Remove ptid_build
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-07-03 Tom Tromey <tom@tromey.com>
2
3 * linux-low.c: Update.
4 * lynx-low.c: Update.
5 * nto-low.c: Update.
6 * remote-utils.c: Update.
7 * spu-low.c: Update.
8 * thread-db.c: Update.
9 * win32-low.c: Update.
10
11 2018-06-29 Joel Brobecker <brobecker@adacore.com>
12
13 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
14 parameter in call to 'amd64_create_target_description'.
15
16 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17
18 * x86-tdesc.h: Remove executable permission flag.
19
20 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
21
22 * configure.ac: Remove AC_PREREQ, add missing quoting.
23 * configure: Re-generate.
24 * config.in: Re-generate.
25 * aclocal.m4: Re-generate.
26
27 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
28
29 * tracepoint.h (current_traceframe): Remove declaration.
30
31 2018-06-18 Alan Hayward <alan.hayward@arm.com>
32
33 * linux-aarch64-low.c (is_sve_tdesc): New function.
34 (aarch64_sve_regs_copy_to_regcache): Likewise.
35 (aarch64_sve_regs_copy_from_regcache): Likewise.
36 (aarch64_regs_info): Add SVE checks.
37 (initialize_low_arch): Initialize SVE.
38
39 2018-06-18 Alan Hayward <alan.hayward@arm.com>
40
41 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
42
43 2018-06-11 Alan Hayward <alan.hayward@arm.com>
44
45 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
46 (initialize_low_tracepoint): Likewise
47 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
48 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
49 param.
50 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
51 checks.
52 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
53
54 2018-06-11 Alan Hayward <alan.hayward@arm.com>
55
56 * server.h (PBUFSIZ): Increase size
57
58 2018-06-11 Alan Hayward <alan.hayward@arm.com>
59
60 * regcache.c (regcache::raw_compare): New function.
61 * regcache.h (regcache::raw_compare): New declaration.
62
63 2018-06-11 Alan Hayward <alan.hayward@arm.com>
64
65 * regcache.c (new_register_cache): Use new.
66 (free_register_cache): Use delete.
67 (register_data): Use const.
68 (supply_register): Move body inside regcache.
69 (regcache::raw_supply): New override function.
70 (collect_register): Move body inside regcache.
71 (regcache::raw_collect): New override function.
72 (regcache::get_register_status): New override function.
73 * regcache.h (struct regcache): Inherit from reg_buffer_common.
74
75 2018-06-09 Tom Tromey <tom@tromey.com>
76
77 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
78 declare queue.
79 (event_queue): Use std::queue.
80 (gdb_event_xfree): Remove.
81 (initialize_event_loop, process_event, wait_for_event): Update.
82
83 2018-06-08 Stan Cox <scox@redhat.com>
84
85 * win32-low.c (win32_create_inferior): last_ptid and last_status
86 moved to client_state.
87
88 2018-06-08 Pedro Alves <palves@redhat.com>
89
90 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
91 common/common-exceptions.o, common/common-utils.o,
92 common/errors.o, common/print-utils.o and utils.o.
93 * gdbreplay.c: Include "common-defs.h" instead of the two
94 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
95 string.h or alloca.h.
96 (perror_with_name): Delete.
97 (remote_open): Use xstrdup instead of strdup.
98 (main): Rename to ...
99 (captured_main): ... this.
100 (main): New.
101
102 2018-06-08 Tom Tromey <tom@tromey.com>
103
104 * linux-low.c (linux_low_read_btrace): Update.
105
106 2018-06-04 Stan Cox <scox@redhat.com>
107
108 * server.h (struct client_state): New.
109 * server.c (cont_thread, general_thread, multi_process)
110 (report_fork_events, report_vfork_events, report_exec_events)
111 (report_thread_events, swbreak_feature, hwbreak_feature)
112 (vCont_supported, disable_randomization, pass_signals)
113 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
114 Moved to client_state.
115 * remote-utils.c (remote_debug, noack_mode)
116 (transport_is_reliable): Moved to client_state.
117 * tracepoint.c (current_traceframe): Moved to client_state.
118
119 Update all callers.
120 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
121 linux-low.c, remote-utils.h, target.c: Use client_state.
122
123 2018-05-31 Alan Hayward <alan.hayward@arm.com>
124
125 * configure.srv: Add new c/h file.
126
127 2018-05-31 Alan Hayward <alan.hayward@arm.com>
128
129 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
130 null VQ.
131
132 2018-05-25 Maciej W. Rozycki <macro@mips.com>
133
134 * gdb.arch/mips-fpregset-core.exp: New test.
135 * gdb.arch/mips-fpregset-core.c: New test source.
136
137 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
138
139 PR server/23198
140 * hostio.c (require_int): Do not report overflow for integers
141 between 0xfffffff and 0x7fffffff.
142
143 2018-05-22 Maciej W. Rozycki <macro@mips.com>
144
145 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
146 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
147 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
148 functions.
149 (the_low_target): Wire them.
150
151 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
152
153 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
154 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
155 mode. Call collect_register_by_name with vscr using
156 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
157 (ppc_store_vrregset): Add and set vscr_offset variable as in
158 ppc_fill_vrregset. Call supply_register_by_name with vscr using
159 vscr_offset.
160
161 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
162
163 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
164 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
165 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
166
167 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
168
169 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
170 (ppc_store_vsxregset): Likewise.
171 (ppc_fill_vrregset): Likewise.
172 (ppc_store_vrregset): Likewise.
173 (ppc_fill_evrregset): Likewise.
174 (ppc_store_evrregset): Likewise.
175 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
176 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
177 needed.
178
179 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
180
181 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
182 wordsize of the inferior. Call ppc_linux_target_wordsize.
183
184 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
185
186 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
187 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
188 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
189 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
190 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
191 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
192 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
193 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
194 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
195 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
196 (tdesc_powerpc_e500l): Remove.
197 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
198 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
199 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
200 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
201 linux-ppc-tdesc.h.
202 (ppc_arch_setup): Remove target description matching code. Fill a
203 ppc_linux_features struct and call ppc_linux_match_description
204 with it.
205
206 2018-05-22 Maciej W. Rozycki <macro@mips.com>
207
208 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
209 width of the requested register exceeds the width of the
210 `ptrace' data type.
211 (mips_cannot_store_register): Likewise.
212
213 2018-05-21 Maciej W. Rozycki <macro@mips.com>
214
215 * linux-mips-low.c (mips_fetch_register): New function. Update
216 preceding comment.
217 (mips_store_gregset): Supply 0 rather than $restart for $zero.
218 (the_low_target): Wire `mips_fetch_register'.
219
220 2018-05-10 Joel Brobecker <brobecker@adacore.com>
221
222 * lynx-i386-low.c (LYNXOS_178): New macro.
223 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
224 the layout on LynxOS-178.
225 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
226 handle floating point registers that are not supported by
227 LynxOS-178.
228
229 2018-05-10 Tom Tromey <tom@tromey.com>
230
231 * configure: Rebuild.
232
233 2018-05-10 Joel Brobecker <brobecker@adacore.com>
234
235 PR server/23158:
236 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
237 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
238 Use it to set the expedite_regs field in the given tdesc.
239 * x86-tdesc.h: New file.
240 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
241 Adjust following the addition of the new expedite_regs parameter
242 to init_target_desc.
243 * linux-tic6x-low.c (tic6x_read_description): Likewise.
244 * linux-x86-tdesc.c: #include "x86-tdesc.h".
245 (i386_linux_read_description, amd64_linux_read_description):
246 Adjust following the addition of the new expedite_regs parameter
247 to init_target_desc.
248 * lynx-i386-low.c: #include "x86-tdesc.h".
249 (lynx_i386_arch_setup): Adjust following the addition of the new
250 expedite_regs parameter to init_target_desc.
251 * nto-x86-low.c: #include "x86-tdesc.h".
252 (nto_x86_arch_setup): Adjust following the addition of the new
253 expedite_regs parameter to init_target_desc.
254 * win32-i386-low.c: #include "x86-tdesc.h".
255 (i386_arch_setup): Adjust following the addition of the new
256 expedite_regs parameter to init_target_desc.
257
258 2018-05-10 Joel Brobecker <brobecker@adacore.com>
259
260 PR server/23158:
261 * win32-low.c (win32_create_inferior): Add call to my_wait
262 setting last_status global.
263
264 2018-05-10 Joel Brobecker <brobecker@adacore.com>
265
266 PR server/23158:
267 * win32-low.c (create_process): Only call gdb_tilde_expand if
268 inferior_cwd is not NULL.
269
270 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
271
272 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
273 registers to the cache if their values have changed.
274 (i387_xsave_to_cache): Provide default values for x87 control
275 registers when these features are available, but disabled.
276 * regcache.c (supply_register_by_name_zeroed): New function.
277 * regcache.h (supply_register_by_name_zeroed): Declare new
278 function.
279
280 2018-05-07 Tom Tromey <tom@tromey.com>
281
282 * configure: Rebuild.
283
284 2018-05-04 Tom Tromey <tom@tromey.com>
285
286 * configure: Rebuild.
287
288 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
289 Pedro Alves <palves@redhat.com>
290
291 * linux-aarch64-low.c (aarch64_stopped_data_address):
292 Likewise.
293
294 2018-04-27 Tom Tromey <tom@tromey.com>
295
296 * configure: Rebuild.
297
298 2018-04-23 Tom Tromey <tom@tromey.com>
299
300 * configure: Rebuild.
301
302 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
303
304 * Makefile.in (depcomp): Add "..".
305 (all_deps_files): New and use it.
306
307 2018-04-18 Alan Hayward <alan.hayward@arm.com>
308
309 * configure.srv (aarch64*-*-linux*): Don't include xml.
310 (i[34567]86-*-cygwin*): Likewise.
311 (i[34567]86-*-linux*): Likewise.
312 (i[34567]86-*-lynxos*): Likewise.
313 (i[34567]86-*-mingw32ce*): Likewise.
314 (i[34567]86-*-mingw*): Likewise.
315 (i[34567]86-*-nto*): Likewise.
316 (tic6x-*-uclinux): Likewise.
317 (x86_64-*-linux*): Likewise.
318 (x86_64-*-mingw*): Likewise.
319 (x86_64-*-cygwin*): Likewise.
320
321 2018-04-18 Alan Hayward <alan.hayward@arm.com>
322
323 * tdesc.c: Remove xml parameter.
324
325 2018-04-18 Alan Hayward <alan.hayward@arm.com>
326
327 * server.c (get_features_xml): Remove cast.
328 * tdesc.c (void target_desc::accept): Fill in function.
329 (tdesc_get_features_xml): Remove old xml creation.
330 (print_xml_feature::visit_pre): Add xml vistor.
331 * tdesc.h (struct target_desc): Make xmltarget mutable.
332 (tdesc_get_features_xml): Remove declaration.
333
334 2018-04-18 Alan Hayward <alan.hayward@arm.com>
335
336 * tdesc.c (tdesc_architecture_name): Add new function.
337 (tdesc_osabi_name): Likewise.
338 (tdesc_get_features_xml): Use new functions.
339
340 2018-04-18 Alan Hayward <alan.hayward@arm.com>
341
342 * tdesc.c (tdesc_create_flags): Remove.
343 (tdesc_add_flag): Likewise.
344 (tdesc_named_type): Likewise.
345 (tdesc_create_union): Likewise.
346 (tdesc_create_struct): Likewise.
347 (tdesc_create_vector): Likewise.
348 (tdesc_add_bitfield): Likewise.
349 (tdesc_add_field): Likewise.
350 (tdesc_set_struct_size): Likewise.
351
352 2018-04-18 Alan Hayward <alan.hayward@arm.com>
353
354 * tdesc.c (~target_desc): Remove implictly deleted items.
355 (init_target_desc): Iterate all features.
356 (tdesc_get_features_xml): Use vector.
357 (tdesc_create_feature): Create feature.
358 * tdesc.h (tdesc_feature) Remove
359 (target_desc): Add features.
360
361 2018-04-18 Alan Hayward <alan.hayward@arm.com>
362
363 * Makefile.in: Add common/tdesc.c
364 * tdesc.c (init_target_desc): init all reg_defs from register
365 vector.
366 (tdesc_create_reg): Create tdesc_reg.
367 * tdesc.h (tdesc_feature): Add register vector.
368
369 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
370
371 * tdesc.h (struct target_desc) <features>: Change type to
372 std::vector<std::string>.
373 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
374 changes.
375 (tdesc_get_features_xml): Likewise.
376 (tdesc_create_feature): Likewise.
377
378 2018-03-26 Alan Hayward <alan.hayward@arm.com>
379
380 * regcache.c (find_register_by_number): Return a ref.
381 (find_regno): Use references.
382 (register_size): Likewise.
383 (register_data): Likewise.
384 * tdesc.c (target_desc::~target_desc): Remove free calls.
385 (target_desc::operator==): Use std::vector compare.
386 (init_target_desc): Use reference.
387 (tdesc_create_reg): Use reg constructors.
388 * tdesc.h (struct target_desc): Replace pointer with object.
389
390 2018-03-23 Alan Hayward <alan.hayward@arm.com>
391
392 * regcache.c (find_register_by_number): Make static.
393 (find_regno): Use find_register_by_number
394 * regcache.h (struct reg): Remove declaration.
395
396 2018-03-23 Alan Hayward <alan.hayward@arm.com>
397
398 * tdesc.c (target_desc::~target_desc): Move to here.
399 (target_desc::operator==): Likewise.
400 * tdesc.h (target_desc::~target_desc): Move from here.
401 (target_desc::operator==): Likewise.
402
403 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
404
405 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
406
407 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
408
409 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
410 S390_TDESC_GS.
411 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
412 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
413 and init_registers_s390_gs_linux64.
414
415 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
416
417 * linux-s390-low.c (s390_fill_gs): Remove function.
418 (s390_fill_gsbc): Remove function.
419 (s390_regsets): Set fill functions for the guarded storage regsets
420 to NULL.
421
422 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
423
424 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
425 the word size. Add comment.
426 (s390_get_wordsize): New function.
427 (s390_arch_setup): No longer select a temporary tdesc to fetch the
428 pswm with it. Instead, use s390_get_wordsize to determine the
429 word size first and derive the correct tdesc from that directly.
430
431 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
432
433 * Makefile.in: Include silent-rules.mk.
434 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
435 (COMPILE): Add ECHO_CXX.
436 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
437 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
438 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
439 (version-generated.c): Add ECHO_GEN.
440 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
441 (IPAGENT_COMPILE): Add ECHO_CXX.
442 (%-generated.c): Add ECHO_REGDAT.
443
444 2018-03-14 Tom Tromey <tom@tromey.com>
445
446 PR cli/14977:
447 * ax.c (ax_printf): Special case for NULL.
448
449 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
450
451 * linux-low.c (linux_qxfer_libraries_svr4): Use
452 xml_escape_text_append.
453
454 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
455
456 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
457
458 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
459
460 * server.c (handle_general_set): Remove unnecessary xstrdup.
461
462 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
463
464 * server.c (parse_debug_format_options): Adjust to
465 delim_string_to_char_ptr_vec changes.
466 * thread-db.c (thread_db_load_search): Adjust to
467 dirnames_to_char_ptr_vec changes.
468
469 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
470
471 * target.h (target_enable_btrace, target_disable_btrace)
472 (target_read_btrace, target_read_btrace_conf): Turn macro into
473 inline function. Throw error if target method is not defined.
474 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
475 check for btrace target method. Be prepared to handle exceptions
476 from btrace target methods.
477
478 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
479
480 * server.c (captured_main): Change order of error message printed
481 when the current working directory cannot be found.
482
483 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
484
485 * server.c: Include "filenames.h" and "pathstuff.h".
486 (program_name): Delete variable.
487 (program_path): New anonymous class.
488 (get_exec_wrapper): Use "program_path" instead of
489 "program_name".
490 (handle_v_run): Likewise.
491 (captured_main): Likewise.
492 (process_serial_event): Likewise.
493
494 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
495
496 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
497 (OBJS): Add "pathstuff.o".
498 * server.c (current_directory): New global variable.
499 (captured_main): Initialize "current_directory".
500
501 2018-02-26 Alan Hayward <alan.hayward@arm.com>
502
503 * tdesc.c: Use common/tdesc.h.
504 * tdesc.h: Likewise.
505
506 2018-02-20 Alan Hayward <alan.hayward@arm.com>
507 Simon Marchi <simon.marchi@ericsson.com>
508
509 * Makefile.in: Switch order of make rules.
510
511 2018-02-19 Alan Hayward <alan.hayward@arm.com>
512
513 * Makefile.in: Add common directory in build.
514 * configure.ac: Add common reference.
515 * configure: Regenerate.
516
517 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
518
519 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
520 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
521 * spu-low.c (spu_target_ops): Likewise.
522 * win32-low.c (win32_target_ops): Likewise.
523 * server.c (supported_btrace_packets): Report packets unconditionally.
524 * target.h (target_ops) <supports_btrace>: Remove.
525 (target_supports_btrace): Remove.
526
527 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
528
529 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
530 (handle_btrace_disable): Change return type to void. Use exceptions
531 to report errors.
532 (handle_btrace_general_set): Catch exception and copy message to
533 return message.
534
535 2018-02-08 Tom Tromey <tom@tromey.com>
536
537 * linux-low.c (install_software_single_step_breakpoints): Use
538 make_scoped_restore.
539 * inferiors.c (make_cleanup_restore_current_thread): Remove.
540 (do_restore_current_thread_cleanup): Remove.
541 * gdbthread.h (make_cleanup_restore_current_thread): Don't
542 declare.
543
544 2018-02-08 Tom Tromey <tom@tromey.com>
545
546 * mem-break.c (set_raw_breakpoint_at): Use
547 gdb::unique_xmalloc_ptr.
548
549 2018-01-30 Pedro Alves <palves@redhat.com>
550
551 PR gdb/13211
552 * target.c (target_terminal::terminal_state): Rename to ...
553 (target_terminal::m_terminal_state): ... this.
554
555 2018-01-19 James Clarke <jrtc27@jrtc27.com>
556
557 * linux-low.c (handle_extended_wait): Surround call to
558 thread_db_notice_clone with #ifdef USE_THREAD_DB.
559
560 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
561
562 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
563 linux_ptrace_attach_fail_reason_string now returning an
564 std::string.
565 (linux_attach): Likewise.
566 * thread-db.c (attach_thread): Likewise.
567
568 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
569
570 PR gdb/21559
571 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
572 checking for fs_base/gs_base fields in struct user_regs_struct.
573 * configure: Regenerate.
574
575 2018-01-16 Yao Qi <yao.qi@linaro.org>
576
577 PR gdb/18749
578 * linux-low.c (fetch_register): Call supply_register instead of
579 error.
580
581 2018-01-08 Yao Qi <yao.qi@linaro.org>
582 Simon Marchi <simon.marchi@ericsson.com>
583
584 * Makefile.in (OBS): Remove selftest.o.
585 * configure.ac: Set srv_selftest_objs if $development is true.
586 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
587 * configure: Re-generated.
588 * server.c (captured_main): Wrap variable selftest_filter with
589 GDB_SELF_TEST.
590
591 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
592
593 * server.c (parse_debug_format_options): Return std::string.
594 (handle_monitor_command, captured_main): Adjust.
595
596 2018-01-05 Pedro Alves <palves@redhat.com>
597
598 PR gdb/18653
599 * server.c (captured_main): Pass quiet=false to
600 save_original_signals_state.
601
602 2018-01-01 Joel Brobecker <brobecker@adacore.com>
603
604 * gdbreplay.c (gdbreplay_version): Update copyright year in
605 version message.
606 * server.c (gdbserver_version): Likewise.
607
608 2017-12-08 Tom Tromey <tom@tromey.com>
609
610 * ax.c (ax_printf): Update.
611
612 2017-12-07 Yao Qi <yao.qi@linaro.org>
613
614 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
615 aarch64_linux_read_description.
616 * linux-amd64-ipa.c (idx2mask): New array.
617 (get_ipa_tdesc): Move idx2mask out.
618 (initialize_low_tracepoint): Initialize target descriptions.
619 * linux-i386-ipa.c (idx2mask): New array.
620 (get_ipa_tdesc): Move idx2mask out.
621 (initialize_low_tracepoint): Initialize target descriptions.
622
623 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
624
625 * tdesc.c (struct tdesc_type): Change return type.
626 (tdesc_add_flag): Change parameter type.
627 (tdesc_add_bitfield): Likewise.
628 (tdesc_add_field): Likewise.
629 (tdesc_set_struct_size): Likewise.
630
631 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
632
633 * regcache.c (registers_to_string): Remove unused variable.
634
635 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
636
637 * inferiors.c (for_each_inferior_with_data): Remove.
638 * inferiors.h (for_each_inferior_with_data): Remove.
639 * server.c (handle_qxfer_threads_worker): Change parameter type.
640 (handle_qxfer_threads_proper): Use for_each_thread.
641
642 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
643
644 * inferiors.c (for_each_inferior): Remove.
645 (clear_inferiors): Use for_each_thread.
646 * inferiors.h (for_each_inferior): Remove.
647 * linux-low.c (linux_wait_for_event_filtered): Use
648 for_each_thread.
649 (linux_stabilize_threads): Likewise.
650 * regcache.c (regcache_release): Likewise.
651 * server.c (gdb_wants_all_threads_stopped): Likewise.
652 (clear_pending_status_callback): Remove.
653 (handle_status): Use for_each_thread.
654 (captured_main): Likewise.
655 * win32-low.c (child_init_thread_list): Likewise.
656 (win32_clear_inferiors): Likewise.
657 (fake_breakpoint_event): Likewise.
658
659 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
660
661 * inferiors.h (find_inferior): Remove.
662 * inferiors.c (find_inferior): Remove.
663
664 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
665
666 * linux-low.c (resume_status_pending_p): Update comment.
667 (need_step_over_p): Update comment.
668
669 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
670
671 * linux-low.c (proceed_one_lwp): Return void, change parameter
672 type.
673 (unsuspend_and_proceed_one_lwp): Likewise.
674 (proceed_all_lwps): Use for_each_thread.
675 (unstop_all_lwps): Likewise.
676
677 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
678
679 * linux-low.c (linux_resume_one_thread): Return void, take
680 parameter directly.
681 (linux_resume): Use for_each_thread.
682
683 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
684
685 * linux-low.c (send_sigstop_callback): Return void, change
686 parameter type. Rename to...
687 (send_sigstop): ... this.
688 (suspend_and_send_sigstop_callback): Return void, change parameter
689 type. Rename to...
690 (suspend_and_send_sigstop): ... this.
691 (stop_all_lwps): Use for_each_thread.
692
693 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
694
695 * linux-low.c (lwp_running): Return bool, remove unused
696 argument.
697 (linux_stabilize_threads): Use find_thread.
698
699 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
700
701 * linux-low.c (select_singlestep_lwp_callback): Remove.
702 (count_events_callback): Remove.
703 (select_event_lwp_callback): Remove.
704 (select_event_lwp): Use find_thread/for_each_thread.
705
706 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
707
708 * linux-low.c (not_stopped_callback): Return bool, take filter
709 argument directly.
710 (linux_wait_for_event_filtered): Use find_thread.
711 (linux_wait_1): Likewise.
712
713 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
714
715 * linux-low.c (same_lwp): Remove.
716 (find_lwp_pid): Use find_thread.
717
718 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
719
720 * linux-low.c (delete_lwp_callback): Remove.
721 (linux_mourn): Use for_each_thread.
722
723 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
724
725 * linux-low.c (linux_detach_lwp_callback): Return void, remove
726 args parameter, don't check for pid.
727 (linux_detach): Use for_each_thread.
728
729 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
730
731 * linux-low.c (struct counter): Remove.
732 (second_thread_of_pid_p): Remove.
733 (last_thread_of_process_p): Use find_thread.
734
735 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
736
737 * inferiors.c (find_inferior_in_random): Remove.
738 * inferiors.h (find_inferior_in_random): Remove.
739 * linux-low.c (status_pending_p_callback): Return bool, accept
740 parameter ptid directly.
741 (linux_wait_for_event_filtered): Use find_thread_in_random.
742 (linux_wait_1): Likewise.
743
744 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
745
746 * inferiors.c (find_inferior_id): Remove.
747 (find_thread_ptid): Move implemention from find_inferior_id to
748 here.
749 * inferiors.h (find_inferior_id): Remove.
750 * server.c (handle_status): Use find_thread_ptid.
751 (process_serial_event): Likewise.
752 * thread-db.c (find_one_thread): Likewise.
753 (thread_db_thread_handle): Likewise.
754 * win32-low.c (thread_rec): Likewise.
755 (child_delete_thread): Likewise.
756 (win32_thread_alive): Likewise.
757 (get_child_debug_event): Likewise.
758
759 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
760
761 * linux-mips-low.c (update_watch_registers_callback): Return
762 void, remove pid_p parameter, don't check for pid.
763 (mips_insert_point, mips_remove_point): Use for_each_thread.
764
765 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
766
767 * lynx.low (lynx_delete_thread_callback): Remove.
768 (lynx_mourn): Use for_each_thread.
769
770 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
771
772 * regcache.c (regcache_invalidate_one): Remove.
773 (regcache_invalidate_pid): use for_each_thread.
774
775 2017-11-26 Tom Tromey <tom@tromey.com>
776
777 * linux-low.c (linux_create_inferior): Update.
778
779 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
780
781 * spu-low.c (spu_create_inferior): Fix typo in argument name.
782
783 2017-11-24 Alan Hayward <alan.hayward@arm.com>
784
785 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
786 * linux-aarch64-low.c (initialize_low_arch): Call init func.
787 * linux-aarch64-tdesc-selftest.c: New file.
788 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
789
790 2017-11-24 Alan Hayward <alan.hayward@arm.com>
791
792 * configure.srv: Add new file.
793 * linux-aarch64-low.c (initialize_low_arch): Call init func.
794 * linux-aarch64-tdesc-selftest.c: New file.
795 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
796
797 2017-11-24 Alan Hayward <alan.hayward@arm.com>
798
799 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
800 * linux-aarch64-low.c (initialize_low_arch): Remove init.
801 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
802
803 2017-11-24 Alan Hayward <alan.hayward@arm.com>
804
805 * configure.srv: Add new files.
806 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
807 aarch64_linux_read_description.
808 * linux-aarch64-low.c (aarch64_linux_read_description):
809 Merge with aarch64_arch_setup.
810 (aarch64_arch_setup): Call aarch64_linux_read_description.
811 * linux-aarch64-tdesc.c: New file.
812 * linux-aarch64-tdesc.h: New file.
813
814 2017-11-24 Yao Qi <yao.qi@linaro.org>
815
816 * configure.srv: Set $srv_regobj for tic6x-linux.
817 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
818 (tic6x_read_description): Move some code to tic6x_arch_setup.
819 (tic6x_tdesc_test): New function.
820 (initialize_low_arch): Call selftests::register_test.
821
822 2017-11-22 Yao Qi <yao.qi@linaro.org>
823
824 * remote-utils.c (prepare_resume_reply): Use memcpy.
825
826 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
827
828 * linux-low.c (kill_one_lwp_callback): Return void, take
829 argument directly, don't filter on pid.
830 (linux_kill): Use for_each_thread.
831
832 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
833
834 * linux-low.c (need_step_over_p): Return bool, remove dummy
835 argument.
836 (linux_resume, proceed_all_lwps): Use find_thread.
837
838 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
839
840 * linux-low.c (resume_status_pending_p): Return bool, remove
841 flag_p argument.
842 (linux_resume): Use find_thread.
843
844 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
845
846 * linux-low.c (struct thread_resume_array): Remove.
847 (linux_set_resume_request): Return void, take arguments
848 directly.
849 (linux_resume): Use for_each_thread.
850
851 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
852
853 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
854 return bool, remove data argument.
855 (linux_stabilize_threads): Use find_thread.
856
857 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
858
859 * linux-low.c (unsuspend_one_lwp): Remove.
860 (unsuspend_all_lwps): Use for_each_thread, inline code from
861 unsuspend_one_lwp.
862
863 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
864
865 * gdbthread.h (find_thread): Add overload with ptid_t filter.
866 * linux-low.c (struct iterate_over_lwps_args): Remove.
867 (iterate_over_lwps_filter): Remove.
868 (iterate_over_lwps): Use find_thread.
869
870 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
871
872 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
873 (linux_handle_new_gdb_connection): Use for_each_thread, inline
874 code from reset_lwp_ptrace_options_callback.
875
876 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
877
878 * linux-arm-low.c (struct update_registers_data): Remove.
879 (update_registers_callback): Return void, take arguments
880 directly, don't check thread's pid.
881 (arm_insert_point, arm_remove_point): Use for_each_thread.
882
883 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
884
885 * win32-low.c (continue_one_thread): Return void, take argument
886 directly.
887 (child_continue): Use for_each_thread.
888
889 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
890
891 * win32-i386-low.c (update_debug_registers_callback): Rename
892 to ...
893 (update_debug_registers): ... this, return void, remove pid_p arg.
894 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
895
896 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
897
898 * inferiors.h (struct process_info): Add constructor, initialize
899 fields..
900 <syscalls_to_catch>: Change type to std::vector<int>.
901 * inferiors.c (add_process): Allocate process_info with new.
902 (remove_process): Free process_info with delete.
903 * linux-low.c (handle_extended_wait): Adjust.
904 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
905 * server.c (handle_general_set): Adjust.
906
907 2017-11-16 Pedro Alves <palves@redhat.com>
908
909 * remote-utils.c (remote_close): Block SIGIO signals instead of
910 uninstalling the SIGIO handler.
911
912 2017-11-16 Alan Hayward <alan.hayward@arm.com>
913
914 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
915
916 2017-11-16 Yao Qi <yao.qi@linaro.org>
917
918 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
919 (tic6x_store_gregset): Likewise.
920 (tic6x_usrregs_info): Move it up.
921
922 2017-11-15 Alan Hayward <alan.hayward@arm.com>
923
924 * Makefile.in: Update arch rules.
925 * configure.srv: Explicitly mark arch/ files.
926
927 2017-11-13 Andreas Schwab <schwab@suse.de>
928
929 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
930 function.
931 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
932
933 2017-11-06 Pedro Alves <palves@redhat.com>
934
935 * config.in, configure: Regenerate.
936
937 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
938
939 * target.c (struct thread_search): Remove.
940 (thread_search_callback): Remove.
941 (prepare_to_access_memory): Use for_each_thread instead of
942 find_inferior. Inline code from thread_search_callback.
943
944 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
945
946 * server.c (struct visit_actioned_threads_data): Remove.
947 (visit_actioned_threads): Change prototype to take arguments
948 directly.
949 (resume): Use find_thread instead of find_inferior.
950
951 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
952
953 * server.c (queue_stop_reply_callback): Change prototype, return
954 void.
955 (find_status_pending_thread_callback): Remove.
956 (handle_status): Replace find_inferior with find_thread and
957 for_each_thread.
958
959 2017-10-25 Alan Hayward <alan.hayward@arm.com>
960
961 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
962 with REGNO.
963 (aarch64_store_gregset): Likewise.
964 (aarch64_fill_fpregset): Likewise.
965 (aarch64_store_fpregset): Likewise.
966
967 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
968
969 * gdbthread.h (find_thread, for_each_thread): New functions.
970 * inferiors.c (thread_of_pid): Remove.
971 (find_any_thread_of_pid): Use find_thread.
972 * linux-low.c (num_lwps): Use for_each_thread.
973
974 2017-10-17 Yao Qi <yao.qi@linaro.org>
975
976 * Makefile.in: Remove one rule.
977 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
978
979 2017-10-17 Yao Qi <yao.qi@linaro.org>
980
981 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
982 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
983
984 2017-10-17 Yao Qi <yao.qi@linaro.org>
985
986 * configure.srv: Rename arm.o with arch/arm.o.
987
988 2017-10-17 Yao Qi <yao.qi@linaro.org>
989
990 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
991 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
992 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
993 (arch-i386.o, arch-amd64.o): Remove rules.
994 (arch/%.o): New rule.
995 Update POSTCOMPILE and COMPILE.pre.
996 * configure.ac: Invoke AC_CONFIG_COMMANDS.
997 * configure: Re-generated.
998 * configure.srv: Replace arch-i386.o with arch/i386.o.
999 Replace arch-amd64.o with arch/amd64.o.
1000
1001 2017-10-16 Yao Qi <yao.qi@linaro.org>
1002
1003 * configure: Regenerated.
1004
1005 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1006
1007 * inferiors.h: (struct inferior_list): Remove.
1008 (struct inferior_list_entry); Remove.
1009 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1010 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1011 get_first_inferior): Remove.
1012 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1013 find_inferior_id, find_inferior_in_random): Change signature.
1014 * inferiors.c (all_threads): Change type to
1015 std::list<thread_info *>.
1016 (get_thread): Remove macro.
1017 (find_inferior, find_inferior_id): Change signature, implement
1018 using find_thread.
1019 (find_inferior_in_random): Change signature, implement using
1020 find_thread_in_random.
1021 (for_each_inferior, for_each_inferior_with_data): Change
1022 signature, implement using for_each_thread.
1023 (add_inferior_to_list, remove_inferior): Remove.
1024 (add_thread, get_first_thread, thread_of_pid,
1025 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1026 (get_first_inferior, one_inferior_p, clear_inferior_list):
1027 Remove.
1028 (clear_inferiors, get_thread_process): Update.
1029 * gdbthread.h: Include <list>.
1030 (struct thread_info) <entry>: Remove field.
1031 <id>: New field.
1032 (all_threads): Change type to std::list<thread_info *>.
1033 (get_first_inferior): Add doc.
1034 (find_thread, for_each_thread, find_thread_in_random): New
1035 functions.
1036 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1037 * linux-arm-low.c (update_registers_callback): Update.
1038 * linux-low.c (second_thread_of_pid_p): Update.
1039 (kill_one_lwp_callback, linux_detach_lwp_callback,
1040 delete_lwp_callback, status_pending_p_callback, same_lwp,
1041 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1042 iterate_over_lwps, not_stopped_callback,
1043 resume_stopped_resumed_lwps, count_events_callback,
1044 select_singlestep_lwp_callback, select_event_lwp_callback,
1045 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1046 suspend_and_send_sigstop_callback, wait_for_sigstop,
1047 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1048 lwp_running, linux_set_resume_request, resume_status_pending_p,
1049 need_step_over_p, start_step_over, linux_resume_one_thread,
1050 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1051 reset_lwp_ptrace_options_callback): Update.
1052 * linux-mips-low.c (update_watch_registers_callback): Update.
1053 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1054 Update.
1055 (free_register_cache_thread_one): Remove.
1056 (regcache_release): Update.
1057 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1058 handle_qxfer_threads_worker): Update.
1059 (handle_query): Update, use list iterator.
1060 (visit_actioned_threads, handle_pending_status,
1061 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1062 clear_pending_status_callback, set_pending_status_callback,
1063 find_status_pending_thread_callback, handle_status,
1064 process_serial_event): Update.
1065 * target.c (thread_search_callback): Update.
1066 * thread-db.c (thread_db_get_tls_address): Update.
1067 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1068 Update.
1069 * win32-i386-low.c (update_debug_registers_callback): Update.
1070 * win32-low.c (delete_thread_info, child_delete_thread,
1071 continue_one_thread, suspend_one_thread,
1072 get_child_debug_event): Adjust.
1073
1074 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1075
1076 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1077 * inferiors.h: Include <list>.
1078 (struct process_info) <entry>: Remove field.
1079 <pid>: New field.
1080 (pid_of): Change macro to function.
1081 (ptid_of, lwpid_of): Remove macro.
1082 (all_processes): Change type to std::list<process_info *>.
1083 (ALL_PROCESSES): Remove macro.
1084 (for_each_process, find_process): New function.
1085 * inferiors.c (all_processes): Change type to
1086 std::list<process_info *>.
1087 (find_thread_process): Adjust.
1088 (add_process): Likewise.
1089 (remove_process): Likewise.
1090 (find_process_pid): Likewise.
1091 (get_first_process): Likewise.
1092 (started_inferior_callback): Remove.
1093 (have_started_inferiors_p): Adjust.
1094 (attached_inferior_callback): Remove.
1095 (have_attached_inferiors_p): Adjust.
1096 * linux-low.c (check_zombie_leaders): Likewise.
1097 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1098 (x86_linux_update_xmltarget): Adjust.
1099 * server.c (handle_query): Likewise.
1100 (gdb_reattached_process): Remove.
1101 (handle_status): Adjust.
1102 (kill_inferior_callback): Likewise.
1103 (detach_or_kill_inferior): Remove.
1104 (print_started_pid): Likewise.
1105 (print_attached_pid): Likewise.
1106 (detach_or_kill_for_exit): Update.
1107 (process_serial_event): Likewise.
1108 * linux-arm-low.c (arm_new_fork): Likewise.
1109
1110 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1111
1112 * dll.h: Include <list>.
1113 (struct dll_info): Add constructor.
1114 <entry>: Remove field.
1115 (all_dlls): Change type to std::list<dll_info>.
1116 * dll.c: Include <algorithm>.
1117 (get_dll): Remove macro.
1118 (all_dlls): Change type to std::list<dll_info *>.
1119 (free_one_dll): Remove.
1120 (match_dll): Likewise.
1121 (loaded_dll): Adjust.
1122 (unloaded_dll): Adjust to all_dlls type change, use
1123 std::find_if. Inline code from match_dll.
1124 (clear_dlls): Adjust to all_dlls type change.
1125 * server.c (emit_dll_description): Remove.
1126 (handle_qxfer_libraries): Adjust to all_dlls type change,
1127 integrate emit_dll_description's functionality.
1128
1129 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1130
1131 * linux-low.h (struct linux_target_ops) <delete_process>: New
1132 field.
1133 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1134 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1135 (struct linux_target_ops): Add delete_process callback.
1136 * linux-arm-low.c (arm_delete_process): New.
1137 (struct linux_target_ops): Add delete_process callback.
1138 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1139 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1140 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1141 * linux-mips-low.c (mips_linux_delete_process): New.
1142 (struct linux_target_ops): Add delete_process callback.
1143 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1144 * linux-s390-low.c (struct linux_target_ops): Likewise.
1145 * linux-sh-low.c (struct linux_target_ops): Likewise.
1146 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1147 * linux-tile-low.c (struct linux_target_ops): Likewise.
1148 * linux-x86-low.c (x86_linux_delete_process): New.
1149 (struct linux_target_ops): Add delete_process callback.
1150 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1151
1152 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1153
1154 * linux-aarch64-low.c (the_low_target): Add thread delete
1155 callback.
1156 * linux-arm-low.c (arm_delete_thread): New function.
1157 (the_low_target): Add thread delete callback.
1158 * linux-bfin-low.c (the_low_target): Likewise.
1159 * linux-crisv32-low.c (the_low_target): Likewise.
1160 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1161 set.
1162 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1163 field.
1164 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1165 * linux-mips-low.c (mips_linux_delete_thread): New function.
1166 (the_low_target): Add thread delete callback.
1167 * linux-ppc-low.c (the_low_target): Likewise.
1168 * linux-s390-low.c (the_low_target): Likewise.
1169 * linux-sh-low.c (the_low_target): Likewise.
1170 * linux-tic6x-low.c (the_low_target): Likewise.
1171 * linux-tile-low.c (the_low_target): Likewise.
1172 * linux-x86-low.c (the_low_target): Likewise.
1173 * linux-xtensa-low.c (the_low_target): Likewise.
1174
1175 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1176
1177 * win32-low.c: Include "common-inferior.h".
1178
1179 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1180
1181 * inferiors.c (set_inferior_cwd): New function.
1182 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1183 (handle_query): Inform that QSetWorkingDir is supported.
1184 * win32-low.c (create_process): Pass the inferior's cwd to
1185 CreateProcess.
1186
1187 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1188
1189 * inferiors.c (current_inferior_cwd): New global variable.
1190 (get_inferior_cwd): New function.
1191 * inferiors.h (struct process_info) <cwd>: New field.
1192
1193 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1194
1195 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1196 (OBS): Add gdb_tilde_expand.o.
1197
1198 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1199
1200 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1201 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1202
1203 2017-09-29 Pedro Alves <palves@redhat.com>
1204
1205 * ax.c (gdb_parse_agent_expr): Constify.
1206 * ax.h (gdb_parse_agent_expr): Constify.
1207 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1208 Constify.
1209 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1210 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1211 * remote-utils.h (read_ptid): Constify.
1212 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1213 (process_point_options, process_serial_event): Constify.
1214 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1215 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1216 (cmd_qtbuffer): Constify.
1217
1218 2017-09-29 Pedro Alves <palves@redhat.com>
1219
1220 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1221 fails.
1222
1223 2017-09-29 Pedro Alves <palves@redhat.com>
1224
1225 * linux-low.c (handle_extended_wait): Pass parent thread instead
1226 of process to thread_db_notice_clone.
1227 * linux-low.h (thread_db_notice_clone): Replace parent process
1228 parameter with parent thread parameter.
1229 * thread-db.c (find_one_thread): Add comment.
1230 (thread_db_notice_clone): Replace parent process parameter with
1231 parent thread parameter. Temporarily switch to the parent thread.
1232
1233 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1234
1235 * gdbthread.h: Include "common-gdbthread.h".
1236 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1237 "if" when validating the ptid.
1238 * remote-utils.c: Include "gdbthread.h".
1239 (prepare_resume_reply): Use "switch_to_thread".
1240 * target.c (done_accessing_memory): Likewise.
1241
1242 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1243
1244 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1245 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1246 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1247 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1248 s390x-gs-linux64-ipa.o to ipa_obj.
1249 * linux-s390-low.c (HWCAP_S390_GS): New define.
1250 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1251 New functions.
1252 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1253 (s390_arch_setup): Check for guarded-storage support and choose
1254 appropriate tdesc.
1255 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1256 init_registers_s390x_gs_linux64.
1257 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1258 enum value.
1259 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1260 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1261
1262 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1263
1264 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1265
1266 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1267
1268 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1269 (thread_db_thread_handle): Declare.
1270 * linux-low.c (linux_target_ops): Initialize thread_handle.
1271 * server.c (handle_qxfer_threads_worker): Add support for
1272 "handle" attribute.
1273 * target.h (struct target_ops): Add new function pointer,
1274 thread_handle.
1275 (target_thread_handle): Define.
1276 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1277 field in lwp.
1278 (thread_db_thread_handle): New function.
1279
1280 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1281
1282 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1283 * linux-low.h (thread_db_notice_clone): Declare.
1284 * thread-db.c (thread_db_notice_clone): New function.
1285
1286 2017-09-21 Pedro Alves <palves@redhat.com>
1287
1288 * server.c (gdb_read_memory, handle_status, process_serial_event)
1289 (handle_serial_event, handle_target_event): Adjust to
1290 set_desired_thread prototype change.
1291 * target.c (set_desired_thread): Remove 'use_general' parameter
1292 and adjust.
1293 * target.h (set_desired_thread): Remove 'use_general' parameter.
1294
1295 2017-09-20 Tom Tromey <tom@tromey.com>
1296
1297 * target.c (target_terminal::terminal_state): Define.
1298 (target_terminal::init): Rename from target_terminal_init.
1299 (target_terminal::inferior): Rename from
1300 target_terminal_inferior.
1301 (target_terminal::ours): Rename from target_terminal_ours.
1302 (target_terminal::ours_for_output, target_terminal::info): New.
1303
1304 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1305
1306 * server.c (accumulate_file_name_length): Remove.
1307 (emit_dll_description): Adjust to std::string change.
1308 (handle_qxfer_libraries): Use std::string to hold document.
1309
1310 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1311
1312 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1313 return type of xml_escape_text.
1314 * server.c (emit_dll_description): Likewise.
1315
1316 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1317
1318 * server.c (captured_main): Accept argument for --selftest.
1319 Update run_tests call.
1320 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1321 when registering selftests.
1322
1323 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1324
1325 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1326 instead of "VEC" for "target_desc.reg_defs".
1327 (regcache_cpy): Likewise.
1328 (registers_to_string): Likewise.
1329 (registers_from_string): Likewise.
1330 (find_regno): Likewise.
1331 (supply_regblock): Likewise.
1332 (regcache_raw_read_unsigned): Likewise.
1333 * tdesc.c (init_target_desc): Likewise.
1334 (tdesc_create_reg): Likewise.
1335 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1336 (struct target_desc) <reg_defs>: Convert to "std::vector".
1337 (target_desc): Do not initialize "reg_defs".
1338 (~target_desc): Update code to use "std::vector" instead of "VEC"
1339 for "target_desc.reg_defs".
1340 (operator==): Likewise.
1341
1342 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1343
1344 * inferiors.h (thread_to_gdb_id): Remove.
1345 * inferiors.c (thread_to_gdb_id): Remove.
1346 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1347 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1348 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1349 Likewise.
1350 * nto-low.c (nto_fetch_registers, nto_store_registers,
1351 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1352
1353 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1354
1355 * inferiors.h (gdb_id_to_thread_id): Remove.
1356 * inferiors.c (gdb_id_to_thread_id): Remove.
1357 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1358 removal. Move pid declaration closer to where it's used.
1359
1360 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1361
1362 * server.c (handle_detach): New function.
1363 (process_serial_event): Move code out, call handle_detach.
1364
1365 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1366
1367 * server.c (require_running): Rename to ...
1368 (require_running_or_return): ... this ...
1369 (require_running_or_break): ... and this.
1370 (handle_query, process_serial_event): Adjust.
1371
1372 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1373
1374 * linux-low.c (linux_set_resume_request): Remove unused
1375 variables.
1376
1377 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1378
1379 * server.c (first_thread_of): Remove.
1380 (process_serial_event): Replace usage of first_thread_of with
1381 find_any_thread_of_pid.
1382 * tracepoint.c (same_process_p): Remove.
1383 (gdb_agent_about_to_close): Replace usage of same_process_p with
1384 find_any_thread_of_pid.
1385 * linux-x86-low.c (same_process_callback): Remove.
1386 (x86_arch_setup_process_callback): Replace usage of
1387 same_process_callback with find_any_thread_of_pid.
1388 * thread-db.c (any_thread_of): Remove.
1389 (switch_to_process): Replace usage of any_thread_of with
1390 find_any_thread_of_pid.
1391 * inferiors.c (thread_pid_matches_callback): Remove.
1392 (find_thread_process): Adjust to use find_any_thread_of_pid.
1393
1394 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1395
1396 * regcache.c (get_thread_regcache): Guard calls to "memset"
1397 with "!VEC_empty".
1398
1399 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1400
1401 * linux-low.c (handle_extended_wait): Use
1402 "allocate_target_description" instead of "XNEW".
1403 * linux-x86-low.c (initialize_low_arch): Likewise.
1404
1405 2017-09-05 Yao Qi <yao.qi@linaro.org>
1406
1407 * configure.srv (srv_i386_regobj): Remove.
1408 (srv_amd64_regobj): Remove.
1409 (srv_regobj): Set it to "" for x86 non-linux targets.
1410 * linux-x86-tdesc.c (i386_linux_read_description):
1411 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1412 (init_registers_i386): Remove the declaration.
1413 (tdesc_i386): Remove the declaration.
1414 (lynx_i386_arch_setup): Call i386_create_target_description.
1415 * nto-x86-low.c: Likewise.
1416 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1417 [!__x86_64__]: include arch/i386.h.
1418 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1419
1420 2017-09-05 Yao Qi <yao.qi@linaro.org>
1421
1422 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1423 i386/amd64-XXX-linux from it.
1424
1425 2017-09-05 Yao Qi <yao.qi@linaro.org>
1426
1427 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1428 false.
1429 (ipa_amd64_linux_regobj): Remove.
1430 (ipa_x32_linux_regobj): Remove.
1431
1432 2017-09-05 Yao Qi <yao.qi@linaro.org>
1433
1434 * Makefile.in (arch-amd64.o): New rule.
1435 * configure.srv: Append arch-amd64.o.
1436 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1437 (get_ipa_tdesc): Call amd64_linux_read_description.
1438 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1439 and init_registers_amd64_XXX.
1440 * linux-x86-low.c (x86_linux_read_description): Call
1441 amd64_linux_read_description.
1442 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1443 (initialize_low_arch): Don't call init_registers_x32_XXX and
1444 init_registers_amd64_XXX.
1445 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1446 and tdesc_amd64_XXX.
1447 [__x86_64__] (amd64_tdesc_test): New function.
1448 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1449 and init_registers_amd64_XXX.
1450 * linux-x86-tdesc.c: Include arch/amd64.h.
1451 (xcr0_to_tdesc_idx): New function.
1452 (i386_linux_read_description): New function.
1453 (amd64_get_ipa_tdesc_idx): New function.
1454 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1455 (amd64_get_ipa_tdesc): Declare.
1456
1457 2017-09-05 Yao Qi <yao.qi@linaro.org>
1458
1459 * configure.srv (srv_i386_linux_xmlfiles): Remove
1460 i386/i386-XXX-linux.xml from it.
1461
1462 2017-09-05 Yao Qi <yao.qi@linaro.org>
1463
1464 * configure.srv: Set srv_i386_linux_regobj empty if $development
1465 is false.
1466 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1467 initialize_low_tdesc.
1468 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1469 with #if initialize_low_tdesc.
1470 * linux-x86-tdesc-selftest.c: New file.
1471 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1472
1473 2017-09-05 Yao Qi <yao.qi@linaro.org>
1474
1475 * Makefile.in (arch-i386.o): New rule.
1476 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1477 (x86_64-*-linux*): Likewise.
1478 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1479 include arch/i386.h.
1480 (i386_linux_read_description): Remove code and call
1481 i386_create_target_description.
1482 * tdesc.c (allocate_target_description): New function.
1483 * tdesc.h (set_tdesc_architecture): Remove declaration.
1484 (set_tdesc_osabi): Likewise.
1485
1486 2017-09-05 Yao Qi <yao.qi@linaro.org>
1487
1488 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1489 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1490 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1491 .xmltarget.
1492 * server.c (get_features_xml): Call tdesc_get_features_xml.
1493 * tdesc.c (set_tdesc_architecture): New function.
1494 (set_tdesc_osabi): New function.
1495 (tdesc_get_features_xml): New function.
1496 (tdesc_create_feature): Add an argument.
1497 * tdesc.h (struct target_desc) <features>: New field.
1498 <arch, osabi>: New field.
1499 (~target_desc): xfree features, arch, and osabi.
1500 (target_desc::oerator==): Don't compare .xmltarget.
1501 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1502 (set_tdesc_osabi): Likewise.
1503 (tdesc_get_features_xml): Likewise.
1504
1505 2017-09-05 Yao Qi <yao.qi@linaro.org>
1506
1507 * linux-x86-tdesc.c: Include selftest.h.
1508 (i386_tdesc_test): New function.
1509 (initialize_low_tdesc): Call selftests::register_test.
1510 * tdesc.h: Include regdef.h.
1511 (target_desc): Override operator == and !=.
1512
1513 2017-09-05 Yao Qi <yao.qi@linaro.org>
1514
1515 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1516 (ipa_obj): Likewise.
1517 * linux-i386-ipa.c: Include common/x86-xstate.h
1518 (get_ipa_tdesc): Call i386_linux_read_description.
1519 (initialize_low_tracepoint): Don't call init_registers_XXX
1520 functions, call initialize_low_tdesc instead.
1521 * linux-x86-low.c (x86_linux_read_description): Call
1522 i386_linux_read_description.
1523 (initialize_low_arch): Don't call init_registers_i386_XXX
1524 functions, call initialize_low_tdesc.
1525 * linux-x86-tdesc.c: New file.
1526 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1527 (i386_get_ipa_tdesc_idx): Declare.
1528 (i386_get_ipa_tdesc): Declare.
1529 (initialize_low_tdesc): Declare.
1530
1531 2017-09-05 Yao Qi <yao.qi@linaro.org>
1532
1533 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1534 instead of 0.
1535
1536 2017-09-05 Yao Qi <yao.qi@linaro.org>
1537
1538 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1539 * regcache.c (get_thread_regcache): Use VEC_length.
1540 (init_register_cache): Likewise.
1541 (regcache_cpy): Likewise.
1542 (registers_to_string): Iterate reg_defs via VEC_iterate.
1543 (find_regno): Likewise.
1544 (find_register_by_number): Use VEC_index.
1545 (register_size): Call find_register_by_number.
1546 (register_data): Call find_register_by_number.
1547 (supply_regblock): Use VEC_length.
1548 (regcache_raw_read_unsigned): Likewise.
1549 * tdesc.c (init_target_desc): Iterate reg_defs via
1550 VEC_iterate.
1551 (default_description): Update initializer.
1552 (copy_target_description): Don't update field num_registers.
1553 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1554 <num_registers>: Remove.
1555
1556 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1557
1558 * Makefile.in (.SECONDARY): Define target.
1559
1560 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1561
1562 * linux-low.c (linux_wait_1): Adjust.
1563 * server.c (queue_stop_reply_callback): Adjust.
1564
1565 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1566
1567 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1568 QEnvironmentUnset and QEnvironmentReset packets.
1569 (handle_query): Inform remote that QEnvironmentHexEncoded,
1570 QEnvironmentUnset and QEnvironmentReset are supported.
1571
1572 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1573
1574 * inferiors.h (inferior_target_data): Rename to ...
1575 (thread_target_data): ... this.
1576 (inferior_regcache_data): Rename to ...
1577 (thread_regcache_data): ... this.
1578 (set_inferior_regcache_data): Rename to ...
1579 (set_thread_regcache_data): ... this.
1580 * inferiors.c (inferior_target_data): Rename to ...
1581 (thread_target_data): ... this.
1582 (inferior_regcache_data): Rename to ...
1583 (thread_regcache_data): ... this.
1584 (set_inferior_regcache_data): Rename to ...
1585 (set_thread_regcache_data): ... this.
1586 (free_one_thread): Update.
1587 * linux-low.h (get_thread_lwp): Update.
1588 * regcache.c (get_thread_regcache): Update.
1589 (regcache_invalidate_thread): Update.
1590 (free_register_cache_thread): Update.
1591 * win32-i386-low.c (update_debug_registers_callback): Update.
1592 (win32_get_current_dr): Update.
1593 * win32-low.c (thread_rec): Update.
1594 (delete_thread_info): Update.
1595 (continue_one_thread): Update.
1596 (suspend_one_thread): Update.
1597
1598 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1599
1600 * inferiors.c (set_inferior_target_data): Remove.
1601 * inferiors.h (set_inferior_target_data): Remove.
1602
1603 2017-08-18 Yao Qi <yao.qi@linaro.org>
1604
1605 * Makefile.in (OBS): Add selftest.o.
1606 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1607 * configure, config.in: Re-generated.
1608 * server.c: Include common/sefltest.h.
1609 (captured_main): Handle option --selftest.
1610
1611 2017-08-09 Yao Qi <yao.qi@linaro.org>
1612
1613 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1614 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1615 i386-avx-mpx.o and i386-mmx.o.
1616 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1617 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1618 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1619 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1620 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1621 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1622 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1623 i386/amd64-avx-mpx.xml.
1624
1625 2017-08-09 Yao Qi <yao.qi@linaro.org>
1626
1627 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1628 and x32-avx-avx512.o.
1629 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1630 i386/x32-avx-avx512.xml.
1631
1632 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1633
1634 * tracepoint.h (enum class fast_tpoint_collect_result): New
1635 enumeration.
1636 (fast_tracepoint_collecting): Change return type to
1637 fast_tpoint_collect_result.
1638 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1639 * linux-low.h: Include tracepoint.h.
1640 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1641 fast_tpoint_collect_result.
1642 * linux-low.c (handle_tracepoints): Adjust.
1643 (linux_fast_tracepoint_collecting): Change return type to
1644 fast_tpoint_collect_result.
1645 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1646 linux_wait_1, stuck_in_jump_pad_callback,
1647 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1648 proceed_one_lwp): Adjust to type change.
1649
1650 2017-07-10 Yao Qi <yao.qi@linaro.org>
1651
1652 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1653
1654 2017-06-29 Yao Qi <yao.qi@linaro.org>
1655
1656 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1657 Remove.
1658 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1659
1660 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1661
1662 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1663
1664 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1665
1666 * linux-low.c (linux_create_inferior): Adjust code to access the
1667 environment information via 'gdb_environ' class.
1668 * lynx-low.c (lynx_create_inferior): Likewise.
1669 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1670 (get_environ): Return a pointer to 'our_environ'.
1671 (captured_main): Initialize 'our_environ'.
1672 * server.h (get_environ): Adjust prototype.
1673 * spu-low.c (spu_create_inferior): Adjust code to access the
1674 environment information via 'gdb_environ' class.
1675
1676 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1677
1678 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1679 usage of "register" keyword.
1680
1681 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1682
1683 * configure: Re-generate.
1684
1685 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1686
1687 * configure: Re-generate.
1688
1689 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1690
1691 * Makefile.in (COMPILE.pre): Add "-x c++".
1692
1693 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1694
1695 * fork-child.c: Conditionally include <signal.h>.
1696
1697 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1698
1699 * server.c (handle_general_set): Handle new packet
1700 "QStartupWithShell".
1701 (handle_query): Add "QStartupWithShell" to the list of supported
1702 packets.
1703 (gdbserver_usage): Add help text explaining the
1704 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1705 options.
1706 (captured_main): Recognize and act upon the presence of the new
1707 CLI options.
1708
1709 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1710 Pedro Alves <palves@redhat.com>
1711
1712 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1713 * configure: Regenerate.
1714 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1715 "fork-inferior.o".
1716 (i[34567]86-*-lynxos*): Likewise.
1717 (spu*-*-*): Likewise.
1718 * fork-child.c: New file.
1719 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1720 and "environ.h".
1721 (linux_ptrace_fun): New function.
1722 (linux_create_inferior): Adjust function prototype to reflect
1723 change on "target.h". Adjust function code to use
1724 "fork_inferior".
1725 (linux_request_interrupt): Delete "signal_pid".
1726 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1727 (lynx_ptrace_fun): New function.
1728 (lynx_create_inferior): Adjust function prototype to reflect
1729 change on "target.h". Adjust function code to use
1730 "fork_inferior".
1731 * nto-low.c (nto_create_inferior): Adjust function prototype and
1732 code to reflect change on "target.h". Update comments.
1733 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1734 "common-terminal.h" and "environ.h".
1735 (terminal_fd): Moved to fork-child.c.
1736 (old_foreground_pgrp): Likewise.
1737 (restore_old_foreground_pgrp): Likewise.
1738 (last_status): Make it global.
1739 (last_ptid): Likewise.
1740 (our_environ): New variable.
1741 (startup_with_shell): Likewise.
1742 (program_name): Likewise.
1743 (program_argv): Rename to...
1744 (program_args): ...this.
1745 (wrapper_argv): New variable.
1746 (start_inferior): Delete function.
1747 (get_exec_wrapper): New function.
1748 (get_exec_file): Likewise.
1749 (get_environ): Likewise.
1750 (prefork_hook): Likewise.
1751 (post_fork_inferior): Likewise.
1752 (postfork_hook): Likewise.
1753 (postfork_child_hook): Likewise.
1754 (handle_v_run): Update code to deal with arguments coming from the
1755 remote host. Update calls from "start_inferior" to
1756 "create_inferior".
1757 (captured_main): Likewise. Initialize environment variable. Call
1758 "have_job_control".
1759 * server.h (post_fork_inferior): New prototype.
1760 (get_environ): Likewise.
1761 (last_status): Declare.
1762 (last_ptid): Likewise.
1763 (signal_pid): Likewise.
1764 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1765 (spu_ptrace_fun): New function.
1766 (spu_create_inferior): Adjust function prototype to reflect change
1767 on "target.h". Adjust function code to use "fork_inferior".
1768 * target.c (target_terminal_init): New function.
1769 (target_terminal_inferior): Likewise.
1770 (target_terminal_ours): Likewise.
1771 * target.h: Include <vector>.
1772 (struct target_ops) <create_inferior>: Update prototype.
1773 (create_inferior): Update macro.
1774 * utils.c (gdb_flush_out_err): New function.
1775 * win32-low.c (win32_create_inferior): Adjust function prototype
1776 and code to reflect change on "target.h".
1777
1778 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1779
1780 * inferiors.c (switch_to_thread): New function.
1781
1782 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1783
1784 * Makefile.in (SFILE): Add "common/job-control.c".
1785 (OBS): Add "job-control.o".
1786
1787 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1788
1789 * Makefile: Remove "@host_makefile_frag@".
1790
1791 2017-05-05 Pedro Alves <palves@redhat.com>
1792
1793 * configure: Regenerate.
1794
1795 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1796
1797 * configure: Regenerate.
1798
1799 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1800
1801 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1802 software_single_step change of return type to
1803 std::vector<CORE_ADDR>.
1804 * linux-low.c (install_software_single_step_breakpoints):
1805 Likewise.
1806 * linux-low.h (install_software_single_step_breakpoints):
1807 Likewise.
1808
1809 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1810
1811 * remote-utils.c: Include "gdb_termios.h" instead of
1812 "terminal.h".
1813 * terminal.h: Delete file.
1814
1815 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1816
1817 * server.c: Include <vector>.
1818 <program_argv, wrapper_argv>: Convert to std::vector.
1819 (start_inferior): Rewrite function to use C++.
1820 (handle_v_run): Likewise. Update code that calculates the argv
1821 based on the vRun packet; use C++.
1822 (captured_main): Likewise.
1823
1824 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1825
1826 * server.c (handle_v_cont): Initialize thread_resume::thread
1827 with null_ptid.
1828
1829 2017-04-05 Pedro Alves <palves@redhat.com>
1830
1831 * configure: Regenerate.
1832
1833 2017-04-05 Pedro Alves <palves@redhat.com>
1834
1835 * gdbreplay.c (sync_error): Constify.
1836 * linux-x86-low.c (push_opcode): Constify.
1837
1838 2017-04-05 Pedro Alves <palves@redhat.com>
1839
1840 * win32-low.c (get_child_debug_event)
1841 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1842 Report TARGET_WAITKIND_SPURIOUS instead.
1843
1844 2017-04-05 Pedro Alves <palves@redhat.com>
1845
1846 * remote-utils.c (remote_prepare, remote_open): Constify.
1847 * remote-utils.h (remote_prepare, remote_open): Constify.
1848 * server.c (captured_main): Constify 'port' handling.
1849
1850 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1851
1852 * Makefile.in (clean): Clear .deps.
1853
1854 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1855
1856 * .gitignore: Remove generated files, replace with wildcard.
1857 * (clean): Replace removal of generated files with wildcard.
1858 (version.c): Replace with...
1859 (version-generated.c): ...this.
1860 (xml-builtin.c): Replace with...
1861 (xml-builtin-generated.c): ...this.
1862 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1863 (%.c: *regformats*): Replace with...
1864 (%-generated.c: *regformats*): ...this.
1865
1866 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1867
1868 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1869 (xtensa_fill_gregset): Call collect_register_by_name for
1870 threadptr register.
1871 (xtensa_store_gregset): Call supply_register_by_name for
1872 threadptr register.
1873
1874 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1875
1876 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1877 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1878 (xtensa_store_gregset): Call supply_register for all registers in
1879 a0_regnum..a0_regnum + C0_NREGS range.
1880
1881 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1882
1883 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1884 (ax-ipa.o: ax.c): Remove.
1885 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1886 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1887 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1888 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1889 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1890
1891 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1892
1893 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1894 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1895 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1896 (errors-ipa.o: ../common/errors.c): Remove.
1897 (format-ipa.o: ../common/format.c): Remove.
1898 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1899
1900 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1901
1902 * Makefile.in (%-ipa.o: %.c): New rule.
1903 (tracepoint-ipa.o: tracepoint.c): Remove.
1904 (utils-ipa.o: utils.c): Remove.
1905 (remote-utils-ipa.o: remote-utils.c): Remove.
1906 (regcache-ipa.o: regcache.c): Remove.
1907 (i386-linux-ipa.o: i386-linux.c): Remove.
1908 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1909 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1910 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1911 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1912 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1913 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1914 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1915 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1916 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1917 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1918 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1919 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1920 (aarch64-ipa.o: aarch64.c): Remove.
1921 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1922 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1923 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1924 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1925 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1926 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1927 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1928 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1929 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1930 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1931 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1932 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1933 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1934 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1935 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1936 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1937 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1938 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1939 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1940 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1941 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1942 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1943 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1944 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1945 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1946 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1947 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1948 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1949 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1950 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1951 (tdesc-ipa.o: tdesc.c): Remove.
1952 (x32-linux-ipa.o: x32-linux.c): Remove.
1953 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1954 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1955
1956 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1957
1958 * Makefile.in (%.o: ../arch/%.c): New rule.
1959 (arm.o: ../arch/arm.c): Remove.
1960 (arm-linux.o: ../arch/arm-linux.c): Remove.
1961 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1962 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1963
1964 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1965
1966 * Makefile.in (%.o: ../nat/%.c): New rule.
1967 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1968 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1969 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1970 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1971 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1972 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1973 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1974 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1975 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1976 (linux-personality.o: ../nat/linux-personality.c): Remove.
1977 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1978 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1979 (x86-linux.o: ../nat/x86-linux.c): Remove.
1980 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1981 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1982
1983 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1984
1985 * Makefile.in (%.o: ../common/%.c): New rule.
1986 (signals.o: ../common/signals.c): Remove.
1987 (print-utils.o: ../common/print-utils.c): Remove.
1988 (rsp-low.o: ../common/rsp-low.c): Remove.
1989 (common-utils.o: ../common/common-utils.c): Remove.
1990 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1991 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1992 (vec.o: ../common/vec.c): Remove.
1993 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1994 (xml-utils.o: ../common/xml-utils.c): Remove.
1995 (ptid.o: ../common/ptid.c): Remove.
1996 (buffer.o: ../common/buffer.c): Remove.
1997 (format.o: ../common/format.c): Remove.
1998 (filestuff.o: ../common/filestuff.c): Remove.
1999 (agent.o: ../common/agent.c): Remove.
2000 (errors.o: ../common/errors.c): Remove.
2001 (environ.o: ../common/environ.c): Remove.
2002 (common-debug.o: ../common/common-debug.c): Remove.
2003 (cleanups.o: ../common/cleanups.c): Remove.
2004 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2005 (fileio.o: ../common/fileio.c): Remove.
2006 (common-regcache.o: ../common/common-regcache.c): Remove.
2007 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2008 (new-op.o: ../common/new-op.c): Remove.
2009 (btrace-common.o: ../common/btrace-common.c): Remove.
2010
2011 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2012
2013 * Makefile.in (%.o: ../target/%.c): New rule.
2014 (waitstatus.o: ../target/waitstatus.c): Remove.
2015
2016 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2017
2018 * Makefile.in
2019 (%.c: ../regformats/%.dat,
2020 (%.c: ../regformats/arm/%.dat,
2021 (%.c: ../regformats/i386/%.dat,
2022 (%.c: ../regformats/rs6000/%.dat): New rules.
2023 (aarch64.c): Remove.
2024 (reg-arm.c): Remove.
2025 (arm-with-iwmmxt.c): Remove.
2026 (arm-with-vfpv2.c): Remove.
2027 (arm-with-vfpv3.c): Remove.
2028 (arm-with-neon.c): Remove.
2029 (reg-bfin.c): Remove.
2030 (reg-cris.c): Remove.
2031 (reg-crisv32.c): Remove.
2032 (i386.c): Remove.
2033 (i386-linux.c): Remove.
2034 (i386-avx.c): Remove.
2035 (i386-avx-linux.c): Remove.
2036 (i386-avx-avx512.c): Remove.
2037 (i386-avx-avx512-linux.c): Remove.
2038 (i386-mpx.c): Remove.
2039 (i386-mpx-linux.c): Remove.
2040 (i386-avx-mpx-avx512-pku.c): Remove.
2041 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2042 (i386-avx-mpx.c): Remove.
2043 (i386-avx-mpx-linux.c): Remove.
2044 (i386-mmx.c): Remove.
2045 (i386-mmx-linux.c): Remove.
2046 (reg-ia64.c): Remove.
2047 (reg-m32r.c): Remove.
2048 (reg-m68k.c): Remove.
2049 (reg-cf.c): Remove.
2050 (mips-linux.c): Remove.
2051 (mips-dsp-linux.c): Remove.
2052 (mips64-linux.c): Remove.
2053 (mips64-dsp-linux.c): Remove.
2054 (nios2-linux.c): Remove.
2055 (powerpc-32.c): Remove.
2056 (powerpc-32l.c): Remove.
2057 (powerpc-altivec32l.c): Remove.
2058 (powerpc-cell32l.c): Remove.
2059 (powerpc-vsx32l.c): Remove.
2060 (powerpc-isa205-32l.c): Remove.
2061 (powerpc-isa205-altivec32l.c): Remove.
2062 (powerpc-isa205-vsx32l.c): Remove.
2063 (powerpc-e500l.c): Remove.
2064 (powerpc-64l.c): Remove.
2065 (powerpc-altivec64l.c): Remove.
2066 (powerpc-cell64l.c): Remove.
2067 (powerpc-vsx64l.c): Remove.
2068 (powerpc-isa205-64l.c): Remove.
2069 (powerpc-isa205-altivec64l.c): Remove.
2070 (powerpc-isa205-vsx64l.c): Remove.
2071 (s390-linux32.c): Remove.
2072 (s390-linux32v1.c): Remove.
2073 (s390-linux32v2.c): Remove.
2074 (s390-linux64.c): Remove.
2075 (s390-linux64v1.c): Remove.
2076 (s390-linux64v2.c): Remove.
2077 (s390-te-linux64.c): Remove.
2078 (s390-vx-linux64.c): Remove.
2079 (s390-tevx-linux64.c): Remove.
2080 (s390x-linux64.c): Remove.
2081 (s390x-linux64v1.c): Remove.
2082 (s390x-linux64v2.c): Remove.
2083 (s390x-te-linux64.c): Remove.
2084 (s390x-vx-linux64.c): Remove.
2085 (s390x-tevx-linux64.c): Remove.
2086 (tic6x-c64xp-linux.c): Remove.
2087 (tic6x-c64x-linux.c): Remove.
2088 (tic6x-c62x-linux.c): Remove.
2089 (reg-sh.c): Remove.
2090 (reg-sparc64.c): Remove.
2091 (reg-spu.c): Remove.
2092 (amd64.c): Remove.
2093 (amd64-linux.c): Remove.
2094 (amd64-avx.c): Remove.
2095 (amd64-avx-linux.c): Remove.
2096 (amd64-avx-avx512.c): Remove.
2097 (amd64-avx-avx512-linux.c): Remove.
2098 (amd64-mpx.c): Remove.
2099 (amd64-mpx-linux.c): Remove.
2100 (amd64-avx-mpx-avx512-pku.c): Remove.
2101 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2102 (amd64-avx-mpx.c): Remove.
2103 (amd64-avx-mpx-linux.c): Remove.
2104 (x32.c): Remove.
2105 (x32-linux.c): Remove.
2106 (x32-avx.c): Remove.
2107 (x32-avx-linux.c): Remove.
2108 (x32-avx-avx512.c): Remove.
2109 (x32-avx-avx512-linux.c): Remove.
2110 (reg-xtensa.c): Remove.
2111 (reg-tilegx.c): Remove.
2112 (reg-tilegx32.c): Remove.
2113
2114 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2115
2116 * Makefile.in (SFILES): Add "common/environ.c".
2117 (OBJS): Add "common/environ.h".
2118
2119 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2120
2121 * configure.ac: Check if the fs_base and gs_base members of
2122 `struct user_regs_struct' exist.
2123 * config.in: Regenerated.
2124 * configure: Likewise.
2125
2126 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2127
2128 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2129 target_read_memory.
2130 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2131 (get_next_pcs_syscall_next_pc): Likewise.
2132
2133 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2134
2135 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2136 * nto-x86-low.c: Likewise.
2137
2138 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2139
2140 * Makefile.in: Include disable-implicit-rules.mk.
2141
2142 2016-11-23 Pedro Alves <palves@redhat.com>
2143
2144 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2145 (debug_vprintf): Use std::chrono::steady_clock instead of
2146 gettimeofday. Use '.' instead of ':'.
2147 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2148 (get_timestamp): Use std::chrono::steady_clock instead of
2149 gettimeofday.
2150
2151 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2152
2153 * Makefile.in: Fix whitespace formatting.
2154
2155 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2156
2157 * Makefile.in (SFILES, OBS): Flatten list and order
2158 alphabetically.
2159
2160 2016-11-23 Pedro Alves <palves@redhat.com>
2161
2162 * event-loop.c (handle_file_event): Use warning.
2163 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2164 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2165 Use warning.
2166
2167 2016-11-23 Pedro Alves <palves@redhat.com>
2168
2169 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2170 output.
2171 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2172 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2173 debug_printf and debug_flush for debug output.
2174 * server.c (handle_general_set): Likewise.
2175 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2176 output.
2177
2178 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2179
2180 * Makefile.in (.c.o): Replace rule with ...
2181 (%.o: %.c): ... this one.
2182
2183 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2184
2185 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2186 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2187 make.
2188 * configure.ac: Remove checks for the make program.
2189 * configure: Re-generate.
2190
2191 2016-10-28 Pedro Alves <palves@redhat.com>
2192
2193 * Makefile.in (CXX_DIALECT): Get from configure.
2194 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2195 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2196 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2197 * config.in: Regenerate.
2198 * configure: Regenerate.
2199
2200 2016-10-27 Yao Qi <yao.qi@linaro.org>
2201
2202 * linux-low.c (linux_supports_range_stepping): Return true if
2203 can_software_single_step return true.
2204
2205 2016-10-27 Yao Qi <yao.qi@linaro.org>
2206
2207 * inferiors.c (find_inferior_in_random): New function.
2208 * inferiors.h (find_inferior_in_random): Declare.
2209 * linux-low.c (linux_wait_for_event_filtered): Call
2210 find_inferior_in_random instead of find_inferior.
2211
2212 2016-10-27 Yao Qi <yao.qi@linaro.org>
2213
2214 * linux-low.c (linux_wait_1): If single-step breakpoints are
2215 inserted, remove them.
2216
2217 2016-10-26 Pedro Alves <palves@redhat.com>
2218
2219 * linux-low.c (handle_extended_wait): Link parent/child fork
2220 threads.
2221 (linux_wait_1): Unlink them.
2222 (linux_set_resume_request): Ignore resume requests for
2223 already-resumed and unhandled fork child threads.
2224 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2225 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2226 New functions.
2227 (handle_v_requests) <vCont>: Don't call require_running.
2228 * server.h (in_queued_stop_replies): New declaration.
2229
2230 2016-10-24 Yao Qi <yao.qi@linaro.org>
2231
2232 PR server/20733
2233 * linux-aarch64-low.c (append_insns): Cast the return value to
2234 'uint32_t *'.
2235
2236 2016-10-10 Yao Qi <yao.qi@linaro.org>
2237
2238 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2239
2240 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2241
2242 * target.c (target_supports_multi_process): New function, moved
2243 from...
2244 * target.h (target_supports_multi_process): ... here. Remove
2245 macro.
2246
2247 2016-10-05 Tom Tromey <tom@tromey.com>
2248
2249 PR remote/20655:
2250 * tracepoint.c (handle_tracepoint_bkpts): Check
2251 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2252
2253 2016-10-05 Yao Qi <yao.qi@linaro.org>
2254
2255 * configure.srv: Update the path of arm-*.xml files.
2256
2257 2016-10-05 Terry Guo <terry.guo@arm.com>
2258 Yao Qi <yao.qi@linaro.org>
2259
2260 * Makefile.in: Adjust the path of rules.
2261 * configure.srv: Update the path of xml files.
2262 * regformats/arm-with-iwmmxt.dat: Regenerated.
2263 * regformats/arm-with-neon.dat: Likewise.
2264 * regformats/arm-with-vfpv2.dat: Likewise.
2265 * regformats/arm-with-vfpv3.dat Likewise.
2266
2267 2016-09-30 Yao Qi <yao.qi@linaro.org>
2268
2269 PR gdbserver/20627
2270 * target.c (target_stop_and_wait): Don't call
2271 target_continue_no_signal, use resume_stop instead.
2272
2273 2016-09-26 Yao Qi <yao.qi@linaro.org>
2274
2275 * linux-low.c (linux_wait_1): Call debug_exit.
2276
2277 2016-09-23 Pedro Alves <palves@redhat.com>
2278
2279 * Makefile.in (SFILES): Add common/new-op.c.
2280 (OBS): Add common/new-op.o.
2281 (new-op.o): New rule.
2282
2283 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2284
2285 * .gitinore: Ignore more files.
2286
2287 2016-09-21 Yao Qi <yao.qi@linaro.org>
2288
2289 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2290 23.
2291
2292 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2293
2294 * server.c (start_inferior): Call target_mourn_inferior instead of
2295 mourn_inferior; pass ptid_t argument to it.
2296 (resume): Likewise.
2297 (handle_target_event): Likewise.
2298 * target.c (target_mourn_inferior): New function.
2299 * target.h (mourn_inferior): Delete macro.
2300
2301 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2302
2303 * linux-low.c (lwp_is_stepping): New function.
2304
2305 2016-09-06 Carl Love <cel@us.ibm.com>
2306
2307 * server.c (start_inferior): Fixed comment, requested comment change
2308 didn't get updated correctly. Removed reference to ptrace () call as
2309 it is only true on Linux systems.
2310
2311 2016-09-06 Carl Love <cel@us.ibm.com>
2312
2313 * server.c (start_inferior): Do not call
2314 function target_post_create_inferior () if the
2315 inferior process has already exited.
2316
2317 2016-09-05 Pedro Alves <palves@redhat.com>
2318
2319 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2320 (COMPILE.pre, CC_LD): Use CXX directly.
2321 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2322 * acinclude.m4: Don't include build-with-cxx.m4.
2323 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2324 * configure: Regenerate.
2325
2326 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2327
2328 PR gdb/19495
2329 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2330 call writing data to own_buf.
2331
2332 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2333
2334 * target.c (mywait): Call target_wait instead of
2335 the_target->wait.
2336 (target_wait): New function.
2337
2338 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2339
2340 * server.c (start_inferior): New variable 'ptid'. Replace calls
2341 to the_target->resume by target_continue{,_no_signal}, depending
2342 on the case.
2343 * target.c (target_stop_and_wait): Call target_continue_no_signal
2344 instead of the_target->resume.
2345 (target_continue): New function.
2346
2347 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2348
2349 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2350
2351 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2352
2353 PR server/20491
2354 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2355 ps_prochandle.
2356 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2357 * linux-arm-low.c (ps_get_thread_area): Likewise.
2358 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2359 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2360 * linux-mips-low.c (ps_get_thread_area): Likewise.
2361 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2362 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2363 * linux-x86-low.c (ps_get_thread_area): Likewise.
2364 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2365
2366 2016-08-19 Pedro Alves <palves@redhat.com>
2367
2368 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2369
2370 2016-08-19 Pedro Alves <palves@redhat.com>
2371
2372 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2373 comment. Use memcpy instead of casting through unsigned long.
2374
2375 2016-08-19 Pedro Alves <palves@redhat.com>
2376
2377 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2378 allocating around 0x80000000.
2379
2380 2016-08-19 Pedro Alves <palves@redhat.com>
2381
2382 PR gdb/20415
2383 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2384 (x32-avx512-linux-ipa.o): New rules.
2385 * configure.ac (x86_64-*-linux*): New x32 check.
2386 * configure.srv (ipa_x32_linux_regobj): New.
2387 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2388 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2389 descriptions.
2390 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2391 descriptions.
2392 * configure: Regenerate.
2393
2394 2016-08-09 Pedro Alves <palves@redhat.com>
2395
2396 PR gdb/18653
2397 * Makefile.in (OBS): Add signals-state-save-restore.o.
2398 (signals-state-save-restore.o): New rule.
2399 * config.in: Regenerate.
2400 * configure: Regenerate.
2401 * linux-low.c: Include "signals-state-save-restore.h".
2402 (linux_create_inferior): Call
2403 restore_original_signals_state.
2404 * server.c: Include "dispositions-save-restore.h".
2405 (captured_main): Call save_original_signals_state.
2406
2407 2016-08-05 Pedro Alves <palves@redhat.com>
2408
2409 * configure: Regenerate.
2410
2411 2016-08-04 Yao Qi <yao.qi@linaro.org>
2412
2413 * linux-low.c (regsets_fetch_inferior_registers): Check
2414 errno is ESRCH or not.
2415
2416 2016-08-02 Yao Qi <yao.qi@linaro.org>
2417
2418 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2419 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2420 (thread_db_load_search): Update.
2421 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2422 td_ta_set_event and td_ta_event_getmsg.
2423
2424 2016-07-26 Pedro Alves <palves@redhat.com>
2425
2426 PR server/20414
2427 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2428 of unsigned long for 64-bit registers and use uint32_t instead of
2429 unsigned int for 32-bit registers.
2430
2431 2016-07-26 Pedro Alves <palves@redhat.com>
2432
2433 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2434 to 'ptrace'.
2435
2436 2016-07-21 Tom Tromey <tom@tromey.com>
2437
2438 * configure: Rebuild.
2439
2440 2016-07-21 Yao Qi <yao.qi@linaro.org>
2441
2442 * mem-break.c (find_gdb_breakpoint): Cast bp to
2443 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2444
2445 2016-07-21 Yao Qi <yao.qi@linaro.org>
2446
2447 * server.c (handle_v_requests): Support s and S actions
2448 if target_supports_software_single_step return true.
2449
2450 2016-07-21 Yao Qi <yao.qi@linaro.org>
2451
2452 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2453 is resume_step, call maybe_hw_step.
2454 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2455 and unstop them.
2456 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2457 breakpoints or not.
2458 (proceed_one_lwp): If resume request is resume_step, install
2459 reinsert breakpoints and call maybe_hw_step.
2460
2461 2016-07-21 Yao Qi <yao.qi@linaro.org>
2462
2463 * linux-low.c (proceed_one_lwp): Declare.
2464 (linux_resume_one_thread): Remove local variable 'step'.
2465 Lift code enqueue signal. Call proceed_one_lwp instead of
2466 linux_resume_one_lwp.
2467
2468 2016-07-21 Yao Qi <yao.qi@linaro.org>
2469
2470 * linux-low.c (linux_resume_one_thread): Call
2471 enqueue_pending_signal.
2472
2473 2016-07-21 Yao Qi <yao.qi@linaro.org>
2474
2475 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2476 * inferiors.c (do_restore_current_thread_cleanup): New function.
2477 (make_cleanup_restore_current_thread): Likewise.
2478 * linux-low.c (install_software_single_step_breakpoints): Call
2479 make_cleanup_restore_current_thread. Switch current_thread to
2480 thread.
2481
2482 2016-07-21 Yao Qi <yao.qi@linaro.org>
2483
2484 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2485 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2486 (clone_one_breakpoint): Likewise.
2487 (delete_reinsert_breakpoints): Change parameter to thread.
2488 Callers updated.
2489 (has_reinsert_breakpoints): Likewise.
2490 (uninsert_reinsert_breakpoints): Likewise.
2491 (reinsert_reinsert_breakpoints): Likewise.
2492 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2493 (delete_reinsert_breakpoints): Likewise.
2494 (reinsert_reinsert_breakpoints): Likewise.
2495 (uninsert_reinsert_breakpoints): Likewise.
2496 (has_reinsert_breakpoints): Likewise.
2497
2498 2016-07-21 Yao Qi <yao.qi@linaro.org>
2499
2500 * inferiors.c (get_thread_process): Make parameter const.
2501 * inferiors.h (get_thread_process): Update declaration.
2502 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2503 Add new parameters child_thread and parent_thread. Callers
2504 updated.
2505 * mem-break.h (clone_all_breakpoints): Update declaration.
2506
2507 2016-07-21 Yao Qi <yao.qi@linaro.org>
2508
2509 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2510 <command_list, handler>: Remove.
2511 (struct gdb_breakpoint): New.
2512 (struct other_breakpoint): New.
2513 (struct reinsert_breakpoint): New.
2514 (is_gdb_breakpoint): New function.
2515 (any_persistent_commands): Update command_list if
2516 is_gdb_breakpoint returns true.
2517 (set_breakpoint): Create breakpoints according to their types.
2518 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2519 (set_gdb_breakpoint_1): Likewise.
2520 (set_gdb_breakpoint): Likewise.
2521 (clear_breakpoint_conditions): Change parameter type to
2522 'struct gdb_breakpoint *'.
2523 (clear_breakpoint_commands): Likewise.
2524 (clear_breakpoint_conditions_and_commands): Likewise.
2525 (add_condition_to_breakpoint): Likewise.
2526 (add_breakpoint_condition): Likewise.
2527 (add_commands_to_breakpoint): Likewise.
2528 (check_breakpoints): Check other_breakpoint.
2529 (clone_one_breakpoint): Clone breakpopint according to its type.
2530 * mem-break.h (struct gdb_breakpoint): Declare.
2531 (set_gdb_breakpoint): Update declaration.
2532 (clear_breakpoint_conditions_and_commands): Likewise.
2533 (add_breakpoint_condition): Likewise.
2534 (add_breakpoint_commands): Likewise.
2535 * server.c (process_point_options): Change parameter type to
2536 'struct gdb_breakpoint *'.
2537
2538 2016-07-21 Yao Qi <yao.qi@linaro.org>
2539
2540 * mem-break.c (set_breakpoint_at): Rename it to ...
2541 (set_breakpoint_type_at): ... it.
2542 (set_breakpoint_at): Call set_breakpoint_type_at.
2543 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2544 * mem-break.h (set_breakpoint_at): Update comments.
2545
2546 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2547
2548 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2549 to buf parameter.
2550 (nios2_store_gregset): Likewise.
2551
2552 2016-07-01 Pedro Alves <palves@redhat.com>
2553 Antoine Tremblay <antoine.tremblay@ericsson.com>
2554
2555 * linux-low.c: Change interface to take the target lwp_info
2556 pointer directly and return void. Handle detaching from a zombie
2557 thread.
2558 (linux_detach_lwp_callback): New function.
2559 (linux_detach): Detach from the leader thread after detaching from
2560 the clone threads.
2561
2562 2016-06-28 Yao Qi <yao.qi@linaro.org>
2563
2564 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2565 for variable new_offset.
2566 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2567 (aarch64_ftrace_insn_reloc_cb): Likewise.
2568 (aarch64_ftrace_insn_reloc_tb): Likewise.
2569 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2570 PRIx64 instead of PRIx32.
2571
2572 2016-06-28 Yao Qi <yao.qi@linaro.org>
2573
2574 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2575 (the_low_target): Install arm_get_syscall_trapinfo.
2576
2577 2016-06-28 Yao Qi <yao.qi@linaro.org>
2578
2579 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2580 function.
2581 (the_low_target): Install aarch64_get_syscall_trapinfo.
2582
2583 2016-06-28 Yao Qi <yao.qi@linaro.org>
2584
2585 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2586 Callers updated.
2587 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2588 Remove parameter sysno.
2589 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2590 sysret.
2591
2592 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2593
2594 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2595 (s390_emit_ne_goto): Likewise.
2596 (s390_emit_lt_goto): Likewise.
2597 (s390_emit_le_goto): Likewise.
2598 (s390_emit_gt_goto): Likewise.
2599 (s390_emit_ge_goto): Likewise.
2600 (s390x_emit_eq_goto): Likewise.
2601 (s390x_emit_ne_goto): Likewise.
2602 (s390x_emit_lt_goto): Likewise.
2603 (s390x_emit_le_goto): Likewise.
2604 (s390x_emit_gt_goto): Likewise.
2605 (s390x_emit_ge_goto): Likewise.
2606 (s390_emit_ops_impl): Mark variable static.
2607 (s390x_emit_ops): Likewise.
2608
2609 2016-06-17 Yao Qi <yao.qi@linaro.org>
2610
2611 * linux-low.c (handle_extended_wait): Call
2612 uninsert_reinsert_breakpoints for the parent process. Remove
2613 reinsert breakpoints from the child process. Reinsert them to
2614 the parent process when vfork is done.
2615 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2616 (reinsert_reinsert_breakpoints): New function.
2617 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2618 (reinsert_reinsert_breakpoints): Declare.
2619
2620 2016-06-17 Yao Qi <yao.qi@linaro.org>
2621
2622 * linux-low.c (handle_extended_wait): If the parent is doing
2623 step-over, remove the reinsert breakpoints from the forked child.
2624
2625 2016-06-17 Yao Qi <yao.qi@linaro.org>
2626
2627 * linux-low.c (unsuspend_all_lwps): Declare.
2628 (linux_low_filter_event): If thread exited, call finish_step_over.
2629 If step-over is finished, unsuspend other threads.
2630
2631 2016-06-17 Yao Qi <yao.qi@linaro.org>
2632
2633 * linux-low.c (linux_resume_one_lwp_throw): Assert
2634 has_reinsert_breakpoints returns false.
2635 * mem-break.c (delete_disabled_breakpoints): Assert
2636 bp type isn't reinsert_breakpoint.
2637
2638 2016-06-17 Yao Qi <yao.qi@linaro.org>
2639
2640 * linux-low.c (maybe_hw_step): New function.
2641 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2642 (finish_step_over): Switch current_thread to lwp temporarily,
2643 and assert has_reinsert_breakpoints returns true.
2644 (proceed_one_lwp): Call maybe_hw_step.
2645 * mem-break.c (has_reinsert_breakpoints): New function.
2646 * mem-break.h (has_reinsert_breakpoints): Declare.
2647
2648 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2649
2650 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2651
2652 2016-05-17 Yao Qi <yao.qi@linaro.org>
2653
2654 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2655 instead of find_inferior.
2656
2657 2016-05-05 Yao Qi <yao.qi@linaro.org>
2658
2659 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2660 Initialize res to zero.
2661
2662 2016-05-05 Yao Qi <yao.qi@linaro.org>
2663
2664 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2665 to uint32_t.
2666
2667 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2668
2669 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2670 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2671 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2672
2673 2016-04-28 Par Olsson <par.olsson@windriver.com>
2674 Simon Marchi <simon.marchi@ericsson.com>
2675
2676 * tracepoint.c (write_inferior_int8): New function.
2677 (cmd_qtenable_disable): Write enable flag using
2678 write_inferior_int8.
2679
2680 2016-04-25 Yao Qi <yao.qi@linaro.org>
2681
2682 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2683 (need_step_over_p): Return zero if the LWP has pending signals
2684 can be delivered on software single step target.
2685
2686 2016-04-25 Yao Qi <yao.qi@linaro.org>
2687
2688 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2689 return instead of error.
2690
2691 2016-04-22 Yao Qi <yao.qi@linaro.org>
2692
2693 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2694 to 23.
2695
2696 2016-04-22 Yao Qi <yao.qi@linaro.org>
2697
2698 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2699 signal when stepping over breakpoint with software single
2700 step.
2701
2702 2016-04-21 Pedro Alves <palves@redhat.com>
2703
2704 * linux-s390-low.c (s390_collect_ptrace_register)
2705 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2706 add casts.
2707 (s390_check_regset): Use void * instead of gdb_byte *.
2708
2709 2016-04-20 Pedro Alves <palves@redhat.com>
2710
2711 * configure: Renegerate.
2712
2713 2016-04-20 Yao Qi <yao.qi@linaro.org>
2714
2715 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2716 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2717 number 16.
2718 (arm_store_gregset): Likewise.
2719
2720 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2721
2722 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2723 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2724 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2725 (amd64-avx-mpx-linux.c): New rules.
2726 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2727 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2728 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2729 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2730 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2731 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2732 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2733 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2734 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2735 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2736 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2737 * linux-x86-low.c (x86_linux_read_description): Add case for
2738 X86_XSTATE_AVX_MPX_MASK.
2739 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2740 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2741 init_registers_i386_avx_mpx_linux.
2742 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2743 (initialize_low_tracepoint): Call
2744 init_registers_i386_avx_mpx_linux.
2745 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2746 (initialize_low_tracepoint): Call
2747 init_registers_amd64_avx_mpx_linux.
2748 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2749 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2750 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2751 declarations.
2752
2753 2016-04-18 Pedro Alves <palves@redhat.com>
2754
2755 * configure: Regenerate.
2756
2757 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2758
2759 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2760 (aarch64_emit_sub): Likewise.
2761
2762 2016-04-12 Pedro Alves <palves@redhat.com>
2763
2764 * utils.c (prepare_to_throw_exception): Delete.
2765
2766 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2767
2768 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2769
2770 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2771
2772 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2773
2774 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2775
2776 * linux-aarch64-ipa.c: Add <elf.h> include.
2777 * linux-ppc-ipa.c: Add <elf.h> include.
2778 * linux-s390-ipa.c: Add <elf.h> include.
2779
2780 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2781
2782 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2783 (get_raw_reg_ptr): Likewise.
2784 (get_trace_state_variable_value_ptr): Likewise.
2785 (set_trace_state_variable_value_ptr): Likewise.
2786 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2787 char *.
2788
2789 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2790 Marcin Kościelnicki <koriakin@0x04.net>
2791
2792 PR/17221
2793 * linux-ppc-low.c (emit_insns): New function.
2794 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2795 (ppc_emit_prologue): New function.
2796 (ppc_emit_epilogue): New function.
2797 (ppc_emit_add): New function.
2798 (ppc_emit_sub): New function.
2799 (ppc_emit_mul): New function.
2800 (ppc_emit_lsh): New function.
2801 (ppc_emit_rsh_signed): New function.
2802 (ppc_emit_rsh_unsigned): New function.
2803 (ppc_emit_ext): New function.
2804 (ppc_emit_zero_ext): New function.
2805 (ppc_emit_log_not): New function.
2806 (ppc_emit_bit_and): New function.
2807 (ppc_emit_bit_or): New function.
2808 (ppc_emit_bit_xor): New function.
2809 (ppc_emit_bit_not): New function.
2810 (ppc_emit_equal): New function.
2811 (ppc_emit_less_signed): New function.
2812 (ppc_emit_less_unsigned): New function.
2813 (ppc_emit_ref): New function.
2814 (ppc_emit_const): New function.
2815 (ppc_emit_reg): New function.
2816 (ppc_emit_pop): New function.
2817 (ppc_emit_stack_flush): New function.
2818 (ppc_emit_swap): New function.
2819 (ppc_emit_stack_adjust): New function.
2820 (ppc_emit_call): New function.
2821 (ppc_emit_int_call_1): New function.
2822 (ppc_emit_void_call_2): New function.
2823 (ppc_emit_if_goto): New function.
2824 (ppc_emit_goto): New function.
2825 (ppc_emit_eq_goto): New function.
2826 (ppc_emit_ne_goto): New function.
2827 (ppc_emit_lt_goto): New function.
2828 (ppc_emit_le_goto): New function.
2829 (ppc_emit_gt_goto): New function.
2830 (ppc_emit_ge_goto): New function.
2831 (ppc_write_goto_address): New function.
2832 (ppc_emit_ops_impl): New static variable.
2833 (ppc64v1_emit_prologue): New function.
2834 (ppc64v2_emit_prologue): New function.
2835 (ppc64_emit_epilogue): New function.
2836 (ppc64_emit_add): New function.
2837 (ppc64_emit_sub): New function.
2838 (ppc64_emit_mul): New function.
2839 (ppc64_emit_lsh): New function.
2840 (ppc64_emit_rsh_signed): New function.
2841 (ppc64_emit_rsh_unsigned): New function.
2842 (ppc64_emit_ext): New function.
2843 (ppc64_emit_zero_ext): New function.
2844 (ppc64_emit_log_not): New function.
2845 (ppc64_emit_bit_and): New function.
2846 (ppc64_emit_bit_or): New function.
2847 (ppc64_emit_bit_xor): New function.
2848 (ppc64_emit_bit_not): New function.
2849 (ppc64_emit_equal): New function.
2850 (ppc64_emit_less_signed): New function.
2851 (ppc64_emit_less_unsigned): New function.
2852 (ppc64_emit_ref): New function.
2853 (ppc64_emit_const): New function.
2854 (ppc64v1_emit_reg): New function.
2855 (ppc64v2_emit_reg): New function.
2856 (ppc64_emit_pop): New function.
2857 (ppc64_emit_stack_flush): New function.
2858 (ppc64_emit_swap): New function.
2859 (ppc64v1_emit_call): New function.
2860 (ppc64v2_emit_call): New function.
2861 (ppc64v1_emit_int_call_1): New function.
2862 (ppc64v2_emit_int_call_1): New function.
2863 (ppc64v1_emit_void_call_2): New function.
2864 (ppc64v2_emit_void_call_2): New function.
2865 (ppc64_emit_if_goto): New function.
2866 (ppc64_emit_eq_goto): New function.
2867 (ppc64_emit_ne_goto): New function.
2868 (ppc64_emit_lt_goto): New function.
2869 (ppc64_emit_le_goto): New function.
2870 (ppc64_emit_gt_goto): New function.
2871 (ppc64_emit_ge_goto): New function.
2872 (ppc64v1_emit_ops_impl): New static variable.
2873 (ppc64v2_emit_ops_impl): New static variable.
2874 (ppc_emit_ops): New function.
2875 (linux_low_target): Wire in ppc_emit_ops.
2876
2877 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2878 Marcin Kościelnicki <koriakin@0x04.net>
2879
2880 PR/17221
2881 * Makefile.in: Add powerpc-*-ipa.o
2882 * configure.srv: Add ipa_obj for powerpc*-linux.
2883 * linux-ppc-ipa.c: New file.
2884 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2885 includes.
2886 (PPC_FIELD): New macro.
2887 (PPC_SEXT): New macro.
2888 (PPC_OP6): New macro.
2889 (PPC_BO): New macro.
2890 (PPC_LI): New macro.
2891 (PPC_BD): New macro.
2892 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2893 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2894 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2895 (ppc_get_thread_area): New function.
2896 (is_elfv2_inferior): New function.
2897 (gen_ds_form): New function.
2898 (GEN_STD): New macro.
2899 (GEN_STDU): New macro.
2900 (GEN_LD): New macro.
2901 (GEN_LDU): New macro.
2902 (gen_d_form): New function.
2903 (GEN_ADDI): New macro.
2904 (GEN_ADDIS): New macro.
2905 (GEN_LI): New macro.
2906 (GEN_LIS): New macro.
2907 (GEN_ORI): New macro.
2908 (GEN_ORIS): New macro.
2909 (GEN_LWZ): New macro.
2910 (GEN_STW): New macro.
2911 (GEN_STWU): New macro.
2912 (gen_xfx_form): New function.
2913 (GEN_MFSPR): New macro.
2914 (GEN_MTSPR): New macro.
2915 (GEN_MFCR): New macro.
2916 (GEN_MTCR): New macro.
2917 (GEN_SYNC): New macro.
2918 (GEN_LWSYNC): New macro.
2919 (gen_x_form): New function.
2920 (GEN_OR): New macro.
2921 (GEN_MR): New macro.
2922 (GEN_LWARX): New macro.
2923 (GEN_STWCX): New macro.
2924 (GEN_CMPW): New macro.
2925 (gen_md_form): New function.
2926 (GEN_RLDICL): New macro.
2927 (GEN_RLDICR): New macro.
2928 (gen_i_form): New function.
2929 (GEN_B): New macro.
2930 (GEN_BL): New macro.
2931 (gen_b_form): New function.
2932 (GEN_BNE): New macro.
2933 (GEN_LOAD): New macro.
2934 (GEN_STORE): New macro.
2935 (gen_limm): New function.
2936 (gen_atomic_xchg): New function.
2937 (gen_call): New function.
2938 (ppc_relocate_instruction): New function.
2939 (ppc_install_fast_tracepoint_jump_pad): New function.
2940 (ppc_get_min_fast_tracepoint_insn_len): New function.
2941 (ppc_get_ipa_tdesc_idx): New function.
2942 (the_low_target): Wire in the new functions.
2943 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2944 tdescs.
2945 * linux-ppc-tdesc.h: New file.
2946
2947 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2948
2949 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2950 (alloc_jump_pad_buffer): New function.
2951 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2952 (alloc_jump_pad_buffer): New function.
2953 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2954 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2955 (alloc_jump_pad_buffer): New function.
2956 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2957 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2958 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2959 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2960
2961 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2962
2963 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2964 * linux-amd64-ipa.c: Likewise.
2965 * linux-i386-ipa.c: Likewise.
2966 * linux-s390-ipa.c: Likewise.
2967 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2968 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2969 set_trace_state_variable_value_ptr.
2970 (struct ipa_sym_addresses): Likewise.
2971 (symbol_list): Likewise.
2972 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2973 accessing gdb_collect directly.
2974 (gdb_collect_ptr_type): New typedef.
2975 (get_raw_reg_ptr_type): New typedef.
2976 (get_trace_state_variable_value_ptr_type): New typedef.
2977 (set_trace_state_variable_value_ptr_type): New typedef.
2978 (gdb_collect_ptr): New global.
2979 (get_raw_reg_ptr): New global.
2980 (get_trace_state_variable_value_ptr): New global.
2981 (set_trace_state_variable_value_ptr): New global.
2982 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2983 accessing get_raw_reg directly.
2984 (get_get_tsv_func_addr): Likewise for
2985 get_trace_state_variable_value_ptr.
2986 (get_set_tsv_func_addr): Likewise for
2987 set_trace_state_variable_value_ptr.
2988 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2989
2990 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2991
2992 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2993
2994 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2995
2996 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2997 packets.
2998 (relocate_instruction): Remove own_buf.
2999 * server.c (own_buf): Make global.
3000 (handle_v_requests): Make global.
3001 * server.h (own_buf): New declaration.
3002 (handle_v_requests): New prototype.
3003
3004 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3005
3006 PR 18377
3007 * linux-s390-low.c (add_insns): New function.
3008 (s390_emit_prologue): New function.
3009 (s390_emit_epilogue): New function.
3010 (s390_emit_add): New function.
3011 (s390_emit_sub): New function.
3012 (s390_emit_mul): New function.
3013 (s390_emit_lsh): New function.
3014 (s390_emit_rsh_signed): New function.
3015 (s390_emit_rsh_unsigned): New function.
3016 (s390_emit_ext): New function.
3017 (s390_emit_log_not): New function.
3018 (s390_emit_bit_and): New function.
3019 (s390_emit_bit_or): New function.
3020 (s390_emit_bit_xor): New function.
3021 (s390_emit_bit_not): New function.
3022 (s390_emit_equal): New function.
3023 (s390_emit_less_signed): New function.
3024 (s390_emit_less_unsigned): New function.
3025 (s390_emit_ref): New function.
3026 (s390_emit_if_goto): New function.
3027 (s390_emit_goto): New function.
3028 (s390_write_goto_address): New function.
3029 (s390_emit_litpool): New function.
3030 (s390_emit_const): New function.
3031 (s390_emit_call): New function.
3032 (s390_emit_reg): New function.
3033 (s390_emit_pop): New function.
3034 (s390_emit_stack_flush): New function.
3035 (s390_emit_zero_ext): New function.
3036 (s390_emit_swap): New function.
3037 (s390_emit_stack_adjust): New function.
3038 (s390_emit_set_r2): New function.
3039 (s390_emit_int_call_1): New function.
3040 (s390_emit_void_call_2): New function.
3041 (s390_emit_eq_goto): New function.
3042 (s390_emit_ne_goto): New function.
3043 (s390_emit_lt_goto): New function.
3044 (s390_emit_le_goto): New function.
3045 (s390_emit_gt_goto): New function.
3046 (s390_emit_ge_goto): New function.
3047 (s390x_emit_prologue): New function.
3048 (s390x_emit_epilogue): New function.
3049 (s390x_emit_add): New function.
3050 (s390x_emit_sub): New function.
3051 (s390x_emit_mul): New function.
3052 (s390x_emit_lsh): New function.
3053 (s390x_emit_rsh_signed): New function.
3054 (s390x_emit_rsh_unsigned): New function.
3055 (s390x_emit_ext): New function.
3056 (s390x_emit_log_not): New function.
3057 (s390x_emit_bit_and): New function.
3058 (s390x_emit_bit_or): New function.
3059 (s390x_emit_bit_xor): New function.
3060 (s390x_emit_bit_not): New function.
3061 (s390x_emit_equal): New function.
3062 (s390x_emit_less_signed): New function.
3063 (s390x_emit_less_unsigned): New function.
3064 (s390x_emit_ref): New function.
3065 (s390x_emit_if_goto): New function.
3066 (s390x_emit_const): New function.
3067 (s390x_emit_call): New function.
3068 (s390x_emit_reg): New function.
3069 (s390x_emit_pop): New function.
3070 (s390x_emit_stack_flush): New function.
3071 (s390x_emit_zero_ext): New function.
3072 (s390x_emit_swap): New function.
3073 (s390x_emit_stack_adjust): New function.
3074 (s390x_emit_int_call_1): New function.
3075 (s390x_emit_void_call_2): New function.
3076 (s390x_emit_eq_goto): New function.
3077 (s390x_emit_ne_goto): New function.
3078 (s390x_emit_lt_goto): New function.
3079 (s390x_emit_le_goto): New function.
3080 (s390x_emit_gt_goto): New function.
3081 (s390x_emit_ge_goto): New function.
3082 (s390_emit_ops): New function.
3083 (struct linux_target_ops): Fill in emit_ops hook.
3084
3085 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3086
3087 PR 18377
3088 * Makefile.in: Add s390 IPA files.
3089 * configure.srv: Build IPA for s390.
3090 * linux-s390-ipa.c: New file.
3091 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3092 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3093 (tdesc_s390_linux32): Likewise.
3094 (init_registers_s390_linux32v1): Likewise.
3095 (tdesc_s390_linux32v1): Likewise.
3096 (init_registers_s390_linux32v2): Likewise.
3097 (tdesc_s390_linux32v2): Likewise.
3098 (init_registers_s390_linux64): Likewise.
3099 (tdesc_s390_linux64): Likewise.
3100 (init_registers_s390_linux64v1): Likewise.
3101 (tdesc_s390_linux64v1): Likewise.
3102 (init_registers_s390_linux64v2): Likewise.
3103 (tdesc_s390_linux64v2): Likewise.
3104 (init_registers_s390_te_linux64): Likewise.
3105 (tdesc_s390_te_linux64): Likewise.
3106 (init_registers_s390_vx_linux64): Likewise.
3107 (tdesc_s390_vx_linux64): Likewise.
3108 (init_registers_s390_tevx_linux64): Likewise.
3109 (tdesc_s390_tevx_linux64): Likewise.
3110 (init_registers_s390x_linux64): Likewise.
3111 (tdesc_s390x_linux64): Likewise.
3112 (init_registers_s390x_linux64v1): Likewise.
3113 (tdesc_s390x_linux64v1): Likewise.
3114 (init_registers_s390x_linux64v2): Likewise.
3115 (tdesc_s390x_linux64v2): Likewise.
3116 (init_registers_s390x_te_linux64): Likewise.
3117 (tdesc_s390x_te_linux64): Likewise.
3118 (init_registers_s390x_vx_linux64): Likewise.
3119 (tdesc_s390x_vx_linux64): Likewise.
3120 (init_registers_s390x_tevx_linux64): Likewise.
3121 (tdesc_s390x_tevx_linux64): Likewise.
3122 (have_hwcap_s390_vx): New static variable.
3123 (s390_arch_setup): Fill have_hwcap_s390_vx.
3124 (s390_get_thread_area): New function.
3125 (s390_ft_entry_gpr_esa): New const.
3126 (s390_ft_entry_gpr_zarch): New const.
3127 (s390_ft_entry_misc): New const.
3128 (s390_ft_entry_fr): New const.
3129 (s390_ft_entry_vr): New const.
3130 (s390_ft_main_31): New const.
3131 (s390_ft_main_64): New const.
3132 (s390_ft_exit_fr): New const.
3133 (s390_ft_exit_vr): New const.
3134 (s390_ft_exit_misc): New const.
3135 (s390_ft_exit_gpr_esa): New const.
3136 (s390_ft_exit_gpr_zarch): New const.
3137 (append_insns): New function.
3138 (s390_relocate_instruction): New function.
3139 (s390_install_fast_tracepoint_jump_pad): New function.
3140 (s390_get_min_fast_tracepoint_insn_len): New function.
3141 (s390_get_ipa_tdesc_idx): New function.
3142 (struct linux_target_ops): Wire in the above functions.
3143 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3144 * linux-s390-tdesc.h: New file.
3145
3146 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3147
3148 * linux-s390-low.c (s390_supports_tracepoints): New function.
3149 (struct linux_target_ops): Fill supports_tracepoints hook.
3150
3151 2016-03-18 Yao Qi <yao.qi@linaro.org>
3152
3153 * linux-low.c (lwp_signal_can_be_delivered): New function.
3154 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3155
3156 2016-03-18 Yao Qi <yao.qi@linaro.org>
3157
3158 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3159 0 if signal is enqueued. Remove 'signal' from one debugging
3160 message. Move one debugging message to some lines below.
3161 Remove code setting 'signal' to 0.
3162
3163 2016-03-18 Yao Qi <yao.qi@linaro.org>
3164
3165 * linux-low.c (linux_low_filter_event): Remove redundant
3166 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3167
3168 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3169
3170 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3171 (struct linux_target_ops): Wire in the above.
3172
3173 2016-03-03 Yao Qi <yao.qi@linaro.org>
3174
3175 * linux-low.c: Update comments to start_step_over.
3176
3177 2016-03-03 Yao Qi <yao.qi@linaro.org>
3178
3179 PR server/19736
3180 * linux-low.c (handle_extended_wait): Set child suspended
3181 if event_lwp->bp_reinsert isn't zero.
3182
3183 2016-03-02 Yao Qi <yao.qi@linaro.org>
3184
3185 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3186 enqueue_pending_signal.
3187
3188 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3189
3190 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3191 is actually loaded.
3192
3193 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3194
3195 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3196 (s390_regmap_3264) [!__s390x__]: New global.
3197 (s390_collect_ptrace_register): Skip map entries containing -1.
3198 (s390_supply_ptrace_register): Ditto.
3199 (s390_fill_gprs_high): New function.
3200 (s390_store_gprs_high): New function.
3201 (s390_regsets): Add NT_S390_HIGH_GPRS.
3202 (s390_get_hwcap): Enable on 31-bit.
3203 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3204 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3205 Detect NT_S390_HIGH_GPRS.
3206 (s390_usrregs_info_3264): Enable on 31-bit.
3207 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3208 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3209
3210 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3211
3212 PR gdb/13808
3213 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3214 * configure.srv: Ditto.
3215 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3216 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3217 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3218 (init_registers_amd64_linux): Remove prototype.
3219 (tdesc_amd64_linux): Remove declaration.
3220 (get_ipa_tdesc): New function.
3221 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3222 initialize remaining tdescs.
3223 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3224 (init_registers_i386_linux): Remove prototype.
3225 (tdesc_i386_linux): Remove declaration.
3226 (get_ipa_tdesc): New function.
3227 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3228 initialize remaining tdescs.
3229 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3230 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3231 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3232 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3233 (x86_get_ipa_tdesc_idx): New function.
3234 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3235 * linux-x86-tdesc.h: New file.
3236 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3237 (target_get_ipa_tdesc_idx): New macro.
3238 * tracepoint.c (ipa_tdesc_idx): New macro.
3239 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3240 (symbol_list): Add ipa_tdesc_idx.
3241 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3242 (ipa_tdesc): Remove.
3243 (ipa_tdesc_idx): New variable.
3244 (get_context_regcache): Use get_ipa_tdesc.
3245 (gdb_collect): Ditto.
3246 (gdb_probe): Ditto.
3247 * tracepoint.h (get_ipa_tdesc): New prototype.
3248 (ipa_tdesc): Remove.
3249
3250 2016-02-24 Pedro Alves <palves@redhat.com>
3251
3252 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3253 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3254 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3255 Factor out common code between the USE_SIGTRAP_SIGINFO and
3256 !USE_SIGTRAP_SIGINFO blocks.
3257 (linux_low_filter_event): Call save_stop_reason instead of
3258 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3259 Update comments.
3260 (linux_wait_1): Update comments.
3261
3262 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3263
3264 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3265 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3266 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3267 ppc_insert_point, ppc_remove_point.
3268
3269 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3270
3271 * linux-s390-low.c (s390_supports_z_point_type): New function.
3272 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3273
3274 2016-02-16 Yao Qi <yao.qi@linaro.org>
3275
3276 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3277 PC. Get pc from regcache_read_pc.
3278
3279 2016-02-12 Yao Qi <yao.qi@linaro.org>
3280
3281 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3282 or linux_get_pc_32bit.
3283 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3284
3285 2016-02-12 Yao Qi <yao.qi@linaro.org>
3286
3287 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3288 arm_linux_get_next_pcs_fixup.
3289
3290 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3291
3292 * tracepoint.c (x_tracepoint_action_download): Change
3293 write_inferior_data_ptr to write_inferior_data_pointer.
3294 (cmd_qtstart): Likewise.
3295 (write_inferior_data_ptr): Remove.
3296 (download_agent_expr): Change write_inferior_data_ptr to
3297 write_inferior_data_pointer.
3298 (download_tracepoint_1): Likewise.
3299 (download_tracepoint): Likewise.
3300 (download_trace_state_variables): Likewise.
3301
3302 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3303 Marcin Kościelnicki <koriakin@0x04.net>
3304
3305 * tracepoint.c (struct tracepoint_action_ops): Remove.
3306 (struct tracepoint_action): Remove ops.
3307 (m_tracepoint_action_download, r_tracepoint_action_download)
3308 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3309 size and offset accordingly.
3310 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3311 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3312 (tracepoint_action_send, tracepoint_action_download): New functions.
3313 Helpers for trace action handlers.
3314 (add_tracepoint_action): Remove setup actions ops.
3315 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3316
3317 2016-02-10 Yao Qi <yao.qi@linaro.org>
3318
3319 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3320
3321 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3322
3323 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3324 to AC_OUTPUT.
3325 * configure: Regenerate.
3326
3327 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3328
3329 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3330 void * to gdb_byte *.
3331 * linux-low.c (siginfo_fixup): Likewise.
3332 (linux_xfer_siginfo): Likewise.
3333 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3334 Likewise.
3335 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3336
3337 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3338
3339 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3340 to srv_tgtobj.
3341 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3342 to srv_tgtobj.
3343 * linux-x86-low.c [__x86_64__]: Include
3344 "nat/amd64-linux-siginfo.h".
3345 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3346 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3347 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3348 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3349 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3350 (cpt_si_fd, si_timerid, si_overrun): Move from
3351 nat/amd64-linux-siginfo.c.
3352 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3353
3354 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3355
3356 * server.c (skip_to_semicolon): Remove.
3357 (process_point_options): Use strchrnul instead of
3358 skip_to_semicolon.
3359
3360 2016-01-26 Yao Qi <yao.qi@linaro.org>
3361
3362 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3363 * linux-low.c (install_software_single_step_breakpoints): Don't
3364 call regcache_read_pc.
3365 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3366 argument pc.
3367
3368 2016-01-26 Yao Qi <yao.qi@linaro.org>
3369
3370 * linux-low.c (install_software_single_step_breakpoints): Call
3371 regcache_read_pc instead of get_pc.
3372
3373 2016-01-26 Yao Qi <yao.qi@linaro.org>
3374
3375 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3376 (unblock_async_io): Rename to ...
3377 (block_unblock_async_io): ... it. New function.
3378 (enable_async_io): Don't install SIGIO handler. Unblock it
3379 instead.
3380 (disable_async_io): Don't ignore SIGIO. Block it instead.
3381 (initialize_async_io): Install SIGIO handler. Don't call
3382 unblock_async_io.
3383
3384 2016-01-26 Yao Qi <yao.qi@linaro.org>
3385
3386 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3387 first character is '\003', call *the_target->request_interrupt.
3388
3389 2016-01-25 Yao Qi <yao.qi@linaro.org>
3390
3391 * remote-utils.c (new_thread_notify): Remove.
3392 (dead_thread_notify): Likewise.
3393 * remote-utils.h (new_thread_notify): Remove declaration.
3394 (dead_thread_notify): Likewise.
3395
3396 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3397
3398 * gdb.trace/pending.exp: Fix expected message on continue.
3399
3400 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3401
3402 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3403 it works properly on big-endian machines where sizeof (CORE_ADDR)
3404 != sizeof (void *).
3405
3406 2016-01-21 Pedro Alves <palves@redhat.com>
3407
3408 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3409 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3410 * configure: Regenerate.
3411
3412 2016-01-21 Yao Qi <yao.qi@linaro.org>
3413
3414 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3415 is_thumb and set it according to CPSR saved on the stack.
3416 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3417 arm_sigreturn_next_pc.
3418
3419 2016-01-18 Yao Qi <yao.qi@linaro.org>
3420
3421 * linux-low.c (linux_set_pc_64bit): New function.
3422 (linux_get_pc_64bit): New function.
3423 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3424 Declare.
3425 * linux-sparc-low.c (debug_threads): Remove declaration.
3426 (sparc_get_pc): Remove.
3427 (the_low_target): Use linux_get_pc_64bit instead of
3428 sparc_get_pc.
3429 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3430 (the_low_target): Use linux_get_pc_64bit and
3431 linux_set_pc_64bit.
3432
3433 2016-01-18 Yao Qi <yao.qi@linaro.org>
3434
3435 * linux-arm-low.c (debug_threads): Remove declaration.
3436 (arm_get_pc, arm_set_pc): Remove.
3437 (the_low_target): Use linux_get_pc_32bit and
3438 linux_set_pc_32bit.
3439 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3440 (the_low_target): Use linux_get_pc_32bit and
3441 linux_set_pc_32bit.
3442 * linux-cris-low.c (debug_threads): Remove declaration.
3443 (cris_get_pc, cris_set_pc,): Remove.
3444 (the_low_target): Use linux_get_pc_32bit and
3445 linux_set_pc_32bit.
3446 * linux-crisv32-low.c (debug_threads): Remove declaration.
3447 (cris_get_pc, cris_set_pc): Remove.
3448 (the_low_target): Use linux_get_pc_32bit and
3449 linux_set_pc_32bit.
3450 * linux-low.c: Include inttypes.h.
3451 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3452 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3453 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3454 (the_low_target): Use linux_get_pc_32bit and
3455 linux_set_pc_32bit.
3456 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3457 (the_low_target): Use linux_get_pc_32bit and
3458 linux_set_pc_32bit.
3459 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3460 (the_low_target): Use linux_get_pc_32bit and
3461 linux_set_pc_32bit.
3462 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3463 (the_low_target): Use linux_get_pc_32bit and
3464 linux_set_pc_32bit.
3465 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3466 (the_low_target): Use linux_get_pc_32bit and
3467 linux_set_pc_32bit.
3468
3469 2016-01-18 Gary Benson <gbenson@redhat.com>
3470
3471 * configure.ac (AC_FUNC_FORK): New check.
3472 * config.in: Regenerate.
3473 * configure: Likewise.
3474
3475 2016-01-14 Yao Qi <yao.qi@linaro.org>
3476
3477 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3478 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3479 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3480 arm_get_next_pcs_ctor.
3481
3482 2016-01-12 Josh Stone <jistone@redhat.com>
3483 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3484
3485 * inferiors.h: Include "gdb_vecs.h".
3486 (struct process_info): Add syscalls_to_catch.
3487 * inferiors.c (remove_process): Free syscalls_to_catch.
3488 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3489 syscall_return stops.
3490 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3491 * server.c (handle_general_set): Handle QCatchSyscalls.
3492 (handle_query): Report support for QCatchSyscalls.
3493 * target.h (struct target_ops): Add supports_catch_syscall.
3494 (target_supports_catch_syscall): New macro.
3495 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3496 (struct lwp_info): Add syscall_state.
3497 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3498 Maintain syscall_state and syscalls_to_catch across exec.
3499 (get_syscall_trapinfo): New function, proxy to the_low_target.
3500 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3501 (linux_low_filter_event): Toggle syscall_state entry/return for
3502 syscall traps, and set it ignored for all others.
3503 (gdb_catching_syscalls_p): New function.
3504 (gdb_catch_this_syscall_p): New function.
3505 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3506 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3507 (linux_supports_catch_syscall): New function.
3508 (linux_target_ops): Install it.
3509 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3510 (the_low_target): Install it.
3511
3512 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3513
3514 * acinclude.m4: Include new ../warning.m4 file.
3515 * configure: Regenerated.
3516 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3517
3518 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3519
3520 * ax.c (is_goto_target): Mark static.
3521 * linux-low.c (register_addr): Likewise.
3522 (linux_fetch_registers, linux_store_registers): Likewise.
3523 * mem-break.c (any_persistent_commands): Fix old prototype.
3524 (add_commands_to_breakpoint): Mark static.
3525 * regcache.c (find_register_by_name): Delete unused func.
3526 * remote-utils.c (hex_or_minus_one): Mark static.
3527 * server.c (monitor_show_help): Mark static.
3528 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3529 handle_v_requests): Likewise.
3530
3531 2016-01-12 Pedro Alves <palves@redhat.com>
3532
3533 Remove use of the registered trademark symbol throughout.
3534
3535 2016-01-08 Yao Qi <yao.qi@linaro.org>
3536
3537 * remote-utils.c (getpkt): If c is '\003', call target hook
3538 request_interrupt.
3539
3540 2016-01-06 Yao Qi <yao.qi@linaro.org>
3541
3542 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3543 linux-aarch32-low.c.
3544 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3545 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3546 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3547 (thumb2_breakpoint): Declare.
3548 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3549 linux-aarch32-low.h.
3550 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3551 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3552 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3553
3554 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3555
3556 * gdbreplay.c (gdbreplay_version): Change copyright year in
3557 version message.
3558 * server.c (gdbserver_version): Likewise.
3559
3560 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3561
3562 * server.c (crc32_table): Delete.
3563 (crc32): Use libiberty's xcrc32 function.
3564
3565 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3566
3567 * lynx-low.c (lynx_delete_thread_callback): New function.
3568 (lynx_mourn): Properly delete our process and all of its
3569 threads. Remove call to clear_inferiors.
3570
3571 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3572
3573 * target.c (thread_search_callback): Add check that
3574 the thread_stopped target callback is not NULL before
3575 calling it.
3576
3577 2015-12-21 Yao Qi <yao.qi@linaro.org>
3578
3579 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3580 arm breakpoint.
3581
3582 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3583
3584 * server.c (handle_query): Call target_supports_software_single_step.
3585
3586 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3587
3588 * linux-low.c (single_step): New function.
3589 (linux_resume_one_lwp_throw): Call single_step.
3590 (start_step_over): Likewise.
3591
3592 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3593
3594 * Makefile.in (SFILES): Append arch/arm-linux.c,
3595 arch/arm-get-next-pcs.c.
3596 (arm-linux.o): New rule.
3597 (arm-get-next-pcs.o): New rule.
3598 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3599 arm-linux.o.
3600 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3601 to linux-aarch32-low.c.
3602 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3603 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3604 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3605 (thumb2_breakpoint_len): Likewise.
3606 (arm_is_thumb_mode): Make non-static.
3607 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3608 from linux-aarch32-low.c.
3609 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3610 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3611 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3612 (thumb2_breakpoint_len): Likewise.
3613 (arm_is_thumb_mode): New declaration.
3614 * linux-arm-low.c: Include arch/arm-linux.h
3615 aarch/arm-get-next-pcs.h, sys/syscall.h.
3616 (get_next_pcs_ops): New struct.
3617 (get_next_pcs_addr_bits_remove): New function.
3618 (get_next_pcs_is_thumb): New function.
3619 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3620 (arm_sigreturn_next_pc): Likewise.
3621 (get_next_pcs_syscall_next_pc): Likewise.
3622 (arm_gdbserver_get_next_pcs): Likewise.
3623 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3624 Initialize.
3625 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3626 * server.h: Include gdb_vecs.h.
3627
3628 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3629
3630 * Makefile.in (SFILES): Append common/common-regcache.c.
3631 (OBS): Append common-regcache.o.
3632 (common-regcache.o): New rule.
3633 * regcache.c (init_register_cache): Initialize cache to
3634 REG_UNAVAILABLE.
3635 (regcache_raw_read_unsigned): New function.
3636 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3637 register_status enum.
3638
3639 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3640
3641 * linux-aarch64-low.c (the_low_targets): Rename
3642 breakpoint_reinsert_addr to get_next_pcs.
3643 * linux-arm-low.c (the_low_targets): Likewise.
3644 * linux-bfin-low.c (the_low_targets): Likewise.
3645 * linux-cris-low.c (the_low_targets): Likewise.
3646 * linux-crisv32-low.c (the_low_targets): Likewise.
3647 * linux-low.c (can_software_single_step): Likewise.
3648 (install_software_single_step_breakpoints): New function.
3649 (start_step_over): Use install_software_single_step_breakpoints.
3650 * linux-low.h: New CORE_ADDR vector.
3651 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3652 get_next_pcs.
3653 * linux-mips-low.c (the_low_targets): Likewise.
3654 * linux-nios2-low.c (the_low_targets): Likewise.
3655 * linux-sparc-low.c (the_low_targets): Likewise.
3656
3657 2015-12-17 Pedro Alves <palves@redhat.com>
3658
3659 * linux-low.c (linux_kill_one_lwp): Remove references to
3660 LinuxThreads.
3661 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3662 to 'kill'.
3663 (linux_init_signals): Delete.
3664 (initialize_low): Adjust.
3665 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3666
3667 2015-12-16 Pedro Alves <palves@redhat.com>
3668
3669 * configure.ac (compiler warning flags): When testing a
3670 -Wno-foo option, check whether -Wfoo works instead.
3671 * configure: Regenerate.
3672
3673 2015-12-11 Don Breazeal <donb@codesourcery.com>
3674
3675 * server.c (process_serial_event): Don't exit from gdbserver
3676 in remote mode if there are still active inferiors.
3677
3678 2015-12-11 Yao Qi <yao.qi@linaro.org>
3679
3680 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3681 arm_breakpoint_at if the process is 32-bit.
3682
3683 2015-12-11 Yao Qi <yao.qi@linaro.org>
3684
3685 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3686 arm breakpoint.
3687
3688 2015-12-07 Yao Qi <yao.qi@linaro.org>
3689
3690 * configure.srv: Append arm.o to srv_tgtobj for
3691 aarch64*-*-linux* target.
3692 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3693 from linux-arm-low.c.
3694 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3695 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3696 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3697 (thumb2_breakpoint_len): Likewise.
3698 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3699 (arm_breakpoint_kinds): Likewise.
3700 (arm_breakpoint_kind_from_pc): Likewise.
3701 (arm_sw_breakpoint_from_kind): Likewise.
3702 (arm_breakpoint_kind_from_current_state): Likewise.
3703 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3704 (arm_sw_breakpoint_from_kind): Declare.
3705 (arm_breakpoint_kind_from_current_state): Declare.
3706 (arm_breakpoint_at): Declare.
3707 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3708 arm_sw_breakpoint_from_kind if process is 32-bit.
3709 (aarch64_breakpoint_kind_from_pc): New function.
3710 (aarch64_breakpoint_kind_from_current_state): New function.
3711 (the_low_target): Initialize fields breakpoint_kind_from_pc
3712 and breakpoint_kind_from_current_state.
3713 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3714 linux-aarch32-low.c.
3715 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3716 (arm_breakpoint, arm_breakpoint_len): Likewise.
3717 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3718 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3719 (arm_is_thumb_mode): Likewise.
3720 (arm_breakpoint_at): Likewise.
3721 (arm_breakpoint_kind_from_pc): Likewise.
3722 (arm_sw_breakpoint_from_kind): Likewise.
3723 (arm_breakpoint_kind_from_current_state): Likewise.
3724
3725 Revert:
3726 2015-08-04 Yao Qi <yao.qi@linaro.org>
3727
3728 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3729 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3730 * server.c (extended_protocol): Remove "static".
3731 * server.h (extended_protocol): Declare it.
3732
3733 2015-12-04 Josh Stone <jistone@redhat.com>
3734
3735 * target.h (struct target_ops) <arch_setup>: Rename to ...
3736 (struct target_ops) <post_create_inferior>: ... this.
3737 (target_arch_setup): Rename to ...
3738 (target_post_create_inferior): ... this, calling post_create_inferior.
3739 * server.c (start_inferior): Update target_arch_setup calls to
3740 target_post_create_inferior.
3741 * linux-low.c (linux_low_ptrace_options): Forward declare.
3742 (linux_arch_setup): Update its comment for general use.
3743 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3744 (struct linux_target_ops): Use linux_post_create_inferior.
3745 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3746 to post_create_inferior.
3747 * nto-low.c (struct nto_target_ops): Likewise.
3748 * spu-low.c (struct spu_target_ops): Likewise.
3749 * win32-low.c (struct win32_target_ops): Likewise.
3750
3751 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3752
3753 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3754
3755 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3756
3757 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3758 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3759 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3760 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3761 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3762 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3763 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3764 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3765 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3766 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3767 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3768 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3769
3770 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3771
3772 * linux-low.c (linux_look_up_symbols): Don't call
3773 linux_supports_traceclone.
3774 * linux-low.h (thread_db_init): Remove use_events argument.
3775 * thread-db.c (thread_db_use_event): Remove global variable.
3776 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3777 (struct thread_db) <td_create_bp>: Remove field.
3778 (thread_db_create_event): Remove function.
3779 (thread_db_enable_reporting): Likewise.
3780 (find_one_thread): Don't check for thread_db_use_events.
3781 (attach_thread): Likewise.
3782 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3783 (try_thread_db_load_1): Don't check for thread_db_use_events.
3784 (thread_db_init): Remove use_events argument and thread events
3785 handling.
3786 (remove_thread_event_breakpoints): Remove function.
3787 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3788
3789 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3790
3791 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3792 New function.
3793 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3794 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3795 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3796 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3797 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3798 Initialize.
3799 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3800 New function.
3801 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3802 * linux-low.c (can_hardware_single_step): Use
3803 supports_hardware_single_step.
3804 (can_software_single_step): New function.
3805 (start_step_over): Call can_software_single_step.
3806 (linux_supports_hardware_single_step): New function.
3807 (struct target_ops) <supports_software_single_step>: Initialize.
3808 * linux-low.h (struct linux_target_ops)
3809 <supports_hardware_single_step>: Initialize.
3810 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3811 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3812 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3813 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3814 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3815 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3816 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3817 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3818 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3819 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3820 Initialize.
3821 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3822 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3823 Initialize.
3824 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3825 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3826 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3827 New function.
3828 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3829 * target.h (struct target_ops): <supports_software_single_step>:
3830 New field.
3831 (target_supports_software_single_step): New macro.
3832
3833 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3834
3835 * linux-low.c (linux_wait_1): Fix pc advance condition.
3836 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3837 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3838
3839 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3840
3841 * linux-arm-low.c (arm_is_thumb_mode): New function.
3842 (arm_breakpoint_at): Use arm_is_thumb_mode.
3843 (arm_breakpoint_kind_from_current_state): New function.
3844 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3845 Initialize.
3846 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3847 (linux_breakpoint_kind_from_current_state): New function.
3848 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3849 * linux-low.h (struct linux_target_ops)
3850 <breakpoint_kind_from_current_state>: New field.
3851 * target.h (struct target_ops): Likewise.
3852 (target_breakpoint_kind_from_current_state): New macro.
3853
3854 2015-11-30 Pedro Alves <palves@redhat.com>
3855
3856 * linux-low.c (linux_resume): Wake up the event loop before
3857 returning.
3858
3859 2015-11-30 Pedro Alves <palves@redhat.com>
3860
3861 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3862 check.
3863 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3864 to -1.
3865 * target.c (struct thread_search): New structure.
3866 (thread_search_callback): New function.
3867 (prev_general_thread): New global.
3868 (prepare_to_access_memory, done_accessing_memory): New functions.
3869 * target.h (prepare_to_access_memory, done_accessing_memory):
3870 Replace macros with function declarations.
3871
3872 2015-11-30 Pedro Alves <palves@redhat.com>
3873
3874 PR 14618
3875 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3876 report TARGET_WAITKIND_NO_RESUMED.
3877 * remote-utils.c (prepare_resume_reply): Handle
3878 TARGET_WAITKIND_NO_RESUMED.
3879 * server.c (report_no_resumed): New global.
3880 (handle_query) <qSupported>: Handle "no-resumed+". Report
3881 "no-resumed+" support.
3882 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3883 return error if the client doesn't support no-resumed events.
3884 (push_stop_notification): New function.
3885 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3886 events if the client supports them.
3887
3888 2015-11-30 Pedro Alves <palves@redhat.com>
3889
3890 * linux-low.c (thread_still_has_status_pending_p): Don't check
3891 vCont;t here.
3892 (lwp_resumed): New function.
3893 (status_pending_p_callback): Return early if the LWP is not
3894 supposed to be resumed.
3895
3896 2015-11-30 Pedro Alves <palves@redhat.com>
3897
3898 * linux-low.c (handle_extended_wait): Assert that the LWP's
3899 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3900 thread create events, leave the new child's status pending.
3901 (linux_low_filter_event): If GDB wants to hear about thread exit
3902 events, leave the LWP marked dead and don't delete it.
3903 (linux_wait_for_event_filtered): Don't check for thread exit.
3904 (filter_exit_event): New function.
3905 (linux_wait_1): Use it, when returning an exit event.
3906 (linux_resume_one_lwp_throw): Assert that the LWP's
3907 waitstatus is TARGET_WAITKIND_IGNORE.
3908 * remote-utils.c (prepare_resume_reply): Handle
3909 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3910 * server.c (report_thread_events): New global.
3911 (handle_general_set): Handle QThreadEvents.
3912 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3913 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3914 TARGET_WAITKIND_THREAD_EXITED.
3915 * server.h (report_thread_events): Declare.
3916
3917 2015-11-30 Pedro Alves <palves@redhat.com>
3918
3919 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3920 the thread's last_resume_kind was resume_stop.
3921
3922 2015-11-30 Pedro Alves <palves@redhat.com>
3923
3924 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3925 before returning.
3926
3927 2015-11-30 Pedro Alves <palves@redhat.com>
3928
3929 * server.c (handle_v_requests): Handle vCtrlC.
3930
3931 2015-11-30 Pedro Alves <palves@redhat.com>
3932
3933 * gdbthread.h (find_any_thread_of_pid): Declare.
3934 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3935 functions.
3936 * server.c (handle_query): If current_thread is NULL, look for
3937 another thread of the selected process.
3938
3939 2015-11-26 Daniel Colascione <dancol@dancol.org>
3940 Simon Marchi <simon.marchi@ericsson.com>
3941
3942 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3943 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3944 name in reply.
3945 * target.h (struct target_ops) <thread_name>: New field.
3946 (target_thread_name): New macro.
3947
3948 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3949
3950 * regcache.h (regcache_invalidate_pid): Add declaration.
3951 * regcache.c (regcache_invalidate_pid): New function, extracted
3952 from regcache_invalidate.
3953 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3954 Add trivial documentation comment.
3955 * lynx-low.c: Use regcache_invalidate_pid instead of
3956 regcache_invalidate.
3957
3958 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3959
3960 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3961 and Elf64_auxv_t if the target is Android.
3962
3963 2015-11-22 Doug Evans <xdje42@gmail.com>
3964
3965 * target.h: #include <sys/types.h>.
3966
3967 2015-11-19 Pedro Alves <palves@redhat.com>
3968
3969 * linux-low.c (linux_process_qsupported): Change prototype.
3970 Adjust.
3971 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3972 Change prototype.
3973 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3974 and adjust to loop over all features.
3975 * server.c (handle_query) <qSupported>: Adjust to call
3976 target_process_qsupported once, passing it a vector of unprocessed
3977 features.
3978 * target.h (struct target_ops) <process_qsupported>: Change
3979 prototype.
3980 (target_process_qsupported): Adjust.
3981
3982 2015-11-19 Pedro Alves <palves@redhat.com>
3983
3984 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3985 mode.
3986 * configure: Regenerate.
3987
3988 2015-11-19 Pedro Alves <palves@redhat.com>
3989
3990 * configure: Regenerate.
3991
3992 2015-11-19 Yao Qi <yao.qi@linaro.org>
3993
3994 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3995 type to uint32_t.
3996
3997 2015-11-19 Yao Qi <yao.qi@linaro.org>
3998
3999 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4000 (struct aarch64_operand): Move enum out.
4001
4002 2015-11-19 Yao Qi <yao.qi@linaro.org>
4003
4004 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4005 struct user_fpsimd_state *.
4006 (aarch64_store_fpregset): Likewise.
4007
4008 2015-11-19 Yao Qi <yao.qi@linaro.org>
4009
4010 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4011 struct user_pt_regs *.
4012 (aarch64_store_gregset): Likewise.
4013
4014 2015-11-18 Pedro Alves <palves@redhat.com>
4015
4016 * Makefile.in (all_object_files): Add $IPA_OBJS.
4017
4018 2015-11-17 Pedro Alves <palves@redhat.com>
4019
4020 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4021 GDB_SIGNAL_0 and gdb_signal_to_string.
4022
4023 2015-11-17 Pedro Alves <palves@redhat.com>
4024
4025 * win32-low.c (handle_output_debug_string): Remove parameter.
4026 (win32_kill): Remove our_status local and adjust call to
4027 handle_output_debug_string.
4028 (get_child_debug_event): Adjust call to
4029 handle_output_debug_string.
4030
4031 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4032
4033 * linux-mips-low.c (mips_fill_gregset): Add cast.
4034 (mips_store_gregset): Likewise.
4035 (mips_fill_fpregset): Likewise.
4036 (mips_store_fpregset): Likewise.
4037
4038 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4039
4040 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4041 priv.
4042
4043 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4044
4045 * linux-mips-low.c (mips_linux_new_thread): Change type of
4046 watch_type to enum target_hw_bp_type.
4047
4048 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4049
4050 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4051 Change return type to arm_hwbp_type.
4052
4053 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4054
4055 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4056 (arm_store_gregset): Likewise.
4057 * linux-arm-low.c (arm_get_hwcap): Likewise.
4058 (arm_read_description): Likewise.
4059
4060 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4061
4062 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4063
4064 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4065
4066 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4067 (ppc_fill_vsxregset): Likewise.
4068 (ppc_store_vsxregset): Likewise.
4069 (ppc_fill_vrregset): Likewise.
4070 (ppc_store_vrregset): Likewise.
4071 (ppc_fill_evrregset): Likewise.
4072 (ppc_store_evrregset): Likewise.
4073
4074 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4075
4076 * linux-ppc-low.c (ppc_usrregs_info): Remove
4077 forward-declaration.
4078 (ppc_arch_setup): Move lower in file.
4079
4080 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4081
4082 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4083 (ps_pdwrite): Likewise.
4084
4085 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4086
4087 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4088 to after assert checks.
4089
4090 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4091
4092 * proc-service.c (ps_pdread): Add/adjust casts.
4093 (ps_pdwrite): Add/adjust casts.
4094
4095 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4096
4097 * server.c (handle_search_memory_1): Cast return value of
4098 memmem.
4099
4100 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4101
4102 * server.c (write_qxfer_response): Change type of data to
4103 gdb_byte *.
4104
4105 2015-10-29 Pedro Alves <palves@redhat.com>
4106
4107 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4108
4109 2015-10-29 Pedro Alves <palves@redhat.com>
4110
4111 * tracepoint.c (clear_installed_tracepoints): Add casts.
4112
4113 2015-10-29 Pedro Alves <palves@redhat.com>
4114
4115 * server.c (handle_v_cont, process_serial_event): Add enum
4116 gdb_signal casts to signal parsing code.
4117
4118 2015-10-29 Pedro Alves <palves@redhat.com>
4119
4120 * linux-low.h (NULL_REGSET): Define.
4121 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4122 * linux-arm-low.c (arm_regsets): Likewise.
4123 * linux-crisv32-low.c (cris_regsets): Likewise.
4124 * linux-m68k-low.c (m68k_regsets): Likewise.
4125 * linux-mips-low.c (mips_regsets): Likewise.
4126 * linux-nios2-low.c (nios2_regsets): Likewise.
4127 * linux-ppc-low.c (ppc_regsets): Likewise.
4128 * linux-s390-low.c (s390_regsets): Likewise.
4129 * linux-sh-low.c (sh_regsets): Likewise.
4130 * linux-sparc-low.c (sparc_regsets): Likewise.
4131 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4132 * linux-tile-low.c (tile_regsets): Likewise.
4133 * linux-x86-low.c (x86_regsets): Likewise.
4134 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4135
4136 2015-10-29 Pedro Alves <palves@redhat.com>
4137
4138 * linux-low.h (NULL_REGSET): Define.
4139 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4140 * linux-arm-low.c (arm_regsets): Likewise.
4141 * linux-crisv32-low.c (cris_regsets): Likewise.
4142 * linux-m68k-low.c (m68k_regsets): Likewise.
4143 * linux-mips-low.c (mips_regsets): Likewise.
4144 * linux-nios2-low.c (nios2_regsets): Likewise.
4145 * linux-ppc-low.c (ppc_regsets): Likewise.
4146 * linux-s390-low.c (s390_regsets): Likewise.
4147 * linux-sh-low.c (sh_regsets): Likewise.
4148 * linux-sparc-low.c (sparc_regsets): Likewise.
4149 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4150 * linux-tile-low.c (tile_regsets): Likewise.
4151 * linux-x86-low.c (x86_regsets): Likewise.
4152 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4153
4154 2015-10-26 Doug Evans <dje@google.com>
4155
4156 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4157
4158 2015-10-26 Doug Evans <dje@google.com>
4159
4160 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4161
4162 2015-10-26 Doug Evans <dje@google.com>
4163
4164 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4165 for debug_printf.
4166 (attach_thread, find_new_threads_callback): Ditto.
4167
4168 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4169
4170 * mem-break.h (set_breakpoint_data): Remove.
4171
4172 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4173
4174 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4175 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4176 (initialize_low): Remove set_breakpoint_data call.
4177 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4178 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4179 (initialize_low): Remove set_breakpoint_data call.
4180 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4181 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4182 (initialize_low): Remove set_breakpoint_data call.
4183
4184 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4185
4186 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4187 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4188 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4189 * target.h (target_breakpoint_kind_from_pc): New macro.
4190
4191 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4192
4193 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4194 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4195 the default breakpoint kind.
4196
4197 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4198
4199 * linux-arm-low.c (arm_supports_z_point_type): Add software
4200 breakpoint support.
4201
4202 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4203
4204 * linux-arm-low.c: Refactor breakpoint definitions.
4205 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4206 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4207
4208 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4209
4210 * Makefile.in: Add arm.c/o.
4211 * configure.srv: Likewise.
4212 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4213 (arm_breakpoint_kind_from_pc): New function.
4214 (arm_sw_breakpoint_from_kind): Return proper kind.
4215 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4216
4217 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4218
4219 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4220 removal.
4221 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4222 (struct raw_breakpoint) <size>: Remove.
4223 (struct raw_breakpoint) <kind>: Add.
4224 (bp_size): New function.
4225 (bp_opcode): Likewise.
4226 (find_raw_breakpoint_at): Adjust for kind.
4227 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4228 (remove_memory_breakpoint): Adjust for kind call bp_size.
4229 (set_raw_breakpoint_at): Adjust for kind.
4230 (set_breakpoint): Likewise.
4231 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4232 (delete_raw_breakpoint): Adjust for kind.
4233 (delete_breakpoint): Likewise.
4234 (find_gdb_breakpoint): Likewise.
4235 (set_gdb_breakpoint_1): Likewise.
4236 (set_gdb_breakpoint): Likewise.
4237 (delete_gdb_breakpoint_1): Likewise.
4238 (delete_gdb_breakpoint): Likewise.
4239 (uninsert_raw_breakpoint): Likewise.
4240 (reinsert_raw_breakpoint): Likewise.
4241 (set_breakpoint_data): Remove.
4242 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4243 (check_mem_read): Adjust for kind call bp_size.
4244 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4245 (clone_one_breakpoint): Adjust for kind.
4246 * mem-break.h (set_gdb_breakpoint): Likewise.
4247 (delete_gdb_breakpoint): Likewise.
4248 * server.c (process_serial_event): Likewise.
4249
4250 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4251
4252 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4253 (struct linux_target_ops) <breakpoint>: Remove.
4254 (struct linux_target_ops) <breakpoint_len>: Remove.
4255 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4256 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4257 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4258 (arm_sw_breakpoint_from_kind): New function.
4259 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4260 (struct linux_target_ops) <breakpoint>: Remove.
4261 (struct linux_target_ops) <breakpoint_len>: Remove.
4262 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4263 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4264 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4265 (struct linux_target_ops) <breakpoint>: Remove.
4266 (struct linux_target_ops) <breakpoint_len>: Remove.
4267 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4268 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4269 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4270 (struct linux_target_ops) <breakpoint>: Remove.
4271 (struct linux_target_ops) <breakpoint_len>: Remove.
4272 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4273 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4274 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4275 and sw_breakpoint_from_kind to increment the pc.
4276 (linux_breakpoint_kind_from_pc): New function.
4277 (linux_sw_breakpoint_from_kind): New function.
4278 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4279 (initialize_low): Call breakpoint_kind_from_pc and
4280 sw_breakpoint_from_kind to replace breakpoint_data/len.
4281 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4282 New field.
4283 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4284 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4285 (struct linux_target_ops) <breakpoint>: Remove.
4286 (struct linux_target_ops) <breakpoint_len>: Remove.
4287 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4288 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4289 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4290 (struct linux_target_ops) <breakpoint>: Remove.
4291 (struct linux_target_ops) <breakpoint_len>: Remove.
4292 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4293 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4294 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4295 (struct linux_target_ops) <breakpoint>: Remove.
4296 (struct linux_target_ops) <breakpoint_len>: Remove.
4297 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4298 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4299 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4300 (struct linux_target_ops) <breakpoint>: Remove.
4301 (struct linux_target_ops) <breakpoint_len>: Remove.
4302 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4303 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4304 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4305 (struct linux_target_ops) <breakpoint>: Remove.
4306 (struct linux_target_ops) <breakpoint_len>: Remove.
4307 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4308 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4309 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4310 (struct linux_target_ops) <breakpoint>: Remove.
4311 (struct linux_target_ops) <breakpoint_len>: Remove.
4312 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4313 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4314 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4315 (struct linux_target_ops) <breakpoint>: Remove.
4316 (struct linux_target_ops) <breakpoint_len>: Remove.
4317 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4318 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4319 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4320 (struct linux_target_ops) <breakpoint>: Remove.
4321 (struct linux_target_ops) <breakpoint_len>: Remove.
4322 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4323 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4324 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4325 (struct linux_target_ops) <breakpoint>: Remove.
4326 (struct linux_target_ops) <breakpoint_len>: Remove.
4327 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4328 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4329 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4330 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4331 (struct linux_target_ops) <breakpoint>: Remove.
4332 (struct linux_target_ops) <breakpoint_len>: Remove.
4333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4334 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4335 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4336 (struct linux_target_ops) <breakpoint>: Remove.
4337 (struct linux_target_ops) <breakpoint_len>: Remove.
4338 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4339 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4340
4341 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4342
4343 * linux-cris-low.c (cris_get_pc): Remove void arg.
4344
4345 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4346
4347 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4348 variable name.
4349
4350 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4351
4352 * inferiors.c (thread_pid_matches_callback): New function.
4353 (find_thread_process): New function.
4354 (remove_thread): Reset current_thread.
4355 (remove_process): Assert threads have been removed first.
4356
4357 2015-10-15 Yao Qi <yao.qi@linaro.org>
4358
4359 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4360 if it is 3.
4361 (aarch64_remove_point): Likewise.
4362 * regcache.c (regcache_register_size): New function.
4363
4364 2015-10-12 Yao Qi <yao.qi@linaro.org>
4365
4366 * linux-aarch64-low.c: Update all callers as emit_load_store
4367 is renamed to aarch64_emit_load_store.
4368
4369 2015-10-12 Yao Qi <yao.qi@linaro.org>
4370
4371 * linux-aarch64-low.c: Update all callers of function renaming
4372 from emit_insn to aarch64_emit_insn.
4373
4374 2015-10-12 Yao Qi <yao.qi@linaro.org>
4375
4376 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4377 arch/aarch64-insn.h.
4378 (struct aarch64_memory_operand): Likewise.
4379 (ENCODE): Likewise.
4380 (emit_insn): Move to arch/aarch64-insn.c.
4381 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4382 (emit_load_store): Move to arch/aarch64-insn.c.
4383 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4384 (can_encode_int32): Remove.
4385
4386 2015-10-12 Yao Qi <yao.qi@linaro.org>
4387
4388 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4389 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4390 (aarch64_relocate_instruction): Likewise.
4391 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4392 (struct aarch64_insn_visitor): Likewise.
4393
4394 2015-10-12 Yao Qi <yao.qi@linaro.org>
4395
4396 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4397 (struct aarch64_insn_visitor): New.
4398 (struct aarch64_insn_relocation_data): New.
4399 (aarch64_ftrace_insn_reloc_b): New function.
4400 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4401 (aarch64_ftrace_insn_reloc_cb): Likewise.
4402 (aarch64_ftrace_insn_reloc_tb): Likewise.
4403 (aarch64_ftrace_insn_reloc_adr): Likewise.
4404 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4405 (aarch64_ftrace_insn_reloc_others): Likewise.
4406 (visitor): New.
4407 (aarch64_relocate_instruction): Use visitor.
4408
4409 2015-10-12 Yao Qi <yao.qi@linaro.org>
4410
4411 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4412 int. Add argument buf.
4413 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4414 aarch64_relocate_instruction.
4415
4416 2015-10-12 Yao Qi <yao.qi@linaro.org>
4417
4418 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4419 argument insn. Remove local variable insn. Don't call
4420 target_read_uint32.
4421 (aarch64_install_fast_tracepoint_jump_pad): Call
4422 target_read_uint32.
4423
4424 2015-09-30 Yao Qi <yao.qi@linaro.org>
4425
4426 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4427 (emit_load_store_pair): Likewise.
4428
4429 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4430
4431 * dll.c (match_dll): Add cast(s).
4432 (unloaded_dll): Likewise.
4433 * linux-low.c (second_thread_of_pid_p): Likewise.
4434 (delete_lwp_callback): Likewise.
4435 (count_events_callback): Likewise.
4436 (select_event_lwp_callback): Likewise.
4437 (linux_set_resume_request): Likewise.
4438 * server.c (accumulate_file_name_length): Likewise.
4439 (emit_dll_description): Likewise.
4440 (handle_qxfer_threads_worker): Likewise.
4441 (visit_actioned_threads): Likewise.
4442 * thread-db.c (any_thread_of): Likewise.
4443 * tracepoint.c (same_process_p): Likewise.
4444 (match_blocktype): Likewise.
4445 (build_traceframe_info_xml): Likewise.
4446
4447 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4448
4449 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4450 assignment.
4451 (gdb_unparse_agent_expr): Likewise.
4452 * hostio.c (require_data): Likewise.
4453 (handle_pread): Likewise.
4454 * linux-low.c (disable_regset): Likewise.
4455 (fetch_register): Likewise.
4456 (store_register): Likewise.
4457 (get_dynamic): Likewise.
4458 (linux_qxfer_libraries_svr4): Likewise.
4459 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4460 (set_fast_tracepoint_jump): Likewise.
4461 (uninsert_fast_tracepoint_jumps_at): Likewise.
4462 (reinsert_fast_tracepoint_jumps_at): Likewise.
4463 (validate_inserted_breakpoint): Likewise.
4464 (clone_agent_expr): Likewise.
4465 * regcache.c (init_register_cache): Likewise.
4466 * remote-utils.c (putpkt_binary_1): Likewise.
4467 (decode_M_packet): Likewise.
4468 (decode_X_packet): Likewise.
4469 (look_up_one_symbol): Likewise.
4470 (relocate_instruction): Likewise.
4471 (monitor_output): Likewise.
4472 * server.c (handle_search_memory): Likewise.
4473 (handle_qxfer_exec_file): Likewise.
4474 (handle_qxfer_libraries): Likewise.
4475 (handle_qxfer): Likewise.
4476 (handle_query): Likewise.
4477 (handle_v_cont): Likewise.
4478 (handle_v_run): Likewise.
4479 (captured_main): Likewise.
4480 * target.c (write_inferior_memory): Likewise.
4481 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4482 * tracepoint.c (init_trace_buffer): Likewise.
4483 (add_tracepoint_action): Likewise.
4484 (add_traceframe): Likewise.
4485 (add_traceframe_block): Likewise.
4486 (cmd_qtdpsrc): Likewise.
4487 (cmd_qtdv): Likewise.
4488 (cmd_qtstatus): Likewise.
4489 (response_source): Likewise.
4490 (response_tsv): Likewise.
4491 (cmd_qtnotes): Likewise.
4492 (gdb_collect): Likewise.
4493 (initialize_tracepoint): Likewise.
4494
4495 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4496
4497 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4498 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4499 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4500 <NOP>: New.
4501 (enum aarch64_condition_codes): New enum.
4502 (w0): New static global.
4503 (fp): Likewise.
4504 (lr): Likewise.
4505 (struct aarch64_memory_operand) <type>: New
4506 MEMORY_OPERAND_POSTINDEX type.
4507 (postindex_memory_operand): New helper function.
4508 (emit_ret): New function.
4509 (emit_load_store_pair): New function, factored out of emit_stp
4510 with support for MEMORY_OPERAND_POSTINDEX.
4511 (emit_stp): Rewrite using emit_load_store_pair.
4512 (emit_ldp): New function.
4513 (emit_load_store): Likewise.
4514 (emit_ldr): Mention post-index instruction in comment.
4515 (emit_ldrh): New function.
4516 (emit_ldrb): New function.
4517 (emit_ldrsw): Mention post-index instruction in comment.
4518 (emit_str): Likewise.
4519 (emit_subs): New function.
4520 (emit_cmp): Likewise.
4521 (emit_and): Likewise.
4522 (emit_orr): Likewise.
4523 (emit_orn): Likewise.
4524 (emit_eor): Likewise.
4525 (emit_mvn): Likewise.
4526 (emit_lslv): Likewise.
4527 (emit_lsrv): Likewise.
4528 (emit_asrv): Likewise.
4529 (emit_mul): Likewise.
4530 (emit_sbfm): Likewise.
4531 (emit_sbfx): Likewise.
4532 (emit_ubfm): Likewise.
4533 (emit_ubfx): Likewise.
4534 (emit_csinc): Likewise.
4535 (emit_cset): Likewise.
4536 (emit_nop): Likewise.
4537 (emit_ops_insns): New helper function.
4538 (emit_pop): Likewise.
4539 (emit_push): Likewise.
4540 (aarch64_emit_prologue): New function.
4541 (aarch64_emit_epilogue): Likewise.
4542 (aarch64_emit_add): Likewise.
4543 (aarch64_emit_sub): Likewise.
4544 (aarch64_emit_mul): Likewise.
4545 (aarch64_emit_lsh): Likewise.
4546 (aarch64_emit_rsh_signed): Likewise.
4547 (aarch64_emit_rsh_unsigned): Likewise.
4548 (aarch64_emit_ext): Likewise.
4549 (aarch64_emit_log_not): Likewise.
4550 (aarch64_emit_bit_and): Likewise.
4551 (aarch64_emit_bit_or): Likewise.
4552 (aarch64_emit_bit_xor): Likewise.
4553 (aarch64_emit_bit_not): Likewise.
4554 (aarch64_emit_equal): Likewise.
4555 (aarch64_emit_less_signed): Likewise.
4556 (aarch64_emit_less_unsigned): Likewise.
4557 (aarch64_emit_ref): Likewise.
4558 (aarch64_emit_if_goto): Likewise.
4559 (aarch64_emit_goto): Likewise.
4560 (aarch64_write_goto_address): Likewise.
4561 (aarch64_emit_const): Likewise.
4562 (aarch64_emit_call): Likewise.
4563 (aarch64_emit_reg): Likewise.
4564 (aarch64_emit_pop): Likewise.
4565 (aarch64_emit_stack_flush): Likewise.
4566 (aarch64_emit_zero_ext): Likewise.
4567 (aarch64_emit_swap): Likewise.
4568 (aarch64_emit_stack_adjust): Likewise.
4569 (aarch64_emit_int_call_1): Likewise.
4570 (aarch64_emit_void_call_2): Likewise.
4571 (aarch64_emit_eq_goto): Likewise.
4572 (aarch64_emit_ne_goto): Likewise.
4573 (aarch64_emit_lt_goto): Likewise.
4574 (aarch64_emit_le_goto): Likewise.
4575 (aarch64_emit_gt_goto): Likewise.
4576 (aarch64_emit_ge_got): Likewise.
4577 (aarch64_emit_ops_impl): New static global variable.
4578 (aarch64_emit_ops): New target function, return
4579 &aarch64_emit_ops_impl.
4580 (struct linux_target_ops): Install it.
4581
4582 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4583
4584 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4585 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4586 aarch64-ipa.o.
4587 * linux-aarch64-ipa.c: New file.
4588 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4589 and endian.h.
4590 (aarch64_get_thread_area): New target method.
4591 (extract_signed_bitfield): New helper function.
4592 (aarch64_decode_ldr_literal): New function.
4593 (enum aarch64_opcodes): New enum.
4594 (struct aarch64_register): New struct.
4595 (struct aarch64_operand): New struct.
4596 (x0): New static global.
4597 (x1): Likewise.
4598 (x2): Likewise.
4599 (x3): Likewise.
4600 (x4): Likewise.
4601 (w2): Likewise.
4602 (ip0): Likewise.
4603 (sp): Likewise.
4604 (xzr): Likewise.
4605 (aarch64_register): New helper function.
4606 (register_operand): Likewise.
4607 (immediate_operand): Likewise.
4608 (struct aarch64_memory_operand): New struct.
4609 (offset_memory_operand): New helper function.
4610 (preindex_memory_operand): Likewise.
4611 (enum aarch64_system_control_registers): New enum.
4612 (ENCODE): New macro.
4613 (emit_insn): New helper function.
4614 (emit_b): New function.
4615 (emit_bcond): Likewise.
4616 (emit_cb): Likewise.
4617 (emit_tb): Likewise.
4618 (emit_blr): Likewise.
4619 (emit_stp): Likewise.
4620 (emit_ldp_q_offset): Likewise.
4621 (emit_stp_q_offset): Likewise.
4622 (emit_load_store): Likewise.
4623 (emit_ldr): Likewise.
4624 (emit_ldrsw): Likewise.
4625 (emit_str): Likewise.
4626 (emit_ldaxr): Likewise.
4627 (emit_stxr): Likewise.
4628 (emit_stlr): Likewise.
4629 (emit_data_processing_reg): Likewise.
4630 (emit_data_processing): Likewise.
4631 (emit_add): Likewise.
4632 (emit_sub): Likewise.
4633 (emit_mov): Likewise.
4634 (emit_movk): Likewise.
4635 (emit_mov_addr): Likewise.
4636 (emit_mrs): Likewise.
4637 (emit_msr): Likewise.
4638 (emit_sevl): Likewise.
4639 (emit_wfe): Likewise.
4640 (append_insns): Likewise.
4641 (can_encode_int32_in): New helper function.
4642 (aarch64_relocate_instruction): New function.
4643 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4644 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4645 (struct linux_target_ops): Install aarch64_get_thread_area,
4646 aarch64_install_fast_tracepoint_jump_pad and
4647 aarch64_get_min_fast_tracepoint_insn_len.
4648
4649 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4650
4651 * Makefile.in (aarch64-insn.o): New rule.
4652 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4653
4654 2015-09-21 Yao Qi <yao.qi@linaro.org>
4655
4656 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4657
4658 2015-09-21 Yao Qi <yao.qi@linaro.org>
4659
4660 * tracepoint.c (max_jump_pad_size): Remove.
4661
4662 2015-09-18 Yao Qi <yao.qi@linaro.org>
4663
4664 * linux-aarch64-low.c: Don't include sys/uio.h.
4665 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4666
4667 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4668
4669 * tracepoint.c (eval_result_type): Change prototype.
4670 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4671
4672 2015-09-15 Pedro Alves <palves@redhat.com>
4673
4674 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4675 Check whether to report exec events instead of checking whether
4676 multiprocess is enabled.
4677
4678 2015-09-15 Pedro Alves <palves@redhat.com>
4679
4680 PR remote/18965
4681 * remote-utils.c (prepare_resume_reply): Merge
4682 TARGET_WAITKIND_VFORK_DONE switch case with the
4683 TARGET_WAITKIND_FORKED case.
4684
4685 2015-09-15 Yao Qi <yao.qi@linaro.org>
4686
4687 * server.c (handle_query): Check string comparison using
4688 "else if" instead of "if".
4689
4690 2015-09-15 Yao Qi <yao.qi@linaro.org>
4691
4692 * server.c (vCont_supported): New global variable.
4693 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4694 matches. Append ";vContSupported+" to own_buf.
4695 (handle_v_requests): Append ";s;S" to own_buf if target supports
4696 hardware single step or vCont_supported is false.
4697 (capture_main): Set vCont_supported to zero.
4698
4699 2015-09-15 Yao Qi <yao.qi@linaro.org>
4700
4701 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4702 it to ...
4703 (linux_supports_hardware_single_step): ... New function.
4704 (linux_target_ops): Update.
4705 * lynx-low.c (lynx_target_ops): Set field
4706 supports_hardware_single_step to target_can_do_hardware_single_step.
4707 * nto-low.c (nto_target_ops): Likewise.
4708 * spu-low.c (spu_target_ops): Likewise.
4709 * win32-low.c (win32_target_ops): Likewise.
4710 * target.c (target_can_do_hardware_single_step): New function.
4711 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4712 Remove. <supports_hardware_single_step>: New field.
4713 (target_supports_conditional_breakpoints): Remove.
4714 (target_supports_hardware_single_step): New macro.
4715 (target_can_do_hardware_single_step): Declare.
4716 * server.c (handle_query): Use target_supports_hardware_single_step
4717 instead of target_supports_conditional_breakpoints.
4718
4719 2015-09-15 Yao Qi <yao.qi@linaro.org>
4720
4721 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4722 function.
4723 (struct linux_target_ops the_low_target): Install
4724 aarch64_linux_siginfo_fixup.
4725
4726 2015-09-11 Don Breazeal <donb@codesourcery.com>
4727 Luis Machado <lgustavo@codesourcery.com>
4728
4729 * linux-low.c (linux_mourn): Static declaration.
4730 (linux_arch_setup): Move in front of
4731 handle_extended_wait.
4732 (linux_arch_setup_thread): New function.
4733 (handle_extended_wait): Handle exec events. Call
4734 linux_arch_setup_thread. Make event_lwp argument a
4735 pointer-to-a-pointer.
4736 (check_zombie_leaders): Do not check stopped threads.
4737 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4738 (linux_low_filter_event): Add lwp and thread for exec'ing
4739 non-leader thread if leader thread has been deleted.
4740 Refactor code into linux_arch_setup_thread and call it.
4741 Pass child lwp pointer by reference to handle_extended_wait.
4742 (linux_wait_for_event_filtered): Update comment.
4743 (linux_wait_1): Prevent clobbering exec event status.
4744 (linux_supports_exec_events): New function.
4745 (linux_target_ops) <supports_exec_events>: Initialize new member.
4746 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4747 new member.
4748 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4749 * server.c (report_exec_events): New global variable.
4750 (handle_query): Handle qSupported query for exec-events feature.
4751 (captured_main): Initialize report_exec_events.
4752 * server.h (report_exec_events): Declare new global variable.
4753 * target.h (struct target_ops) <supports_exec_events>: New
4754 member.
4755 (target_supports_exec_events): New macro.
4756 * win32-low.c (win32_target_ops) <supports_exec_events>:
4757 Initialize new member.
4758
4759 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4760
4761 * linux-low.c (linux_low_enable_btrace): Remove.
4762 (linux_target_ops): Replace linux_low_enable_btrace with
4763 linux_enable_btrace.
4764
4765 2015-09-03 Yao Qi <yao.qi@linaro.org>
4766
4767 * linux-aarch64-low.c (aarch64_insert_point): Call
4768 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4769 returns true.
4770
4771 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4772
4773 * linux-low.c (check_stopped_by_breakpoint): Use
4774 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4775
4776 2015-08-27 Pedro Alves <palves@redhat.com>
4777
4778 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4779
4780 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4781
4782 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4783 the XNEW-family equivalent.
4784 (compile_bytecodes): Likewise.
4785 * dll.c (loaded_dll): Likewise.
4786 * event-loop.c (append_callback_event): Likewise.
4787 (create_file_handler): Likewise.
4788 (create_file_event): Likewise.
4789 * hostio.c (handle_open): Likewise.
4790 * inferiors.c (add_thread): Likewise.
4791 (add_process): Likewise.
4792 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4793 * linux-arm-low.c (arm_new_process): Likewise.
4794 (arm_new_thread): Likewise.
4795 * linux-low.c (add_to_pid_list): Likewise.
4796 (linux_add_process): Likewise.
4797 (handle_extended_wait): Likewise.
4798 (add_lwp): Likewise.
4799 (enqueue_one_deferred_signal): Likewise.
4800 (enqueue_pending_signal): Likewise.
4801 (linux_resume_one_lwp_throw): Likewise.
4802 (linux_resume_one_thread): Likewise.
4803 (linux_read_memory): Likewise.
4804 (linux_write_memory): Likewise.
4805 * linux-mips-low.c (mips_linux_new_process): Likewise.
4806 (mips_linux_new_thread): Likewise.
4807 (mips_add_watchpoint): Likewise.
4808 * linux-x86-low.c (initialize_low_arch): Likewise.
4809 * lynx-low.c (lynx_add_process): Likewise.
4810 * mem-break.c (set_raw_breakpoint_at): Likewise.
4811 (set_breakpoint): Likewise.
4812 (add_condition_to_breakpoint): Likewise.
4813 (add_commands_to_breakpoint): Likewise.
4814 (clone_agent_expr): Likewise.
4815 (clone_one_breakpoint): Likewise.
4816 * regcache.c (new_register_cache): Likewise.
4817 * remote-utils.c (look_up_one_symbol): Likewise.
4818 * server.c (queue_stop_reply): Likewise.
4819 (start_inferior): Likewise.
4820 (queue_stop_reply_callback): Likewise.
4821 (handle_target_event): Likewise.
4822 * spu-low.c (fetch_ppc_memory): Likewise.
4823 (store_ppc_memory): Likewise.
4824 * target.c (set_target_ops): Likewise.
4825 * thread-db.c (thread_db_load_search): Likewise.
4826 (try_thread_db_load_1): Likewise.
4827 * tracepoint.c (add_tracepoint): Likewise.
4828 (add_tracepoint_action): Likewise.
4829 (create_trace_state_variable): Likewise.
4830 (cmd_qtdpsrc): Likewise.
4831 (cmd_qtro): Likewise.
4832 (add_while_stepping_state): Likewise.
4833 * win32-low.c (child_add_thread): Likewise.
4834 (get_image_name): Likewise.
4835
4836 2015-08-25 Yao Qi <yao.qi@linaro.org>
4837
4838 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4839
4840 2015-08-25 Yao Qi <yao.qi@linaro.org>
4841
4842 * Makefile.in (aarch64-linux.o): New rule.
4843 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4844 srv_tgtobj.
4845 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4846 (aarch64_init_debug_reg_state): Make it extern.
4847 (aarch64_linux_prepare_to_resume): Remove.
4848
4849 2015-08-25 Yao Qi <yao.qi@linaro.org>
4850
4851 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4852 lwp_arch_private_info and ptid_of_lwp.
4853
4854 2015-08-25 Yao Qi <yao.qi@linaro.org>
4855
4856 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4857 Find proc_info by find_process_pid. All callers updated.
4858
4859 2015-08-25 Yao Qi <yao.qi@linaro.org>
4860
4861 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4862 Remove.
4863 (debug_reg_change_callback): Remove.
4864 (aarch64_notify_debug_reg_change): Remove.
4865
4866 2015-08-25 Yao Qi <yao.qi@linaro.org>
4867
4868 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4869 Call current_lwp_ptid.
4870
4871 2015-08-25 Yao Qi <yao.qi@linaro.org>
4872
4873 * linux-aarch64-low.c (debug_reg_change_callback): Use
4874 debug_printf.
4875
4876 2015-08-25 Yao Qi <yao.qi@linaro.org>
4877
4878 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4879
4880 2015-08-25 Yao Qi <yao.qi@linaro.org>
4881
4882 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4883
4884 2015-08-25 Yao Qi <yao.qi@linaro.org>
4885
4886 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4887 the code.
4888
4889 2015-08-25 Yao Qi <yao.qi@linaro.org>
4890
4891 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4892 Remove.
4893 (debug_reg_change_callback): Remove argument entry and add argument
4894 lwp. Remove local variable thread. Don't print thread id in the
4895 debugging output. Don't check whether pid of thread equals to pid.
4896 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4897 iterate_over_lwps instead find_inferior.
4898
4899 2015-08-24 Pedro Alves <palves@redhat.com>
4900
4901 * inferiors.c (get_first_process): New function.
4902 * inferiors.h (get_first_process): New declaration.
4903 * remote-utils.c (read_ptid): Default to the first process in the
4904 list, instead of to the current thread's process.
4905
4906 2015-08-24 Pedro Alves <palves@redhat.com>
4907
4908 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4909 * event-loop.c: Likewise.
4910 * remote-utils.c: Likewise.
4911 * tracepoint.c: Likewise.
4912
4913 2015-08-24 Pedro Alves <palves@redhat.com>
4914
4915 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4916 ptid_get_lwp.
4917
4918 2015-08-21 Pedro Alves <palves@redhat.com>
4919
4920 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4921 instead of literal 1.
4922
4923 2015-08-21 Pedro Alves <palves@redhat.com>
4924
4925 * tdesc.c (default_description): Explicitly zero-initialize.
4926
4927 2015-08-21 Pedro Alves <palves@redhat.com>
4928
4929 PR gdb/18749
4930 * inferiors.c (remove_thread): Discard any pending stop reply for
4931 this thread.
4932 * server.c (remove_all_on_match_pid): Rename to ...
4933 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4934 instead of a pid.
4935 (discard_queued_stop_replies): Change parameter to a ptid. Now
4936 extern.
4937 (handle_v_kill, kill_inferior_callback, captured_main)
4938 (process_serial_event): Adjust.
4939 * server.h (discard_queued_stop_replies): Declare.
4940
4941 2015-08-21 Pedro Alves <palves@redhat.com>
4942
4943 * linux-low.c (wait_for_sigstop): Always switch to no thread
4944 selected if the previously current thread dies.
4945 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4946 process instead of the current thread's.
4947 * remote-utils.c (input_interrupt): Don't check if there's no
4948 current thread.
4949 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4950 current thread to the general thread fails, error out.
4951 (handle_qxfer_auxv, handle_qxfer_libraries)
4952 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4953 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4954 (handle_query): Check if there's a thread selected instead of
4955 checking whether there's any thread in the thread list.
4956 (handle_qxfer_threads, handle_qxfer_btrace)
4957 (handle_qxfer_btrace_conf): Don't error out early if there's no
4958 thread in the thread list.
4959 (handle_v_cont, myresume): Don't set the current thread to the
4960 continue thread.
4961 (process_serial_event) <Hg handling>: Also set thread_id if the
4962 previous general thread is still alive.
4963 (process_serial_event) <g/G handling>: If setting the current
4964 thread to the general thread fails, error out.
4965 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4966 thread's lwp instead of the current thread's.
4967 * target.c (set_desired_thread): If the desired thread was not
4968 found, leave the current thread pointing to NULL. Return an int
4969 (boolean) indicating success.
4970 * target.h (set_desired_thread): Change return type to int.
4971
4972 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4973
4974 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4975 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4976 #includes.
4977 (ps_get_thread_area): New function.
4978
4979 2015-08-19 Gary Benson <gbenson@redhat.com>
4980
4981 * hostio.c (handle_pread): Do not attempt to read more data
4982 than hostio_reply_with_data can fit in a packet.
4983
4984 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4985
4986 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4987
4988 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4989
4990 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4991
4992 2015-08-06 Pedro Alves <palves@redhat.com>
4993
4994 * tracepoint.c (expr_eval_result): Now an int.
4995
4996 2015-08-06 Pedro Alves <palves@redhat.com>
4997
4998 * gdbthread.h (struct regcache): Forward declare.
4999 (struct thread_info) <regcache_data>: Now a struct regcache
5000 pointer.
5001 * inferiors.c (inferior_regcache_data)
5002 (set_inferior_regcache_data): Now work with struct regcache
5003 pointers.
5004 * inferiors.h (struct regcache): Forward declare.
5005 (inferior_regcache_data, set_inferior_regcache_data): Now work
5006 with struct regcache pointers.
5007 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5008 (free_register_cache_thread): Remove struct regcache pointer
5009 casts.
5010
5011 2015-08-06 Pedro Alves <palves@redhat.com>
5012
5013 * server.c (captured_main): On error, print the exception message
5014 to stderr, and if run_once is set, throw a quit.
5015
5016 2015-08-06 Pedro Alves <palves@redhat.com>
5017
5018 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5019 the current thread.
5020
5021 2015-08-06 Pedro Alves <palves@redhat.com>
5022
5023 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5024 reading beyond the passed in buffer length.
5025
5026 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5027
5028 * tracepoint.c (symbol_list) <required>: Remove.
5029
5030 2015-08-06 Pedro Alves <palves@redhat.com>
5031
5032 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5033 count if stopping and suspending threads.
5034 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5035 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5036 (linux_detach): Complete an ongoing step-over.
5037 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5038 throughout.
5039 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5040 (linux_wait_1): If passing a signal to the inferior after
5041 finishing a step-over, unsuspend and re-resume all lwps. If we
5042 see a single-step event but the thread should be continuing, don't
5043 pass the trap to gdb.
5044 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5045 internal_error instead of gdb_assert.
5046 (enqueue_pending_signal): New function.
5047 (check_ptrace_stopped_lwp_gone): Add debug output.
5048 (start_step_over): Use internal_error instead of gdb_assert.
5049 (complete_ongoing_step_over): New function.
5050 (linux_resume_one_thread): Don't resume a suspended thread.
5051 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5052 it stepping.
5053
5054 2015-08-06 Pedro Alves <palves@redhat.com>
5055
5056 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5057 (linux_thread_alive): Use lwp_is_marked_dead.
5058 (extended_event_reported): Delete.
5059 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5060 instead of extended_event_reported.
5061 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5062 as well.
5063 (lwp_is_marked_dead): New function.
5064 (lwp_running): Use lwp_is_marked_dead.
5065 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5066 comment.
5067
5068 2015-08-06 Pedro Alves <palves@redhat.com>
5069
5070 * linux-low.c (linux_wait_1): Move fork event output out of the
5071 !report_to_gdb check. Pass event_child->waitstatus to
5072 target_waitstatus_to_string instead of ourstatus.
5073
5074 2015-08-04 Yao Qi <yao.qi@linaro.org>
5075
5076 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5077 if current_thread is 32 bit.
5078
5079 2015-08-04 Yao Qi <yao.qi@linaro.org>
5080
5081 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5082 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5083 * server.c (extended_protocol): Remove "static".
5084 * server.h (extended_protocol): Declare it.
5085
5086 2015-08-04 Yao Qi <yao.qi@linaro.org>
5087
5088 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5089 both aarch64 and aarch32.
5090 (aarch64_set_pc): Likewise.
5091
5092 2015-08-04 Yao Qi <yao.qi@linaro.org>
5093
5094 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5095 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5096 arm-with-neon.xml to srv_xmlfiles.
5097 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5098 (is_64bit_tdesc): New function.
5099 (aarch64_linux_read_description): New function.
5100 (aarch64_arch_setup): Call aarch64_linux_read_description.
5101 (regs_info): Rename to regs_info_aarch64.
5102 (aarch64_regs_info): Return right regs_info.
5103 (initialize_low_arch): Call initialize_low_arch_aarch32.
5104
5105 2015-08-04 Yao Qi <yao.qi@linaro.org>
5106
5107 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5108 * linux-aarch32-low.c: New file.
5109 * linux-aarch32-low.h: New file.
5110 * linux-arm-low.c (arm_fill_gregset): Move it to
5111 linux-aarch32-low.c.
5112 (arm_store_gregset): Likewise.
5113 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5114 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5115 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5116 (regs_info): Rename to regs_info_arm.
5117 (arm_regs_info): Return regs_info_aarch32 if
5118 have_ptrace_getregset is 1 and target description is
5119 arm_with_neon or arm_with_vfpv3.
5120 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5121 Call initialize_low_arch_aarch32 instead.
5122
5123 2015-08-04 Yao Qi <yao.qi@linaro.org>
5124
5125 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5126 * linux-low.c: ... here.
5127 * linux-low.h (have_ptrace_getregset): Declare it.
5128
5129 2015-08-04 Pedro Alves <palves@redhat.com>
5130
5131 * thread-db.c (struct thread_db): Use new typedefs.
5132 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5133 CHK calls.
5134 (disable_thread_event_reporting): Cast result of dlsym to
5135 destination function pointer type.
5136 (thread_db_mourn): Use td_ta_delete_ftype.
5137
5138 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5139
5140 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5141 arch variant.
5142 (CDX_BREAKPOINT): Define for R2.
5143 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5144 (the_low_target): Add comments.
5145
5146 2015-07-30 Yao Qi <yao.qi@linaro.org>
5147
5148 * linux-arm-low.c (arm_hwcap): Remove it.
5149 (arm_read_description): New local variable arm_hwcap. Don't
5150 set arm_hwcap to zero.
5151
5152 2015-07-30 Yao Qi <yao.qi@linaro.org>
5153
5154 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5155 Use regcache->tdesc instead.
5156 (arm_store_wmmxregset): Likewise.
5157 (arm_fill_vfpregset): Likewise.
5158 (arm_store_vfpregset): Likewise.
5159
5160 2015-07-30 Yao Qi <yao.qi@linaro.org>
5161
5162 * linux-arm-low.c: Include arch/arm.h.
5163 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5164 (arm_store_gregset): Likewise.
5165
5166 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5167
5168 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5169 ptrace's 4th parameter.
5170
5171 2015-07-27 Yao Qi <yao.qi@linaro.org>
5172
5173 * configure.srv (case aarch64*-*-linux*): Don't set
5174 srv_linux_usrregs.
5175
5176 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5177
5178 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5179 sys/ptrace.h.
5180 * linux-arm-low.c: Likewise.
5181 * linux-cris-low.c: Likewise.
5182 * linux-crisv32-low.c: Likewise.
5183 * linux-low.c: Likewise.
5184 * linux-m68k-low.c: Likewise.
5185 * linux-mips-low.c: Likewise.
5186 * linux-nios2-low.c: Likewise.
5187 * linux-s390-low.c: Likewise.
5188 * linux-sparc-low.c: Likewise.
5189 * linux-tic6x-low.c: Likewise.
5190 * linux-tile-low.c: Likewise.
5191 * linux-x86-low.c: Likewise.
5192
5193 2015-07-24 Pedro Alves <palves@redhat.com>
5194
5195 * config.in: Regenerate.
5196 * configure: Regenerate.
5197
5198 2015-07-24 Pedro Alves <palves@redhat.com>
5199
5200 * acinclude.m4: Include ../ptrace.m4.
5201 * configure.ac: Call GDB_AC_PTRACE.
5202 * config.in, configure: Regenerate.
5203
5204 2015-07-24 Yao Qi <yao.qi@linaro.org>
5205
5206 * linux-low.c (linux_create_inferior): Remove setting to
5207 proc->priv->new_inferior.
5208 (linux_attach): Likewise.
5209 (linux_low_filter_event): Likewise.
5210 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5211
5212 2015-07-24 Yao Qi <yao.qi@linaro.org>
5213
5214 * linux-low.c (linux_arch_setup): New function.
5215 (linux_low_filter_event): If proc->tdesc is NULL and
5216 proc->attached is true, call the_low_target.arch_setup.
5217 Otherwise, keep status pending, and return.
5218 (linux_resume_one_lwp_throw): Don't call get_pc if
5219 thread->while_stepping isn't NULL. Don't call
5220 get_thread_regcache if proc->tdesc is NULL.
5221 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5222 (linux_target_ops): Install arch_setup.
5223 * server.c (start_inferior): Call the_target->arch_setup.
5224 * target.h (struct target_ops) <arch_setup>: New field.
5225 (target_arch_setup): New marco.
5226 * lynx-low.c (lynx_target_ops): Update.
5227 * nto-low.c (nto_target_ops): Update.
5228 * spu-low.c (spu_target_ops): Update.
5229 * win32-low.c (win32_target_ops): Update.
5230
5231 2015-07-24 Yao Qi <yao.qi@linaro.org>
5232
5233 * linux-low.c (linux_add_process): Don't set
5234 proc->priv->new_inferior.
5235 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5236 (linux_attach): Likewise.
5237
5238 2015-07-24 Yao Qi <yao.qi@linaro.org>
5239
5240 * server.c (start_inferior): Code refactor.
5241
5242 2015-07-24 Yao Qi <yao.qi@linaro.org>
5243
5244 * server.c (process_serial_event): Set general_thread.
5245
5246 2015-07-21 Yao Qi <yao.qi@linaro.org>
5247
5248 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5249 aarch64_linux_get_debug_reg_capacity.
5250
5251 2015-07-17 Yao Qi <yao.qi@linaro.org>
5252
5253 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5254 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5255 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5256 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5257 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5258 (AARCH64_HWP_ALIGNMENT): Likewise.
5259 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5260 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5261 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5262 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5263 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5264 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5265 (struct aarch64_debug_reg_state): Likewise.
5266 (struct arch_lwp_info): Likewise.
5267 (aarch64_align_watchpoint): Likewise.
5268 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5269 (aarch64_watchpoint_length): Likewise.
5270 (aarch64_point_encode_ctrl_reg): Likewise
5271 (aarch64_point_is_aligned): Likewise.
5272 (aarch64_align_watchpoint): Likewise.
5273 (aarch64_linux_set_debug_regs):
5274 (aarch64_dr_state_insert_one_point): Likewise.
5275 (aarch64_dr_state_remove_one_point): Likewise.
5276 (aarch64_handle_breakpoint): Likewise.
5277 (aarch64_handle_aligned_watchpoint): Likewise.
5278 (aarch64_handle_unaligned_watchpoint): Likewise.
5279 (aarch64_handle_watchpoint): Likewise.
5280
5281 2015-07-17 Yao Qi <yao.qi@linaro.org>
5282
5283 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5284 and don't aarch64_get_debug_reg_state. All callers update.
5285 (aarch64_handle_aligned_watchpoint): Likewise.
5286 (aarch64_handle_unaligned_watchpoint): Likewise.
5287 (aarch64_handle_watchpoint): Likewise.
5288 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5289 (aarch64_remove_point): Likewise.
5290
5291 2015-07-17 Yao Qi <yao.qi@linaro.org>
5292
5293 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5294 debug_printf.
5295 (aarch64_handle_unaligned_watchpoint): Likewise.
5296
5297 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5298
5299 Revert the previous 3 commits:
5300 Move gdb_regex* to common/
5301 Move linux_find_memory_regions_full & co.
5302 gdbserver build-id attribute generator
5303
5304 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5305 Jan Kratochvil <jan.kratochvil@redhat.com>
5306
5307 gdbserver build-id attribute generator.
5308 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5309 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5310 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5311 (find_phdr): New.
5312 (get_dynamic): Use find_pdhr to traverse program headers.
5313 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5314 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5315 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5316 (get_hex_build_id): New.
5317 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5318 to reply XML document.
5319
5320 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5321 Jan Kratochvil <jan.kratochvil@redhat.com>
5322
5323 * target.c: Include target/target-utils.h and fcntl.h.
5324 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5325 (target_fileio_read_stralloc): New functions.
5326
5327 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5328
5329 * Makefile.in (OBS): Add gdb_regex.o.
5330 (gdb_regex.o): New.
5331 * config.in: Rebuilt.
5332 * configure: Rebuilt.
5333
5334 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5335 Jan Kratochvil <jan.kratochvil@redhat.com>
5336
5337 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5338 * Makefile.in (OBS): Add target-utils.o.
5339 (linux-maps.o, target-utils.o): New.
5340 * configure.srv (srv_linux_obj): Add linux-maps.o.
5341
5342 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5343
5344 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5345 function, return 1.
5346 (the_low_target): Install it.
5347
5348 2015-07-14 Pedro Alves <palves@redhat.com>
5349
5350 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5351 Instead, ignore ECHILD, and throw an error for other errnos.
5352
5353 2015-07-10 Pedro Alves <palves@redhat.com>
5354
5355 * event-loop.c (struct callback_event) <data>: Change type to
5356 gdb_client_data instance instead of gdb_client_data pointer.
5357 (append_callback_event): Adjust.
5358
5359 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5360
5361 * linux-aarch64-low.c: Add comments for each linux_target_ops
5362 method. Remove comments already covered in target_ops and
5363 linux_target_ops definitions.
5364 (the_low_target): Add comments for each unimplemented method.
5365
5366 2015-07-09 Yao Qi <yao.qi@linaro.org>
5367
5368 * linux-aarch64-low.c (aarch64_regmap): Remove.
5369 (aarch64_usrregs_info): Remove.
5370 (regs_info): Set field usrregs to NULL.
5371
5372 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5373
5374 * linux-low.c: Include "rsp-low.h"
5375 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5376 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5377 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5378 (handle_btrace_enable_pt): New.
5379 (handle_btrace_general_set): Support "pt".
5380 (handle_btrace_conf_general_set): Support "pt:size".
5381
5382 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5383
5384 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5385 Z_PACKET_SW_BP.
5386
5387 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5388
5389 * linux-aarch64-low.c: Remove comment about endianness.
5390 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5391 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5392 memcmp.
5393
5394 2015-06-24 Gary Benson <gbenson@redhat.com>
5395
5396 * linux-i386-ipa.c (stdint.h): Do not include.
5397 * lynx-i386-low.c (stdint.h): Likewise.
5398 * lynx-ppc-low.c (stdint.h): Likewise.
5399 * mem-break.c (stdint.h): Likewise.
5400 * thread-db.c (stdint.h): Likewise.
5401 * tracepoint.c (stdint.h): Likewise.
5402 * win32-low.c (stdint.h): Likewise.
5403
5404 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5405
5406 * server.c (write_qxfer_response): Update call to
5407 remote_escape_output.
5408
5409 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5410 Jan Kratochvil <jan.kratochvil@redhat.com>
5411
5412 Merge multiple hex conversions.
5413 * gdbreplay.c (tohex): Rename to 'fromhex'.
5414 (logchar): Use fromhex.
5415
5416 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5417
5418 * server.c (handle_qxfer_libraries): Set `version' attribute for
5419 <library-list>.
5420
5421 2015-06-10 Gary Benson <gbenson@redhat.com>
5422
5423 * target.h (struct target_ops) <multifs_open>: New field.
5424 <multifs_unlink>: Likewise.
5425 <multifs_readlink>: Likewise.
5426 * linux-low.c (nat/linux-namespaces.h): New include.
5427 (linux_target_ops): Initialize the_target->multifs_open,
5428 the_target->multifs_unlink and the_target->multifs_readlink.
5429 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5430 * hostio.c (hostio_fs_pid): New static variable.
5431 (hostio_handle_new_gdb_connection): New function.
5432 (handle_setfs): Likewise.
5433 (handle_open): Use the_target->multifs_open as appropriate.
5434 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5435 (handle_readlink): Use the_target->multifs_readlink as
5436 appropriate.
5437 (handle_vFile): Handle vFile:setfs packets.
5438 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5439 after target_handle_new_gdb_connection.
5440
5441 2015-06-10 Gary Benson <gbenson@redhat.com>
5442
5443 * configure.ac (AC_CHECK_FUNCS): Add setns.
5444 * config.in: Regenerate.
5445 * configure: Likewise.
5446 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5447 (linux-namespaces.o): New rule.
5448 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5449
5450 2015-06-09 Gary Benson <gbenson@redhat.com>
5451
5452 * hostio.c (handle_open): Process mode argument with
5453 fileio_to_host_mode.
5454
5455 2015-06-01 Yao Qi <yao.qi@linaro.org>
5456
5457 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5458 * linux-x86-low.c: Likewise.
5459
5460 2015-05-28 Don Breazeal <donb@codesourcery.com>
5461
5462 * linux-low.c (handle_extended_wait): Initialize
5463 thread_info.last_resume_kind for new fork children.
5464
5465 2015-05-15 Pedro Alves <palves@redhat.com>
5466
5467 * target.h (target_handle_new_gdb_connection): Rewrite using if
5468 wrapped in do/while.
5469
5470 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5471
5472 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5473 * configure, config.in: Regenerate.
5474 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5475 Declare typedef.
5476
5477 2015-05-12 Don Breazeal <donb@codesourcery.com>
5478
5479 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5480 PTRACE_EVENT_VFORK_DONE.
5481 (linux_low_ptrace_options, extended_event_reported): Add vfork
5482 events.
5483 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5484 and "vforkdone" for RSP 'T' Stop Reply Packet.
5485 * server.h (report_vfork_events): Declare
5486 global variable.
5487
5488 2015-05-12 Don Breazeal <donb@codesourcery.com>
5489
5490 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5491 (the_low_target) <new_fork>: Initialize new member.
5492 * linux-arm-low.c (arm_new_fork): New function.
5493 (the_low_target) <new_fork>: Initialize new member.
5494 * linux-low.c (handle_extended_wait): Call new target function
5495 new_fork.
5496 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5497 * linux-mips-low.c (mips_add_watchpoint): New function
5498 extracted from mips_insert_point.
5499 (the_low_target) <new_fork>: Initialize new member.
5500 (mips_linux_new_fork): New function.
5501 (mips_insert_point): Call mips_add_watchpoint.
5502 * linux-x86-low.c (x86_linux_new_fork): New function.
5503 (the_low_target) <new_fork>: Initialize new member.
5504
5505 2015-05-12 Don Breazeal <donb@codesourcery.com>
5506
5507 * linux-low.c (handle_extended_wait): Implement return value,
5508 rename argument 'event_child' to 'event_lwp', handle
5509 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5510 (linux_low_ptrace_options): New function.
5511 (linux_low_filter_event): Call linux_low_ptrace_options,
5512 use different argument fo linux_enable_event_reporting,
5513 use return value from handle_extended_wait.
5514 (extended_event_reported): New function.
5515 (linux_wait_1): Call extended_event_reported and set
5516 status to report fork events.
5517 (linux_write_memory): Add pid to debug message.
5518 (reset_lwp_ptrace_options_callback): New function.
5519 (linux_handle_new_gdb_connection): New function.
5520 (linux_target_ops): Initialize new structure member.
5521 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5522 * lynx-low.c: Initialize new structure member.
5523 * remote-utils.c (prepare_resume_reply): Implement stop reason
5524 "fork" for "T" stop message.
5525 * server.c (handle_query): Call handle_new_gdb_connection.
5526 * server.h (report_fork_events): Declare global flag.
5527 * target.h (struct target_ops) <handle_new_gdb_connection>:
5528 New member.
5529 (target_handle_new_gdb_connection): New macro.
5530 * win32-low.c: Initialize new structure member.
5531
5532 2015-05-12 Don Breazeal <donb@codesourcery.com>
5533
5534 * mem-break.c (APPEND_TO_LIST): Define macro.
5535 (clone_agent_expr): New function.
5536 (clone_one_breakpoint): New function.
5537 (clone_all_breakpoints): New function.
5538 * mem-break.h: Declare new functions.
5539
5540 2015-05-12 Don Breazeal <donb@codesourcery.com>
5541
5542 * linux-low.c (linux_supports_fork_events): New function.
5543 (linux_supports_vfork_events): New function.
5544 (linux_target_ops): Initialize new structure members.
5545 (initialize_low): Call linux_check_ptrace_features.
5546 * lynx-low.c (lynx_target_ops): Initialize new structure
5547 members.
5548 * server.c (report_fork_events, report_vfork_events):
5549 New global flags.
5550 (handle_query): Add new features to qSupported packet and
5551 response.
5552 (captured_main): Initialize new global variables.
5553 * target.h (struct target_ops) <supports_fork_events>:
5554 New member.
5555 <supports_vfork_events>: New member.
5556 (target_supports_fork_events): New macro.
5557 (target_supports_vfork_events): New macro.
5558 * win32-low.c (win32_target_ops): Initialize new structure
5559 members.
5560
5561 2015-05-12 Gary Benson <gbenson@redhat.com>
5562
5563 * server.c (handle_qxfer_exec_file): Use current process
5564 if annex is empty.
5565
5566 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5567
5568 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5569 Remove HAVE_PTRACE_GETREGS conditionals.
5570 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5571 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5572
5573 2015-05-08 Yao Qi <yao.qi@linaro.org>
5574
5575 * linux-low.c (linux_supports_conditional_breakpoints): New
5576 function.
5577 (linux_target_ops): Install new target method.
5578 * lynx-low.c (lynx_target_ops): Install NULL hook for
5579 supports_conditional_breakpoints.
5580 * nto-low.c (nto_target_ops): Likewise.
5581 * spu-low.c (spu_target_ops): Likewise.
5582 * win32-low.c (win32_target_ops): Likewise.
5583 * server.c (handle_query): Check
5584 target_supports_conditional_breakpoints.
5585 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5586 New field.
5587 (target_supports_conditional_breakpoints): New macro.
5588
5589 2015-05-06 Pedro Alves <palves@redhat.com>
5590
5591 PR server/18081
5592 * server.c (start_inferior): If the process exits, mourn it.
5593
5594 2015-04-21 Gary Benson <gbenson@redhat.com>
5595
5596 * hostio.c (fileio_open_flags_to_host): Factored out to
5597 fileio_to_host_openflags in common/fileio.c. Single use
5598 updated.
5599
5600 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5601
5602 * linux-xtensa-low.c (xtensa_fill_gregset)
5603 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5604 XCHAL_HAVE_LOOP.
5605
5606 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5607
5608 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5609 (regs_info): Replace usrregs pointer with NULL.
5610
5611 2015-04-17 Gary Benson <gbenson@redhat.com>
5612
5613 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5614 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5615 * server.c (handle_qxfer_exec_file): New function.
5616 (qxfer_packets): Add exec-file entry.
5617 (handle_query): Report qXfer:exec-file:read as supported packet.
5618
5619 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5620
5621 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5622
5623 2015-04-09 Gary Benson <gbenson@redhat.com>
5624
5625 * hostio-errno.c (errno_to_fileio_error): Remove function.
5626 Update caller to use remote_fileio_to_fio_error.
5627
5628 2015-04-09 Yao Qi <yao.qi@linaro.org>
5629
5630 * linux-low.c (linux_insert_point): Call
5631 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5632 (linux_remove_point): Call remove_memory_breakpoint if type is
5633 raw_bkpt_type_sw.
5634 * linux-x86-low.c (x86_insert_point): Don't call
5635 insert_memory_breakpoint.
5636 (x86_remove_point): Don't call remove_memory_breakpoint.
5637
5638 2015-04-01 Pedro Alves <palves@redhat.com>
5639 Cleber Rosa <crosa@redhat.com>
5640
5641 * server.c (gdbserver_usage): Reorganize and extend the usage
5642 message.
5643
5644 2015-03-24 Pedro Alves <palves@redhat.com>
5645
5646 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5647 output. Also dump TRAP_TRACE.
5648 (linux_low_filter_event): In debug output, distinguish a
5649 resume_stop SIGSTOP from a delayed SIGSTOP.
5650
5651 2015-03-24 Gary Benson <gbenson@redhat.com>
5652
5653 * linux-x86-low.c (x86_linux_new_thread): Moved to
5654 nat/x86-linux.c.
5655 (x86_linux_prepare_to_resume): Likewise.
5656
5657 2015-03-24 Gary Benson <gbenson@redhat.com>
5658
5659 * Makefile.in (x86-linux-dregs.o): New rule.
5660 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5661 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5662 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5663 (x86_linux_dr_get): Likewise.
5664 (x86_linux_dr_set): Likewise.
5665 (update_debug_registers_callback): Likewise.
5666 (x86_linux_dr_set_addr): Likewise.
5667 (x86_linux_dr_get_addr): Likewise.
5668 (x86_linux_dr_set_control): Likewise.
5669 (x86_linux_dr_get_control): Likewise.
5670 (x86_linux_dr_get_status): Likewise.
5671 (x86_linux_update_debug_registers): Likewise.
5672
5673 2015-03-24 Gary Benson <gbenson@redhat.com>
5674
5675 * linux-x86-low.c (x86_linux_update_debug_registers):
5676 New function, factored out from...
5677 (x86_linux_prepare_to_resume): ...this.
5678
5679 2015-03-24 Gary Benson <gbenson@redhat.com>
5680
5681 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5682 (x86_linux_dr_set): Likewise.
5683 (update_debug_registers_callback): Likewise.
5684 (x86_linux_dr_set_addr): Likewise.
5685 (x86_linux_dr_get_addr): Likewise.
5686 (x86_linux_dr_set_control): Likewise.
5687 (x86_linux_dr_get_control): Likewise.
5688 (x86_linux_dr_get_status): Likewise.
5689 (x86_linux_prepare_to_resume): Likewise.
5690
5691 2015-03-24 Gary Benson <gbenson@redhat.com>
5692
5693 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5694 Use perror_with_name. Pass string through gettext.
5695 (x86_linux_dr_set): Likewise.
5696
5697 2015-03-24 Gary Benson <gbenson@redhat.com>
5698
5699 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5700 (x86_linux_dr_set_addr): ...this.
5701 (x86_dr_low_get_addr): Rename to...
5702 (x86_linux_dr_get_addr): ...this.
5703 (x86_dr_low_set_control): Rename to...
5704 (x86_linux_dr_set_control): ...this.
5705 (x86_dr_low_get_control): Rename to...
5706 (x86_linux_dr_get_control): ...this.
5707 (x86_dr_low_get_status): Rename to...
5708 (x86_linux_dr_get_status): ...this.
5709 (x86_dr_low): Update with new function names.
5710
5711 2015-03-24 Gary Benson <gbenson@redhat.com>
5712
5713 * Makefile.in (x86-linux.o): New rule.
5714 * configure.srv: Add x86-linux.o to relevant targets.
5715 * linux-low.c (lwp_set_arch_private_info): New function.
5716 (lwp_arch_private_info): Likewise.
5717 * linux-x86-low.c: Include nat/x86-linux.h.
5718 (arch_lwp_info): Removed structure.
5719 (update_debug_registers_callback):
5720 Use lwp_set_debug_registers_changed.
5721 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5722 and lwp_set_debug_registers_changed.
5723 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5724
5725 2015-03-24 Gary Benson <gbenson@redhat.com>
5726
5727 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5728 * linux-arm-low.c (arm_new_thread): Likewise.
5729 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5730 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5731 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5732 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5733
5734 2015-03-24 Gary Benson <gbenson@redhat.com>
5735
5736 * linux-low.c (ptid_of_lwp): New function.
5737 (lwp_is_stopped): Likewise.
5738 (lwp_stop_reason): Likewise.
5739 * linux-x86-low.c (update_debug_registers_callback):
5740 Use lwp_is_stopped.
5741 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5742 lwp_stop_reason.
5743
5744 2015-03-24 Gary Benson <gbenson@redhat.com>
5745
5746 * linux-low.h (linux_stop_lwp): Remove declaration.
5747
5748 2015-03-24 Gary Benson <gbenson@redhat.com>
5749
5750 * linux-low.h: Include nat/linux-nat.h.
5751 * linux-low.c (iterate_over_lwps_args): New structure.
5752 (iterate_over_lwps_filter): New function.
5753 (iterate_over_lwps): Likewise.
5754 * linux-x86-low.c (update_debug_registers_callback):
5755 Update signature to what iterate_over_lwps expects.
5756 Remove PID check that iterate_over_lwps now performs.
5757 (x86_dr_low_set_addr): Use iterate_over_lwps.
5758 (x86_dr_low_set_control): Likewise.
5759
5760 2015-03-24 Gary Benson <gbenson@redhat.com>
5761
5762 * linux-x86-low.c (x86_debug_reg_state): New function.
5763 (x86_linux_prepare_to_resume): Use the above.
5764
5765 2015-03-24 Gary Benson <gbenson@redhat.com>
5766
5767 * linux-low.c (current_lwp_ptid): New function.
5768 * linux-x86-low.c: Include nat/linux-nat.h.
5769 (x86_dr_low_get_addr): Use current_lwp_ptid.
5770 (x86_dr_low_get_control): Likewise.
5771 (x86_dr_low_get_status): Likewise.
5772
5773 2015-03-20 Pedro Alves <palves@redhat.com>
5774
5775 * tracepoint.c (cmd_qtstatus): Make "str" const.
5776
5777 2015-03-20 Pedro Alves <palves@redhat.com>
5778
5779 * server.c (handle_general_set): Make "req_str" const.
5780
5781 2015-03-19 Pedro Alves <palves@redhat.com>
5782
5783 * linux-low.c (linux_resume_one_lwp): Rename to ...
5784 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5785 instead call perror_with_name.
5786 (check_ptrace_stopped_lwp_gone): New function.
5787 (linux_resume_one_lwp): Reimplement as wrapper around
5788 linux_resume_one_lwp_throw that swallows errors if the LWP is
5789 gone.
5790
5791 2015-03-19 Pedro Alves <palves@redhat.com>
5792
5793 * linux-low.c (count_events_callback, select_event_lwp_callback):
5794 No longer check whether the thread has resume_stop as last resume
5795 kind.
5796
5797 2015-03-19 Pedro Alves <palves@redhat.com>
5798
5799 * linux-low.c (count_events_callback, select_event_lwp_callback):
5800 Use the lwp's status_pending_p field, not the thread's.
5801
5802 2015-03-19 Pedro Alves <palves@redhat.com>
5803
5804 * linux-low.c (select_event_lwp_callback): Update comments to
5805 no longer mention SIGTRAP.
5806
5807 2015-03-18 Gary Benson <gbenson@redhat.com>
5808
5809 * server.c (handle_query): Do not report vFile:fstat as supported.
5810
5811 2015-03-11 Gary Benson <gbenson@redhat.com>
5812
5813 * hostio.c (sys/types.h): New include.
5814 (sys/stat.h): Likewise.
5815 (common-remote-fileio.h): Likewise.
5816 (handle_fstat): New function.
5817 (handle_vFile): Handle vFile:fstat packets.
5818
5819 2015-03-11 Gary Benson <gbenson@redhat.com>
5820
5821 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5822 struct stat.st_blocks and struct stat.st_blksize.
5823 * configure: Regenerate.
5824 * config.in: Likewise.
5825 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5826 (OBS): Add common-remote-fileio.o.
5827 (common-remote-fileio.o): New rule.
5828
5829 2015-03-09 Pedro Alves <palves@redhat.com>
5830
5831 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5832 'struct sockaddr' pointer in 'accept' call.
5833
5834 2015-03-09 Pedro Alves <palves@redhat.com>
5835
5836 Revert:
5837 2015-03-07 Pedro Alves <palves@redhat.com>
5838 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5839 or <winsock2.h> here. Instead include "gdb_socket.h".
5840 (remote_open): Use union gdb_sockaddr_u.
5841 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5842 or <winsock2.h> here. Instead include "gdb_socket.h".
5843 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5844 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5845 or <sys/un.h>.
5846 (init_named_socket, gdb_agent_helper_thread): Use union
5847 gdb_sockaddr_u.
5848
5849 2015-03-07 Pedro Alves <palves@redhat.com>
5850
5851 * configure.ac (build_warnings): Move
5852 -Wdeclaration-after-statement to the C-specific set.
5853 * configure: Regenerate.
5854
5855 2015-03-07 Pedro Alves <palves@redhat.com>
5856
5857 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5858 or <winsock2.h> here. Instead include "gdb_socket.h".
5859 (remote_open): Use union gdb_sockaddr_u.
5860 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5861 or <winsock2.h> here. Instead include "gdb_socket.h".
5862 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5863 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5864 or <sys/un.h>.
5865 (init_named_socket, gdb_agent_helper_thread): Use union
5866 gdb_sockaddr_u.
5867
5868 2015-03-07 Pedro Alves <palves@redhat.com>
5869
5870 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5871 instead.
5872
5873 2015-03-06 Yao Qi <yao.qi@linaro.org>
5874
5875 * linux-aarch64-low.c (aarch64_insert_point): Use
5876 show_debug_regs as a boolean.
5877 (aarch64_remove_point): Likewise.
5878
5879 2015-03-05 Pedro Alves <palves@redhat.com>
5880
5881 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5882 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5883 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5884 * nto-low.c (nto_target_ops): Likewise.
5885 * spu-low.c (spu_target_ops): Likewise.
5886 * win32-low.c (win32_target_ops): Likewise.
5887
5888 2015-03-04 Pedro Alves <palves@redhat.com>
5889
5890 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5891 Decide whether a breakpoint triggered based on the SIGTRAP's
5892 siginfo.si_code.
5893 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5894 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5895 (linux_low_filter_event): Check for breakpoints before checking
5896 watchpoints.
5897 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5898 siginfo.si_code.
5899 (linux_stopped_by_sw_breakpoint)
5900 (linux_supports_stopped_by_sw_breakpoint)
5901 (linux_stopped_by_hw_breakpoint)
5902 (linux_supports_stopped_by_hw_breakpoint): New functions.
5903 (linux_target_ops): Install new target methods.
5904
5905 2015-03-04 Pedro Alves <palves@redhat.com>
5906
5907 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5908 * server.c (swbreak_feature, hwbreak_feature): New globals.
5909 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5910 (captured_main): Clear swbreak_feature and hwbreak_feature.
5911 * server.h (swbreak_feature, hwbreak_feature): Declare.
5912 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5913 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5914 supports_stopped_by_hw_breakpoint>: New fields.
5915 (target_supports_stopped_by_sw_breakpoint)
5916 (target_stopped_by_sw_breakpoint)
5917 (target_supports_stopped_by_hw_breakpoint)
5918 (target_stopped_by_hw_breakpoint): Declare.
5919
5920 2015-03-04 Pedro Alves <palves@redhat.com>
5921
5922 enum lwp_stop_reason -> enum target_stop_reason
5923 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5924 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5925 (linux_wait_1, stuck_in_jump_pad_callback)
5926 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5927 (linux_stopped_by_watchpoint):
5928 * linux-low.h (enum lwp_stop_reason): Delete.
5929 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5930 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5931
5932 2015-03-04 Yao Qi <yao.qi@linaro.org>
5933
5934 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5935
5936 2015-03-03 Gary Benson <gbenson@redhat.com>
5937
5938 * hostio.c (handle_vFile): Fix prefix lengths.
5939
5940 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5941
5942 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5943 ptr_bits.
5944
5945 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5946
5947 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5948 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5949 (clean): Add "rm -f" for above C files.
5950 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5951 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5952 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5953 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5954 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5955 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5956 (init_registers_s390x_vx_linux64)
5957 (init_registers_s390x_tevx_linux64)
5958 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5959 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5960 declarations.
5961 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5962 (s390_store_vxrs_high): New functions.
5963 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5964 NT_S390_VXRS_HIGH.
5965 (s390_arch_setup): Add logic for selecting one of the new target
5966 descriptions. Activate the new vector regsets if applicable.
5967 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5968 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5969 and init_registers_s390x_tevx_linux64.
5970
5971 2015-03-01 Pedro Alves <palves@redhat.com>
5972
5973 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5974 parameter.
5975
5976 2015-02-27 Pedro Alves <palves@redhat.com>
5977
5978 * linux-x86-low.c (u_debugreg_offset): New function.
5979 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5980
5981 2015-02-27 Pedro Alves <palves@redhat.com>
5982
5983 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5984 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5985 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5986 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5987 (ps_lsetfpregs, ps_getpid)
5988 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5989 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5990 (ps_lsetxregs, ps_plog): Declare.
5991
5992 2015-02-27 Pedro Alves <palves@redhat.com>
5993
5994 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5995 IP_AGENT_EXPORT_FUNC.
5996 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5997 IP_AGENT_EXPORT_FUNC.
5998 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5999 (IP_AGENT_EXPORT): Delete.
6000 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6001 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6002 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6003 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6004 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6005 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6006 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6007 (traceframe_read_count, traceframe_write_count)
6008 (traceframes_created, trace_state_variables, get_raw_reg)
6009 (get_trace_state_variable_value, set_trace_state_variable_value)
6010 (ust_loaded, helper_thread_id, cmd_buf): Use
6011 IPA_SYM_EXPORTED_NAME.
6012 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6013 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6014 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6015 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6016 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6017 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6018 EXTERN_C_PUSH/EXTERN_C_POP.
6019 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6020 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6021 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6022 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6023 (traceframe_write_count, traceframe_read_count)
6024 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6025 (about_to_request_buffer_space, get_trace_state_variable_value)
6026 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6027 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6028 EXTERN_C_PUSH/EXTERN_C_POP.
6029 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6030 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6031 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6032 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6033 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6034 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6035 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6036 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6037 Define.
6038 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6039 (IP_AGENT_EXPORT_VAR_DECL): Define.
6040 (tracing): Declare.
6041 (gdb_agent_get_raw_reg): Declare.
6042
6043 2015-02-27 Tom Tromey <tromey@redhat.com>
6044 Pedro Alves <palves@redhat.com>
6045
6046 Rename symbols whose names are reserved C++ keywords throughout.
6047
6048 2015-02-27 Pedro Alves <palves@redhat.com>
6049
6050 * Makefile.in (COMPILER): New, get it from autoconf.
6051 (CXX): Get from autoconf instead.
6052 (COMPILE.pre): Use COMPILER.
6053 (CC-LD): Rename to ...
6054 (CC_LD): ... this. Use COMPILER.
6055 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6056 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6057 * acinclude.m4: Include build-with-cxx.m4.
6058 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6059 Disable -Werror by default if building in C++ mode.
6060 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6061 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6062 the C++ compiler. Save/restore CXXFLAGS too.
6063 * configure: Regenerate.
6064
6065 2015-02-27 Pedro Alves <palves@redhat.com>
6066
6067 * acinclude.m4: Include libiberty.m4.
6068 * configure.ac: Call libiberty_INIT.
6069 * config.in, configure: Regenerate.
6070
6071 2015-02-26 Pedro Alves <palves@redhat.com>
6072
6073 * linux-low.c (linux_wait_1): When incrementing the PC past a
6074 program breakpoint always use the_low_target.breakpoint_len as
6075 increment, rather than the maximum between that and
6076 the_low_target.decr_pc_after_break.
6077
6078 2015-02-23 Pedro Alves <palves@redhat.com>
6079
6080 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6081 thread was doing a step-over; always adjust the PC if
6082 we stepped over a permanent breakpoint.
6083 (linux_wait_1): If we stepped over breakpoint that was on top of a
6084 permanent breakpoint, manually advance the PC past it.
6085
6086 2015-02-23 Pedro Alves <palves@redhat.com>
6087
6088 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6089 modes.
6090 (x86_fill_gregset, x86_store_gregset): Use it when handling
6091 $orig_eax.
6092
6093 2015-02-20 Pedro Alves <palves@redhat.com>
6094
6095 * thread-db.c: Include "nat/linux-procfs.h".
6096 (thread_db_init): Skip listing new threads if the kernel supports
6097 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6098
6099 2015-02-20 Pedro Alves <palves@redhat.com>
6100
6101 * linux-low.c (status_pending_p_callback): Use ptid_match.
6102
6103 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6104
6105 PR breakpoints/16812
6106 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6107 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6108 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6109
6110 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6111
6112 PR breakpoints/15956
6113 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6114
6115 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6116
6117 * linux-low.c (linux_low_btrace_conf): Print size.
6118 * server.c (handle_btrace_conf_general_set): New.
6119 (hanle_general_set): Call handle_btrace_conf_general_set.
6120 (handle_query): Report Qbtrace-conf:bts:size as supported.
6121
6122 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6123
6124 * linux-low.c (linux_low_enable_btrace): Update parameters.
6125 (linux_low_btrace_conf): New.
6126 (linux_target_ops)<to_btrace_conf>: Initialize.
6127 * server.c (current_btrace_conf): New.
6128 (handle_btrace_enable): Rename to ...
6129 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6130 to target_enable_btrace. Update comment. Update users.
6131 (handle_qxfer_btrace_conf): New.
6132 (qxfer_packets): Add btrace-conf entry.
6133 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6134 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6135 (target_ops)<read_btrace_conf>: New.
6136 (target_enable_btrace): Update parameters.
6137 (target_read_btrace_conf): New.
6138
6139 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6140
6141 * server.c (handle_btrace_general_set): Remove call to
6142 target_supports_btrace.
6143 (supported_btrace_packets): New.
6144 (handle_query): Call supported_btrace_packets.
6145 * target.h: include btrace-common.h.
6146 (btrace_target_info): Removed.
6147 (supports_btrace, target_supports_btrace): Update parameters.
6148
6149 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6150
6151 * Makefile.in (SFILES): Add common/btrace-common.c.
6152 (OBS): Add common/btrace-common.o.
6153 (btrace-common.o): Add build rules.
6154 * linux-low: Include btrace-common.h.
6155 (linux_low_read_btrace): Use struct btrace_data. Call
6156 btrace_data_init and btrace_data_fini.
6157
6158 2015-02-06 Pedro Alves <palves@redhat.com>
6159
6160 * thread-db.c (find_new_threads_callback): Add debug output.
6161
6162 2015-02-04 Pedro Alves <palves@redhat.com>
6163
6164 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6165 (resume_stopped_resumed_lwps): New function.
6166 (linux_wait_for_event_filtered): Use it.
6167
6168 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6169
6170 * Makefile.in (SFILES): Add linux-personality.c.
6171 (linux-personality.o): New rule.
6172 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6173 list of objects to be built.
6174 * linux-low.c: Include nat/linux-personality.h.
6175 (linux_create_inferior): Remove code to disable address space
6176 randomization (moved to ../nat/linux-personality.c). Create
6177 cleanup to disable address space randomization.
6178
6179 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6180
6181 * Makefile.in (posix-strerror.o): New rule.
6182 (mingw-strerror.o): Likewise.
6183 * configure: Regenerated.
6184 * configure.ac: Source file ../common/common.host. Initialize new
6185 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6186
6187 2015-01-14 Yao Qi <yao@codesourcery.com>
6188
6189 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6190 (ppc-linux.o): New rule.
6191 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6192 * configure.ac: AC_CHECK_FUNCS(getauxval).
6193 * config.in: Re-generated.
6194 * configure: Re-generated.
6195 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6196 ppc64_64bit_inferior_p
6197
6198 2015-01-14 Yao Qi <yao@codesourcery.com>
6199
6200 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6201 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6202 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6203 (PT_ORIG_R3, PT_TRAP): Likewise.
6204 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6205 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6206 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6207
6208 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6209
6210 * i387-fp.c (i387_cache_to_xsave): In look over
6211 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6212 zmmh_low_space field by use of zmmh_high_space.
6213
6214 2015-01-09 Pedro Alves <palves@redhat.com>
6215
6216 * linux-low.c (step_over_bkpt): Move higher up in the file.
6217 (handle_extended_wait): Don't store the stop_pc here.
6218 (get_stop_pc): Adjust comments and rename to ...
6219 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6220 stopped for a software breakpoint or hardware breakpoint.
6221 (thread_still_has_status_pending_p): New function.
6222 (status_pending_p_callback): Use
6223 thread_still_has_status_pending_p. If the event is no longer
6224 interesting, resume the LWP.
6225 (handle_tracepoints): Add assert.
6226 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6227 (wstatus_maybe_breakpoint): New function.
6228 (cancel_breakpoint): Delete function.
6229 (check_stopped_by_watchpoint): New function, factored out from
6230 linux_low_filter_event.
6231 (lp_status_maybe_breakpoint): Delete function.
6232 (linux_low_filter_event): Remove filter_ptid argument.
6233 Leave thread group exits pending here. Store the LWP's stop PC.
6234 Always leave events pending.
6235 (linux_wait_for_event_filtered): Pull all events out of the
6236 kernel, and leave them all pending.
6237 (count_events_callback, select_event_lwp_callback): Consider all
6238 events.
6239 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6240 (select_event_lwp): Only give preference to the stepping LWP in
6241 all-stop mode. Adjust comments.
6242 (ignore_event): New function.
6243 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6244 references to cancel_breakpoints. Adjust to renames. Also give
6245 equal priority to all LWPs that have had events in non-stop mode.
6246 If reporting a software breakpoint event, unadjust the LWP's PC.
6247 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6248 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6249 Adjust.
6250 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6251 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6252 (linux_stopped_by_watchpoint): Adjust.
6253 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6254 * linux-low.h (enum lwp_stop_reason): New.
6255 (struct lwp_info) <stop_pc>: Adjust comment.
6256 <stopped_by_watchpoint>: Delete field.
6257 <stop_reason>: New field.
6258 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6259 * mem-break.c (software_breakpoint_inserted_here)
6260 (hardware_breakpoint_inserted_here): New function.
6261 * mem-break.h (software_breakpoint_inserted_here)
6262 (hardware_breakpoint_inserted_here): Declare.
6263 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6264 (cancel_breakpoints): Delete.
6265 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6266 (upload_fast_traceframes): Remove references to
6267 cancel_breakpoints.
6268
6269 2015-01-09 Pedro Alves <palves@redhat.com>
6270
6271 * thread-db.c (find_new_threads_callback): Ignore thread if the
6272 kernel thread ID is -1.
6273
6274 2015-01-09 Pedro Alves <palves@redhat.com>
6275
6276 * linux-low.c (linux_attach_fail_reason_string): Move to
6277 nat/linux-ptrace.c, and rename.
6278 (linux_attach_lwp): Update comment.
6279 (attach_proc_task_lwp_callback): New function.
6280 (linux_attach): Adjust to rename and use
6281 linux_proc_attach_tgid_threads.
6282 (linux_attach_fail_reason_string): Delete declaration.
6283
6284 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6285
6286 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6287 * server.c (gdbserver_version): Likewise.
6288
6289 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6290
6291 * remote-utils.c: Include ctype.h.
6292 (input_interrupt): Explicitly handle the case when the char
6293 received is the NUL byte. Improve the printing of non-ASCII
6294 characters.
6295
6296 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6297
6298 * linux-low.c (linux_low_filter_event): Update call to
6299 linux_enable_event_reporting following the addition of
6300 a new parameter to that function.
6301
6302 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6303
6304 PR server/17457
6305 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6306 (AARCH64_FPCR_REGNO): Likewise.
6307 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6308 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6309 (aarch64_store_fpregset): Likewise.
6310
6311 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6312
6313 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6314 Remove FIXME comment about assumption about N.
6315
6316 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6317
6318 * configure.ac: If large-file support is disabled in GDBserver,
6319 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6320 * configure: Regenerate.
6321
6322 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6323
6324 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6325 warning upon ENODATA from ptrace.
6326 * linux-s390-low.c (s390_store_tdb): New.
6327 (s390_regsets): Add regset for NT_S390_TDB.
6328
6329 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6330
6331 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6332 without a fill_function.
6333 * linux-s390-low.c (s390_fill_last_break): Remove.
6334 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6335 (s390_arch_setup): Use regset's size instead of fill_function for
6336 loop end condition.
6337
6338 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6339
6340 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6341 the regset's store function when ptrace returned an error.
6342 * regcache.c (get_thread_regcache): Invalidate register cache
6343 before fetching inferior's registers.
6344
6345 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6346
6347 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6348 while-loop as for-loop.
6349 (regsets_store_inferior_registers): Likewise.
6350
6351 2014-11-28 Yao Qi <yao@codesourcery.com>
6352
6353 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6354 * config.in, configure: Re-generate.
6355 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6356 is defined.
6357
6358 2014-11-21 Yao Qi <yao@codesourcery.com>
6359
6360 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6361 (AC_CHECK_HEADERS): Remove malloc.h.
6362 * configure: Re-generated.
6363 * config.in: Re-generated.
6364 * server.h: Don't include alloca.h and malloc.h.
6365 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6366 Don't include malloc.h.
6367
6368 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6369
6370 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6371 corresponding ERRNO check in same block.
6372
6373 2014-11-12 Pedro Alves <palves@redhat.com>
6374
6375 * server.c (cont_thread): Update comment.
6376 (start_inferior, attach_inferior): No longer clear cont_thread.
6377 (handle_v_cont): No longer set cont_thread.
6378 (captured_main): Clear cont_thread each time a GDB connects.
6379
6380 2014-11-12 Pedro Alves <palves@redhat.com>
6381
6382 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6383 thread, and don't resume all threads if the Hc thread has exited.
6384
6385 2014-11-12 Pedro Alves <palves@redhat.com>
6386
6387 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6388 the process group instead of to a specific LWP.
6389
6390 2014-10-15 Pedro Alves <palves@redhat.com>
6391
6392 PR server/17487
6393 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6394 parameter.
6395 (arm_set_thread_context): Delete.
6396 (the_low_target): Adjust.
6397 * win32-i386-low.c (debug_registers_changed)
6398 (debug_registers_used): Delete.
6399 (update_debug_registers_callback): New function.
6400 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6401 needing to update their debug registers.
6402 (win32_get_current_dr): New function.
6403 (x86_dr_low_get_addr, x86_dr_low_get_control)
6404 (x86_dr_low_get_status): Fetch the debug register from the thread
6405 record's context.
6406 (i386_initial_stuff): Adjust.
6407 (i386_get_thread_context): Remove current_event parameter. Don't
6408 clear debug_registers_changed nor copy DR values to
6409 debug_reg_state.
6410 (i386_set_thread_context): Delete.
6411 (i386_prepare_to_resume): New function.
6412 (i386_thread_added): Mark the thread as needing to update irs
6413 debug registers.
6414 (the_low_target): Remove i386_set_thread_context and install
6415 i386_prepare_to_resume.
6416 * win32-low.c (win32_get_thread_context): Adjust.
6417 (win32_set_thread_context): Use SetThreadContext
6418 directly.
6419 (win32_prepare_to_resume): New function.
6420 (win32_require_context): New function, factored out from ...
6421 (thread_rec): ... this.
6422 (continue_one_thread): Call win32_prepare_to_resume on each thread
6423 we're about to continue.
6424 (win32_resume): Call win32_prepare_to_resume on the event thread.
6425 * win32-low.h (struct win32_thread_info)
6426 <debug_registers_changed>: New field.
6427 (struct win32_target_ops): Change prototype of set_thread_context,
6428 delete set_thread_context and add prepare_to_resume.
6429 (win32_require_context): New declaration.
6430
6431 2014-10-08 Gary Benson <gbenson@redhat.com>
6432
6433 * server.h: Do not include common-exceptions.h.
6434
6435 2014-10-08 Gary Benson <gbenson@redhat.com>
6436
6437 * server.h: Do not include cleanups.h.
6438
6439 2014-09-30 James Hogan <james.hogan@imgtec.com>
6440
6441 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6442 mips64-dsp-linux.c.
6443
6444 2014-09-23 Yao Qi <yao@codesourcery.com>
6445
6446 * linux-low.c (lp_status_maybe_breakpoint): New function.
6447 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6448 (count_events_callback): Likewise.
6449 (select_event_lwp_callback): Likewise.
6450 (cancel_breakpoints_callback): Likewise.
6451
6452 2014-09-19 Don Breazeal <donb@codesourcery.com>
6453
6454 * linux-low.c (handle_extended_wait): Call
6455 linux_ptrace_get_extended_event.
6456 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6457 linux_is_extended_waitstatus.
6458
6459 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6460
6461 * Makefile.in (CPPFLAGS): Define.
6462 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6463 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6464
6465 2014-09-16 Gary Benson <gbenson@redhat.com>
6466
6467 * inferiors.h (current_inferior): Renamed as...
6468 (current_thread): New variable. All uses updated.
6469 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6470 (maybe_move_out_of_jump_pad): Likewise.
6471 (cancel_breakpoint): Likewise.
6472 (linux_low_filter_event): Likewise.
6473 (wait_for_sigstop): Likewise.
6474 (linux_resume_one_lwp): Likewise.
6475 (need_step_over_p): Likewise.
6476 (start_step_over): Likewise.
6477 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6478 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6479 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6480 and save_inferior as saved_thread.
6481 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6482 saved_thread.
6483 (regcache_invalidate_thread): Likewise.
6484 * remote-utils.c (prepare_resume_reply): Likewise.
6485 * thread-db.c (thread_db_get_tls_address): Likewise.
6486 (disable_thread_event_reporting): Likewise.
6487 (remove_thread_event_breakpoints): Likewise.
6488 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6489 as saved_thread.
6490 * target.h (set_desired_inferior): Renamed as...
6491 (set_desired_thread): New declaration. All uses updated.
6492 * server.c (myresume): Updated comment to reference thread instead
6493 of inferior.
6494 (handle_serial_event): Likewise.
6495 (handle_target_event): Likewise.
6496
6497 2014-09-12 Tom Tromey <tromey@redhat.com>
6498 Gary Benson <gbenson@redhat.com>
6499
6500 * regcache.h: Include common-regcache.h.
6501 (regcache_read_pc): Don't declare.
6502 * regcache.c (get_thread_regcache_for_ptid): New function.
6503
6504 2014-09-11 Tom Tromey <tromey@redhat.com>
6505 Gary Benson <gbenson@redhat.com>
6506
6507 * symbol.c: New file.
6508 * Makefile.in (SFILES): Add symbol.c.
6509 (OBS): Add symbol.o.
6510
6511 2014-09-11 Gary Benson <gbenson@redhat.com>
6512
6513 * target.c (target_stop_ptid, target_continue_ptid): New
6514 functions.
6515
6516 2014-09-11 Tom Tromey <tromey@redhat.com>
6517 Gary Benson <gbenson@redhat.com>
6518
6519 * target.h: Include target/target.h.
6520 * target.c (target_read_memory, target_read_uint32)
6521 (target_write_memory): New functions.
6522
6523 2014-09-11 Gary Benson <gbenson@redhat.com>
6524
6525 * server.h (debug_hw_points): Don't declare.
6526 * server.c (debug_hw_points): Don't define. Replace all uses
6527 with show_debug_regs.
6528 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6529 all uses with show_debug_regs.
6530
6531 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6532
6533 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6534 endianness into account.
6535 (ppc_supply_ptrace_register): Likewise.
6536
6537 2014-09-03 James Hogan <james.hogan@imgtec.com>
6538
6539 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6540 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6541
6542 2014-09-03 Gary Benson <gbenson@redhat.com>
6543
6544 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6545 ALL_DEBUG_ADDRESS_REGISTERS.
6546
6547 2014-09-02 Gary Benson <gbenson@redhat.com>
6548
6549 * i386-low.h: Renamed as...
6550 * x86-low.h: New file. All type, function and variable name
6551 prefixes changed from "i386_" to "x86_". All references updated.
6552 * i386-low.c: Renamed as...
6553 * x86-low.c: New file. All type, function and variable name
6554 prefixes changed from "i386_" to "x86_". All references updated.
6555
6556 2014-09-02 Gary Benson <gbenson@redhat.com>
6557
6558 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6559 (x86_linux_new_thread): Likewise.
6560
6561 2014-08-29 Gary Benson <gbenson@redhat.com>
6562
6563 * server.h (setjmp.h): Do not include.
6564 (toplevel): Do not declare.
6565 (common-exceptions.h): Include.
6566 (cleanups.h): Likewise.
6567 * server.c (toplevel): Do not define.
6568 (exit_code): New static global.
6569 (detach_or_kill_for_exit_cleanup): New function.
6570 (main): New function. Original main renamed to...
6571 (captured_main): New function.
6572 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6573
6574 2014-08-29 Gary Benson <gbenson@redhat.com>
6575
6576 * Makefile.in (SFILES): Add common/common-exceptions.c.
6577 (OBS): Add common-exceptions.o.
6578 (common-exceptions.o): New rule.
6579 * utils.c (prepare_to_throw_exception): New function.
6580
6581 2014-08-29 Gary Benson <gbenson@redhat.com>
6582
6583 * config.in: Regenerate.
6584 * configure: Likewise.
6585
6586 2014-08-29 Gary Benson <gbenson@redhat.com>
6587
6588 * Makefile.in (SFILES): Add common/cleanups.c.
6589 (OBS): cleanups.o.
6590 (cleanups.o): New rule.
6591
6592 2014-08-29 Gary Benson <gbenson@redhat.com>
6593
6594 * utils.c (internal_vwarning): New function.
6595
6596 2014-08-28 Gary Benson <gbenson@redhat.com>
6597
6598 * utils.h (fatal): Remove declaration.
6599 * utils.c (fatal): Remove function.
6600
6601 2014-08-28 Gary Benson <gbenson@redhat.com>
6602
6603 * tracepoint.c (gdb_agent_init): Replace fatal with
6604 perror_with_name.
6605 (initialize_tracepoint): Likewise.
6606
6607 2014-08-28 Gary Benson <gbenson@redhat.com>
6608
6609 * remote-utils.c (remote_prepare): Replace fatal with error.
6610
6611 2014-08-28 Gary Benson <gbenson@redhat.com>
6612
6613 * linux-low.c (linux_async): Replace fatal with warning.
6614 Tidy up and return.
6615 (linux_start_non_stop): Return -1 if linux_async failed.
6616
6617 2014-08-28 Gary Benson <gbenson@redhat.com>
6618
6619 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6620 gdb_assert.
6621 (i386_dr_low_get_addr): Remove vague comment.
6622 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6623 gdb_assert.
6624
6625 2014-08-28 Gary Benson <gbenson@redhat.com>
6626
6627 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6628 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6629 internal_error.
6630 (linux_resume_one_lwp): Likewise.
6631 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6632 gdb_assert.
6633 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6634 with internal_error.
6635 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6636 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6637 (find_register_by_name): Replace fatal with internal_error.
6638 (find_regno): Likewise.
6639 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6640 * thread-db.c (thread_db_create_event): Likewise.
6641 (thread_db_load_search): Likewise.
6642 (try_thread_db_load_1): Likewise.
6643 * tracepoint.c (get_jump_space_head): Replace fatal with
6644 internal_error.
6645 (claim_trampoline_space): Likewise.
6646 (have_fast_tracepoint_trampoline_buffer): Likewise.
6647 (cmd_qtstart): Likewise.
6648 (stop_tracing): Likewise.
6649 (fast_tracepoint_collecting): Likewise.
6650 (target_malloc): Likewise.
6651 (download_tracepoint): Likewise.
6652 (download_trace_state_variables): Replace check with gdb_assert.
6653 (upload_fast_traceframes): Replace fatal with internal_error.
6654
6655 2014-08-19 Tom Tromey <tromey@redhat.com>
6656 Gary Benson <gbenson@redhat.com>
6657
6658 * Makefile.in (SFILES): Add common/common-debug.c.
6659 (OBS): Add common-debug.o.
6660 (common-debug.o): New rule.
6661 * debug.h (debug_printf): Don't declare.
6662 * debug.c (debug_printf): Renamed and rewritten as...
6663 (debug_vprintf): New function.
6664
6665 2014-08-19 Gary Benson <gbenson@redhat.com>
6666
6667 * utils.h: Do not include print-utils.h.
6668
6669 2014-08-19 Tom Tromey <tromey@redhat.com>
6670 Gary Benson <gbenson@redhat.com>
6671
6672 * server.h: Add static assertion.
6673 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6674
6675 2014-08-19 Tom Tromey <tromey@redhat.com>
6676 Gary Benson <gbenson@redhat.com>
6677
6678 * Makefile.in (SFILES): Add common/errors.c.
6679 (OBS): Add errors.o.
6680 (IPA_OBS): Add errors-ipa.o.
6681 (errors.o): New rule.
6682 (errors-ipa.o): Likewise.
6683 * utils.h (perror_with_name, error, warning): Don't declare.
6684 * utils.c (warning): Renamed and rewritten as...
6685 (vwarning): New function.
6686 (error): Renamed and rewritten as...
6687 (verror): New function.
6688 (internal_error): Renamed and rewritten as...
6689 (internal_verror): New function.
6690
6691 2014-08-07 Gary Benson <gbenson@redhat.com>
6692
6693 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6694 * configure: Regenerate.
6695 * config.in: Likewise.
6696 * server.h: Do not include errno.h.
6697 * event-loop.c: Likewise.
6698 * hostio-errno.c: Likewise.
6699 * linux-low.c: Likewise.
6700 * remote-utils.c: Likewise.
6701 * spu-low.c: Likewise.
6702 * utils.c: Likewise.
6703 * gdbreplay.c: Unconditionally include errno.h.
6704
6705 2014-08-07 Gary Benson <gbenson@redhat.com>
6706
6707 * server.h: Do not include string.h.
6708 * event-loop.c: Likewise.
6709 * linux-low.c: Likewise.
6710 * regcache.c: Likewise.
6711 * remote-utils.c: Likewise.
6712 * spu-low.c: Likewise.
6713 * utils.c: Likewise.
6714
6715 2014-08-07 Gary Benson <gbenson@redhat.com>
6716
6717 * server.h: Do not include gdb_assert.h.
6718
6719 2014-08-07 Gary Benson <gbenson@redhat.com>
6720
6721 * server.h: Do not include common-utils.h.
6722
6723 2014-08-07 Gary Benson <gbenson@redhat.com>
6724
6725 * server.h: Do not include ptid.h.
6726 * notif.h: Likewise.
6727
6728 2014-08-07 Gary Benson <gbenson@redhat.com>
6729
6730 * server.h: Do not include gdb_locale.h.
6731
6732 2014-08-07 Gary Benson <gbenson@redhat.com>
6733
6734 * server.h: Do not include gdb/signals.h.
6735 * win32-low.c: Likewise.
6736
6737 2014-08-07 Gary Benson <gbenson@redhat.com>
6738
6739 * server.h: Do not include pathmax.h.
6740
6741 2014-08-07 Gary Benson <gbenson@redhat.com>
6742
6743 * server.h: Do not include libiberty.h.
6744 * linux-bfin-low.c: Likewise.
6745
6746 2014-08-07 Gary Benson <gbenson@redhat.com>
6747
6748 * server.h: Do not include ansidecl.h.
6749
6750 2014-08-07 Gary Benson <gbenson@redhat.com>
6751
6752 * linux-x86-low.c: Do not include stddef.h.
6753 * lynx-ppc-low.c: Likewise.
6754 * tracepoint.c: Likewise.
6755
6756 2014-08-07 Gary Benson <gbenson@redhat.com>
6757
6758 * server.h: Do not include stdarg.h.
6759 * nto-low.c: Likewise.
6760
6761 2014-08-07 Gary Benson <gbenson@redhat.com>
6762
6763 * server.h: Do not include stdlib.h.
6764 * inferiors.c: Likewise.
6765 * linux-low.c: Likewise.
6766 * regcache.c: Likewise.
6767 * spu-low.c: Likewise.
6768 * tracepoint.c: Likewise.
6769 * utils.c: Likewise.
6770
6771 2014-08-07 Gary Benson <gbenson@redhat.com>
6772
6773 * server.h: Do not include stdio.h.
6774 * linux-low.c: Likewise.
6775 * remote-utils.c: Likewise.
6776 * spu-low.c: Likewise.
6777 * utils.c: Likewise.
6778 * wincecompat.c: Likewise.
6779
6780 2014-08-06 Gary Benson <gbenson@redhat.com>
6781
6782 * regcache.c (init_register_cache): Move conditionals inside if.
6783
6784 2014-08-06 Gary Benson <gbenson@redhat.com>
6785
6786 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6787
6788 2014-07-31 Gary Benson <gbenson@redhat.com>
6789
6790 * ax.h: Do not include server.h.
6791 * gdbthread.h: Likewise.
6792 * lynx-low.h: Likewise.
6793 * notif.h: Likewise.
6794
6795 2014-07-30 Gary Benson <gbenson@redhat.com>
6796
6797 * server.h: Include common-defs.h.
6798 Do not include config.h or build-gnulib-gdbserver/config.h.
6799
6800 2014-07-30 Gary Benson <gbenson@redhat.com>
6801
6802 * hostio-errno.c: Move server.h to top of includes list.
6803 * inferiors.c: Likewise.
6804 * linux-x86-low.c: Likewise.
6805 * notif.c: Include server.h.
6806
6807 2014-07-24 Tom Tromey <tromey@redhat.com>
6808 Gary Benson <gbenson@redhat.com>
6809
6810 * server.h (CORE_ADDR): Now unsigned.
6811
6812 2014-07-16 Pedro Alves <palves@redhat.com>
6813
6814 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6815
6816 2014-07-15 Pedro Alves <palves@redhat.com>
6817
6818 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6819 copy.
6820
6821 2014-07-11 Pedro Alves <palves@redhat.com>
6822
6823 * linux-low.c (kill_wait_lwp): New function, based on
6824 kill_one_lwp_callback, but use my_waitpid directly.
6825 (kill_one_lwp_callback, linux_kill): Use it.
6826
6827 2014-06-23 Pedro Alves <palves@redhat.com>
6828
6829 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6830 before setting DR0..DR3.
6831
6832 2014-06-20 Gary Benson <gbenson@redhat.com>
6833
6834 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6835 * configure: Regenerated.
6836 * config.in: Likewise.
6837
6838 2014-06-20 Gary Benson <gbenson@redhat.com>
6839
6840 * Makefile.in (SFILES): Update locations for files moved
6841 from common to nat.
6842 (object file files): Reordered.
6843
6844 2014-06-20 Gary Benson <gbenson@redhat.com>
6845
6846 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6847 (i386_dr_low_set_addr): Likewise.
6848 (i386_dr_low_get_addr): Likewise.
6849 (i386_dr_low_can_set_control): Likewise.
6850 (i386_dr_low_set_control): Likewise.
6851 (i386_dr_low_get_control): Likewise.
6852 (i386_dr_low_get_status): Likewise.
6853 (i386_get_debug_register_length): Likewise.
6854 * linux-x86-low.c (i386_dr_low_set_addr):
6855 Changed signature. Made static.
6856 (i386_dr_low_get_addr): Likewise.
6857 (i386_dr_low_set_control): Likewise.
6858 (i386_dr_low_get_control): Likewise.
6859 (i386_dr_low_get_status): Likewise.
6860 (i386_dr_low): New global variable.
6861 * win32-i386-low.c (i386_dr_low_set_addr):
6862 Changed signature. Made static.
6863 (i386_dr_low_get_addr): Likewise.
6864 (i386_dr_low_set_control): Likewise.
6865 (i386_dr_low_get_control): Likewise.
6866 (i386_dr_low_get_status): Likewise.
6867 (i386_dr_low): New global variable.
6868
6869 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6870
6871 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6872 * Makefile.in (AR, AR_FLAGS): Define.
6873 * configure: Regenerate.
6874
6875 2014-06-19 Gary Benson <gbenson@redhat.com>
6876
6877 * Makefile.in (i386-dregs.o): New rule.
6878 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6879 * i386-low.c (target.h): Remove include.
6880 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6881 (DR_CONTROL_SHIFT): Likewise.
6882 (DR_CONTROL_SIZE): Likewise.
6883 (DR_RW_EXECUTE): Likewise.
6884 (DR_RW_WRITE): Likewise.
6885 (DR_RW_READ): Likewise.
6886 (DR_RW_IORW): Likewise.
6887 (DR_LEN_1): Likewise.
6888 (DR_LEN_2): Likewise.
6889 (DR_LEN_4): Likewise.
6890 (DR_LEN_8): Likewise.
6891 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6892 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6893 (DR_ENABLE_SIZE): Likewise.
6894 (DR_LOCAL_SLOWDOWN): Likewise.
6895 (DR_GLOBAL_SLOWDOWN): Likewise.
6896 (DR_CONTROL_RESERVED): Likewise.
6897 (I386_DR_CONTROL_MASK): Likewise.
6898 (I386_DR_VACANT): Likewise.
6899 (I386_DR_LOCAL_ENABLE): Likewise.
6900 (I386_DR_GLOBAL_ENABLE): Likewise.
6901 (I386_DR_DISABLE): Likewise.
6902 (I386_DR_SET_RW_LEN): Likewise.
6903 (I386_DR_GET_RW_LEN): Likewise.
6904 (I386_DR_WATCH_HIT): Likewise.
6905 (i386_wp_op_t): Likewise.
6906 (i386_show_dr): Likewise.
6907 (i386_length_and_rw_bits): Likewise.
6908 (i386_insert_aligned_watchpoint): Likewise.
6909 (i386_remove_aligned_watchpoint): Likewise.
6910 (i386_handle_nonaligned_watchpoint): Likewise.
6911 i386_update_inferior_debug_regs(): Likewise.
6912 (i386_dr_insert_watchpoint): Likewise.
6913 (i386_dr_remove_watchpoint): Likewise.
6914 (i386_dr_region_ok_for_watchpoint): Likewise.
6915 (i386_dr_stopped_data_address): Likewise.
6916 (i386_dr_stopped_by_watchpoint): Likewise.
6917
6918 2014-06-19 Gary Benson <gbenson@redhat.com>
6919
6920 * i386-low.c (i386_dr_show): Renamed to
6921 i386_show_dr and made static. All uses updated.
6922 (i386_dr_length_and_rw_bits): Renamed to
6923 i386_length_and_rw_bits and made static.
6924 All uses updated.
6925 (i386_dr_insert_aligned_watchpoint): Renamed to
6926 i386_insert_aligned_watchpoint and made static.
6927 All uses updated.
6928 (i386_dr_remove_aligned_watchpoint): Renamed to
6929 i386_remove_aligned_watchpoint and made static.
6930 All uses updated.
6931 (i386_dr_update_inferior_debug_regs): Renamed to
6932 i386_update_inferior_debug_regs and made static.
6933 All uses updated.
6934
6935 2014-06-18 Gary Benson <gbenson@redhat.com>
6936
6937 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6938 (i386_dr_low_can_set_control): Likewise.
6939 (i386_get_debug_register_length): Likewise.
6940 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6941 (i386_dr_low_can_set_control): Likewise.
6942 (i386_get_debug_register_length): Likewise.
6943
6944 2014-06-17 Gary Benson <gbenson@redhat.com>
6945
6946 * i386-low.h (i386-dregs.h): New include.
6947 (DR_FIRSTADDR): Now in i386-dregs.h.
6948 (DR_LASTADDR): Likewise.
6949 (DR_NADDR): Likewise.
6950 (DR_STATUS): Likewise.
6951 (DR_CONTROL): Likewise.
6952 (i386_debug_reg_state): Likewise.
6953 (i386_dr_insert_watchpoint): Likewise.
6954 (i386_dr_remove_watchpoint): Likewise.
6955 (i386_dr_region_ok_for_watchpoint): Likewise.
6956 (i386_dr_stopped_data_address): Likewise.
6957 (i386_dr_stopped_by_watchpoint): Likewise.
6958 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6959
6960 2014-06-18 Gary Benson <gbenson@redhat.com>
6961
6962 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6963 i386_dr_insert_watchpoint.
6964 (i386_low_remove_watchpoint): Renamed to
6965 i386_dr_remove_watchpoint.
6966 (i386_low_region_ok_for_watchpoint): Renamed to
6967 i386_dr_region_ok_for_watchpoint.
6968 (i386_low_stopped_data_address): Renamed to
6969 i386_dr_stopped_data_address.
6970 (i386_low_stopped_by_watchpoint): Renamed to
6971 i386_dr_stopped_by_watchpoint.
6972 * i386-low.c (i386_show_dr): Renamed to
6973 i386_dr_show and made nonstatic. All uses updated.
6974 (i386_length_and_rw_bits): Renamed to
6975 i386_dr_length_and_rw_bits and made nonstatic.
6976 All uses updated.
6977 (i386_insert_aligned_watchpoint): Renamed to
6978 i386_dr_insert_aligned_watchpoint and made nonstatic.
6979 All uses updated.
6980 (i386_remove_aligned_watchpoint): Renamed to
6981 i386_dr_remove_aligned_watchpoint and made nonstatic.
6982 All uses updated.
6983 (i386_update_inferior_debug_regs): Renamed to
6984 i386_dr_update_inferior_debug_regs and made nonstatic.
6985 All uses updated.
6986 (i386_low_insert_watchpoint): Renamed to
6987 i386_dr_insert_watchpoint. All uses updated.
6988 (i386_low_remove_watchpoint): Renamed to
6989 i386_dr_remove_watchpoint. All uses updated.
6990 (i386_low_region_ok_for_watchpoint): Renamed to
6991 i386_dr_region_ok_for_watchpoint. All uses updated.
6992 (i386_low_stopped_data_address): Renamed to
6993 i386_dr_stopped_data_address. All uses updated.
6994 (i386_low_stopped_by_watchpoint): Renamed to
6995 i386_dr_stopped_by_watchpoint. All uses updated.
6996
6997 2014-06-18 Gary Benson <gbenson@redhat.com>
6998
6999 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7000 (i386_dr_low_can_set_control): Likewise.
7001 (i386_insert_aligned_watchpoint): New check.
7002
7003 2014-06-18 Gary Benson <gbenson@redhat.com>
7004
7005 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7006 Renamed to state.
7007
7008 2014-06-18 Gary Benson <gbenson@redhat.com>
7009
7010 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7011 instead of fatal and error.
7012 (i386_handle_nonaligned_watchpoint): Likewise.
7013
7014 2014-06-18 Gary Benson <gbenson@redhat.com>
7015
7016 * i386-low.c (i386_get_debug_register_length): New macro.
7017 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7018 (i386_show_dr): Use debug_printf instead of fprintf. Use
7019 phex to format values.
7020
7021 2014-06-18 Gary Benson <gbenson@redhat.com>
7022
7023 * i386-low.h: Comment changes.
7024 * i386-low.c: Likewise.
7025
7026 2014-06-18 Gary Benson <gbenson@redhat.com>
7027
7028 * i386-low.c: Whitespace changes.
7029
7030 2014-06-12 Tom Tromey <tromey@redhat.com>
7031
7032 * utils.c (freeargv): Remove.
7033
7034 2014-06-12 Tom Tromey <tromey@redhat.com>
7035
7036 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7037 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7038 (parse_debug_format_options): Likewise.
7039 (gdbserver_usage): Likewise.
7040 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7041 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7042 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7043 against libiberty.
7044 ($(LIBGNU)): Depend on libiberty.
7045 (all-lib): Recurse into all subdirs.
7046 (install-only): Invoke "install" target in subdirs.
7047 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7048 targets.
7049 * configure: Rebuild.
7050 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7051 for vasprintf, vsnprintf, or gettimeofday.
7052 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7053 srv_tgtobj.
7054
7055 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7056
7057 * development.sh: Delete.
7058 * Makefile.in (config.status): Adjust dependency on development.sh.
7059 * configure.ac: Adjust development.sh source call.
7060 * configure: Regenerate.
7061
7062 2014-06-02 Pedro Alves <palves@redhat.com>
7063
7064 * ax.c (gdb_free_agent_expr): New function.
7065 * ax.h (gdb_free_agent_expr): New declaration.
7066 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7067 list.
7068 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7069 static.
7070 (clear_breakpoint_conditions_and_commands): New function.
7071 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7072 (clear_breakpoint_conditions_and_commands): New declaration.
7073
7074 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7075
7076 * linux-aarch64-low.c (asm/ptrace.h): Include.
7077
7078 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7079
7080 Fix TLS access for -static -pthread.
7081 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7082 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7083 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7084
7085 2014-05-20 Pedro Alves <palves@redhat.com>
7086
7087 * linux-aarch64-low.c (aarch64_insert_point)
7088 (aarch64_remove_point): No longer check whether the type is
7089 supported here. Adjust to new interface.
7090 (the_low_target): Install aarch64_supports_z_point_type as
7091 supports_z_point_type method.
7092 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7093 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7094 instead of a Z packet char. Adjust.
7095 (arm_supports_z_point_type): New function.
7096 (arm_insert_point, arm_remove_point): Adjust to new interface.
7097 (the_low_target): Install arm_supports_z_point_type.
7098 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7099 (cris_insert_point, cris_remove_point): Adjust to new interface.
7100 Don't check whether the type is supported here.
7101 (the_low_target): Install cris_supports_z_point_type.
7102 * linux-low.c (linux_supports_z_point_type): New function.
7103 (linux_insert_point, linux_remove_point): Adjust to new interface.
7104 * linux-low.h (struct linux_target_ops) <insert_point,
7105 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7106 raw_breakpoint pointer parameter.
7107 <supports_z_point_type>: New method.
7108 * linux-mips-low.c (mips_supports_z_point_type): New function.
7109 (mips_insert_point, mips_remove_point): Adjust to new interface.
7110 Use mips_supports_z_point_type.
7111 (the_low_target): Install mips_supports_z_point_type.
7112 * linux-ppc-low.c (the_low_target): Install NULL as
7113 supports_z_point_type method.
7114 * linux-s390-low.c (the_low_target): Install NULL as
7115 supports_z_point_type method.
7116 * linux-sparc-low.c (the_low_target): Install NULL as
7117 supports_z_point_type method.
7118 * linux-x86-low.c (x86_supports_z_point_type): New function.
7119 (x86_insert_point): Adjust to new insert_point interface. Use
7120 insert_memory_breakpoint. Adjust to new
7121 i386_low_insert_watchpoint interface.
7122 (x86_remove_point): Adjust to remove_point interface. Use
7123 remove_memory_breakpoint. Adjust to new
7124 i386_low_remove_watchpoint interface.
7125 (the_low_target): Install x86_supports_z_point_type.
7126 * lynx-low.c (lynx_target_ops): Install NULL as
7127 supports_z_point_type callback.
7128 * nto-low.c (nto_supports_z_point_type): New.
7129 (nto_insert_point, nto_remove_point): Adjust to new interface.
7130 (nto_target_ops): Install nto_supports_z_point_type.
7131 * mem-break.c: Adjust intro comment.
7132 (struct raw_breakpoint) <raw_type, size>: New fields.
7133 <inserted>: Update comment.
7134 <shlib_disabled>: Delete field.
7135 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7136 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7137 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7138 (raw_bkpt_type_to_target_hw_bp_type): New function.
7139 (find_enabled_raw_code_breakpoint_at): New function.
7140 (find_raw_breakpoint_at): New type and size parameters. Use them.
7141 (insert_memory_breakpoint): New function, based off
7142 set_raw_breakpoint_at.
7143 (remove_memory_breakpoint): New function.
7144 (set_raw_breakpoint_at): Reimplement.
7145 (set_breakpoint): New, based on set_breakpoint_at.
7146 (set_breakpoint_at): Reimplement.
7147 (delete_raw_breakpoint): Go through the_target->remove_point
7148 instead of assuming memory breakpoints.
7149 (find_gdb_breakpoint_at): Delete.
7150 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7151 (find_gdb_breakpoint): New function.
7152 (set_gdb_breakpoint_at): Delete.
7153 (z_type_supported): New function.
7154 (set_gdb_breakpoint_1): New function, loosely based off
7155 set_gdb_breakpoint_at.
7156 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7157 (delete_gdb_breakpoint_at): Delete.
7158 (delete_gdb_breakpoint_1): New function, loosely based off
7159 delete_gdb_breakpoint_at.
7160 (delete_gdb_breakpoint): New function.
7161 (clear_gdb_breakpoint_conditions): Rename to ...
7162 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7163 breakpoint.
7164 (add_condition_to_breakpoint): Make static.
7165 (add_breakpoint_condition): Take a struct breakpoint pointer
7166 instead of an address. Adjust.
7167 (gdb_condition_true_at_breakpoint): Rename to ...
7168 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7169 z_type parameter.
7170 (gdb_condition_true_at_breakpoint): Reimplement.
7171 (add_breakpoint_commands): Take a struct breakpoint pointer
7172 instead of an address. Adjust.
7173 (gdb_no_commands_at_breakpoint): Rename to ...
7174 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7175 parameter. Return true if no breakpoint was found. Change debug
7176 output.
7177 (gdb_no_commands_at_breakpoint): Reimplement.
7178 (run_breakpoint_commands): Rename to ...
7179 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7180 and change return type to boolean.
7181 (run_breakpoint_commands): New function.
7182 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7183 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7184 breakpoint. Go through the_target->remove_point instead of
7185 assuming memory breakpoint.
7186 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7187 software and hardware breakpoints.
7188 (reinsert_raw_breakpoint): Go through the_target->insert_point
7189 instead of assuming memory breakpoint.
7190 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7191 software and hardware breakpoints.
7192 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7193 Check both software and hardware breakpoints.
7194 (validate_inserted_breakpoint): Assert the breakpoint is a
7195 software breakpoint. Set the inserted flag to -1 instead of
7196 setting shlib_disabled.
7197 (delete_disabled_breakpoints): Adjust.
7198 (validate_breakpoints): Only validate software breakpoints.
7199 Adjust to inserted flag change.
7200 (check_mem_read, check_mem_write): Skip breakpoint types other
7201 than software breakpoints. Adjust to inserted flag change.
7202 * mem-break.h (enum raw_bkpt_type): New enum.
7203 (raw_breakpoint, struct process_info): Forward declare.
7204 (Z_packet_to_target_hw_bp_type): Delete declaration.
7205 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7206 (set_gdb_breakpoint, delete_gdb_breakpoint)
7207 (clear_breakpoint_conditions): New declarations.
7208 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7209 (breakpoint_inserted_here): Update comment.
7210 (add_breakpoint_condition, add_breakpoint_commands): Replace
7211 address parameter with a breakpoint pointer parameter.
7212 (gdb_breakpoint_here): Update comment.
7213 (delete_gdb_breakpoint_at): Delete.
7214 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7215 * server.c (process_point_options): Take a struct breakpoint
7216 pointer instead of an address. Adjust.
7217 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7218 delete_gdb_breakpoint.
7219 * spu-low.c (spu_target_ops): Install NULL as
7220 supports_z_point_type method.
7221 * target.h: Include mem-break.h.
7222 (struct target_ops) <prepare_to_access_memory>: Update comment.
7223 <supports_z_point_type>: New field.
7224 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7225 instead of a char. Also take a raw breakpoint pointer.
7226 * win32-arm-low.c (the_low_target): Install NULL as
7227 supports_z_point_type.
7228 * win32-i386-low.c (i386_supports_z_point_type): New function.
7229 (i386_insert_point, i386_remove_point): Adjust to new interface.
7230 (the_low_target): Install i386_supports_z_point_type.
7231 * win32-low.c (win32_supports_z_point_type): New function.
7232 (win32_insert_point, win32_remove_point): Adjust to new interface.
7233 (win32_target_ops): Install win32_supports_z_point_type.
7234 * win32-low.h (struct win32_target_ops):
7235 <supports_z_point_type>: New method.
7236 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7237 instead of a char. Also take a raw breakpoint pointer.
7238
7239 2014-05-20 Pedro Alves <palves@redhat.com>
7240
7241 * mem-break.h: Include break-common.h.
7242 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7243 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7244 (Z_packet_to_target_hw_bp_type): New declaration.
7245 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7246 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7247 (Z_PACKET_ACCESS_WP): Delete macros.
7248 (Z_packet_to_hw_type): Delete function.
7249 * i386-low.h: Don't include break-common.h here.
7250 (Z_packet_to_hw_type): Delete declaration.
7251 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7252 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7253 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7254 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7255 * linux-aarch64-low.c: Don't include break-common.h here.
7256 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7257 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7258 (Z_packet_to_target_hw_bp_type): Delete function.
7259 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7260 function.
7261 (mips_insert_point, mips_remove_point): Use
7262 Z_packet_to_target_hw_bp_type.
7263
7264 2014-05-20 Pedro Alves <palves@redhat.com>
7265
7266 * linux-aarch64-low.c: Include break-common.h.
7267 (enum target_point_type): Delete.
7268 (Z_packet_to_point_type): Rename to ...
7269 (Z_packet_to_target_hw_bp_type): ... this, and return a
7270 target_hw_bp_type instead.
7271 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7272 instead of an enum target_point_type.
7273 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7274 breakpoint type.
7275 (aarch64_dr_state_insert_one_point)
7276 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7277 (aarch64_handle_aligned_watchpoint)
7278 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7279 Take an enum target_hw_bp_type instead of an enum
7280 target_point_type.
7281 (aarch64_supports_z_point_type): New function.
7282 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7283 use Z_packet_to_target_hw_bp_type.
7284
7285 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7286
7287 * configure.ac: Only use -Werror by default when DEVELOPMENT
7288 is true.
7289 * configure: Regenerate.
7290
7291 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7292
7293 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7294 * linux-x86-low.c (X86_64_USER_REGS): New.
7295 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7296
7297 2014-04-28 Yao Qi <yao@codesourcery.com>
7298
7299 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7300 name.
7301
7302 2014-04-25 Pedro Alves <palves@redhat.com>
7303
7304 PR server/16255
7305 * linux-low.c (linux_attach_fail_reason_string): New function.
7306 (linux_attach_lwp): Delete.
7307 (linux_attach_lwp_1): Rename to ...
7308 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7309 argument. Remove "initial" parameter. Return int instead of
7310 void. Don't error or warn here.
7311 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7312 failure to attach to the tgid. Call warning when failing to
7313 attach to an lwp.
7314 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7315 argument. Remove "initial" parameter. Return int instead of
7316 void. Don't error or warn here.
7317 (linux_attach_fail_reason_string): New declaration.
7318 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7319 interface change. Use linux_attach_fail_reason_string.
7320
7321 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7322 Walfred Tedeschi <walfred.tedeschi@intel.com>
7323
7324 * Makefile.in: Added rules to handle new files
7325 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7326 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7327 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7328 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7329 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7330 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7331 x32-avx512-linux.o.
7332 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7333 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7334 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7335 i386/x32-avx512.xml.
7336 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7337 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7338 i386/x32-avx512-linux.xml.
7339 * i387-fp.c (num_avx512_k_registers): New constant for number
7340 of K registers.
7341 (num_avx512_zmmh_low_registers): New constant for number of
7342 lower ZMM registers (0-15).
7343 (num_avx512_zmmh_high_registers): New constant for number of
7344 higher ZMM registers (16-31).
7345 (num_avx512_ymmh_registers): New contant for number of higher
7346 YMM registers (ymm16-31 added by avx521 on x86_64).
7347 (num_avx512_xmm_registers): New constant for number of higher
7348 XMM registers (xmm16-31 added by AVX512 on x86_64).
7349 (struct i387_xsave): Add space for AVX512 registers.
7350 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7351 Add code to handle AVX512 registers.
7352 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7353 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7354 prototypei from generated file.
7355 (tdesc_amd64_avx512_linux): Likewise.
7356 (init_registers_x32_avx512_linux): Likewise.
7357 (tdesc_x32_avx512_linux): Likewise.
7358 (init_registers_i386_avx512_linux): Likewise.
7359 (tdesc_i386_avx512_linux): Likewise.
7360 (x86_64_regmap): Add AVX512 registers.
7361 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7362 mask.
7363 (initialize_low_arch): Add code to initialize AVX512 registers.
7364
7365 2014-04-23 Pedro Alves <palves@redhat.com>
7366
7367 * mem-break.c (find_gdb_breakpoint_at): Make static.
7368 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7369
7370 2014-04-23 Pedro Alves <palves@redhat.com>
7371
7372 * i386-low.c: Don't include break-common.h here.
7373 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7374 prototype to take target_hw_bp_type as argument instead of a Z
7375 packet char.
7376 * i386-low.h: Include break-common.h here.
7377 (Z_packet_to_hw_type): Declare.
7378 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7379 prototypes.
7380 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7381 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7382 (x86_remove_point): Convert the packet number to a
7383 target_hw_bp_type before calling i386_low_remove_watchpoint.
7384 * win32-i386-low.c (i386_insert_point): Convert the packet number
7385 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7386 (i386_remove_point): Convert the packet number to a
7387 target_hw_bp_type before calling i386_low_remove_watchpoint.
7388
7389 2014-04-23 Pedro Alves <palves@redhat.com>
7390
7391 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7392
7393 2014-04-10 Pedro Alves <palves@redhat.com>
7394
7395 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7396 Check if the condition or command is NULL before checking if the
7397 breakpoint is known. On success, return true.
7398 * mem-break.h (add_breakpoint_condition): Document return.
7399 (add_breakpoint_commands): Add describing comment.
7400 * server.c (skip_to_semicolon): New function.
7401 (process_point_options): Use it.
7402
7403 2014-04-09 Pedro Alves <palves@redhat.com>
7404
7405 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7406 to lwpid_of.
7407
7408 2014-02-27 Pedro Alves <palves@redhat.com>
7409
7410 PR 12702
7411 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7412 macros.
7413 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7414 output.
7415 (last_thread_of_process_p): Take a PID argument instead of a
7416 thread pointer.
7417 (linux_wait_for_lwp): Delete.
7418 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7419 functions.
7420 (linux_low_filter_event): New function, party factored out from
7421 linux_wait_for_event.
7422 (linux_wait_for_event): Rename to ...
7423 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7424 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7425 sigsuspend. Check for zombie leaders.
7426 (linux_wait_for_event): Reimplement as wrapper around
7427 linux_wait_for_event_filtered.
7428 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7429 a normal or signal exit is seen, it's the whole process exiting.
7430 (wait_for_sigstop): No longer a for_each_inferior callback.
7431 Rewrite on top of linux_wait_for_event_filtered.
7432 (stop_all_lwps): Call wait_for_sigstop directly.
7433 * server.c (resume, handle_target_event): Handle
7434 TARGET_WAITKIND_NO_RESUMED.
7435
7436 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7437
7438 * win32-low.c (psapi_get_dll_name,
7439 * win32_CreateToolhelp32Snapshot): Delete.
7440 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7441 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7442 Delete.
7443 (handle_load_dll): Add function description.
7444 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7445
7446 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7447
7448 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7449 Add comment.
7450 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7451 base address when calling win32_add_one_solib.
7452 (handle_load_dll): Delete local variable load_addr.
7453 Remove 0x1000 offset applied to DLL base address when calling
7454 win32_add_one_solib.
7455 (handle_unload_dll): Add comment.
7456
7457 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7458
7459 * win32-low.c (win32_add_all_dlls): Renames
7460 win32_ensure_ntdll_loaded. Rewrite function documentation.
7461 Adjust implementation to always load all DLLs.
7462 Add 0x1000 offset to DLL base address when calling
7463 win32_add_one_solib.
7464 (child_initialization_done): New static global.
7465 (do_initial_child_stuff): Set child_initialization_done to
7466 zero during child initialization, and 1 after. Replace call
7467 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7468 Add comment.
7469 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7470 (handle_unload_dll): Add function documentation.
7471 (get_child_debug_event): Ignore load and unload DLL events
7472 during child initialization.
7473
7474 2014-02-20 Doug Evans <dje@google.com>
7475
7476 Remove global all_lwps.
7477 * inferiors.h (ptid_of): Move here from linux-low.h.
7478 (pid_of, lwpid_of): Ditto.
7479 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7480 parameter is a struct thread_info * now.
7481 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7482 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7483 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7484 directly.
7485 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7486 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7487 * linux-arm-low.c (update_registers_callback): Update, "entry"
7488 parameter is a struct thread_info * now.
7489 Fetch lwpid from current_inferior directly.
7490 (arm_insert_point): Pass &all_threads to find_inferior instead of
7491 &all_lwps.
7492 (arm_remove_point): Ditto.
7493 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7494 (arm_prepare_to_resume): Fetch pid from thread.
7495 (arm_read_description): Fetch lwpid from current_inferior directly.
7496 * linux-low.c (all_lwps): Delete.
7497 (delete_lwp): Delete call to remove_inferior.
7498 (handle_extended_wait): Fetch lwpid from thread.
7499 (add_lwp): Don't set lwp->entry.id. Remove call to
7500 add_inferior_to_list.
7501 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7502 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7503 (kill_one_lwp_callback): Ditto.
7504 (linux_kill): Don't dereference NULL pointer.
7505 Fetch ptid,lwpid from thread.
7506 (get_detach_signal): Fetch ptid from thread.
7507 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7508 Simplify call to regcache_invalidate_thread.
7509 (delete_lwp_callback): Update, "entry" parameter is a
7510 struct thread_info * now. Fetch pid from thread.
7511 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7512 (status_pending_p_callback): Update, "entry" parameter is a
7513 struct thread_info * now. Fetch ptid from thread.
7514 (find_lwp_pid): Update, "entry" parameter is a
7515 struct thread_info * now.
7516 (linux_wait_for_lwp): Fetch pid from thread.
7517 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7518 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7519 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7520 (dequeue_one_deferred_signal): Ditto.
7521 (cancel_breakpoint): Fetch ptid from current_inferior.
7522 (linux_wait_for_event): Pass &all_threads to find_inferior,
7523 not &all_lwps. Fetch ptid, lwpid from thread.
7524 (count_events_callback): Update, "entry" parameter is a
7525 struct thread_info * now.
7526 (select_singlestep_lwp_callback): Ditto.
7527 (select_event_lwp_callback): Ditto.
7528 (cancel_breakpoints_callback): Ditto.
7529 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7530 not &all_lwps.
7531 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7532 (unsuspend_one_lwp): Update, "entry" parameter is a
7533 struct thread_info * now.
7534 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7535 not &all_lwps.
7536 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7537 Fetch lwpid from thread, not lwp.
7538 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7539 Pass &all_threads to find_inferior, not &all_lwps.
7540 (send_sigstop): Fetch lwpid from thread, not lwp.
7541 (send_sigstop_callback): Update, "entry" parameter is a
7542 struct thread_info * now.
7543 (suspend_and_send_sigstop_callback): Ditto.
7544 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7545 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7546 struct thread_info * now.
7547 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7548 from thread, lwp.
7549 (lwp_running): Update, "entry" parameter is a
7550 struct thread_info * now.
7551 (stop_all_lwps): Fetch ptid from thread.
7552 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7553 (linux_resume_one_lwp): Fetch lwpid from thread.
7554 (linux_set_resume_request): Update, "entry" parameter is a
7555 struct thread_info * now. Fetch pid, lwpid from thread.
7556 (resume_status_pending_p): Update, "entry" parameter is a
7557 struct thread_info * now.
7558 (need_step_over_p): Ditto. Fetch lwpid from thread.
7559 (start_step_over): Fetch lwpid from thread.
7560 (linux_resume_one_thread): Update, "entry" parameter is a
7561 struct thread_info * now. Fetch lwpid from thread.
7562 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7563 (proceed_one_lwp): Update, "entry" parameter is a
7564 struct thread_info * now. Fetch lwpid from thread.
7565 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7566 struct thread_info * now.
7567 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7568 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7569 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7570 directly.
7571 (regsets_store_inferior_registers): Ditto.
7572 (fetch_register, store_register): Ditto.
7573 (linux_read_memory, linux_write_memory): Ditto.
7574 (linux_request_interrupt): Ditto.
7575 (linux_read_auxv): Ditto.
7576 (linux_xfer_siginfo): Ditto.
7577 (linux_qxfer_spu): Ditto.
7578 (linux_qxfer_libraries_svr4): Ditto.
7579 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7580 moved to inferiors.h.
7581 (get_lwp): Delete.
7582 (get_thread_lwp): Update.
7583 (struct lwp_info): Delete member "entry". Simplify comment for
7584 member "thread".
7585 (all_lwps): Delete.
7586 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7587 current_inferior directly.
7588 (update_watch_registers_callback): Update, "entry" parameter is a
7589 struct thread_info * now. Fetch pid from thread.
7590 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7591 (mips_insert_point): Fetch lwpid from current_inferior.
7592 Pass &all_threads to find_inferior, not &all_lwps.
7593 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7594 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7595 directly.
7596 (mips_stopped_data_address): Ditto.
7597 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7598 directly.
7599 * linux-tile-low.c (tile_arch_setup): Ditto.
7600 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7601 (update_debug_registers_callback): Update, "entry" parameter is a
7602 struct thread_info * now. Fetch pid from thread.
7603 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7604 Pass &all_threads to find_inferior, not &all_lwps.
7605 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7606 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7607 Pass &all_threads to find_inferior, not &all_lwps.
7608 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7609 (i386_dr_low_get_status): Ditto.
7610 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7611 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7612 (x86_linux_read_description): Ditto.
7613 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7614
7615 2014-02-20 Doug Evans <dje@google.com>
7616
7617 * inferiors.c (get_first_inferior): Fix buglet.
7618
7619 2014-02-19 Doug Evans <dje@google.com>
7620
7621 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7622 * inferiors.c (add_thread): Change result type to struct thread_info *.
7623 All callers updated.
7624 (add_lwp): Call add_thread here instead of in callers.
7625 All callers updated.
7626 * linux-low.h (get_lwp_thread): Rewrite.
7627 (struct lwp_info): New member "thread".
7628
7629 2014-02-19 Doug Evans <dje@google.com>
7630
7631 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7632 All callers updated.
7633
7634 2014-02-19 Doug Evans <dje@google.com>
7635
7636 * inferiors.c (add_thread): Fix whitespace.
7637
7638 2014-02-19 Doug Evans <dje@google.com>
7639
7640 * dll.c (clear_dlls): Replace accessing list implemention details
7641 with API function.
7642 * gdbthread.h (get_first_thread): Declare.
7643 * inferiors.c (for_each_inferior_with_data): New function.
7644 (get_first_thread): New function.
7645 (find_thread_ptid): Simplify.
7646 (get_first_inferior): New function.
7647 (clear_list): Delete.
7648 (one_inferior_p): New function.
7649 (clear_inferior_list): New function.
7650 (clear_inferiors): Update.
7651 * inferiors.h (for_each_inferior_with_data): Declare.
7652 (clear_inferior_list): Declare.
7653 (one_inferior_p): Declare.
7654 (get_first_inferior): Declare.
7655 * linux-low.c (linux_wait_for_event): Replace accessing list
7656 implemention details with API function.
7657 * server.c (target_running): Ditto.
7658 (accumulate_file_name_length): New function.
7659 (emit_dll_description): New function.
7660 (handle_qxfer_libraries): Replace accessing list implemention
7661 details with API function.
7662 (handle_qxfer_threads_worker): New function.
7663 (handle_qxfer_threads_proper): Replace accessing list implemention
7664 details with API function.
7665 (handle_query): Ditto.
7666 (visit_actioned_threads_callback_ftype): New typedef.
7667 (visit_actioned_threads_data): New struct.
7668 (visit_actioned_threads): Rewrite to be find_inferior callback.
7669 (resume): Call find_inferior.
7670 (handle_status): Replace accessing list implemention
7671 details with API function.
7672 (process_serial_event): Replace accessing list implemention details
7673 with API function.
7674 * target.c (set_desired_inferior): Replace accessing list implemention
7675 details with API function.
7676 * tracepoint.c (same_process_p): New function.
7677 (gdb_agent_about_to_close): Replace accessing list implemention
7678 details with API function.
7679 * win32-low.c (child_delete_thread): Replace accessing list
7680 implemention details with API function.
7681 (match_dll_by_basename): New function.
7682 (dll_is_loaded_by_basename): New function.
7683 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7684 details call to dll_is_loaded_by_basename.
7685
7686 2014-02-19 Doug Evans <dje@google.com>
7687
7688 * dll.h (struct dll_info): Add comment.
7689 * gdbthread.h (struct thread_info): Add comment.
7690 (current_ptid): Simplify.
7691 * inferiors.c (add_process): Update.
7692 (remove_process): Update.
7693 * inferiors.h (struct process_info): Rename member "head" to "entry".
7694 * linux-low.c (delete_lwp): Update.
7695 (add_lwp): Update.
7696 (last_thread_of_process_p): Update.
7697 (kill_one_lwp_callback, linux_kill): Update.
7698 (status_pending_p_callback): Update.
7699 (wait_for_sigstop): Update. Simplify read of ptid.
7700 (start_step_over): Update.
7701 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7702 (get_lwp_thread): Update.
7703 (struct lwp_info): Rename member "head" to "entry".
7704 * regcache.h (inferior_list_entry): Delete.
7705 * server.c (kill_inferior_callback): Update.
7706 (detach_or_kill_inferior_callback): Update.
7707 (print_started_pid): Update.
7708 (print_attached_pid): Update.
7709 (process_serial_event): Simplify read of ptid.
7710 * thread-db.c (thread_db_create_event): Update.
7711 (thread_db_get_tls_address): Update.
7712 * win32-low.c (current_inferior_ptid): Simplify.
7713
7714 2014-02-19 Tom Tromey <tromey@redhat.com>
7715
7716 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7717 argument.
7718 (target_supports_btrace): Update.
7719
7720 2014-02-14 Yao Qi <yao@codesourcery.com>
7721
7722 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7723 (rsp-low-ipa.o): New target.
7724
7725 2014-02-12 Tom Tromey <tromey@redhat.com>
7726
7727 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7728 convert_ascii_to_int.
7729 * regcache.c (registers_to_string): Likewise.
7730 * remote-utils.c (decode_M_packet): Likewise.
7731 * server.c (process_serial_event): Likewise.
7732
7733 2014-02-12 Tom Tromey <tromey@redhat.com>
7734
7735 * server.c (handle_query, handle_v_run): Use hex2bin, not
7736 unhexify.
7737 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7738
7739 2014-02-12 Tom Tromey <tromey@redhat.com>
7740
7741 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7742 convert_int_to_ascii.
7743 * regcache.c (registers_to_string, collect_register_as_string):
7744 Likewise.
7745 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7746 Likewise.
7747 * server.c (process_serial_event): Likewise.
7748 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7749 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7750
7751 2014-02-12 Tom Tromey <tromey@redhat.com>
7752
7753 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7754 bin2hex, not hexify.
7755 * tracepoint.c (cmd_qtstatus): Likewise.
7756
7757 2014-02-12 Tom Tromey <tromey@redhat.com>
7758
7759 * remote-utils.c (monitor_output): Pass explicit length to
7760 hexify.
7761
7762 2014-02-12 Tom Tromey <tromey@redhat.com>
7763
7764 * tracepoint.c: Include rsp-low.h.
7765 * server.c: Include rsp-low.h.
7766 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7767 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7768 declare.
7769 * remote-utils.c: Include rsp-low.h.
7770 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7771 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7772 (convert_int_to_ascii, convert_ascii_to_int): Move to
7773 common/rsp-low.c.
7774 * regcache.c: Include rsp-low.h.
7775 * ax.c: Include rsp-low.h.
7776 * Makefile.in (SFILES): Add common/rsp-low.c.
7777 (OBS): Add rsp-low.o.
7778 (rsp-low.o): New target.
7779
7780 2014-02-12 Tom Tromey <tromey@redhat.com>
7781
7782 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7783 Include print-utils.h.
7784 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7785 (plongest, thirty_two, phex_nz): Remove.
7786 * Makefile.in (SFILES): Add common/print-utils.c.
7787 (OBS): Add print-utils.o.
7788 (print-utils-ipa.o): New target.
7789 (print-utils.o): New target.
7790 (IPA_OBJS): Add print-utils-ipa.o.
7791
7792 2014-02-06 Tom Tromey <tromey@redhat.com>
7793
7794 * Makefile.in (SFILES): Fix indentation.
7795
7796 2014-02-05 Doug Evans <dje@google.com>
7797
7798 * linux-low.c (linux_wait_for_event): Improve comment.
7799 (linux_wait_1): Keep current_inferior in sync with event_child.
7800
7801 2014-01-22 Doug Evans <dje@google.com>
7802
7803 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7804
7805 2014-01-22 Doug Evans <dje@google.com>
7806
7807 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7808 * configure: Regenerate.
7809 * config.in: Regenerate.
7810 * Makefile.in (SFILES): Add debug.c.
7811 (OBS): Add debug.o.
7812 * debug.c: New file.
7813 * debug.h: New file.
7814 * linux-aarch64-low.c (*): Update all debugging printfs to use
7815 debug_printf instead of fprintf.
7816 * linux-arm-low.c (*): Ditto.
7817 * linux-cris-low.c (*): Ditto.
7818 * linux-crisv32-low.c (*): Ditto.
7819 * linux-m32r-low.c (*): Ditto.
7820 * linux-sparc-low.c (*): Ditto.
7821 * linux-x86.c (*): Ditto.
7822 * linux-low.c (*): Ditto.
7823 (linux_wait_1): Add calls to debug_enter, debug_exit.
7824 (linux_wait): Remove redundant debugging printf.
7825 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7826 (linux_resume, unstop_all_lwps): Ditto.
7827 * mem-break.c (*): Update all debugging printfs to use
7828 debug_printf instead of fprintf.
7829 * remote-utils.c (*): Ditto.
7830 * thread-db.c (*): Ditto.
7831 * server.c #include <ctype.h>, "gdb_vecs.h".
7832 (debug_threads): Moved to debug.c.
7833 (*): Update all debugging printfs to use debug_printf instead of
7834 fprintf.
7835 (start_inferior): Replace call to fflush with call to debug_flush.
7836 (monitor_show_help): Mention set debug-format.
7837 (parse_debug_format_options): New function.
7838 (handle_monitor_command): Handle "monitor set debug-format".
7839 (gdbserver_usage): Mention --debug-format.
7840 (main): Parse --debug-format.
7841 * server.h (debug_threads): Declaration moved to debug.h.
7842 #include "debug.h".
7843 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7844 trace_debug_1 that uses debug_printf.
7845 (tracepoint_look_up_symbols): Update all debugging printfs to use
7846 debug_printf instead of fprintf.
7847
7848 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7849
7850 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7851 sys/ptrace.h.
7852
7853 2014-01-17 Pedro Alves <palves@redhat.com>
7854
7855 PR build/16445
7856 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7857 defined after including gdb_proc_service.h.
7858
7859 2014-01-16 Doug Evans <dje@google.com>
7860
7861 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7862 (match_dll): Use it.
7863
7864 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7865
7866 * target.h (target_ops) <read_btrace>: Change parameters and
7867 return type to allow error reporting.
7868 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7869 trace reading errors on.
7870 * linux-low.c (linux_low_read_btrace): Pass trace reading
7871 errors on.
7872 (linux_low_disable_btrace): New.
7873
7874 2014-01-15 Doug Evans <dje@google.com>
7875
7876 * inferiors.c (thread_id_to_gdb_id): Delete.
7877 * inferiors.h (thread_id_to_gdb_id): Delete.
7878
7879 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7880
7881 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7882 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7883 versions.
7884
7885 2014-01-08 Pedro Alves <palves@redhat.com>
7886
7887 * server.c (handle_status): Don't discard previous queued stop
7888 replies or thread's pending status here.
7889 (main) <disconnection>: Do it here instead.
7890
7891 2014-01-08 Pedro Alves <palves@redhat.com>
7892
7893 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7894 * server.c (visit_actioned_threads, handle_pending_status): New
7895 function.
7896 (handle_v_cont): Factor out parts to ...
7897 (resume): ... this new function. If in all-stop, and a thread
7898 being resumed has a pending status, report it without actually
7899 resuming.
7900 (myresume): Adjust to use the new 'resume' function.
7901 (clear_pending_status_callback, set_pending_status_callback)
7902 (find_status_pending_thread_callback): New functions.
7903 (handle_status): Handle the case of multiple threads having
7904 interesting statuses to report. Report threads' real last signal
7905 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7906 with an interesting thread to report the status for, instead of
7907 always reporting the status of the first thread.
7908
7909 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7910
7911 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7912 * gdbreplay.c (gdbreplay_version): Likewise.
7913
7914 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7915
7916 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7917 iov.iov_len with the real length in use.
7918
7919 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7920
7921 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7922 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7923 for all targets that use win32-low.c.
7924 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7925 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7926
7927 2013-12-13 Pedro Alves <palves@redhat.com>
7928
7929 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7930 if equal to TARGET_WAITKIND_LOADED.
7931 * win32-low.c (cached_status): New static global.
7932 (win32_wait): Add declaration.
7933 (do_initial_child_stuff): Flush all initial pending debug events
7934 up to the initial breakpoint.
7935 (win32_wait): If CACHED_STATUS was set, return that instead
7936 of doing a real wait. Remove the code resuming the execution
7937 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7938 during the initial phase. Also remove the code changing
7939 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7940 TARGET_WAITKIND_STOPPED.
7941
7942 2013-12-11 Yao Qi <yao@codesourcery.com>
7943
7944 * notif.c (handle_notif_ack): Return 0 if no notification
7945 matches.
7946
7947 2013-11-20 Doug Evans <dje@google.com>
7948
7949 * linux-low.c (linux_set_resume_request): Fix comment.
7950
7951 2013-11-20 Doug Evans <dje@google.com>
7952
7953 * linux-low.c (resume_status_pending_p): Tweak comment.
7954
7955 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7956
7957 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7958 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7959 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7960 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7961 (srv_amd64_regobj): Add amd64-mpx.o.
7962 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7963 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7964 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7965 * i387-fp.c (num_pl_bnd_register) Added constant.
7966 (num_pl_bnd_cfg_registers) Added constant.
7967 (struct i387_xsave) Added reserved area and MPX fields.
7968 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7969 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7970 function.
7971 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7972 (init_registers_amd64_mpx_linux): Declare new function.
7973 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7974 (x86_64_regmap): Add MPX registers.
7975 (x86_linux_read_description): Add MPX case.
7976 (initialize_low_arch): Initialize MPX targets.
7977
7978 2013-11-18 Tom Tromey <tromey@redhat.com>
7979
7980 * configure: Rebuild.
7981 * configure.ac: Don't check for stdlib.h.
7982 * gdbreplay.c: Unconditionally include stdlib.h.
7983
7984 2013-11-18 Tom Tromey <tromey@redhat.com>
7985
7986 * config.in: Rebuild.
7987 * configure: Rebuild.
7988 * configure.ac: Don't use AC_HEADER_DIRENT.
7989
7990 2013-11-18 Tom Tromey <tromey@redhat.com>
7991
7992 * server.h: Don't check HAVE_STRING_H.
7993 * gdbreplay.c: Don't check HAVE_STRING_H.
7994 * configure: Rebuild.
7995
7996 2013-11-18 Tom Tromey <tromey@redhat.com>
7997
7998 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7999 LIBGNU.
8000
8001 2013-11-08 Tom Tromey <tromey@redhat.com>
8002
8003 * configure, config.in: Rebuild.
8004 * configure.ac: Remove unused configury.
8005
8006 2013-11-08 Tom Tromey <tromey@redhat.com>
8007
8008 * acinclude.m4: Include common.m4, codeset.m4.
8009 * configure, config.in: Rebuild.
8010 * configure.ac: Use GDB_AC_COMMON.
8011
8012 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8013
8014 * linux-s390-low.c (HWCAP_S390_TE): New define.
8015 (s390_arch_setup): Consider the TE field in the HWCAP for
8016 determining 'have_regset_tdb'.
8017
8018 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8019
8020 PR gdb/16014
8021 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8022 call to sizeof.
8023
8024 2013-10-02 Pedro Alves <palves@redhat.com>
8025
8026 * server.c (process_serial_event): Don't output "GDBserver
8027 exiting" if GDB is connected through stdio.
8028 * target.c (mywait): Likewise, be silent if GDB is connected
8029 through stdio.
8030
8031 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8032
8033 * lynx-low.c (lynx_add_threads_after_attach): New function.
8034 (lynx_attach): Remove call to add_thread. Add call to
8035 lynx_add_threads_after_attach instead.
8036
8037 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8038
8039 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8040 * config.in, configure: Regenerated.
8041
8042 2013-09-18 Yao Qi <yao@codesourcery.com>
8043
8044 PR server/15959
8045 * server.c (start_inferior): Clear 'resume_info'.
8046
8047 2013-09-16 Jiong Wang <jiwang@tilera.com>
8048
8049 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8050 for each register.
8051
8052 2013-09-16 Jiong Wang <jiwang@tilera.com>
8053
8054 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8055 linux-tile-low.o to srv_tgtobj.
8056
8057 2013-09-16 Will Newton <will.newton@linaro.org>
8058
8059 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8060 out regs.
8061
8062 2013-09-06 Pedro Alves <palves@redhat.com>
8063
8064 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8065 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8066 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8067 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8068 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8069 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8070
8071 2013-09-06 Pedro Alves <palves@redhat.com>
8072
8073 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8074 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8075
8076 2013-09-06 Pedro Alves <palves@redhat.com>
8077
8078 * linux-amd64-ipa.c: Include tracepoint.h.
8079 * linux-i386-ipa.c: Include tracepoint.h.
8080
8081 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8082
8083 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8084 (ps_get_thread_area): New function.
8085
8086 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8087
8088 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8089 (initialize_low_arch): Call init_registers_crisv32 rather than
8090 init_register_crisv32.
8091
8092 2013-09-05 Pedro Alves <palves@redhat.com>
8093
8094 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8095 to ...
8096 * hostio.h: ... this new file.
8097 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8098 win32-low.c: Include hostio.h.
8099
8100 2013-09-05 Pedro Alves <palves@redhat.com>
8101
8102 * server.h (gdb_client_data, handler_func, callback_handler_func)
8103 (delete_file_handler, add_file_handler, append_callback_event)
8104 (delete_callback_event, start_event_loop, initialize_event_loop):
8105 Move to event-loop.h and include it.
8106 * event-loop.h: New file.
8107
8108 2013-09-05 Pedro Alves <palves@redhat.com>
8109
8110 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8111 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8112 (loaded_dll, unloaded_dll): Move to ...
8113 * dll.h: ... this new file.
8114 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8115
8116 2013-09-05 Pedro Alves <palves@redhat.com>
8117
8118 * server.h (current_process, get_thread_process, all_processes)
8119 (add_inferior_to_list, for_each_inferior, current_inferior)
8120 (remove_inferior, add_process, remove_process, find_process_pid)
8121 (have_started_inferiors_p, have_attached_inferiors_p)
8122 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8123 (clear_inferiors, find_inferior, find_inferior_id)
8124 (inferior_target_data, set_inferior_target_data)
8125 (inferior_regcache_data, set_inferior_regcache_data): Move to
8126 inferiors.h, and include it.
8127 * inferiors.h: New file.
8128
8129 2013-09-05 Pedro Alves <palves@redhat.com>
8130
8131 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8132 Move ...
8133 * ax.h: ... here.
8134
8135 2013-09-05 Pedro Alves <palves@redhat.com>
8136
8137 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8138 tracepoint.h.
8139 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8140 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8141 (handle_tracepoint_general_set, handle_tracepoint_query)
8142 (tracepoint_finished_step, tracepoint_was_hit)
8143 (release_while_stepping_state_list, current_traceframe)
8144 (in_readonly_region, traceframe_read_mem)
8145 (fetch_traceframe_registers, traceframe_read_sdata)
8146 (traceframe_read_info, struct fast_tpoint_collect_status)
8147 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8148 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8149 (supply_fast_tracepoint_registers)
8150 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8151 (ipa_tdesc, claim_trampoline_space)
8152 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8153 (agent_mem_read, agent_get_trace_state_variable_value)
8154 (agent_set_trace_state_variable_value, agent_tsv_read)
8155 (agent_mem_read_string, get_raw_reg_func_addr)
8156 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8157 * tracepoint.h: ... this new file.
8158
8159 2013-09-05 Pedro Alves <palves@redhat.com>
8160
8161 * server.h (perror_with_name, error, fatal, warning, paddress)
8162 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8163 include it.
8164 * utils.h: New file.
8165
8166 2013-09-05 Pedro Alves <palves@redhat.com>
8167
8168 * server.h (remote_debug, noack_mode, transport_is_reliable)
8169 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8170 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8171 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8172 (write_enn, initialize_async_io, enable_async_io)
8173 (disable_async_io, check_remote_input_interrupt_request)
8174 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8175 (dead_thread_notify, prepare_resume_reply)
8176 (decode_address_to_semicolon, decode_address, decode_m_packet)
8177 (decode_M_packet, decode_X_packet, decode_xfer_write)
8178 (decode_search_memory_packet, unhexify, hexify)
8179 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8180 (look_up_one_symbol, relocate_instruction)
8181 (monitor_output): Move to remote-utils.h, and include it.
8182 * remote-utils.h: New file.
8183
8184 2013-09-05 Pedro Alves <palves@redhat.com>
8185
8186 * server.h (_): Delete.
8187
8188 2013-09-02 Pedro Alves <palves@redhat.com>
8189
8190 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8191 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8192 allocated.
8193 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8194
8195 2013-09-02 Pierre Muller <muller@sourceware.org>
8196
8197 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8198 or WriteProcessMemory complete successfully and handle
8199 ERROR_PARTIAL_COPY error.
8200
8201 2013-09-02 Pedro Alves <palves@redhat.com>
8202
8203 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8204 error instead of EIO.
8205
8206 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8207
8208 PR server/15604
8209 * linux-low.c: Include filestuff.h.
8210 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8211 * lynx-low.c: Include filestuff.h.
8212 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8213 * server.c: Include filestuff.h.
8214 (main): Call notice_open_fds.
8215 * spu-low.c: Include filestuff.h.
8216 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8217
8218 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8219
8220 * Makefile.in: Explain why ../target and ../nat are not
8221 listed as include file search paths.
8222 (linux-waitpid.o): New object file rule.
8223 * configure.srv (srv_native_linux_obj): New variable.
8224 Replace all occurrences of linux native object files with
8225 $srv_native_linux_obj.
8226 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8227 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8228 (linux_enable_event_reporting): Remove declaration.
8229 (my_waitpid): Moved to common/linux-waitpid.c.
8230 (linux_wait_for_event): Pass ptid when calling
8231 linux_enable_event_reporting.
8232 (linux_supports_tracefork_flag): Remove.
8233 (linux_enable_event_reporting): Likewise.
8234 (linux_tracefork_grandchild): Remove.
8235 (STACK_SIZE): Moved to common/linux-ptrace.c.
8236 (linux_tracefork_child): Remove.
8237 (linux_test_for_tracefork): Remove.
8238 (linux_look_up_symbols): Call linux_supports_traceclone.
8239 (initialize_low): Remove call to linux_test_for_tracefork.
8240 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8241 common/linux-ptrace.h.
8242 (PTRACE_TYPE_ARG4): Likewise.
8243 Include linux-ptrace.h.
8244
8245 2013-08-21 Pedro Alves <palves@redhat.com>
8246
8247 * config.in: Renegerate.
8248
8249 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8250
8251 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8252 (SFILES): Remove $(srcdir)/common/target-common.c and
8253 add $(srcdir)/target/waitstatus.c.
8254 (OBS): Remove target-common.o and add waitstatus.o.
8255 (server_h): Remove $(srcdir)/../common/target-common.h and
8256 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8257 and $(srcdir)/../target/waitstatus.h.
8258 (target-common.o): Remove.
8259 (waitstatus.o): New target object file.
8260 * target.h: Do not include target-common.h and
8261 include target/resume.h, target/wait.h and
8262 target/waitstatus.h.
8263
8264 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8265
8266 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8267 to PTRACE_TYPE_ARG3.
8268 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8269 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8270 PTRACE_TYPE_ARG4.
8271 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8272 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8273
8274 2013-07-27 Jie Zhang <jie@codesourcery.com>
8275 Daniel Jacobowitz <dan@codesourcery.com>
8276 Yao Qi <yao@codesourcery.com>
8277
8278 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8279 (mips-linux-watch.o): New rule.
8280 (mips_linux_watch_h): New variable.
8281 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8282 srv_tgtobj.
8283 * linux-mips-low.c: Include mips-linux-watch.h.
8284 (struct arch_process_info, struct arch_lwp_info): New.
8285 (update_watch_registers_callback): New function.
8286 (mips_linux_new_process, mips_linux_new_thread) New functions.
8287 (mips_linux_prepare_to_resume, mips_insert_point): New
8288 functions.
8289 (mips_remove_point, mips_stopped_by_watchpoint): New
8290 functions.
8291 (rsp_bp_type_to_target_hw_bp_type): New function.
8292 (mips_stopped_data_address): New function.
8293 (the_low_target): Add watchpoint support functions.
8294
8295 2013-07-27 Yao Qi <yao@codesourcery.com>
8296
8297 * i386-low.c: Include break-common.h.
8298 (enum target_hw_bp_type): Remove.
8299
8300 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8301
8302 * Makefile.in (SFILES): /common/target-common.c.
8303 (OBS): Add target-common.o.
8304 (server_h): Add $(srcdir)/../common/target-common.h.
8305 (target-common.o): New target.
8306 * server.c (queue_stop_reply_callback): Free
8307 status string after use.
8308 * target.c (target_waitstatus_to_string): Remove.
8309 * target.h: Include target-common.h.
8310 (resume_kind): Likewise.
8311 (target_waitkind): Likewise.
8312 (target_waitstatus): Likewise.
8313 (TARGET_WNOHANG): Likewise.
8314
8315 2013-07-04 Yao Qi <yao@codesourcery.com>
8316
8317 * Makefile.in (host_alias): Use @host_noncanonical@.
8318 (target_alias): Use @target_noncanonical@.
8319 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8320 ACX_NONCANONICAL_HOST.
8321 * configure: Regenerated.
8322
8323 Revert:
8324 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8325
8326 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8327 * configure: Rebuild.
8328 * Makefile.in (version_host, version_target): Get from configure.
8329 (version.c): Use $(version_host) and $(version_target).
8330
8331 2013-07-03 Pedro Alves <palves@redhat.com>
8332
8333 * Makefile.in (config.status): Depend on development.sh.
8334 * acinclude.m4: Include libmcheck.m4.
8335 * configure: Regenerate.
8336
8337 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8338
8339 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8340 attribute inside the parentheses.
8341 (winapi_DebugSetProcessKillOnExit): Ditto.
8342 (winapi_DebugBreakProcess): Ditto.
8343 (winapi_GenerateConsoleCtrlEvent): Ditto.
8344
8345 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8346
8347 * notif.h (notif_event): Add a dummy member to avoid compiler
8348 errors.
8349
8350 2013-07-01 Pedro Alves <palves@redhat.com>
8351
8352 * hostio.c (HOSTIO_PATH_MAX): Define.
8353 (require_filename, handle_open, handle_unlink, handle_readlink):
8354 Use it.
8355
8356 2013-07-01 Pedro Alves <palves@redhat.com>
8357
8358 * server.h: Include "pathmax.h".
8359 * linux-low.c: Don't include sys/param.h.
8360 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8361 MAXPATHLEN.
8362 * win32-low.c: Don't include sys/param.h.
8363 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8364
8365 2013-07-01 Pedro Alves <palves@redhat.com>
8366
8367 * event-loop.c: Don't check HAVE_UNISTD_H before including
8368 <unistd.h>.
8369 * gdbreplay.c: Likewise.
8370 * remote-utils.c: Likewise.
8371 * server.c: Likewise.
8372 * configure.ac: Don't check for unistd.h.
8373 * configure: Regenerate.
8374
8375 2013-06-28 Tom Tromey <tromey@redhat.com>
8376
8377 * Makefile.in (version.c): Use version.in, not
8378 common/version.in.
8379
8380 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8381
8382 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8383 * configure: Rebuild.
8384 * Makefile.in (version_host, version_target): Get from configure.
8385 (version.c): Use $(version_host) and $(version_target).
8386
8387 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8388
8389 Fix trace-status to output user name without trailing colon.
8390 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8391
8392 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8393
8394 Fix trace-status to output proper start-time and stop-time.
8395 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8396 output start time and stop time in hex as gdb expects.
8397
8398 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8399
8400 * tracepoint.c (build_traceframe_info_xml): Output trace state
8401 variables present in the trace buffer.
8402
8403 2013-06-24 Tom Tromey <tromey@redhat.com>
8404
8405 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8406 create-version.sh.
8407 (version.o): Remove.
8408 * gdbreplay.c: Include version.h.
8409 (version, host_name): Don't declare.
8410 * server.h: Include version.h.
8411 (version, host_name): Don't declare.
8412
8413 2013-06-12 Pedro Alves <palves@redhat.com>
8414
8415 * linux-x86-low.c (linux_is_elf64): Delete global.
8416 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8417 with local linux_pid_exe_is_elf_64_file use.
8418
8419 2013-06-11 Pedro Alves <palves@redhat.com>
8420
8421 * linux-low.c (regset_disabled, disable_regset): New functions.
8422 (regsets_fetch_inferior_registers)
8423 (regsets_store_inferior_registers): Use them.
8424 (initialize_regsets_info); Don't allocate the disabled_regsets
8425 array here.
8426 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8427 comment.
8428
8429 2013-06-11 Pedro Alves <palves@redhat.com>
8430
8431 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8432 xmalloc.
8433
8434 2013-06-11 Pedro Alves <palves@redhat.com>
8435
8436 * linux-x86-low.c (initialize_low_arch): Call
8437 init_registers_x32_avx_linux.
8438
8439 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8440
8441 Fix compatibility with Android Bionic.
8442 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8443 it is not empty.
8444
8445 2013-06-07 Pedro Alves <palves@redhat.com>
8446
8447 PR server/14823
8448 * Makefile.in (OBS): Add tdesc.o.
8449 (IPA_OBJS): Add tdesc-ipa.o.
8450 (tdesc-ipa.o): New rule.
8451 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8452 interface.
8453 * linux-low.c (new_inferior): Delete.
8454 (disabled_regsets, num_regsets): Delete.
8455 (linux_add_process): Adjust to set the new per-process
8456 new_inferior flag.
8457 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8458 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8459 was a stop. When calling arch_setup, switch the current inferior
8460 to the thread that got an event.
8461 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8462 (regsets_fetch_inferior_registers)
8463 (regsets_store_inferior_registers): New regsets_info parameter.
8464 Adjust to use it.
8465 (linux_register_in_regsets): New regs_info parameter. Adjust to
8466 use it.
8467 (register_addr, fetch_register, store_register): New usrregs_info
8468 parameter. Adjust to use it.
8469 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8470 parameter regs_info. Adjust to use it.
8471 (linux_fetch_registers): Get the current inferior's regs_info, and
8472 adjust to use it.
8473 (linux_store_registers): Ditto.
8474 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8475 (initialize_low): Don't initialize the target_regsets here. Call
8476 initialize_low_arch.
8477 * linux-low.h (target_regsets): Delete declaration.
8478 (struct regsets_info): New.
8479 (struct usrregs_info): New.
8480 (struct regs_info): New.
8481 (struct process_info_private) <new_inferior>: New field.
8482 (struct linux_target_ops): Delete the num_regs, regmap, and
8483 regset_bitmap fields. New field regs_info.
8484 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8485 * i387-fp.c (num_xmm_registers): Delete.
8486 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8487 calls to new interface.
8488 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8489 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8490 Infer the number of xmm registers from the regcache's target
8491 description.
8492 * i387-fp.h (num_xmm_registers): Delete.
8493 * inferiors.c (add_thread): Don't install the thread's regcache
8494 here.
8495 * proc-service.c (gregset_info): Fetch the current inferior's
8496 regs_info. Adjust to use it.
8497 * regcache.c: Include tdesc.h.
8498 (register_bytes, reg_defs, num_registers)
8499 (gdbserver_expedite_regs): Delete.
8500 (get_thread_regcache): If the thread doesn't have a regcache yet,
8501 create one, instead of aborting gdbserver.
8502 (regcache_invalidate_one): Rename to ...
8503 (regcache_invalidate_thread): ... this.
8504 (regcache_invalidate_one): New.
8505 (regcache_invalidate): Only invalidate registers of the current
8506 process.
8507 (init_register_cache): Add target_desc parameter, and use it.
8508 (new_register_cache): Ditto. Assert the target description has a
8509 non zero registers_size.
8510 (regcache_cpy): Add assertions. Adjust.
8511 (realloc_register_cache, set_register_cache): Delete.
8512 (registers_to_string, registers_from_string): Adjust.
8513 (find_register_by_name, find_regno, find_register_by_number)
8514 (register_cache_size): Add target_desc parameter, and use it.
8515 (free_register_cache_thread, free_register_cache_thread_one)
8516 (regcache_release, register_cache_size): New.
8517 (register_size): Add target_desc parameter, and use it.
8518 (register_data, supply_register, supply_register_zeroed)
8519 (supply_regblock, supply_register_by_name, collect_register)
8520 (collect_register_as_string, collect_register_by_name): Adjust.
8521 * regcache.h (struct target_desc): Forward declare.
8522 (struct regcache) <tdesc>: New field.
8523 (init_register_cache, new_register_cache): Add target_desc
8524 parameter.
8525 (regcache_invalidate_thread): Declare.
8526 (regcache_invalidate_one): Delete declaration.
8527 (regcache_release): Declare.
8528 (find_register_by_number, register_cache_size, register_size)
8529 (find_regno): Add target_desc parameter.
8530 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8531 declarations.
8532 * remote-utils.c: Include tdesc.h.
8533 (outreg, prepare_resume_reply): Adjust.
8534 * server.c: Include tdesc.h.
8535 (gdbserver_xmltarget): Delete declaration.
8536 (get_features_xml, process_serial_event): Adjust.
8537 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8538 declare.
8539 (struct process_info) <tdesc>: New field.
8540 (ipa_tdesc): Declare.
8541 * tdesc.c: New file.
8542 * tdesc.h: New file.
8543 * tracepoint.c: Include tdesc.h.
8544 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8545 (get_context_regcache): Adjust to pass ipa_tdesc down.
8546 (do_action_at_tracepoint): Adjust to get the register cache size
8547 from the context regcache's description.
8548 (traceframe_walk_blocks): Adjust to get the register cache size
8549 from the current trace frame's description.
8550 (traceframe_get_pc): Adjust to get current trace frame's
8551 description and pass it down.
8552 (gdb_collect): Adjust to get the register cache size from the
8553 IPA's description.
8554 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8555 (gdbserver_xmltarget): Delete.
8556 (initialize_low_tracepoint): Set the ipa's target description.
8557 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8558 (initialize_low_tracepoint): Set the ipa's target description.
8559 * linux-x86-low.c: Include tdesc.h.
8560 [__x86_64__] (is_64bit_tdesc): New.
8561 (ps_get_thread_area, x86_get_thread_area): Use it.
8562 (i386_cannot_store_register): Rename to ...
8563 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8564 (i386_cannot_fetch_register): Rename to ...
8565 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8566 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8567 to new interface.
8568 (target_regsets): Rename to ...
8569 (x86_regsets): ... this.
8570 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8571 interface.
8572 (x86_siginfo_fixup): Use is_64bit_tdesc.
8573 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8574 (tdesc_x32_avx_linux, tdesc_x32_linux)
8575 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8576 Declare.
8577 (x86_linux_update_xmltarget): Delete.
8578 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8579 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8580 (AMD64_LINUX_USER64_CS): New.
8581 (x86_linux_read_description): New, based on
8582 x86_linux_update_xmltarget.
8583 (same_process_callback): New.
8584 (x86_arch_setup_process_callback): New.
8585 (x86_linux_update_xmltarget): New.
8586 (x86_regsets_info): New.
8587 (amd64_linux_regs_info): New.
8588 (i386_linux_usrregs_info): New.
8589 (i386_linux_regs_info): New.
8590 (x86_linux_regs_info): New.
8591 (x86_arch_setup): Reimplement.
8592 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8593 (x86_emit_ops): Ditto.
8594 (the_low_target): Adjust. Install x86_linux_regs_info,
8595 x86_cannot_fetch_register, and x86_cannot_store_register.
8596 (initialize_low_arch): New.
8597 * linux-ia64-low.c (tdesc_ia64): Declare.
8598 (ia64_fetch_register): Adjust.
8599 (ia64_usrregs_info, regs_info): New globals.
8600 (ia64_regs_info): New function.
8601 (the_low_target): Adjust.
8602 (initialize_low_arch): New function.
8603 * linux-sparc-low.c (tdesc_sparc64): Declare.
8604 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8605 Adjust.
8606 (sparc_arch_setup): New function.
8607 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8608 (the_low_target): Adjust.
8609 (initialize_low_arch): New function.
8610 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8611 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8612 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8613 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8614 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8615 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8616 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8617 (tdesc_powerpc_isa205_vsx64l): Declare.
8618 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8619 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8620 (ppc_set_pc, ppc_get_hwcap): Adjust.
8621 (ppc_usrregs_info): Forward declare.
8622 (!__powerpc64__) ppc_regmap_adjusted: New global.
8623 (ppc_arch_setup): Adjust to the current process'es target
8624 description.
8625 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8626 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8627 (ppc_store_evrregset): Adjust.
8628 (target_regsets): Rename to ...
8629 (ppc_regsets): ... this, and make static.
8630 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8631 (ppc_regs_info): New function.
8632 (the_low_target): Adjust.
8633 (initialize_low_arch): New function.
8634 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8635 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8636 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8637 (tdesc_s390x_linux64v2): Declare.
8638 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8639 (s390_fill_gregset, s390_store_last_break): Adjust.
8640 (target_regsets): Rename to ...
8641 (s390_regsets): ... this, and make static.
8642 (s390_get_pc, s390_set_pc): Adjust.
8643 (s390_get_hwcap): New target_desc parameter, and use it.
8644 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8645 (s390_arch_setup): Adjust to set the current process'es target
8646 description. Don't adjust the regmap.
8647 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8648 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8649 (regs_info_3264): New globals.
8650 (s390_regs_info): New function.
8651 (the_low_target): Adjust.
8652 (initialize_low_arch): New function.
8653 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8654 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8655 [__mips64] (init_registers_mips_linux)
8656 (init_registers_mips_dsp_linux): Delete defines.
8657 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8658 (have_dsp): New global.
8659 (mips_read_description): New, based on mips_arch_setup.
8660 (mips_arch_setup): Reimplement.
8661 (get_usrregs_info): New function.
8662 (mips_cannot_fetch_register, mips_cannot_store_register)
8663 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8664 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8665 (target_regsets): Rename to ...
8666 (mips_regsets): ... this, and make static.
8667 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8668 (dsp_regs_info, regs_info): New globals.
8669 (mips_regs_info): New function.
8670 (the_low_target): Adjust.
8671 (initialize_low_arch): New function.
8672 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8673 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8674 Declare.
8675 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8676 (arm_read_description): New, with bits factored from
8677 arm_arch_setup.
8678 (arm_arch_setup): Reimplement.
8679 (target_regsets): Rename to ...
8680 (arm_regsets): ... this, and make static.
8681 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8682 (arm_regs_info): New function.
8683 (the_low_target): Adjust.
8684 (initialize_low_arch): New function.
8685 * linux-m68k-low.c (tdesc_m68k): Declare.
8686 (target_regsets): Rename to ...
8687 (m68k_regsets): ... this, and make static.
8688 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8689 (m68k_regs_info): New function.
8690 (m68k_arch_setup): New function.
8691 (the_low_target): Adjust.
8692 (initialize_low_arch): New function.
8693 * linux-sh-low.c (tdesc_sharch): Declare.
8694 (target_regsets): Rename to ...
8695 (sh_regsets): ... this, and make static.
8696 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8697 (sh_regs_info, sh_arch_setup): New functions.
8698 (the_low_target): Adjust.
8699 (initialize_low_arch): New function.
8700 * linux-bfin-low.c (tdesc_bfin): Declare.
8701 (bfin_arch_setup): New function.
8702 (bfin_usrregs_info, regs_info): New globals.
8703 (bfin_regs_info): New function.
8704 (the_low_target): Adjust.
8705 (initialize_low_arch): New function.
8706 * linux-cris-low.c (tdesc_cris): Declare.
8707 (cris_arch_setup): New function.
8708 (cris_usrregs_info, regs_info): New globals.
8709 (cris_regs_info): New function.
8710 (the_low_target): Adjust.
8711 (initialize_low_arch): New function.
8712 * linux-cris-low.c (tdesc_crisv32): Declare.
8713 (cris_arch_setup): New function.
8714 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8715 (cris_regs_info): New function.
8716 (the_low_target): Adjust.
8717 (initialize_low_arch): New function.
8718 * linux-m32r-low.c (tdesc_m32r): Declare.
8719 (m32r_arch_setup): New function.
8720 (m32r_usrregs_info, regs_info): New globals.
8721 (m32r_regs_info): Adjust.
8722 (initialize_low_arch): New function.
8723 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8724 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8725 (tic6x_usrregs_info): Forward declare.
8726 (tic6x_read_description): New function, based on ...
8727 (tic6x_arch_setup): ... this. Reimplement.
8728 (target_regsets): Rename to ...
8729 (tic6x_regsets): ... this, and make static.
8730 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8731 (tic6x_regs_info): New function.
8732 (the_low_target): Adjust.
8733 (initialize_low_arch): New function.
8734 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8735 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8736 (target_regsets): Rename to ...
8737 (xtensa_regsets): ... this, and make static.
8738 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8739 globals.
8740 (xtensa_arch_setup, xtensa_regs_info): New functions.
8741 (the_low_target): Adjust.
8742 (initialize_low_arch): New function.
8743 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8744 (nios2_arch_setup): Set the current process'es tdesc.
8745 (target_regsets): Rename to ...
8746 (nios2_regsets): ... this.
8747 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8748 (nios2_regs_info): New function.
8749 (the_low_target): Adjust.
8750 (initialize_low_arch): New function.
8751 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8752 (aarch64_arch_setup): Set the current process'es tdesc.
8753 (target_regsets): Rename to ...
8754 (aarch64_regsets): ... this.
8755 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8756 (aarch64_regs_info): New function.
8757 (the_low_target): Adjust.
8758 (initialize_low_arch): New function.
8759 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8760 globals.
8761 (target_regsets): Rename to ...
8762 (tile_regsets): ... this.
8763 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8764 (tile_regs_info): New function.
8765 (tile_arch_setup): Set the current process'es tdesc.
8766 (the_low_target): Adjust.
8767 (initialize_low_arch): New function.
8768 * spu-low.c (tdesc_spu): Declare.
8769 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8770 * win32-arm-low.c (tdesc_arm): Declare.
8771 (arm_arch_setup): New function.
8772 (the_low_target): Install arm_arch_setup instead of
8773 init_registers_arm.
8774 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8775 (init_windows_x86): Rename to ...
8776 (i386_arch_setup): ... this. Set `win32_tdesc'.
8777 (the_low_target): Adjust.
8778 * win32-low.c (win32_tdesc): New global.
8779 (child_add_thread): Don't create the thread cache here.
8780 (do_initial_child_stuff): Set the new process'es tdesc.
8781 * win32-low.h (struct target_desc): Forward declare.
8782 (win32_tdesc): Declare.
8783 * lynx-i386-low.c (tdesc_i386): Declare global.
8784 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8785 * lynx-low.c (lynx_tdesc): New global.
8786 (lynx_add_process): Set the new process'es tdesc.
8787 * lynx-low.h (struct target_desc): Forward declare.
8788 (lynx_tdesc): Declare global.
8789 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8790 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8791 * nto-low.c (nto_tdesc): New global.
8792 (do_attach): Set the new process'es tdesc.
8793 * nto-low.h (struct target_desc): Forward declare.
8794 (nto_tdesc): Declare.
8795 * nto-x86-low.c (tdesc_i386): Declare.
8796 (nto_x86_arch_setup): Set `nto_tdesc'.
8797
8798 2013-06-04 Gary Benson <gbenson@redhat.com>
8799
8800 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8801 to qSupported response when appropriate.
8802 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8803 with nonzero-length annex.
8804 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8805 arguments supplied in annex.
8806
8807 2013-05-31 Doug Evans <dje@google.com>
8808
8809 PR server/15594
8810 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8811 64 bits in 64-cross-32 environment.
8812
8813 2013-05-28 Pedro Alves <palves@redhat.com>
8814
8815 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8816 (aarch64-without-fpu.c): Delete rule.
8817 * configure.srv (aarch64*-*-linux*): Remove references to
8818 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8819 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8820 declaration.
8821
8822 2013-05-24 Pedro Alves <palves@redhat.com>
8823
8824 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8825 instead of strchr/decode_address. Error if the range isn't split
8826 with a ','. Don't assume there's be a ':' in the action.
8827
8828 2013-05-23 Yao Qi <yao@codesourcery.com>
8829 Pedro Alves <palves@redhat.com>
8830
8831 * linux-low.c (lwp_in_step_range): New function.
8832 (linux_wait_1): If the thread was range stepping and stopped
8833 outside the stepping range, report the stop to GDB. Otherwise,
8834 continue stepping. Add range stepping debug output.
8835 (linux_set_resume_request): Copy the step range from the resume
8836 request to the lwp.
8837 (linux_supports_range_stepping): New.
8838 (linux_target_ops) <supports_range_stepping>: Set to
8839 linux_supports_range_stepping.
8840 * linux-low.h (struct linux_target_ops)
8841 <supports_range_stepping>: New field.
8842 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8843 * linux-x86-low.c (x86_supports_range_stepping): New.
8844 (the_low_target) <supports_range_stepping>: Set to
8845 x86_supports_range_stepping.
8846 * server.c (handle_v_cont): Handle 'r' action.
8847 (handle_v_requests): Append ";r" if the target supports range
8848 stepping.
8849 * target.h (struct thread_resume) <step_range_start,
8850 step_range_end>: New fields.
8851 (struct target_ops) <supports_range_stepping>:
8852 New field.
8853 (target_supports_range_stepping): New macro.
8854
8855 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8856
8857 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8858 confusion in comment.
8859
8860 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8861
8862 * lynx-low.c (struct process_info_private): New type.
8863 (lynx_add_process): New function.
8864 (lynx_create_inferior, lynx_attach): Replace calls to
8865 add_process by calls to lynx_add_process.
8866 (lynx_resume): If PTID is null, then try using
8867 current_process()->private->last_wait_event_ptid.
8868 Add comments.
8869 (lynx_clear_inferiors): Delete. The contents of that function
8870 has been inlined in lynx_mourn;
8871 (lynx_wait_1): Save the ptid in the process's private data.
8872 (lynx_mourn): Free the process' private data. Replace call
8873 to lynx_clear_inferiors by call to clear_inferiors.
8874
8875 2013-05-17 Yao Qi <yao@codesourcery.com>
8876
8877 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8878 the right place.
8879
8880 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8881
8882 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8883 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8884 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8885 PT_TEXT_END_ADDR guards. Update comments.
8886 (linux_target_op) <read_offsets>: Conditionally define to
8887 linux_read_offsets if the target is UCLIBC and if it defines
8888 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8889
8890 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8891 Andrew Jenner <andrew@codesourcery.com>
8892
8893 * Makefile.in (SFILES): Add linux-nios2-low.c.
8894 (clean): Add action to delete nios2-linux.c.
8895 (nios2-linux.c): New rule.
8896 * configure.srv: Add nios2*-*-linux*.
8897 * linux-nios2-low.c: New.
8898
8899 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8900
8901 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8902
8903 2013-04-25 Hui Zhu <hui@codesourcery.com>
8904
8905 PR gdb/15186
8906 * ax.c (ax_printf): Add fflush.
8907
8908 2013-04-22 Tom Tromey <tromey@redhat.com>
8909
8910 * Makefile.in (SFILES): Add filestuff.c.
8911 (OBS): Add filestuff.o.
8912 (filestuff.o): New target.
8913 * config.in, configure: Rebuild.
8914 * configure.ac: Check for fdwalk, pipe2.
8915
8916 2013-04-17 Pedro Alves <palves@redhat.com>
8917
8918 * configure.ac (USE_THREAD_DB): Delete variable.
8919 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8920 Don't AC_SUBST USE_THREAD_DB.
8921 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8922 * config.in, configure: Regenerate.
8923
8924 2013-04-16 Pedro Alves <palves@redhat.com>
8925
8926 * linux-low.h (struct lwp_info) <thread_known>: Move under
8927 the USE_THREAD_DB #ifdef.
8928
8929 2013-04-16 Pedro Alves <palves@redhat.com>
8930
8931 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8932 (linux-low.o): Delete rule.
8933 * linux-low.h: Always include "gdb_thread_db.h" instead of
8934 conditionally including thread_db.h.
8935 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8936 HAVE_THREAD_DB_H.
8937
8938 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8939
8940 * Makefile.in (install-only): Fix make install regression.
8941
8942 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8943
8944 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8945 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8946 installation.
8947 * gdbserver.1: Remove.
8948
8949 2013-03-22 Pedro Alves <palves@redhat.com>
8950
8951 * linux-low.c (handle_extended_wait): Don't call
8952 linux_enable_event_reporting.
8953
8954 2013-03-15 Tony Theodore <tonyt@logyst.com>
8955
8956 PR build/9098:
8957 * Makefile.in (SHELL): Use @SHELL@.
8958
8959 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8960
8961 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8962 compiler warning.
8963
8964 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8965
8966 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8967 Remove extraneous NULL element.
8968
8969 2013-03-13 Yao Qi <yao@codesourcery.com>
8970
8971 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8972 'V' block in trace frame.
8973
8974 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8975
8976 * target.h (struct target_ops): Add btrace ops.
8977 (target_supports_btrace): New macro.
8978 (target_enable_btrace): New macro.
8979 (target_disable_btrace): New macro.
8980 (target_read_btrace): New macro.
8981 * gdbthread.h (struct thread_info): Add btrace field.
8982 * server.c: Include btrace-common.h.
8983 (handle_btrace_general_set): New function.
8984 (handle_btrace_enable): New function.
8985 (handle_btrace_disable): New function.
8986 (handle_general_set): Call handle_btrace_general_set.
8987 (handle_qxfer_btrace): New function.
8988 (struct qxfer qxfer_packets[]): Add btrace entry.
8989 * inferiors.c (remove_thread): Disable btrace.
8990 * linux-low: Include linux-btrace.h.
8991 (linux_low_enable_btrace): New function.
8992 (linux_low_read_btrace): New function.
8993 (linux_target_ops): Add btrace ops.
8994 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8995 Add srv_linux_btrace=yes.
8996 (x86_64-*-linux*): Add linux-btrace.o.
8997 Add srv_linux_btrace=yes.
8998 * configure.ac: Define HAVE_LINUX_BTRACE.
8999 * config.in: Regenerated.
9000 * configure: Regenerated.
9001
9002 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9003
9004 * server.c (handle_qxfer): Preserve error message if -3 is
9005 returned.
9006 (qxfer): Document the -3 return value.
9007
9008 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9009
9010 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9011 (linux_btrace_h): New variable.
9012 (linux-btrace.o): New rule.
9013
9014 2013-03-08 Stan Shebs <stan@codesourcery.com>
9015 Hafiz Abid Qadeer <abidh@codesourcery.com>
9016
9017 * tracepoint.c (trace_buffer_size): New global.
9018 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9019 (init_trace_buffer): Change to one-argument function. Allocate
9020 trace buffer memory.
9021 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9022 handle QTBuffer:size packet.
9023 (cmd_bigqtbuffer_size): New function.
9024 (initialize_tracepoint): Call init_trace_buffer with
9025 DEFAULT_TRACE_BUFFER_SIZE.
9026 * server.c (handle_query): Add QTBuffer:size in the
9027 supported packets.
9028
9029 2013-03-07 Yao Qi <yao@codesourcery.com>
9030
9031 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9032 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9033 of -1.
9034 (cmd_qtsp): Adjust condition. Do post increment.
9035 Set cur_action and cur_step_action back to 0.
9036
9037 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9038
9039 PR server/15236
9040 * linux-low.c (linux_write_memory): Return early success if LEN is
9041 zero.
9042
9043 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9044
9045 * configure.srv: Add x86_64-*-cygwin* as target.
9046
9047 2013-02-28 Tom Tromey <tromey@redhat.com>
9048
9049 * configure.ac: Invoke AC_SYS_LARGEFILE.
9050 * configure, config.in: Rebuild.
9051
9052 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9053
9054 * win32-low.c: Throughout, fix format strings and casts of
9055 printf-like functions to avoid type related warnings on all
9056 platforms.
9057 (get_child_debug_event): Print dwDebugEventCode as hex since
9058 that's how it's usually documented.
9059
9060 2013-02-28 Yao Qi <yao@codesourcery.com>
9061
9062 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9063 pulongest.
9064
9065 2013-02-27 Jiong Wang <jiwang@tilera.com>
9066
9067 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9068 (reg-tilegx32.c): New rule.
9069 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9070 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9071 different register info initializer according to elf class.
9072 (init_registers_tilgx32): New function. The tilegx32 register info
9073 initializer.
9074 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9075 (tile_store_gregset): Likewise.
9076
9077 2013-02-27 Yao Qi <yao@codesourcery.com>
9078
9079 * server.c (process_point_options): Print debug message when
9080 debug_threads is true.
9081
9082 2013-02-26 Yao Qi <yao@codesourcery.com>
9083
9084 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9085
9086 2013-02-19 Pedro Alves <palves@redhat.com>
9087 Kai Tietz <ktietz@redhat.com>
9088
9089 PR gdb/15161
9090
9091 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9092 instead of strtoul to extract address from packet.
9093 (process_serial_event) <'z'>: Likewise.
9094
9095 2013-02-18 Yao Qi <yao@codesourcery.com>
9096
9097 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9098
9099 2013-02-14 Pedro Alves <palves@redhat.com>
9100
9101 Plug memory leak.
9102
9103 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9104 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9105
9106 2013-02-14 Pedro Alves <palves@redhat.com>
9107
9108 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9109
9110 2013-02-14 Pedro Alves <palves@redhat.com>
9111
9112 * tracepoint.c (save_string): Delete.
9113 (add_tracepoint_action): Use savestring instead of save_string.
9114
9115 2013-02-12 Pedro Alves <palves@redhat.com>
9116
9117 * linux-xtensa-low.c: Ditto.
9118 * xtensa-xtregs.c: Ditto.
9119
9120 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9121
9122 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9123 thread_db.
9124
9125 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9126
9127 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9128 aarch64_num_wp_regs and aarch64_num_bp_regs to
9129 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9130
9131 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9132
9133 * linux-aarch64-low.c (ps_get_thread_area): Replace
9134 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9135
9136 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9137 Marcus Shawcroft <marcus.shawcroft@arm.com>
9138 Nigel Stephens <nigel.stephens@arm.com>
9139 Yufeng Zhang <yufeng.zhang@arm.com>
9140
9141 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9142 (aarch64.c, aarch64-without-fpu.c): New targets.
9143 * configure.srv (aarch64*-*-linux*): New.
9144 * linux-aarch64-low.c: New file.
9145
9146 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9147
9148 * linux-low.c (handle_extended_wait, linux_create_inferior)
9149 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9150 (dequeue_one_deferred_signal, linux_resume_one_thread)
9151 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9152 (linux_tracefork_grandchild, linux_test_for_tracefork)
9153 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9154 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9155 where the argument is 0.
9156
9157 2013-01-25 Yao Qi <yao@codesourcery.com>
9158
9159 * event-loop.c: Include "queue.h".
9160 (gdb_event_p): New typedef.
9161 (struct gdb_event) <next_event>: Remove.
9162 (event_queue): Change to QUEUE(gdb_event_p).
9163 (async_queue_event): Remove.
9164 (gdb_event_xfree): New.
9165 (initialize_event_loop): New.
9166 (process_event): Use API from QUEUE.
9167 (wait_for_event): Likewise.
9168 * server.c (main): Call initialize_event_loop.
9169 * server.h (initialize_event_loop): Declare.
9170
9171 2013-01-18 Yao Qi <yao@codesourcery.com>
9172
9173 * ax.h (struct eval_agent_expr_context): New.
9174 (gdb_eval_agent_expr): Update declaration.
9175 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9176 TFRAME. Add new argument CTX.
9177 * server.h (struct eval_agent_expr_context): Declare.
9178 (agent_mem_read, agent_tsv_read): Update declaration.
9179 (agent_mem_read_string): Likewise.
9180 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9181 (add_traceframe_block): Add new argument TPOINT.
9182 Increase TPOINT->traceframe_usage.
9183 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9184 eval_tracepoint_agent_expr.
9185 (condition_true_at_tracepoint): Likewise.
9186 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9187 (agent_mem_read_string, agent_tsv_read): Likewise.
9188
9189 2013-01-16 Yao Qi <yao@codesourcery.com>
9190
9191 * linux-low.c (linux_resume_one_lwp): Don't check
9192 'lwp->bp_reinsert != 0'.
9193
9194 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9195 Pedro Alves <palves@redhat.com>
9196
9197 * lynx-low.c (ptrace_request_to_str): Define a temporary
9198 macro and use it to simplify this function's implementation.
9199
9200 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9201
9202 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9203 sets errno.
9204
9205 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9206
9207 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9208
9209 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9210
9211 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9212
9213 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9214
9215 * lynx-low.c (lynx_resume): Use the resume_info parameter
9216 to determine the ptid for the lynx_ptrace call, unless
9217 it is equal to minus_one_ptid, in which case we use the
9218 ptid of the current_inferior.
9219 (lynx_wait_1): After having received a thread create/exit
9220 event, resume the inferior's execution using the signaling
9221 thread's ptid, rather than the old ptid.
9222
9223 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9224
9225 * lynx-low.c (lynx_resume): Delete variable ret.
9226
9227 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9228
9229 * gdbreplay.c (gdbreplay_version): Update copyright year.
9230 * server.c (gdbserver_version): Likewise.
9231
9232 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9233
9234 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9235 new thread.
9236
9237 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9238
9239 * lynx-low.c (ptrace_request_to_str): Add handling for
9240 PTRACE_GETTRACESIG.
9241
9242 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9243
9244 * lynx-low.c (lynx_attach): Delete variable new_process.
9245
9246 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9247
9248 * lynx-low.c (lynx_create_inferior): Delete variable
9249 new_process.
9250
9251 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9252
9253 * lynx-low.c (ptrace_request_to_str): Do not handle
9254 PTRACE_GETTHREADLIST if this macro does not exist.
9255
9256 2012-12-15 Yao Qi <yao@codesourcery.com>
9257
9258 * Makefile.in (OBS): Add notif.o.
9259 * notif.c, notif.h: New.
9260 * server.c: Include "notif.h".
9261 (struct vstop_notif) <next>: Remove.
9262 <base>: New field.
9263 (queue_stop_reply): Update.
9264 (push_event, send_next_stop_reply): Remove.
9265 (discard_queued_stop_replies): Update.
9266 (notif_stop): New variable.
9267 (handle_v_stopped): Remove.
9268 (handle_v_requests): Don't call handle_v_stopped. Call
9269 handle_ack_notif instead.
9270 (queue_stop_reply_callback): Call notif_event_enque instead
9271 of queue_stop_reply.
9272 (handle_status): Don't call send_next_stop_reply, call
9273 notif_write_event instead.
9274 (kill_inferior_callback): Likewise.
9275 (detach_or_kill_inferior_callback): Likewise.
9276 (main): Call initialize_notif.
9277 (process_serial_event): Call QUEUE_is_empty.
9278 (handle_target_event): Call notif_push instead of push event.
9279 * server.h (push_event): Remove declaration.
9280
9281 2012-12-10 Tom Tromey <tromey@redhat.com>
9282
9283 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9284 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9285 macros.
9286 (.c.o): Rewrite.
9287 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9288 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9289 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9290 (amd64-linux-ipa.o, ax.o): Rewrite.
9291 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9292 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9293 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9294 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9295 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9296 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9297 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9298 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9299 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9300 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9301 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9302 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9303 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9304 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9305 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9306 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9307 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9308 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9309 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9310 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9311 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9312 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9313 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9314 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9315 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9316 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9317 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9318 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9319 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9320 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9321 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9322 (reg-tilegx.o): Remove.
9323 (all_object_files): New macro.
9324 Include .deps files.
9325 * aclocal.m4, configure: Rebuild.
9326 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9327 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9328 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9329
9330 2012-12-05 Tom Tromey <tromey@redhat.com>
9331
9332 PR gdb/14917:
9333 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9334
9335 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9336
9337 * configure.ac: Check for linux/perf_event.h.
9338 * config.in: Regenerated.
9339 * configure: Regenerated.
9340
9341 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9342
9343 * hostio.c (handle_readlink): Decrease buffer size
9344 parameter passed to readlink by one byte.
9345
9346 2012-11-26 Yao Qi <yao@codesourcery.com>
9347
9348 * configure.ac (build_warnings): Append '-Wempty-body'.
9349 * configure: Regenerated.
9350 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9351 body.
9352
9353 2012-11-15 Pierre Muller <muller@sourceware.org>
9354
9355 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9356 * config.in: Regenerate.
9357 * configure: Regenerate.
9358 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9359 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9360 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9361 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9362 header.
9363 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9364 instead of <sys/wait.h> header.
9365 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9366
9367 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9368
9369 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9370 (various make rules): Remove -DGDBSERVER
9371
9372 2012-11-09 Yao Qi <yao@codesourcery.com>
9373
9374 * spu-low.c (current_ptid): Move it to ..
9375 * gdbthread.h: ... here. New.
9376 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9377 * server.c (myresume, process_serial_event): Likewise.
9378 * thread-db.c (thread_db_find_new_threads): Likewise.
9379 * tracepoint.c (run_inferior_command): Likewise.
9380
9381 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9382
9383 * server.c (handle_search_memory_1): Include access length in
9384 warning message.
9385
9386 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9387
9388 * linux-crisv32-low.c: Fix compile errors.
9389
9390 2012-09-04 Yao Qi <yao@codesourcery.com>
9391
9392 * tracepoint.c (cmd_qtsv): Adjust debug message.
9393 Don't check CUR_TPOINT.
9394
9395 2012-08-28 Yao Qi <yao@codesourcery.com>
9396
9397 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9398 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9399 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9400 Remove declarations of xmalloc, xreallloc, xstrdup and
9401 freeargv.
9402 * Makefile.in (libiberty_h): New.
9403 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9404 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9405
9406 2012-08-23 Yao Qi <yao@codesourcery.com>
9407
9408 * server.h: Remove declaration of 'xsnprintf'.
9409
9410 2012-08-22 Keith Seitz <keiths@redhat.com>
9411
9412 * server.h: Include build-gnulib-gbserver/config.h.
9413 * gdbreplay.c: Likewise.
9414
9415 2012-08-08 Doug Evans <dje@google.com>
9416
9417 * Makefile.in (SFILES): Add gdb_vecs.c.
9418 (OBS): Add gdb_vecs.o.
9419 (gdb_vecs_h, host_defs_h): New variables.
9420 (thread-db.o): Add $(gdb_vecs_h) dependency.
9421 (gdb_vecs.o): New rule.
9422 * thread-db.c: #include "gdb_vecs.h".
9423 (thread_db_load_search): Use a vector to iterate over path elements.
9424 Handle text appearing after "$pdir".
9425
9426 * configure.ac: Add check for strstr.
9427 * config.in: Regenerate.
9428 * configure: Regenerate.
9429
9430 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9431
9432 * hostio.c (handle_pread): If pread fails, fall back to attempting
9433 lseek/read.
9434 (handle_pwrite): Likewise for pwrite.
9435
9436 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9437
9438 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9439 between unsupported TYPE and unimplementable ADDR/LEN combination.
9440 (arm_insert_point): Act on new return value.
9441
9442 2012-07-31 Pedro Alves <palves@redhat.com>
9443
9444 * server.c (process_point_options): Only skip tokens if we find
9445 one that is unrecognized. Don't treat 'X' specially while
9446 skipping unrecognized tokens.
9447
9448 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9449
9450 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9451 to 4-byte-align HW breakpoint addresses for Thumb.
9452
9453 2012-07-27 Yao Qi <yao@codesourcery.com>
9454
9455 PR remote/14161.
9456
9457 * server.h: Declare gdb_agent_about_to_close.
9458 * target.c (kill_inferior): Include "agent.h".
9459 New. Send command 'kill'.
9460 * target.h (kill_inferior): Removed macro.
9461 * tracepoint.c (gdb_agent_about_to_close): New.
9462 (gdb_agent_helper_thread): Handle command 'close'.
9463 Wait endlessly until the inferior stops.
9464 Install gdb_agent_remove_socket to atexit hook.
9465 (agent_socket_name): New static variable.
9466 (gdb_agent_socket_init): Replace local variable 'name' with
9467 'agent_socket_name'.
9468 (gdb_agent_remove_socket): New.
9469
9470 2012-07-27 Yao Qi <yao@codesourcery.com>
9471
9472 * server.c (process_point_options): Stop at 'X' when parsing.
9473
9474 2012-07-19 Michael Eager <eager@eagercon.com>
9475
9476 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9477 to hw_execute.
9478 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9479 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9480 hardware breakpoint.
9481
9482 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9483
9484 * gdbserver/linux-low.c (initialize_low): Call
9485 linux_ptrace_init_warnings.
9486
9487 2012-07-02 Doug Evans <dje@google.com>
9488
9489 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9490 pointer to int.
9491
9492 2012-07-02 Stan Shebs <stan@codesourcery.com>
9493
9494 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9495 (ax.o): Add it to build rule.
9496 (ax-ipa.o): Ditto.
9497 (OBS): Add format.o.
9498 (IPA_OBS): Add format.o.
9499 * server.c (handle_query): Claim support for breakpoint commands.
9500 (process_point_options): Add command case.
9501 (process_serial_event): Leave running if there are printfs in
9502 effect.
9503 * mem-break.h (any_persistent_commands): Declare.
9504 (add_breakpoint_commands): Declare.
9505 (gdb_no_commands_at_breakpoint): Declare.
9506 (run_breakpoint_commands): Declare.
9507 * mem-break.c (struct point_command_list): New struct.
9508 (struct breakpoint): New field command_list.
9509 (any_persistent_commands): New function.
9510 (add_commands_to_breakpoint): New function.
9511 (add_breakpoint_commands): New function.
9512 (gdb_no_commands_at_breakpoint): New function.
9513 (run_breakpoint_commands): New function.
9514 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9515 locally.
9516 * ax.c: Include format.h.
9517 (ax_printf): New function.
9518 (gdb_eval_agent_expr): Add printf opcode.
9519
9520 2012-06-13 Yao Qi <yao@codesourcery.com>
9521
9522 * server.c (start_inferior): Remove duplicated writes to fields
9523 'last_resume_kind' and 'last_status' of 'current_inferior'.
9524
9525 2012-06-12 Yao Qi <yao@codesourcery.com>
9526 Pedro Alves <palves@redhat.com>
9527
9528 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9529 comment.
9530 * server.c (handle_v_cont): Extend comment.
9531
9532 2012-06-11 Yao Qi <yao@codesourcery.com>
9533
9534 * linux-low.c (linux_attach): Add 'static'.
9535
9536 2012-06-06 Yao Qi <yao@codesourcery.com>
9537
9538 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9539
9540 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9541
9542 Fix gcc -flto compilation warning.
9543 * server.c (main): Make variable multi_mode and attach volatile.
9544
9545 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9546
9547 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9548 if the platform doesn't know about it.
9549
9550 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9551
9552 * Makefile.in (SFILES): Add linux-tile-low.c.
9553 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9554 * configure.srv: Handle tilegx-*-linux*.
9555 * linux-tile-low.c: New file.
9556
9557 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9558
9559 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9560
9561 2012-05-24 Pedro Alves <palves@redhat.com>
9562
9563 PR gdb/7205
9564
9565 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9566
9567 2012-05-24 Pedro Alves <palves@redhat.com>
9568
9569 PR gdb/7205
9570
9571 Replace target_signal with gdb_signal throughout.
9572
9573 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9574
9575 * linux-low.c (linux_store_registers): Avoid the copying sequence
9576 when no data has been retrieved by ptrace.
9577
9578 2012-05-22 Will Deacon <will.deacon@arm.com>
9579
9580 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9581 Include asm/ptrace.h.
9582 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9583 already defined.
9584
9585 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9586
9587 * linux-low.c (linux_store_registers): Don't re-retrieve data
9588 with ptrace that has already been obtained from /proc. Always
9589 copy any data retrieved with ptrace to the buffer supplied.
9590
9591 2012-05-11 Yao Qi <yao@codesourcery.com>
9592 Pedro Alves <palves@redhat.com>
9593
9594 * linux-low.c (enum stopping_threads_kind): New.
9595 (stopping_threads): Change type to `enum stopping_threads_kind'.
9596 (handle_extended_wait): If stopping and suspending threads, leave
9597 the new_lwp suspended too.
9598 (linux_wait_for_event): Adjust.
9599 (stop_all_lwps): Set `stopping_threads' to
9600 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9601 whether we're suspending threads or just stopping them. Assert no
9602 recursion happens.
9603
9604 2012-04-29 Yao Qi <yao@codesourcery.com>
9605
9606 * server.h: Move some code to ...
9607 * gdbthread.h: ... here. New.
9608 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9609 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9610 (nto-low.o, win32-low.o): Likewise.
9611 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9612 * regcache.c, remote-utils.c, server.c: Likewise.
9613 * target.c, tracepoint.c, win32-low.c: Likewise.
9614
9615 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9616
9617 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9618 (PTRACE_ARG4_TYPE): Likewise.
9619 (PTRACE_XFER_TYPE): Likewise.
9620 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9621 ptrace to PTRACE_ARG3_TYPE.
9622 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9623 (PTRACE_ARG4_TYPE): Likewise.
9624 (PTRACE_XFER_TYPE): Likewise.
9625 (linux_detach_one_lwp): Cast fourth argument of
9626 ptrace to long then PTRACE_ARG4_TYPE.
9627 (regsets_fetch_inferior_registers): Cast third argument of
9628 ptrace to long then PTRACE_ARG3_TYPE.
9629 (regsets_store_inferior_registers): Likewise.
9630
9631 2012-04-20 Pedro Alves <palves@redhat.com>
9632
9633 * configure: Regenerate.
9634
9635 2012-04-19 Pedro Alves <palves@redhat.com>
9636
9637 * Makefile.in (GNULIB_BUILDDIR): New.
9638 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9639 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9640 (all, install-only, uninstall, clean-info, all-lib, clean): No
9641 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9642 (maintainer-clean realclean distclean): Use subdir_do.
9643 (subdir_do): New.
9644 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9645 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9646 * acinclude.m4: Include acx_configure_dir.m4.
9647 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9648 calls. Call AC_PROG_RANLIB. Configure gnulib using
9649 ACX_CONFIGURE_DIR.
9650 (GNULIB): New.
9651 (GNULIB_STDINT_H): Adjust.
9652 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9653 * gdbreplay.c: Include build-gnulib/config.h.
9654 * server.h: Likewise.
9655 * aclocal.m4: Regenerate.
9656 * config.in: Regenerate.
9657 * configure: Regenerate.
9658
9659 2012-04-19 Pedro Alves <palves@redhat.com>
9660
9661 * Makefile.in (LIBGNU, INCGNU): Adjust.
9662 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9663 (all, install-only, uninstall, clean-info, all-lib, clean)
9664 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9665 * configure.ac: Adjust AC_OUTPUT output.
9666 * aclocal.m4: Regenerate.
9667 * configure: Regenerate.
9668
9669 2012-04-19 Pedro Alves <palves@redhat.com>
9670
9671 * Makefile.in (generated_files): New.
9672 (server_h): Remove the explicit dependency on config.h, and depend
9673 on $generated_files.
9674
9675 2012-04-19 Pedro Alves <palves@redhat.com>
9676
9677 * Makefile.in (INCGNU): Add -Ignulib.
9678
9679 2012-04-19 Pedro Alves <palves@redhat.com>
9680
9681 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9682 (INCGNU): ... this, and spell out -I here.
9683 (GNULIB_LIB): Rename to ...
9684 (LIBGNU): ... this.
9685 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9686
9687 2012-04-19 Pedro Alves <palves@redhat.com>
9688
9689 * config.in: Regenerate.
9690
9691 2012-04-19 Pedro Alves <palves@redhat.com>
9692
9693 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9694 * server.h (memmem): Remove declaration.
9695 * config.in: Regenerate.
9696 * configure: Regenerate.
9697
9698 2012-04-19 Yao Qi <yao@codesourcery.com>
9699
9700 * Makefile.in (SFILES): Add common/vec.c.
9701 (OBS): Add vec.o.
9702 (vec.o): New rule.
9703
9704 2012-04-19 Yao Qi <yao@codesourcery.com>
9705
9706 * remote-utils.c (prepare_resume_reply): Replace with macro
9707 target_core_of_thread.
9708 * server.c (handle_qxfer_threads_proper): Likewise.
9709 * target.h (traget_core_of_thread): New macro.
9710
9711 2012-04-18 Pedro Alves <palves@redhat.com>
9712
9713 * aclocal.m4: Regenerate.
9714 * configure: Regenerate.
9715
9716 2012-04-16 Yao Qi <yao@codesourcery.com>
9717
9718 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9719 duplicated on address.
9720
9721 2012-04-16 Yao Qi <yao@codesourcery.com>
9722
9723 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9724 (struct tracepoint_action_ops) <send>: New field.
9725 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9726 (agent_expr_send, x_tracepoint_action_send): New.
9727 (l_tracepoint_action_send): New.
9728 (cmd_qtdp): Download and install tracepoint
9729 according to `use_agent'.
9730 (run_inferior_command): Add one more parameter `len'.
9731 Update callers.
9732 (tracepoint_send_agent): New.
9733 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9734
9735 2012-04-16 Yao Qi <yao@codesourcery.com>
9736
9737 * tracepoint.c (download_tracepoints): Moved to ...
9738 (cmd_qtstart): ... here.
9739
9740 2012-04-14 Yao Qi <yao@codesourcery.com>
9741
9742 * tracepoint.c: Include inttypes.h.
9743 (struct collect_memory_action): Use sized types.
9744 (struct tracepoint): Likewise.
9745 (cmd_qtdp, stop_tracing): Update print specifiers.
9746 (cmd_qtp, response_tracepoint): Likewise.
9747 (collect_data_at_tracepoint): Likewise.
9748 (collect_data_at_step): Likewise.
9749
9750 2012-04-14 Yao Qi <yao@codesourcery.com>
9751
9752 Import gnulib module inttypes.
9753 * aclocal.m4, config.in, configure: Regenerated.
9754
9755 2012-04-14 Yao Qi <yao@codesourcery.com>
9756
9757 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9758 Makefile and config.status at last.
9759
9760 2012-04-13 Yao Qi <yao@codesourcery.com>
9761
9762 * tracepoint.c: Include stdint.h unconditionally.
9763
9764 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9765
9766 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9767 on BFD_HAVE_SYS_PROCFS_TYPE.
9768 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9769 * configure: Regenerate.
9770 * config.in: Likewise.
9771
9772 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9773
9774 * Makefile.in (clean): Also remove x32.c x32-linux.c
9775 x32-avx.c x32-avx-linux.c.
9776 (x32.o): New target.
9777 (x32.c): Likewise.
9778 (x32-linux.o): Likewise.
9779 (x32-linux.c): Likewise.
9780 (x32-avx.o): Likewise.
9781 (x32-avx.c): Likewise.
9782 (x32-avx-linux.o): Likewise.
9783 (x32-avx-linux.c): Likewise.
9784
9785 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9786 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9787 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9788 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9789 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9790 i386/x32-avx-linux.xml.
9791
9792 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9793 (init_registers_x32_avx_linux): Likwise.
9794 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9795 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9796
9797 2012-04-13 Pedro Alves <palves@redhat.com>
9798
9799 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9800 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9801 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9802 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9803 the sub-make.
9804
9805 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9806
9807 * linux-x86-low.c (compat_x32_clock_t): New.
9808 (compat_x32_siginfo_t): Likewise.
9809 (compat_x32_siginfo_from_siginfo): Likewise.
9810 (siginfo_from_compat_x32_siginfo): Likewise.
9811 (linux_is_elf64): Likewise.
9812 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9813 and siginfo_from_compat_x32_siginfo for x32.
9814 (x86_arch_setup): Set linux_is_elf64.
9815
9816 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9817
9818 PR gdb/13969
9819 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9820 e_machine field.
9821 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9822 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9823 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9824 compatible with process.
9825
9826 2012-04-12 Yao Qi <yao@codesourcery.com>
9827
9828 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9829 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9830 (install-only, install-info, clean): Handle sub dir gnulib.
9831 (all-lib, am--refresh): New targets.
9832 (memmem.o): Remove target.
9833 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9834 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9835 (AC_REPLACE_FUNCS): Remove memmem.
9836 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9837 (AC_OUTPUT): Generate Makefile in gnulib/.
9838 * aclocal.m4, config.in, configure: Regenerated.
9839
9840 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9841
9842 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9843
9844 2012-04-05 Pedro Alves <palves@redhat.com>
9845
9846 -Werror=strict-aliasing
9847
9848 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9849 pointer.
9850
9851 2012-04-04 Pedro Alves <palves@redhat.com>
9852
9853 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9854 (sparc_store_gregset_from_stack, sparc_store_gregset)
9855 (sparc_breakpoint_at): Fix formatting.
9856
9857 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9858
9859 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9860 are available.
9861 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9862 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9863 * config.in: Regenerate.
9864 * configure: Likewise.
9865
9866 2012-03-29 Pedro Alves <palves@redhat.com>
9867
9868 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9869 Correct ptrace arguments.
9870
9871 2012-03-28 Pedro Alves <palves@redhat.com>
9872
9873 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9874 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9875 (IA64_FR1_REGNUM): New defines.
9876 (ia64_fetch_register): New.
9877 (the_low_target): Install it.
9878 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9879 field.
9880 * linux-low.c (linux_fetch_registers): Try the
9881 the_low_target.fetch_register hook first.
9882
9883 * linux-arm-low.c (the_low_target): Adjust.
9884 * linux-bfin-low.c (the_low_target): Adjust.
9885 * linux-cris-low.c (the_low_target): Adjust.
9886 * linux-crisv32-low.c (the_low_target): Adjust.
9887 * linux-m32r-low.c (the_low_target): Adjust.
9888 * linux-m68k-low.c (the_low_target): Adjust.
9889 * linux-mips-low.c (the_low_target): Adjust.
9890 * linux-ppc-low.c (the_low_target): Adjust.
9891 * linux-s390-low.c (the_low_target): Adjust.
9892 * linux-sh-low.c (the_low_target): Adjust.
9893 * linux-sparc-low.c (the_low_target): Adjust.
9894 * linux-tic6x-low.c (the_low_target): Adjust.
9895 * linux-x86-low.c (the_low_target): Adjust.
9896 * linux-xtensa-low.c (the_low_target): Adjust.
9897
9898 2012-03-26 Pedro Alves <palves@redhat.com>
9899
9900 * server.c (handle_qxfer_libraries): Don't bail early if
9901 the_target->qxfer_libraries_svr4 is not NULL.
9902
9903 2012-03-26 Pedro Alves <palves@redhat.com>
9904
9905 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9906
9907 2012-03-23 Pedro Alves <palves@redhat.com>
9908
9909 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9910 "library-list-svr4" element's start tag when the the DSO list is
9911 empty.
9912
9913 2012-03-23 Pedro Alves <palves@redhat.com>
9914
9915 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9916 a variable whose type size is the same as the inferior's pointer
9917 size.
9918
9919 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9920
9921 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9922 struct siginfo.
9923 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9924 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9925 * linux-low.h: Include <signal.h>.
9926 (struct siginfo): Remove forward declaration.
9927 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9928 struct siginfo.
9929
9930 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9931
9932 * .gitignore: Ignore more files.
9933
9934 2012-03-19 Pedro Alves <palves@redhat.com>
9935 Jan Kratochvil <jan.kratochvil@redhat.com>
9936
9937 * server.c (cont_thread, general_thread): Add describing comments.
9938 (start_inferior): Clear `cont_thread'.
9939 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9940 of a process.
9941
9942 2012-03-15 Yao Qi <yao@codesourcery.com>
9943
9944 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9945 handling to ...
9946 (cmd_qtdp): ... here.
9947
9948 2012-03-15 Yao Qi <yao@codesourcery.com>
9949
9950 * tracepoint.c (struct tracepoint_action_ops): New.
9951 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9952 (m_tracepoint_action_download): New.
9953 (r_tracepoint_action_download): New.
9954 (x_tracepoint_action_download): New.
9955 (l_tracepoint_action_download): New.
9956 (add_tracepoint_action): Install `action->ops' according type.
9957 (download_tracepoint_1): Move code `download' function pointer
9958 of various tracepoint_action_ops.
9959
9960 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9961
9962 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9963 linux_ptrace_attach_warnings.
9964
9965 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9966
9967 * Makefile.in (linux-ptrace.o): New.
9968 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9969 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9970 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9971 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9972 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9973 of these targets.
9974 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9975
9976 2012-03-08 Yao Qi <yao@codesourcery.com>
9977 Pedro Alves <palves@redhat.com>
9978
9979 Fix PR server/13392.
9980 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9981 offset of JMP insn.
9982 * tracepoint.c (remove_tracepoint): New.
9983 (cmd_qtdp): Call remove_tracepoint when failed to install.
9984
9985 2012-03-07 Pedro Alves <palves@redhat.com>
9986
9987 * linux-low.c (get_detach_signal): New.
9988 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9989 Pass on pending signals to PTRACE_DETACH. Check the result of the
9990 ptrace call.
9991 * server.c (program_signals, program_signals_p): New.
9992 (handle_general_set): Handle QProgramSignals.
9993 * server.h (program_signals, program_signals_p): Declare.
9994
9995 2012-03-05 Pedro Alves <palves@redhat.com>
9996 Jan Kratochvil <jan.kratochvil@redhat.com>
9997
9998 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9999 New comment why.
10000
10001 2012-03-03 Yao Qi <yao@codesourcery.com>
10002
10003 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10004 agent_look_up_symbols.
10005
10006 2012-03-03 Yao Qi <yao@codesourcery.com>
10007
10008 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10009 (linux-x86-low.o): Likewise.
10010 * server.h: Remove in_process_agent_loaded.
10011 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10012 common/agent.c.
10013 Update callers.
10014
10015 2012-03-03 Yao Qi <yao@codesourcery.com>
10016
10017 * tracepoint.c (gdb_agent_capability): New global.
10018 (in_process_agent_loaded_ust): Renamed to
10019 `in_process_agent_supports_ust'.
10020 Update callers.
10021 (in_process_agent_supports_ust): Call agent_capability_check.
10022 (clear_installed_tracepoints): Assert that agent supports
10023 agent.
10024
10025 2012-03-03 Yao Qi <yao@codesourcery.com>
10026
10027 * linux-low.c (linux_supports_agent): New.
10028 (linux_target_ops): Initialize field `supports_agent' with
10029 linux_supports_agent.
10030 * target.h (struct target_ops) <supports_agent>: New.
10031 (target_supports_agent): New macro.
10032 * server.c (handle_general_set): Handle packet 'QAgent'.
10033 (handle_query): Send `QAgent+'.
10034 * Makefile.in (server.o): Depends on agent.h.
10035
10036 2012-03-03 Yao Qi <yao@codesourcery.com>
10037
10038 * Makefile.in (OBS): Add agent.o.
10039 Add new rule for agent.o.
10040 Track dependence of tracepoint.c on agent.h.
10041 * tracepoint.c (run_inferior_command_1):
10042 (run_inferior_command): Call agent_run_command.
10043 (gdb_ust_connect_sync_socket): Deleted. Move it to
10044 common/agent.c.
10045 (resume_thread, stop_thread): Likewise.
10046 (gdb_ust_socket_init): Renamed to ...
10047 (gdb_agent_socket_init): ... New.
10048 (gdb_ust_thread): Renamed to ...
10049 (gdb_agent_helper_thread): ... New.
10050 (gdb_ust_init): Move some code to ...
10051 (gdb_agent_init): ... here. New.
10052 [HAVE_UST]: Call gdb_ust_init.
10053 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10054 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10055 * config.in, configure: Regenerated.
10056
10057 2012-03-02 Pedro Alves <palves@redhat.com>
10058
10059 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10060 * linux-low.c (struct simple_pid_list): New.
10061 (stopped_pids): New a struct simple_pid_list pointer.
10062 (add_to_pid_list, pull_pid_from_list): New.
10063 (handle_extended_wait): Don't assume the first signal new children
10064 report is SIGSTOP. Adjust call to pull_pid_from_list.
10065 (linux_wait_for_lwp): Adjust.
10066
10067 2012-03-02 Yao Qi <yao@codesourcery.com>
10068
10069 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10070 debug log.
10071
10072 2012-03-02 Yao Qi <yao@codesourcery.com>
10073
10074 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10075 `stop_pc' and `tpoint'. Update caller.
10076
10077 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10078
10079 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10080 * linux-low.c (use_linux_regsets): New macro.
10081 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10082 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10083 (linux_register_in_regsets): New function.
10084 (usr_fetch_inferior_registers): Skip registers covered by
10085 regsets.
10086 (usr_store_inferior_registers): Likewise.
10087 (usr_fetch_inferior_registers): New macro.
10088 (usr_store_inferior_registers): Likewise.
10089 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10090 (linux_store_registers): Likewise.
10091 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10092 prototype.
10093 (init_registers_mips64_dsp_linux): Likewise.
10094 (init_registers_mips_linux): New macro.
10095 (init_registers_mips_dsp_linux): Likewise.
10096 (mips_dsp_num_regs): Likewise.
10097 (DSP_BASE, DSP_CONTROL): New fallback macros.
10098 (mips_base_regs): New macro.
10099 (mips_regmap): Use it. Fix the size.
10100 (mips_dsp_regmap): New variable.
10101 (mips_dsp_regset_bitmap): Likewise.
10102 (mips_arch_setup): New function.
10103 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10104 than mips_regmap.
10105 (mips_cannot_store_register): Likewise.
10106 (the_low_target): Update .arch_setup, .num_regs and .regmap
10107 initializers. Add .regset_bitmap initializer.
10108 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10109 initializer.
10110 * linux-bfin-low.c (the_low_target): Likewise.
10111 * linux-cris-low.c (the_low_target): Likewise.
10112 * linux-crisv32-low.c (the_low_target): Likewise.
10113 * linux-ia64-low.c (the_low_target): Likewise.
10114 * linux-m32r-low.c (the_low_target): Likewise.
10115 * linux-m68k-low.c (the_low_target): Likewise.
10116 * linux-ppc-low.c (the_low_target): Likewise.
10117 * linux-s390-low.c (the_low_target): Likewise.
10118 * linux-sh-low.c (the_low_target): Likewise.
10119 * linux-sparc-low.c (the_low_target): Likewise.
10120 * linux-tic6x-low.c (the_low_target): Likewise.
10121 * linux-x86-low.c (the_low_target): Likewise.
10122 * linux-xtensa-low.c (the_low_target): Likewise.
10123 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10124 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10125 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10126 srv_xmlfiles.
10127 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10128 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10129
10130 2012-02-29 Yao Qi <yao@codesourcery.com>
10131 Pedro Alves <palves@redhat.com>
10132
10133 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10134 `step_over_finished' is true.
10135
10136 2012-02-27 Pedro Alves <palves@redhat.com>
10137
10138 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10139 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10140
10141 2012-02-27 Pedro Alves <palves@redhat.com>
10142
10143 PR server/9684
10144 * linux-low.c (pid_is_stopped): New.
10145 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10146
10147 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10148
10149 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10150 of conditions.
10151
10152 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10153
10154 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10155
10156 2012-02-24 Luis Machado <lgustavo@codesourcery>
10157
10158 * server.c (handle_query): Advertise support for target-side
10159 breakpoint condition evaluation.
10160 (process_point_options): New function.
10161 (process_serial_event): When inserting a breakpoint, check for
10162 a target-side condition that should be evaluated.
10163
10164 * mem-break.c: Include regcache.h and ax.h.
10165 (point_cond_list_t): New data structure.
10166 (breakpoint) <cond_list>: New field.
10167 (find_gdb_breakpoint_at): Make non-static.
10168 (delete_gdb_breakpoint_at): Clear any target-side
10169 conditions.
10170 (clear_gdb_breakpoint_conditions): New function.
10171 (add_condition_to_breakpoint): Likewise.
10172 (add_breakpoint_condition): Likewise.
10173 (gdb_condition_true_at_breakpoint): Likewise.
10174 (gdb_breakpoint_here): Return result directly instead
10175 of going through a local variable.
10176
10177 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10178 (clear_gdb_breakpoint_conditions): Likewise.
10179 (add_breakpoint_condition): Likewise.
10180 (gdb_condition_true_at_breakpoint): Likewise.
10181
10182 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10183 (need_step_over_p): Take target-side breakpoint condition into
10184 consideration.
10185
10186 2012-02-24 Luis Machado <lgustavo@codesourcery>
10187
10188 * server.h: Include tracepoint.h.
10189 (agent_mem_read, agent_get_trace_state_variable_value,
10190 agent_set_trace_state_variable_value,
10191 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10192 get_set_tsv_func_addr): New prototypes.
10193
10194 * ax.h: New include file.
10195 * ax.c: New source file.
10196
10197 * tracepoint.c: Include ax.h.
10198 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10199 agent_expr, eval_result_type): Move to ax.h.
10200 (parse_agent_expr): Rename to ...
10201 (gdb_parse_agent_expr): ... this, make it non-static and move
10202 to ax.h.
10203 (unparse_agent_expr) Rename to ...
10204 (gdb_unparse_agent_expr): ... this, make it non-static and move
10205 to ax.h.
10206 (eval_agent_expr): Rename to ...
10207 (eval_tracepoint_agent_expr): ... this.
10208 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10209 forward declarations.
10210 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10211 (agent_get_trace_state_variable_value): New function.
10212 (agent_set_trace_state_variable_value): New function.
10213 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10214 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10215 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10216 (condition_true_at_tracepoint): Likewise.
10217 (parse_agent_expr): Rename to ...
10218 (gdb_parse_agent_expr): ... this and move to ax.c.
10219 (unparse_agent_expr): Rename to ...
10220 (gdb_unparse_agent_expr): ... this and move to ax.c.
10221 (gdb_agent_op_name): Move to ax.c.
10222 (eval_agent_expr): Rename to ...
10223 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10224 and move to ax.c.
10225 (eval_tracepoint_agent_expr): New function.
10226 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10227 non-static.
10228 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10229 ax.c.
10230 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10231 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10232 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10233 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10234 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10235 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10236 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10237 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10238 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10239 (compile_bytecodes): Remove forward declaration.
10240 (is_goto_target): Move to ax.c.
10241 (compile_bytecodes): Move to ax.c and call
10242 agent_get_trace_state_variable_value (...) and
10243 agent_set_trace_state_variable_value (...).
10244
10245 * Makefile.in: Update ax.c and IPA dependencies.
10246
10247 2012-02-24 Pedro Alves <palves@redhat.com>
10248
10249 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10250 (cmd_bigqtbuffer_circular): ... this. Only handle
10251 'QTBuffer:circular:'.
10252 (handle_tracepoint_general_set): Adjust.
10253
10254 2012-02-16 Yao Qi <yao@codesourcery.com>
10255
10256 * inferiors.c: Move code to ...
10257 * dll.c: .... here. New.
10258 * server.h: Declare clear_dlls.
10259 * Makefile.in (SFILES): Add dll.c.
10260 (OBS): Add dll.o
10261 (dll.o): New rule.
10262
10263 2012-02-11 Yao Qi <yao@codesourcery.com>
10264
10265 * server.c: (handle_monitor_command): Add a new parameter
10266 `own_buf'.
10267 (handle_query): Update caller.
10268
10269 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10270
10271 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10272 * configure, config.in: Regenerate.
10273 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10274 is not defined.
10275
10276 2012-02-02 Pedro Alves <palves@redhat.com>
10277
10278 Try SIGKILL first, then PTRACE_KILL.
10279 * linux-low.c (linux_kill_one_lwp): New.
10280 (linux_kill_one_lwp): Rename to ...
10281 (kill_one_lwp_callback): ... this. Use the new
10282 linux_kill_one_lwp.
10283
10284 2012-02-02 Pedro Alves <palves@redhat.com>
10285
10286 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10287 inferior.
10288
10289 2012-01-27 Pedro Alves <palves@redhat.com>
10290
10291 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10292 (elf_64_file_p): Make static.
10293 (linux_pid_exe_is_elf_64_file): New.
10294 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10295 Delete declarations.
10296 (linux_pid_exe_is_elf_64_file): Declare.
10297 * linux-x86-low.c (x86_arch_setup): Use
10298 linux_pid_exe_is_elf_64_file.
10299
10300 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10301
10302 * linux-low.c (linux_wait_for_event_1): Rename to ...
10303 (linux_wait_for_event): ... here and merge it with former
10304 linux_wait_for_event - new variable wait_ptid, use it.
10305 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10306
10307 2012-01-23 Pedro Alves <palves@redhat.com>
10308
10309 * server.c (main): Avoid yet another case of infinite loop while
10310 detaching/killing after a longjmp.
10311
10312 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10313
10314 Code cleanup.
10315 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10316
10317 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10318
10319 * hostio.c (handle_readlink): New function.
10320 (handle_vFile): Call it to handle "vFile:readlink" packets.
10321
10322 2012-01-20 Pedro Alves <palves@redhat.com>
10323 Ulrich Weigand <ulrich.weigand@linaro.org>
10324
10325 * server.c (handle_v_requests): Only support vAttach and vRun to
10326 start multiple processes when in extended protocol mode.
10327
10328 2012-01-17 Pedro Alves <palves@redhat.com>
10329
10330 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10331 memalign plus mprotect to allocate the scratch buffer.
10332
10333 2012-01-13 Pedro Alves <palves@redhat.com>
10334
10335 * server.c (attach_inferior): Clear `cont_thread'.
10336
10337 2012-01-13 Pedro Alves <palves@redhat.com>
10338
10339 * server.c (main): Avoid infinite loop while detaching/killing
10340 after a longjmp.
10341
10342 2012-01-09 Doug Evans <dje@google.com>
10343
10344 * server.c (start_inferior): Set last_ptid in --wrapper case.
10345
10346 2012-01-06 Yao Qi <yao@codesourcery.com>
10347
10348 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10349 defined.
10350 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10351
10352 2012-01-04 Yao Qi <yao@codesourcery.com>
10353
10354 * tracepoint.c (cmd_qtdp): Print debug message
10355 for static tracepoint.
10356
10357 2012-01-04 Yao Qi <yao@codesourcery.com>
10358
10359 * tracepoint.c (trace_vdebug): Differentiate debug message
10360 between gdbserver and IPA.
10361
10362 2012-01-03 Yao Qi <yao@codesourcery.com>
10363
10364 * tracepoint.c (tracepoint_was_hit): Don't collect for
10365 static tracepoint.
10366
10367 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10368
10369 * terminal.h: Reformat copyright header.
10370
10371 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10372
10373 * server.c (gdbserver_version): Update copyright year.
10374 * gdbreplay.c (gdbreplay_version): Likewise.
10375
10376 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10377
10378 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10379
10380 Revert:
10381 2011-12-18 Hui Zhu <teawater@gmail.com>
10382 * linux-low.c (linux_create_inferior): Save return value to ret.
10383
10384 2011-12-18 Hui Zhu <teawater@gmail.com>
10385
10386 * linux-low.c (linux_create_inferior): Save return value to ret.
10387
10388 2011-12-16 Doug Evans <dje@google.com>
10389
10390 * linux-low.c (linux_create_inferior): If stdio connection,
10391 redirect stdin from /dev/null, stdout to stderr.
10392 * remote-utils.c (remote_is_stdio): New static global.
10393 (remote_connection_is_stdio): New function.
10394 (remote_prepare): Handle stdio connection.
10395 (remote_open): Ditto.
10396 (remote_close): Don't close stdin for stdio connections.
10397 (read_prim,write_prim): New functions. Replace all calls to
10398 read/write to these.
10399 * server.c (main): Watch for "-" argument. Move call to
10400 remote_prepare before start_inferior.
10401 * server.h (STDIO_CONNECTION_NAME): New macro.
10402 (remote_connection_is_stdio): Declare.
10403
10404 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10405 in debugging output.
10406
10407 2011-12-15 Yao Qi <yao@codesourcery.com>
10408
10409 * tracepoint.c: Include sys/syscall.h.
10410 (gdb_ust_thread): Remove preprocessor conditional.
10411
10412 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10413
10414 * linux-low.c (linux_detach_one_lwp): Call
10415 the_low_target.prepare_to_resume before detaching.
10416
10417 2011-12-14 Yao Qi <yao@codesourcery.com>
10418
10419 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10420 of write.
10421
10422 2011-12-14 Yao Qi <yao@codesourcery.com>
10423
10424 * i386-low.c (i386_low_stopped_data_address): Initialize local
10425 variable `control'.
10426
10427 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10428
10429 PR remote/13492
10430
10431 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10432 DR_CONTROL unless necessary. Extend comments.
10433 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10434 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10435
10436 2011-12-13 Yao Qi <yao@codesourcery.com>
10437
10438 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10439 macros.
10440 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10441
10442 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10443
10444 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10445 Print new debug message for such case.
10446
10447 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10448
10449 Fix overlapping memcpy.
10450 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10451 the read_inferior_memory transfer.
10452 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10453 write_inferior_memory transfer.
10454 (set_fast_tracepoint_jump): New variable buf. Use it for the
10455 read_inferior_memory and write_inferior_memory transfers.
10456 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10457 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10458 Use it for the write_inferior_memory transfer.
10459 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10460 buffers.
10461
10462 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10463
10464 * linux-low.c (fetch_register, store_register): Make code
10465 consistent, fix formatting.
10466
10467 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10468
10469 * linux-low.c (usr_store_inferior_registers): Factor out code
10470 to handle individual registers into...
10471 (store_register): ... this new function.
10472
10473 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10474
10475 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10476 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10477 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10478 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10479 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10480 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10481 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10482 (srv_xmlfiles): Add new XML files.
10483
10484 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10485 and <sys/uio.h>.
10486 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10487 (init_registers_s390_linux32v1): Add prototype.
10488 (init_registers_s390_linux32v2): Likewise.
10489 (init_registers_s390_linux64v1): Likewise.
10490 (init_registers_s390_linux64v2): Likewise.
10491 (init_registers_s390x_linux64v1): Likewise.
10492 (init_registers_s390x_linux64v2): Likewise.
10493 (s390_num_regs): Increment to 52.
10494 (s390_regmap): Add orig_r2 register.
10495 (s390_num_regs_3264): Increment to 68.
10496 (s390_regmap_3264): Add orig_r2 register.
10497 (s390_collect_ptrace_register): Handle orig_r2 register.
10498 (s390_supply_ptrace_register): Likewise.
10499 (s390_fill_last_break): New function.
10500 (s390_store_last_break): Likewise.
10501 (s390_fill_system_call): New function.
10502 (s390_store_system_call): Likewise.
10503 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10504 register sets.
10505 (s390_check_regset): New function.
10506 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10507 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10508 Update target_regsets for available register sets.
10509
10510 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10511 Jan Kratochvil <jan.kratochvil@redhat.com>
10512
10513 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10514 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10515 New.
10516 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10517 * linux-low.h (struct process_info_private): New member r_debug.
10518 * server.c (handle_qxfer_libraries): Call
10519 the_target->qxfer_libraries_svr4.
10520 (handle_qxfer_libraries_svr4): New function.
10521 (qxfer_packets): New entry "libraries-svr4".
10522 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10523 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10524 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10525 PACKET_qXfer_libraries_svr4.
10526
10527 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10528
10529 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10530 PSW address/mask between 8-byte and 16-byte formats.
10531 (s390_supply_ptrace_register): Likewise.
10532 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10533 basic addressing mode bit.
10534
10535 2011-11-24 Stan Shebs <stan@codesourcery.com>
10536
10537 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10538
10539 2011-11-17 Stan Shebs <stan@codesourcery.com>
10540
10541 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10542 (tracing_start_time): New global.
10543 (tracing_stop_time): New global.
10544 (tracing_user_name): New global.
10545 (tracing_notes): New global.
10546 (tracing_stop_note): New global.
10547 (cmd_qtstart): Set traceframe_usage, start_time.
10548 (stop_tracing): Set stop_time.
10549 (cmd_qtstatus): Report additional status.
10550 (cmd_qtp): New function.
10551 (handle_tracepoint_query): Call it.
10552 (cmd_qtnotes): New function.
10553 (handle_tracepoint_general_set): Call it.
10554 (get_timestamp): Rename from tsv_get_timestamp.
10555
10556 2011-11-14 Stan Shebs <stan@codesourcery.com>
10557 Kwok Cheung Yeung <kcy@codesourcery.com>
10558
10559 * linux-x86-low.c (small_jump_insn): New.
10560 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10561 trampoline and error message, build a trampoline and issue a small
10562 jump instruction to it.
10563 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10564 trampoline and error message.
10565 (x86_get_min_fast_tracepoint_insn_len): New.
10566 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10567 * linux-low.h (struct linux_target_ops): Add arguments to
10568 install_fast_tracepoint_jump_pad operation, add new operation.
10569 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10570 arguments.
10571 (linux_get_min_fast_tracepoint_insn_len): New function.
10572 (linux_target_op): Add new operation.
10573 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10574 (gdb_trampoline_buffer_end): Ditto.
10575 (gdb_trampoline_buffer_error): Ditto.
10576 (struct ipa_sym_addresses): Add fields for new IPA variables.
10577 (symbol_list): Add entries for new IPA variables.
10578 (struct tracepoint): Add fields to hold the address range of the
10579 trampoline used by the tracepoint.
10580 (trampoline_buffer_head): New static variable.
10581 (trampoline_buffer_tail): Ditto.
10582 (claim_trampoline_space): New function.
10583 (have_fast_tracepoint_trampoline_buffer): New function.
10584 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10585 structure.
10586 (install_fast_tracepoint): Ditto, also add error buffer argument.
10587 (cmd_qtminftpilen): New function.
10588 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10589 (fast_tracepoint_from_trampoline_address): New function.
10590 (fast_tracepoint_collecting): Handle trampoline as part of jump
10591 pad space.
10592 (set_trampoline_buffer_space): New function.
10593 (initialize_tracepoint): Initialize new IPA variables.
10594 * target.h (struct target_ops): Add arguments to
10595 install_fast_tracepoint_jump_pad operation, add new
10596 get_min_fast_tracepoint_insn_len operation.
10597 (target_get_min_fast_tracepoint_insn_len): New.
10598 (install_fast_tracepoint_jump_pad): Add arguments.
10599 * server.h (IPA_BUFSIZ): Define.
10600 * linux-i386-ipa.c: Include extra header files.
10601 (initialize_fast_tracepoint_trampoline_buffer): New function.
10602 (initialize_low_tracepoint): Call it.
10603 * server.h (set_trampoline_buffer_space): Declare.
10604 (claim_trampoline_space): Ditto.
10605 (have_fast_tracepoint_trampoline_buffer): Ditto.
10606
10607 2011-11-14 Yao Qi <yao@codesourcery.com>
10608
10609 * server.c (handle_query): Handle InstallInTrace for qSupported.
10610 * tracepoint.c (add_tracepoint): Sort list.
10611 (install_tracepoint, download_tracepoint): New.
10612 (cmd_qtdp): Call them to install and download tracepoints.
10613 (sort_tracepoints): Removed.
10614 (cmd_qtstart): Update.
10615
10616 2011-11-14 Yao Qi <yao@codesourcery.com>
10617
10618 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10619 * mem-break.h: Declare.
10620 * tracepoint.c (cmd_qtstart): Move some code to ...
10621 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10622 New.
10623 (download_tracepoints): Move some code to ...
10624 (download_tracepoint_1): ... here. New.
10625
10626 2011-11-08 Yao Qi <yao@codesourcery.com>
10627
10628 * remote-utils.c (relocate_instruction): A comment fix.
10629
10630 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10631
10632 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10633 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10634 dr_status_mirror and dr_control_mirror from debug_reg_state.
10635 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10636 (i386_initial_stuff): Remove use of deleted globals.
10637 (i386_get_thread_context, i386_set_thread_context,
10638 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10639 from debug_reg_state.
10640
10641 2011-11-05 Yao Qi <yao@codesourcery.com>
10642
10643 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10644 address as TPOINT's.
10645
10646 2011-11-02 Stan Shebs <stan@codesourcery.com>
10647
10648 * tracepoint.c (agent_mem_read_string): New function.
10649 (eval_agent_expr): Call it for tracenz.
10650 * server.c (handle_query): Report support for tracenz.
10651
10652 2011-11-02 Yao Qi <yao@codesourcery.com>
10653
10654 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10655
10656 2011-11-02 Yao Qi <yao@codesourcery.com>
10657
10658 * target.h: Fix a typo in comment.
10659
10660 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10661
10662 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10663 clobber the breakpoints' shadows with fast tracepoint jumps.
10664 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10665 * target.c (write_inferior_memory): Also pass MYADDR down to
10666 check_mem_write.
10667
10668 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10669
10670 * configure.ac: Check support for personality routine.
10671 * configure: Regenerate.
10672 * config.in: Likewise.
10673 * linux-low.c: Include <sys/personality.h>.
10674 Define ADDR_NO_RANDOMIZE if necessary.
10675 (linux_create_inferior): Disable address space randomization when
10676 forking inferior, if requested.
10677 (linux_supports_disable_randomization): New function.
10678 (linux_target_ops): Install it.
10679 * server.h (disable_randomization): Declare.
10680 * server.c (disable_randomization): New global variable.
10681 (handle_general_set): Handle QDisableRandomization.
10682 (handle_query): Likewise for qSupported.
10683 (main): Support --disable-randomization and --no-disable-randomization
10684 command line arguments.
10685 * target.h (struct target_ops): Add supports_disable_randomization.
10686 (target_supports_disable_randomization): New macro.
10687
10688 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10689
10690 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10691 ifdef check.
10692 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10693 [!PT_GETDSBT] (target_loadmap): New definition.
10694 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10695 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10696 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10697 and PT_GETDSBT to LINUX_LOADMAP.
10698 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10699 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10700
10701 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10702
10703 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10704 (arm_linux_hwbp_cap): New static variable.
10705 (arm_linux_get_hwbp_cap): Replace by ...
10706 (arm_linux_init_hwbp_cap): ... this new function.
10707 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10708 (arm_linux_get_hw_watchpoint_count): Likewise.
10709 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10710 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10711 (arm_prepare_to_resume): Use perror_with_name instead of error.
10712
10713 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10714
10715 * linux-arm-low.c: Include <signal.h>.
10716 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10717 (struct arm_linux_hwbp_cap): New data type.
10718 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10719 (struct arm_linux_hw_breakpoint): New data type.
10720 (MAX_BPTS, MAX_WPTS): Define.
10721 (struct arch_process_info, struct arch_lwp_info): New data types.
10722 (arm_linux_get_hwbp_cap): New function.
10723 (arm_linux_get_hw_breakpoint_count): Likewise.
10724 (arm_linux_get_hw_watchpoint_count): Likewise.
10725 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10726 (arm_hwbp_control_initialize): Likewise.
10727 (arm_hwbp_control_is_enabled): Likewise.
10728 (arm_hwbp_control_is_initialized): Likewise.
10729 (arm_hwbp_control_disable): Likewise.
10730 (arm_linux_hw_breakpoint_equal): Likewise.
10731 (arm_linux_hw_point_initialize): Likewise.
10732 (struct update_registers_data): New data structure.
10733 (update_registers_callback: New function.
10734 (arm_insert_point): Likewise.
10735 (arm_remove_point): Likewise.
10736 (arm_stopped_by_watchpoint): Likewise.
10737 (arm_stopped_data_address): Likewise.
10738 (arm_new_process): Likewise.
10739 (arm_new_thread): Likewise.
10740 (arm_prepare_to_resume): Likewise.
10741 (the_low_target): Register arm_insert_point, arm_remove_point,
10742 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10743 arm_new_thread, and arm_prepare_to_resume.
10744
10745 2011-09-15 Stan Shebs <stan@codesourcery.com>
10746
10747 * server.h (struct emit_ops): Add compare-goto fields.
10748 * tracepoint.c (gdb_agent_op_sizes): New table.
10749 (emit_eq_goto): New function.
10750 (emit_ne_goto): New function.
10751 (emit_lt_goto): New function.
10752 (emit_le_goto): New function.
10753 (emit_gt_goto): New function.
10754 (emit_ge_goto): New function.
10755 (is_goto_target): New function.
10756 (compile_bytecodes): Recognize special cases of compare-goto
10757 combinations and call specialized emitters for them.
10758 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10759 (amd64_emit_ne_goto): New function.
10760 (amd64_emit_lt_goto): New function.
10761 (amd64_emit_le_goto): New function.
10762 (amd64_emit_gt_goto): New function.
10763 (amd64_emit_ge_goto): New function.
10764 (amd64_emit_ops): Add the new functions.
10765 (i386_emit_eq_goto): New function.
10766 (i386_emit_ne_goto): New function.
10767 (i386_emit_lt_goto): New function.
10768 (i386_emit_le_goto): New function.
10769 (i386_emit_gt_goto): New function.
10770 (i386_emit_ge_goto): New function.
10771 (i386_emit_ops): Add the new functions.
10772
10773 2011-09-08 Stan Shebs <stan@codesourcery.com>
10774
10775 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10776 (i386_emit_epilogue): Restore %ebx.
10777
10778 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10779
10780 * server.c (step_thread): Remove definition.
10781 (process_serial_event): Don't handle Hs.
10782 * server.h (step_thread): Remove declaration.
10783 * target.c (set_desired_inferior): Remove use of step_thread.
10784
10785 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10786
10787 * linux-low.c: Include linux-procfs.h.
10788 (linux_attach_lwp_1): Update comments.
10789 (linux_attach): Scan for existing threads when attaching to a
10790 process that is the tgid.
10791 * Makefile.in: Update dependencies.
10792
10793 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10794
10795 * configure.srv: Add linux-procfs.o dependencies.
10796
10797 2011-08-14 Yao Qi <yao@codesourcery.com>
10798
10799 * target.h (struct target_ops): Fix indent.
10800 * win32-low.c (win32_target_ops): Fix comment.
10801
10802 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10803 Yao Qi <yao@codesourcery.com>
10804
10805 * Makefile.in (clean): Remove tic6x-*.c files.
10806 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10807 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10808 (tic6x-c64xp-linux.c): Likewise.
10809 * configure.srv: Add support for tic6x-*-uclinux.
10810 * linux-tic6x-low.c: New.
10811 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10812
10813 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10814 Yao Qi <yao@codesourcery.com>
10815
10816 * target.h (struct target_ops): Add read_loadmap.
10817 * linux-low.c (struct target_loadseg): New type.
10818 (struct target_loadmap): New type.
10819 (linux_read_loadmap): New function.
10820 (linux_target_ops): Add linux_read_loadmap.
10821 * server.c (handle_query): Support qXfer:fdpic:read packet.
10822 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10823 to NULL.
10824
10825 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10826
10827 * win32-low.c: Include <stdint.h>.
10828
10829 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10830
10831 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10832 to the inferior here.
10833 (i386_remove_aligned_watchpoint): Ditto.
10834 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10835 fit part of the watchpoint in the debug registers.
10836 (i386_update_inferior_debug_regs): New.
10837 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10838 registers, and only update the inferior on success.
10839 (i386_low_remove_watchpoint): Ditto.
10840
10841 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10842
10843 * linux-low.c (compare_ints, unique, list_threads, show_process,
10844 linux_core_of_thread): Delete.
10845 (linux_target_ops): Change linux_core_of_thread to
10846 linux_common_core_of_thread.
10847 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10848 * utils.c (malloc_failure): Change type of argument.
10849 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10850 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10851 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10852 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10853 (IPA_OBJS): Add common-utils-ipa.o.
10854 (ptid_h, linux_osdata_h): New macros.
10855 (server_h): Add common/common-utils.h, common/xml-utils.h,
10856 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10857 common/ptid.h.
10858 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10859 ptid.o, buffer.o): New rules.
10860 (linux-low.o): Add common/linux-osdata.h as a dependency.
10861 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10862 * configure.ac: Add AC_HEADER_DIRENT check.
10863 * config.in: Regenerate.
10864 * configure: Regenerate.
10865 * remote-utils.c (xml_escape_text): Delete.
10866 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10867 buffer_xml_printf): Move to common/buffer.c.
10868 * server.c (main): Remove call to initialize_inferiors.
10869 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10870 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10871 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10872 internal_error, gdb_assert, gdb_assert_fail): Delete.
10873 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10874 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10875 common/buffer.h.
10876 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10877 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10878 initialize_inferiors): Delete.
10879
10880 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10881
10882 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10883 symbol error.
10884
10885 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10886
10887 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10888 assertion.
10889 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10890
10891 2011-05-26 Yao Qi <yao@codesourcery.com>
10892
10893 * Makefile.in (thread-db.o): Track dependence to
10894 common/gdb_thread_db.h.
10895 * thread-db.c: include gdb_thread_db.h from right place.
10896
10897 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10898
10899 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10900 __FILE__ and __LINE__ to internal_error.
10901
10902 2011-05-13 Doug Evans <dje@google.com>
10903
10904 * thread-db.c (try_thread_db_load_from_sdir): New function.
10905 (try_thread_db_load_from_dir): New function.
10906 (thread_db_load_search): Handle $sdir, ignore $pdir.
10907 Remove trying of system directories if search of
10908 libthread-db-search-path fails, that is now done via $sdir.
10909
10910 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10911
10912 * server.c (handle_query): Add EnableDisableTracepoints to the list
10913 of supported features.
10914 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10915 tracepoints.
10916 (cmd_qtenable_disable): New.
10917 (cmd_qtstart): Install tracepoints even if disabled.
10918 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10919 receiving a QTEnable or QTDisable packet.
10920 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10921 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10922 tracepoints.
10923 (gdb_probe): Skip data collection if static tracepoint is disabled.
10924
10925 2011-05-10 Doug Evans <dje@google.com>
10926
10927 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10928
10929 2011-05-04 Doug Evans <dje@google.com>
10930
10931 * linux-low.c (linux_join): Skip process lookup.
10932 * spu-low.c (spu_join): Ditto.
10933 * server.c (join_inferiors_callback): Delete.
10934 (process_serial_event): For 'D' packet (detach) call join_inferior
10935 directly.
10936
10937 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10938
10939 * README: Don't mention xscale*-*-linux*.
10940 * configure.srv (xscale*-*-linux*): Don't handle target.
10941
10942 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10943
10944 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10945 casting pointers.
10946 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10947 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10948 (i386_emit_void_call_2): Likewise.
10949
10950 2011-04-26 Yao Qi <yao@codesourcery.com>
10951
10952 * linux-low.c: Move common macros to linux-ptrace.h.
10953 Include linux-ptrace.h.
10954 * Makefile.in (linux_ptrace_h): New.
10955 (linux-low.o): Depends on linux-ptrace.h.
10956
10957 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10958
10959 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10960 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10961 (remote_prepare): New function with most of the TCP code from ...
10962 (remote_open): ... here. Detect PORT here unconditionally. Move also
10963 setting transport_is_reliable.
10964 * server.c (run_once): New variable.
10965 (gdbserver_usage): Document it.
10966 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10967 the first run if RUN_ONCE.
10968 * server.h (run_once, remote_prepare): New declarations.
10969
10970 2011-04-19 Tom Tromey <tromey@redhat.com>
10971
10972 * win32-low.c (handle_load_dll): Remove duplicate "the".
10973
10974 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10975
10976 Remove support for old Cygwin 1.5 versions.
10977 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10978 function to avoid warning.
10979 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10980 warning.
10981
10982 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10983
10984 * gdbserver/server.h (Macro _): Define it if not available.
10985
10986 2011-03-14 Michael Snyder <msnyder@vmware.com>
10987
10988 * hostio.c (handle_close): Remove unnecessary null test.
10989
10990 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10991
10992 * Makefile.in (maintainer-clean realclean distclean): Remove
10993 "make ... subdir_do" command.
10994
10995 2011-03-10 Michael Snyder <msnyder@vmware.com>
10996
10997 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10998
10999 * server.c (handle_v_run): Free alloced buffer on early return.
11000
11001 2011-03-09 Yao Qi <yao@codesourcery.com>
11002
11003 Revert:
11004 2011-03-04 Yao Qi <yao@codesourcery.com>
11005
11006 * Makefile.in: Remove GNU make feature --directory.
11007
11008 2011-03-05 Yao Qi <yao@codesourcery.com>
11009
11010 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11011 (subdir_do): New make target. Copied from gdb/Makefile.
11012 (maintainer-clean, realclean, distclean, clean): Call corresponding
11013 make targets in common/Makefile.
11014
11015 2011-02-11 Yao Qi <yao@codesourcery.com>
11016
11017 * configure.ac: Call AC_PROG_RANLIB.
11018 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11019 * configure: Regenerate.
11020
11021 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11022
11023 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11024
11025 2011-03-06 Yao Qi <yao@codesourcery.com>
11026
11027 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11028
11029 2011-03-05 Yao Qi <yao@codesourcery.com>
11030
11031 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11032 (subdir_do): New make target. Copied from gdb/Makefile.
11033 (maintainer-clean, realclean, distclean, clean): Call corresponding
11034 make targets in common/Makefile.
11035
11036 2011-03-04 Yao Qi <yao@codesourcery.com>
11037
11038 * Makefile.in: Remove GNU make feature --directory.
11039
11040 2011-03-04 Michael Snyder <msnyder@vmware.com>
11041
11042 * server.c (queue_stop_reply): Call xmalloc not malloc.
11043
11044 2011-03-02 Michael Snyder <msnyder@vmware.com>
11045
11046 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11047
11048 2011-02-28 Michael Snyder <msnyder@vmware.com>
11049
11050 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11051 (cmd_qtframe): Ditto.
11052 (cmd_qtbuffer): Ditto.
11053 (cmd_bigqtbuffer): Ditto.
11054
11055 * utils.c (decimal2str): Initialize 'width' to nine, then
11056 don't mess with it.
11057
11058 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11059
11060 * hostio.c (require_data): Free *data, not data.
11061
11062 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11063
11064 * hostio.c (require_data): Use free, not xfree.
11065
11066 2011-02-27 Michael Snyder <msnyder@vmware.com>
11067
11068 * server.c (handle_query): Discard unused value.
11069
11070 * hostio.c (require_data): Free malloc memory before returning
11071 error.
11072
11073 2011-02-26 Michael Snyder <msnyder@vmware.com>
11074
11075 * linux-low.c (list_threads): Call closedir for dirent.
11076
11077 2011-02-27 Michael Snyder <msnyder@vmware.com>
11078
11079 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11080 a case statement falls through.
11081
11082 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11083
11084 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11085 in comparison.
11086
11087 2011-02-26 Michael Snyder <msnyder@vmware.com>
11088
11089 * utils.c (decimal2str): Eliminate dead code and dead param.
11090 (pulongest): Drop dead param from call to decimal2str.
11091 (plongest): Ditto.
11092
11093 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11094
11095 Revert the following patch (not approved yet):
11096 2011-02-21 Hui Zhu <teawater@gmail.com>
11097 * tracepoint.c (tp_printf): New function.
11098 (eval_agent_expr): Handle gdb_agent_op_printf.
11099
11100 2011-02-21 Hui Zhu <teawater@gmail.com>
11101
11102 * tracepoint.c (tp_printf): New function.
11103 (eval_agent_expr): Handle gdb_agent_op_printf.
11104
11105 2011-02-18 Tom Tromey <tromey@redhat.com>
11106
11107 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11108 (tracepoint.o): Likewise.
11109 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11110 (gdb_agent_op_names): Likewise.
11111
11112 2011-02-18 Tom Tromey <tromey@redhat.com>
11113
11114 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11115 gdb_agent_op_rot>: New constants.
11116 (gdb_agent_op_names): Add pick and roll.
11117 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11118 cases.
11119
11120 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11121
11122 * aclocal.m4: Regenerated with aclocal-1.11.1.
11123
11124 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11125
11126 * server.c (handle_qxfer_traceframe_info): New.
11127 (qxfer_packets): Register "traceframe-info".
11128 (handle_query): Report support for qXfer:traceframe-info:read+.
11129 * tracepoint.c (match_blocktype): New.
11130 (traceframe_find_block_type): Rename to ...
11131 (traceframe_walk_blocks): ... this. Add callback filter argument,
11132 and use it.
11133 (traceframe_find_block_type): New, reimplemented on top of
11134 traceframe_walk_blocks.
11135 (build_traceframe_info_xml): New.
11136 (traceframe_read_info): New.
11137 * server.h (traceframe_read_info): Declare.
11138
11139 2011-02-11 Yao Qi <yao@codesourcery.com>
11140
11141 * configure.ac: Call AC_PROG_RANLIB.
11142 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11143 * configure: Regenerate.
11144
11145 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11146
11147 * server.c (gdb_read_memory): Change return semantics to allow
11148 partial transfers.
11149 (handle_search_memory_1): Adjust.
11150 (process_serial_event) <'m' packet>: Handle partial transfers.
11151 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11152
11153 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11154
11155 * regcache.c (init_register_cache): Initialize
11156 regcache->register_status.
11157 (free_register_cache): Release regcache->register_status.
11158 (regcache_cpy): Copy register_status.
11159 (registers_to_string): Print 'x's for unavailable registers.
11160 (supply_register): Mark the register's status valid or
11161 unavailable, depending on whether a buffer was passed in or not.
11162 (supply_register_zeroed): New.
11163 (supply_regblock): Mark the registers' status valid or
11164 unavailable, depending on whether a buffer was passed in or not.
11165 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11166 (struct regcache): New `register_status' field.
11167 (supply_register_zeroed): Declare.
11168 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11169 supply_register_zeroed, rather than passing a NULL buffer to
11170 supply_register.
11171 * tracepoint.c (fetch_traceframe_registers): Update comment.
11172
11173 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11174
11175 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11176 buffer explicit.
11177
11178 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11179
11180 * server.h (decode_xfer_write): Change prototype.
11181 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11182 and don't extract the annex here.
11183 * server.c (decode_xfer_read): Remove `annex' parameter,
11184 and don't extract the annex here.
11185 (decode_xfer): New.
11186 (struct qxfer): New.
11187 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11188 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11189 (handle_qxfer_statictrace): New functions, abstracted out from
11190 handle_query, and made to use the struct qxfer interface.
11191 (handle_threads_qxfer_proper): Rename to ...
11192 (handle_qxfer_threads_proper): ... this.
11193 (handle_threads_qxfer): Rename to ...
11194 (handle_qxfer_threads): ... this. Adjust.
11195 (qxfer_packets): New array.
11196 (handle_qxfer): New function.
11197 (handle_query): Use handle_qxfer.
11198
11199 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11200
11201 * gdbreplay.c: Shorten lines of >= 80 columns.
11202 * linux-low.c: Ditto.
11203 * linux-ppc-low.c: Ditto.
11204 * linux-s390-low.c: Ditto.
11205 * linux-sparc-low.c: Ditto.
11206 * linux-x86-low.c: Ditto.
11207 * linux-xtensa-low.c: Ditto.
11208 * mem-break.c: Ditto.
11209 * nto-low.c: Ditto.
11210 * regcache.h: Ditto.
11211 * remote-utils.c: Ditto.
11212 * server.c: Ditto.
11213 * server.h: Ditto.
11214 * thread-db.c: Ditto.
11215 * tracepoint.c: Ditto.
11216 * utils.c: Ditto.
11217 * win32-low.h: Ditto.
11218
11219 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11220
11221 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11222 update.
11223
11224 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11225
11226 * server.c (gdbserver_version): Update copyright year in version
11227 output.
11228 * gdbreplay.c (gdbreplay_version): Ditto.
11229
11230 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11231
11232 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11233 * linux-bfin-low.c: New file.
11234 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11235 PT_DATA_ADDR for BFIN targets.
11236 * Makefile.in (SFILES): Add linux-bfin-low.c.
11237 (clean): Remove reg-bfin.c.
11238 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11239 * README: Mention supported Blackfin targets.
11240
11241 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11242
11243 * .gitignore: New file.
11244
11245 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11246
11247 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11248
11249 2010-10-22 Jie Zhang <jie@codesourcery.com>
11250
11251 * Makefile.in: Add FLAGS_TO_PASS variable.
11252 (install): Remove dependency of install-only and recursively
11253 invoke make for install-only.
11254
11255 2010-10-04 Doug Evans <dje@google.com>
11256
11257 * Makefile.in (uninstall): Use $(DESTDIR).
11258
11259 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11260
11261 PR gdb/11842
11262
11263 * linux-x86-low.c (compat_siginfo_from_siginfo)
11264 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11265 si_code is < 0. Check for si_code == SI_TIMER before checking for
11266 si_code < 0.
11267
11268 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11269
11270 * lynx-i386-low.c: New file.
11271 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11272
11273 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11274
11275 * lynx-low.c (ptrace_request_to_str): Remove handling for
11276 request values that have been removed in LynxOS 5.x.
11277
11278 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11279
11280 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11281 <ptrace.h>
11282
11283 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11284
11285 * configure.ac: Add --enable-inprocess-agent option.
11286 * configure: Rebuilt.
11287
11288 2010-09-06 Yao Qi <yao@codesourcery.com>
11289
11290 * linux-low.c (linux_kill): Remove unused variable.
11291 (linux_stabilize_threads): Likewise.
11292 * server.c (start_inferior): Likewise.
11293 (queue_stop_reply_callback): Likewise.
11294 * tracepoint.c (do_action_at_tracepoint): Likewise.
11295
11296 2010-09-06 Yao Qi <yao@codesourcery.com>
11297
11298 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11299 on return.
11300
11301 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11302
11303 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11304
11305 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11306
11307 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11308 "$(IPA_DEPFILES)".
11309
11310 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11311
11312 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11313 gdbserver/lynx-ppc-low.c: New files.
11314 * Makefile.in (lynx_low_h): New variable.
11315 (lynx-low.o, lynx-ppc-low.o): New rules.
11316 * configure.ac: On LynxOS, link with -lnetinet.
11317 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11318 * configure: regenerate.
11319
11320 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11321
11322 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11323 * configure.ac: Add check for vasprintf and vsnprintf.
11324 * configure, config.in: Regenerate.
11325 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11326
11327 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11328
11329 * gdbreplay.c: Move include of alloca.h up, next to include of
11330 malloc.h.
11331 * server.h: Add include of malloc.h.
11332 * mem-break.c: Remove include of malloc.h.
11333 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11334
11335 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11336
11337 * Makefile.in (memmem.o): Build with -Wno-error.
11338
11339 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11340
11341 * utils.c (xsnprintf): Make non-static.
11342 * server.h: Add xsnprintf declaration.
11343 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11344 replace calls to snprintf by calls to xsnprintf throughout.
11345
11346 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11347
11348 * configure.ac: Add configure check for alloca.
11349 * configure, config.in: Regenerate.
11350 * server.h: Include alloca.h if it exists.
11351 * gdbreplay.c: Include alloca.h if it exists.
11352
11353 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11354
11355 * linux-low.c (__SIGRTMIN): Define if not already defined.
11356 (linux_create_inferior): Check for __ANDROID__ rather than
11357 __SIGRTMIN.
11358 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11359 are already deferred.
11360 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11361 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11362 stopped and already has a pending signal to report.
11363 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11364 a pending signal to report or is moving out of a jump pad.
11365 (linux_init_signals): Check for __ANDROID__ rather than
11366 __SIGRTMIN.
11367
11368 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11369
11370 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11371 debug_threads check. Avoid a linear search when not doing debug
11372 output.
11373
11374 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11375
11376 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11377 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11378 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11379 (process_event): Change local fd's type to gdb_fildes_t.
11380 (create_file_handler): Adjust prototype.
11381 (delete_file_handler): Adjust prototype.
11382 (handle_file_event): Adjust prototype. Use pfildes.
11383 (create_file_event): Adjsut prototype.
11384 * remote-utils.c (remote_desc, listen_desc): Change type to
11385 gdb_fildes_t.
11386 * server.h: New gdb_fildes_t typedef.
11387 [USE_WIN32API]: Include winsock2.h.
11388 (delete_file_handler, add_file_handler): Adjust prototypes.
11389 (pfildes): Declare.
11390 * utils.c (pfildes): New.
11391
11392 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11393
11394 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11395 * configure: Regenerate.
11396
11397 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11398
11399 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11400 (linux_done_accessing_memory): ... this.
11401 (linux_target_ops): Adjust.
11402 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11403 * nto-low.c (nto_target_ops): Adjust comment.
11404 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11405 * spu-low.c (spu_target_ops): Adjust comment.
11406 * target.h (target_ops): Rename unprepare_to_access_memory field
11407 to done_accessing_memory.
11408 (unprepare_to_access_memory): Rename to ...
11409 (done_accessing_memory): ... this.
11410
11411 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11412
11413 * linux-low.c (linux_prepare_to_access_memory): New.
11414 (linux_unprepare_to_access_memory): New.
11415 (linux_target_ops): Install them.
11416 * server.c (read_memory): Rename to ...
11417 (gdb_read_memory): ... this. Use
11418 prepare_to_access_memory/prepare_to_access_memory.
11419 (write_memory): Rename to ...
11420 (gdb_write_memory): ... this. Use
11421 prepare_to_access_memory/prepare_to_access_memory.
11422 (handle_search_memory_1): Adjust.
11423 (process_serial_event): Adjust.
11424 * target.h (struct target_ops): New fields
11425 prepare_to_access_memory and unprepare_to_access_memory.
11426 (prepare_to_access_memory, unprepare_to_access_memory): New.
11427 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11428 prepare_to_access_memory/prepare_to_access_memory.
11429 * nto-low.c (nto_target_ops): Adjust.
11430 * spu-low.c (spu_target_ops): Adjust.
11431 * win32-low.c (win32_target_ops): Adjust.
11432
11433 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11434
11435 * Makefile.in (WARN_CFLAGS): Get it from configure.
11436 (WERROR_CFLAGS): New.
11437 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11438 * configure.ac: Introduce --enable-werror, which adds -Werror to
11439 the compiler command line. Enabled by default. Disable with
11440 --disable-werror. Add -Wdeclaration-after-statement
11441 Wpointer-arith and -Wformat-nonliteral to warning flags.
11442 * configure: Regenerate.
11443
11444 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11445
11446 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11447
11448 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11449
11450 * gdbreplay.c (remote_error): New.
11451 (gdbchar): New.
11452 (expect): Use gdbchar. Check for error reading from GDB.
11453 Clarify sync error output.
11454 (play): Check for errors writing to GDB.
11455 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11456 * remote-utils.c (getpkt): Check for errors writing to the remote
11457 descriptor.
11458
11459 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11460
11461 * linux-low.c (linux_wait_1): Move non-debugging code out of
11462 `debug_threads' control.
11463
11464 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11465
11466 * linux-low.c (linux_wait_1): Don't set last_status here.
11467 * server.c (push_event, queue_stop_reply_callback): Assert we're
11468 not pushing a TARGET_WAITKIND_IGNORE event.
11469 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11470 (myresume, handle_target_event): Set the thread's last_resume_kind
11471 and last_status from the target returned status.
11472
11473 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11474
11475 PR threads/10729
11476
11477 * linux-x86-low.c (update_debug_registers_callback): New.
11478 (i386_dr_low_set_addr): Use it.
11479 (i386_dr_low_get_addr): New.
11480 (i386_dr_low_set_control): Use update_debug_registers_callback.
11481 (i386_dr_low_get_control): New.
11482 (i386_dr_low_get_status): Adjust.
11483 * linux-low.c (linux_stop_lwp): New.
11484 * linux-low.h (linux_stop_lwp): Declare.
11485
11486 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11487 argument instead of a i386_debug_reg_state.
11488 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11489 a i386_debug_reg_state.
11490 (i386_insert_aligned_watchpoint): Adjust.
11491 (i386_remove_aligned_watchpoint): Adjust.
11492 (i386_low_stopped_data_address): Read the debug registers from the
11493 inferior instead of from the mirrors.
11494 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11495 (i386_dr_low_get_addr): Declare.
11496 (i386_dr_low_get_control): Declare.
11497 (i386_dr_low_get_status): Change prototype.
11498
11499 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11500 (i386_dr_low_get_addr): New.
11501 (i386_dr_low_get_control): New.
11502 (i386_dr_low_get_status): Adjust prototype. Return
11503 dr_status_mirror.
11504 (i386_initial_stuff): Clear dr_status_mirror and
11505 dr_control_mirror.
11506 (i386_get_thread_context): Adjust.
11507 (i386_set_thread_context): Adjust.
11508 (i386_thread_added): Adjust.
11509
11510 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11511
11512 * linux-low.h (linux_thread_area): Delete declaration.
11513
11514 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11515
11516 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11517 after its termination.
11518
11519 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11520
11521 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11522 (gdb_wants_all_stopped): Delete.
11523 (linux_wait_1): Don't call them.
11524 * server.c (handle_v_cont): Tag all threads as want-stopped.
11525 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11526 stopped as "client-wants-stopped".
11527
11528 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11529
11530 * Makefile.in (signals_h): New.
11531 (server_h): Depend on it.
11532 (server.o): Don't depend on $(signals_def).
11533 (signals.o): Depend on $(signals_def).
11534
11535 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11536
11537 * Makefile.in (signals_def): New.
11538 (server_h): Append include/gdb/signals.h and signals_def.
11539 (server.o): Append signals_def.
11540
11541 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11542
11543 * server.c (handle_target_event): Use target_signal_to_host for
11544 resume_info.sig initialization.
11545 * target.h (struct thread_resume) <sig>: New comment.
11546
11547 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11548
11549 * server.c (handle_query): strcpy() the returned string from paddress()
11550 instead of sprintf().
11551 * utils.c (paddress): Return phex_nz().
11552
11553 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11554
11555 * server.c (handle_v_cont): Call mourn_inferior if process
11556 just exited.
11557 (myresume): Likewise.
11558
11559 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11560
11561 Static tracepoints, and integration with UST.
11562
11563 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11564 * mem-break.c (uninsert_all_breakpoints)
11565 (reinsert_all_breakpoints): New.
11566 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11567 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11568 (gdb_agent_ust_loaded, helper_thread_id)
11569 (gdb_agent_helper_thread_id): New macros.
11570 (struct ipa_sym_addresses): Add addr_ust_loaded,
11571 addr_helper_thread_id, addr_cmd_buf.
11572 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11573 (in_process_agent_loaded_ust): New.
11574 (write_e_ust_not_loaded): New.
11575 (maybe_write_ipa_ust_not_loaded): New.
11576 (struct collect_static_trace_data_action): New.
11577 (enum tracepoint_type) <static_tracepoint>: New.
11578 (struct tracepoint) <handle>: Mention static tracepoints.
11579 (struct static_tracepoint_ctx): New.
11580 (CMD_BUF_SIZE): New.
11581 (add_tracepoint_action): Handle static tracepoint actions.
11582 (unprobe_marker_at): New.
11583 (clear_installed_tracepoints): Handle static tracepoints.
11584 (cmd_qtdp): Handle static tracepoints.
11585 (probe_marker_at): New.
11586 (cmd_qtstart): Handle static tracepoints.
11587 (response_tracepoint): Handle static tracepoints.
11588 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11589 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11590 (get_context_regcache): Handle static tracepoints.
11591 (do_action_at_tracepoint): Handle static tracepoint actions.
11592 (traceframe_find_block_type): Handle static trace data blocks.
11593 (traceframe_read_sdata): New.
11594 (download_tracepoints): Download static tracepoint actions.
11595 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11596 (GDB_PROBE_NAME): New.
11597 (ust_ops): New.
11598 (GET_UST_SYM): New.
11599 (USTF): New.
11600 (dlsym_ust): New.
11601 (ust_marker_to_static_tracepoint): New.
11602 (gdb_probe): New.
11603 (collect_ust_data_at_tracepoint): New.
11604 (gdb_ust_probe): New.
11605 (UNIX_PATH_MAX, SOCK_DIR): New.
11606 (gdb_ust_connect_sync_socket): New.
11607 (resume_thread, stop_thread): New.
11608 (run_inferior_command): New.
11609 (init_named_socket): New.
11610 (gdb_ust_socket_init): New.
11611 (cstr_to_hexstr): New.
11612 (next_st): New.
11613 (first_marker, next_marker): New.
11614 (response_ust_marker): New.
11615 (cmd_qtfstm, cmd_qtsstm): New.
11616 (unprobe_marker_at, probe_marker_at): New.
11617 (cmd_qtstmat, gdb_ust_thread): New.
11618 (gdb_ust_init): New.
11619 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11620 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11621 (ST_REGENTRY): New.
11622 (x86_64_st_collect_regmap): New.
11623 (X86_64_NUM_ST_COLLECT_GREGS): New.
11624 (AMD64_RIP_REGNUM): New.
11625 (supply_static_tracepoint_registers): New.
11626 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11627 (ST_REGENTRY): New.
11628 (i386_st_collect_regmap): New.
11629 (i386_NUM_ST_COLLECT_GREGS): New.
11630 (supply_static_tracepoint_registers): New.
11631 * server.c (handle_query): Handle qXfer:statictrace:read.
11632 <qSupported>: Report support for StaticTracepoints, and
11633 qXfer:statictrace:read features.
11634 * server.h (traceframe_read_sdata)
11635 (supply_static_tracepoint_registers): Declare.
11636 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11637 (unpack_varlen_hex): Include in IPA build.
11638 * Makefile.in (ustlibs, ustinc): New.
11639 (IPA_OBJS): Add remote-utils-ipa.o.
11640 ($(IPA_LIB)): Link -ldl and -lpthread.
11641 (UST_CFLAGS): New.
11642 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11643 * config.in, configure: Regenerate.
11644
11645 2010-06-20 Ian Lance Taylor <iant@google.com>
11646 Pedro Alves <pedro@codesourcery.com>
11647
11648 * linux-x86-low.c (always_true): Delete.
11649 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11650 trying to fool the compiler with always_true.
11651
11652 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11653
11654 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11655 conditions in gdbserver.
11656
11657 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11658
11659 * spu-low.c (spu_read_memory): Wrap around local store limit.
11660 (spu_write_memory): Likewise.
11661
11662 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11663
11664 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11665 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11666 LONGEST uses.
11667 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11668 uses.
11669 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11670 uses with LONGEST uses.
11671
11672 2010-06-14 Stan Shebs <stan@codesourcery.com>
11673 Pedro Alves <pedro@codesourcery.com>
11674
11675 Bytecode compiler.
11676
11677 * linux-x86-low.c: Include limits.h.
11678 (add_insns): New.
11679 (always_true): New.
11680 (EMIT_ASM): New.
11681 (EMIT_ASM32): New.
11682 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11683 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11684 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11685 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11686 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11687 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11688 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11689 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11690 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11691 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11692 (amd64_emit_void_call_2): New.
11693 (amd64_emit_ops): New.
11694 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11695 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11696 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11697 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11698 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11699 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11700 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11701 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11702 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11703 (i386_emit_stack_adjust, i386_emit_int_call_1)
11704 (i386_emit_void_call_2): New.
11705 (i386_emit_ops): New.
11706 (x86_emit_ops): New.
11707 (the_low_target): Install x86_emit_ops.
11708 * server.h (struct emit_ops): New.
11709 (get_raw_reg_func_addr): Declare.
11710 (current_insn_ptr, emit_error): Declare.
11711 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11712 (set_trace_state_variable_value): New defines.
11713 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11714 addr_get_trace_state_variable_value and
11715 addr_set_trace_state_variable_value.
11716 (symbol_list): New fields for get_raw_reg,
11717 get_trace_state_variable_value and set_trace_state_variable_value.
11718 (condfn): New typedef.
11719 (struct tracepoint): New field `compiled_cond'.
11720 (do_action_at_tracepoint): Clear compiled_cond.
11721 (get_trace_state_variable_value, set_trace_state_variable_value):
11722 Export in the IPA.
11723 (condition_true_at_tracepoint): If there's a compiled condition,
11724 run that.
11725 (current_insn_ptr, emit_error): New globals.
11726 (struct bytecode_address): New.
11727 (get_raw_reg_func_addr): New.
11728 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11729 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11730 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11731 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11732 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11733 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11734 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11735 (compile_tracepoint_condition, compile_bytecodes): New.
11736 * target.h (emit_ops): Forward declare.
11737 (struct target_ops): New field emit_ops.
11738 (target_emit_ops): New.
11739 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11740 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11741 * linux-low.c (linux_emit_ops): New.
11742 (linux_target_ops): Install it.
11743 * linux-low.h (struct linux_target_ops): New field emit_ops.
11744
11745 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11746
11747 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11748 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11749
11750 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11751 Stan Shebs <stan@codesourcery.com>
11752
11753 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11754 (all): Depend on $(extra_libraries).
11755 (install-only): Install the IPA.
11756 (IPA_OBJS, IPA_LIB): New.
11757 (clean): Remove the IPA lib.
11758 (IPAGENT_CFLAGS): New.
11759 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11760 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11761 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11762 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11763 * configure.ac: Check for atomic builtins support in the compiler.
11764 (IPA_DEPFILES, extra_libraries): Define.
11765 * configure.srv (ipa_obj): Add description.
11766 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11767 (i[34567]86-*-linux*): Set ipa_obj.
11768 (x86_64-*-linux*): Set ipa_obj.
11769 * linux-low.c (stabilizing_threads): New.
11770 (supports_fast_tracepoints): New.
11771 (linux_detach): Stabilize threads before detaching.
11772 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11773 the lwp is either not stabilizing, or is moving out of a jump pad.
11774 (linux_fast_tracepoint_collecting): New.
11775 (maybe_move_out_of_jump_pad): New.
11776 (enqueue_one_deferred_signal): New.
11777 (dequeue_one_deferred_signal): New.
11778 (linux_wait_for_event_1): If moving out of a jump pad, defer
11779 pending signals to later.
11780 (linux_stabilize_threads): New.
11781 (linux_wait_1): Check if threads need moving out of jump pads, and
11782 do it if so.
11783 (stuck_in_jump_pad_callback): New.
11784 (move_out_of_jump_pad_callback): New.
11785 (lwp_running): New.
11786 (linux_resume_one_lwp): Handle moving out of jump pads.
11787 (linux_set_resume_request): Dequeue deferred signals.
11788 (need_step_over_p): Also step over fast tracepoint jumps.
11789 (start_step_over): Also uninsert fast tracepoint jumps.
11790 (finish_step_over): Also reinsert fast tracepoint jumps.
11791 (linux_install_fast_tracepoint_jump): New.
11792 (linux_target_ops): Install linux_stabilize_threads and
11793 linux_install_fast_tracepoint_jump_pad.
11794 * linux-low.h (linux_target_ops) <get_thread_area,
11795 install_fast_tracepoint_jump_pad>: New fields.
11796 (struct lwp_info) <collecting_fast_tracepoint,
11797 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11798 (linux_get_thread_area): Declare.
11799 * linux-x86-low.c (jump_insn): New.
11800 (x86_get_thread_area): New.
11801 (append_insns): New.
11802 (push_opcode): New.
11803 (amd64_install_fast_tracepoint_jump_pad): New.
11804 (i386_install_fast_tracepoint_jump_pad): New.
11805 (x86_install_fast_tracepoint_jump_pad): New.
11806 (the_low_target): Install x86_get_thread_area and
11807 x86_install_fast_tracepoint_jump_pad.
11808 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11809 (struct fast_tracepoint_jump): New.
11810 (fast_tracepoint_jump_insn): New.
11811 (fast_tracepoint_jump_shadow): New.
11812 (find_fast_tracepoint_jump_at): New.
11813 (fast_tracepoint_jump_here): New.
11814 (delete_fast_tracepoint_jump): New.
11815 (set_fast_tracepoint_jump): New.
11816 (uninsert_fast_tracepoint_jumps_at): New.
11817 (reinsert_fast_tracepoint_jumps_at): New.
11818 (set_breakpoint_at): Use write_inferior_memory.
11819 (uninsert_raw_breakpoint): Use write_inferior_memory.
11820 (check_mem_read): Mask out fast tracepoint jumps.
11821 (check_mem_write): Mask out fast tracepoint jumps.
11822 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11823 (set_fast_tracepoint_jump): Declare.
11824 (delete_fast_tracepoint_jump)
11825 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11826 (reinsert_fast_tracepoint_jumps_at): Declare.
11827 * regcache.c: Don't compile many functions when building the
11828 in-process agent library.
11829 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11830 the register buffer in the heap.
11831 (free_register_cache): If the register buffer isn't owned by the
11832 regcache, don't free it.
11833 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11834 pre-existing register caches.
11835 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11836 type.
11837 (convert_ascii_to_int): : Constify `from' parameter type.
11838 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11839 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11840 the needed buffer in-place.
11841 (relocate_instruction): New.
11842 * server.c (handle_query) <qSymbols>: If the target supports
11843 tracepoints, give it a chance of looking up symbols. Report
11844 support for fast tracepoints.
11845 (handle_status): Stabilize threads.
11846 (process_serial_event): Adjust.
11847 * server.h (struct fast_tracepoint_jump): Forward declare.
11848 (struct process_info) <fast_tracepoint_jumps>: New field.
11849 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11850 (decode_X_packet, decode_M_packet): Adjust.
11851 (relocate_instruction): Declare.
11852 (in_process_agent_loaded): Declare.
11853 (tracepoint_look_up_symbols): Declare.
11854 (struct fast_tpoint_collect_status): Declare.
11855 (fast_tracepoint_collecting): Declare.
11856 (force_unlock_trace_buffer): Declare.
11857 (handle_tracepoint_bkpts): Declare.
11858 (initialize_low_tracepoint)
11859 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11860 * target.h (struct target_ops) <stabilize_threads,
11861 install_fast_tracepoint_jump_pad>: New fields.
11862 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11863 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11864 [HAVE_STDINT_H]: Include stdint.h.
11865 (trace_debug_1): Rename to ...
11866 (trace_vdebug): ... this.
11867 (trace_debug): Rename to ...
11868 (trace_debug_1): ... this. Add `level' parameter.
11869 (trace_debug): New.
11870 (ATTR_USED, ATTR_NOINLINE): New.
11871 (IP_AGENT_EXPORT): New.
11872 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11873 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11874 (about_to_request_buffer_space, trace_buffer_is_full)
11875 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11876 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11877 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11878 (traceframe_write_count, traceframes_created)
11879 (trace_state_variables)
11880 New renaming defines.
11881 (struct ipa_sym_addresses): New.
11882 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11883 (symbol_list): New.
11884 (ipa_sym_addrs): New.
11885 (all_tracepoint_symbols_looked_up): New.
11886 (in_process_agent_loaded): New.
11887 (write_e_ipa_not_loaded): New.
11888 (maybe_write_ipa_not_loaded): New.
11889 (tracepoint_look_up_symbols): New.
11890 (debug_threads) [IN_PROCESS_AGENT]: New.
11891 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11892 (UNKNOWN_SIDE_EFFECTS): New.
11893 (stop_tracing): New.
11894 (flush_trace_buffer): New.
11895 (stop_tracing_bkpt): New.
11896 (flush_trace_buffer_bkpt): New.
11897 (read_inferior_integer): New.
11898 (read_inferior_uinteger): New.
11899 (read_inferior_data_pointer): New.
11900 (write_inferior_data_pointer): New.
11901 (write_inferior_integer): New.
11902 (write_inferior_uinteger): New.
11903 (struct collect_static_trace_data_action): Delete.
11904 (enum tracepoint_type): New.
11905 (struct tracepoint) <type>: New field `type'.
11906 <actions_str, step_actions, step_actions_str>: Only include in
11907 GDBserver.
11908 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11909 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11910 (tracepoints): Use IP_AGENT_EXPORT.
11911 (last_tracepoint): Don't include in the IPA.
11912 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11913 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11914 (alloced_trace_state_variables): New.
11915 (trace_state_variables): Use IP_AGENT_EXPORT.
11916 (traceframe_t): Delete unused variable.
11917 (circular_trace_buffer): Don't include in the IPA.
11918 (trace_buffer_start): Delete.
11919 (struct trace_buffer_control): New.
11920 (trace_buffer_free): Delete.
11921 (struct ipa_trace_buffer_control): New.
11922 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11923 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11924 New.
11925 (trace_buffer_ctrl): New.
11926 (TRACE_BUFFER_CTRL_CURR): New.
11927 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11928 Reimplement as macros.
11929 (trace_buffer_wrap): Delete.
11930 (traceframe_write_count, traceframe_read_count)
11931 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11932 (struct tracepoint_hit_ctx) <type>: New field.
11933 (struct fast_tracepoint_ctx): New.
11934 (memory_barrier): New.
11935 (cmpxchg): New.
11936 (record_tracepoint_error): Update atomically in the IPA.
11937 (clear_inferior_trace_buffer): New.
11938 (about_to_request_buffer_space): New.
11939 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11940 updating the same buffer.
11941 (add_tracepoint): Default the tracepoint's type to trap
11942 tracepoint, and orig_size to -1.
11943 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11944 internal variables.
11945 (create_trace_state_variable): New parameter `gdb'. Handle it.
11946 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11947 (cmd_qtdp): Handle fast tracepoints.
11948 (cmd_qtdv): Adjust.
11949 (max_jump_pad_size): New.
11950 (gdb_jump_pad_head): New.
11951 (get_jump_space_head): New.
11952 (claim_jump_space): New.
11953 (sort_tracepoints): New.
11954 (MAX_JUMP_SIZE): New.
11955 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11956 IPA.
11957 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11958 support. Upload fast traceframes, and delete internal IPA
11959 breakpoints.
11960 (stop_tracing_handler): New.
11961 (flush_trace_buffer_handler): New.
11962 (cmd_qtstop): Upload fast tracepoints.
11963 (response_tracepoint): Handle fast tracepoints.
11964 (tracepoint_finished_step): Upload fast traceframes. Set the
11965 tracepoint hit context's tracepoint type.
11966 (handle_tracepoint_bkpts): New.
11967 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11968 type. Add comment about fast tracepoints.
11969 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11970 non-existing action_str field.
11971 (get_context_regcache): Handle fast tracepoints.
11972 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11973 to the regcache.
11974 (fast_tracepoint_from_jump_pad_address): New.
11975 (fast_tracepoint_from_ipa_tpoint_address): New.
11976 (collecting_t): New.
11977 (force_unlock_trace_buffer): New.
11978 (fast_tracepoint_collecting): New.
11979 (collecting): New.
11980 (gdb_collect): New.
11981 (write_inferior_data_ptr): New.
11982 (target_tp_heap): New.
11983 (target_malloc): New.
11984 (download_agent_expr): New.
11985 (UALIGN): New.
11986 (download_tracepoints): New.
11987 (download_trace_state_variables): New.
11988 (upload_fast_traceframes): New.
11989 (IPA_FIRST_TRACEFRAME): New.
11990 (IPA_NEXT_TRACEFRAME_1): New.
11991 (IPA_NEXT_TRACEFRAME): New.
11992 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11993 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11994 (gdb_jump_pad_buffer_end): New.
11995 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11996 (initialize_tracepoint): Adjust.
11997 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11998 buffer. Initialize the low module.
11999 * utils.c (PREFIX, TOOLNAME): New.
12000 (malloc_failure): Use PREFIX.
12001 (error): In the IPA, an error causes an exit.
12002 (fatal, warning): Use PREFIX.
12003 (internal_error): Use TOOLNAME.
12004 (NUMCELLS): Increase to 10.
12005 * configure, config.in: Regenerate.
12006
12007 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12008
12009 * server.c (handle_query) <qSupported>: Do two passes over the
12010 qSupported string to avoid nesting strtok.
12011
12012 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12013
12014 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12015 (CDEPS): New.
12016 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12017 -Wl,--dynamic-list.
12018 * configure: Regenerate.
12019 * proc-service.list: New.
12020
12021 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12022
12023 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12024 New comment.
12025
12026 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12027
12028 * gdbreplay.c (remote_open): Check error return from socket() call by
12029 its equality to -1 not by it being negative.
12030 * remote-utils.c (remote_open): Likewise.
12031
12032 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12033
12034 * config.h: Regenerate.
12035
12036 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12037
12038 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12039 doesn't provide PTRACE_GET_THREAD_AREA.
12040
12041 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12042
12043 * linux-m68k-low.c: Include <asm/ptrace.h>
12044 (ps_get_thread_area): Implement.
12045
12046 2010-05-03 Doug Evans <dje@google.com>
12047
12048 * event-loop.c (struct callback_event): New struct.
12049 (callback_list): New global.
12050 (append_callback_event, delete_callback_event): New functions.
12051 (process_callback): New function.
12052 (start_event_loop): Call it.
12053 * remote-utils.c (NOT_SCHEDULED): Define.
12054 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12055 moved out of readchar.
12056 (readchar): Rewrite. Call reschedule before returning.
12057 (reset_readchar): New function.
12058 (remote_close): Call it.
12059 (process_remaining, reschedule): New functions.
12060 * server.h (callback_handler_func): New typedef.
12061 (append_callback_event, delete_callback_event): Declare.
12062
12063 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12064
12065 * proc-service.c (ps_pglobal_lookup): Use
12066 thread_db_look_up_one_symbol.
12067 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12068 parameter. Use it instead of all_symbols_looked_up.
12069 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12070 field.
12071 (all_symbols_looked_up): Don't declare.
12072 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12073 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12074 field.
12075 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12076 Set all_symbols_looked_up here.
12077 (thread_db_look_up_one_symbol): New.
12078 (thread_db_get_tls_address): Adjust.
12079 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12080 thread_db object on the heap, and tentatively set it in the
12081 process structure.
12082 (thread_db_init): Don't set all_symbols_looked_up here.
12083 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12084
12085 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12086
12087 * linux-low.c (linux_kill, linux_detach): Adjust.
12088 (status_pending_p_callback): Remove redundant statement. Check
12089 for !TARGET_WAITIKIND_IGNORE, instead of
12090 TARGET_WAITKIND_STOPPED.
12091 (handle_tracepoints): Make sure LWP is locked. Adjust.
12092 (linux_wait_for_event_1): Adjust.
12093 (linux_cancel_breakpoints): New.
12094 (unsuspend_one_lwp): New.
12095 (unsuspend_all_lwps): New.
12096 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12097 (send_sigstop_callback): Change return type to int, add new
12098 `except' parameter and handle it.
12099 (suspend_and_send_sigstop_callback): New.
12100 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12101 pass them down. If SUSPEND, also increment the lwp's suspend
12102 count.
12103 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12104 (need_step_over_p): Don't consider suspended LWPs.
12105 (start_step_over): Adjust.
12106 (proceed_one_lwp): Change return type to int, add new `except'
12107 parameter and handle it.
12108 (unsuspend_and_proceed_one_lwp): New.
12109 (proceed_all_lwps): Use find_inferior instead of
12110 for_each_inferior.
12111 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12112 also decrement the suspend count of LWPs. Pass `except' down,
12113 instead of hacking its suspend count.
12114 (linux_pause_all): Add `freeze' parameter. Adjust.
12115 (linux_unpause_all): New.
12116 (linux_target_ops): Install linux_unpause_all.
12117 * server.c (handle_status): Adjust.
12118 * target.h (struct target_ops): New fields `unpause_all' and
12119 `cancel_breakpoints'. Add new parameter to `pause_all'.
12120 (pause_all): Add new `freeze' parameter.
12121 (unpause_all): New.
12122 (cancel_breakpoints): New.
12123 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12124 cancel breakpoints.
12125 (cmd_qtstart): Pause threads.
12126 (stop_tracing): Pause threads, and cancel breakpoints.
12127 * win32-low.c (win32_target_ops): Adjust.
12128
12129 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12130
12131 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12132 the inferior right away from here...
12133 (linux_wait_1): ... to here, and adjust to check the thread's
12134 last_resume_kind instead of the lwp's step or stop_expected flags.
12135
12136 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12137
12138 * README: Use consistent `GDB' and `GDBserver' spellings.
12139
12140 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12141
12142 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12143 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12144 (linux_detach_one_lwp): Assume the lwp is stopped.
12145 (any_thread_of): Delete.
12146 (linux_detach): Stop all lwps here. Don't blindly delete all
12147 breakpoints.
12148 (delete_lwp_callback): New.
12149 (linux_mourn): Delete all lwps of the process that is gone.
12150 (linux_wait_1): Don't delete the last lwp of the process here.
12151 * mem-break.h (mark_breakpoints_out): Declare.
12152 * mem-break.c (mark_breakpoints_out): New.
12153 (free_all_breakpoints): Use it.
12154 * server.c (handle_target_event): If the process is gone, mark
12155 breakpoints out.
12156 * thread-db.c (struct thread_db) <create_bp>: New field.
12157 (thread_db_enable_reporting): Fix prototype. Store a thread event
12158 breakpoint reference in the thread_db struct.
12159 (thread_db_load_search): Clear the thread_db object.
12160 (try_thread_db_load_1): Ditto.
12161 (switch_to_process): New.
12162 (disable_thread_event_reporting): Use it.
12163 (remove_thread_event_breakpoints): New.
12164 (thread_db_detach, thread_db_mourn): Use it.
12165
12166 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12167
12168 * linux-low.c (linux_enable_event_reporting): New.
12169 (linux_wait_for_event_1, handle_extended_wait): Use it.
12170
12171 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12172
12173 * linux-low.c (linux_kill_one_lwp, linux_kill)
12174 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12175 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12176 SIGSTOP even if the LWP is stopped.
12177 (send_sigstop_callback): New.
12178 (stop_all_lwps): Use send_sigstop_callback instead.
12179 (linux_resume_one_thread): Adjust.
12180 (proceed_one_lwp): Still proceed an LWP that the client has
12181 requested to stop, if we haven't reported it as stopped yet. Make
12182 sure that LWPs the client want stopped, have a pending SIGSTOP.
12183
12184 2010-04-26 Doug Evans <dje@google.com>
12185
12186 * server.c (handle_general_set): Make static.
12187
12188 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12189 Print received char after testing for error/eof instead of before.
12190 (input_interrupt): Tweak comment.
12191
12192 2010-04-23 Doug Evans <dje@google.com>
12193
12194 * server.c (start_inferior): Print inferior argv if --debug.
12195
12196 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12197
12198 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12199 * nto-x86-low.c: Include server.h
12200
12201 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12202
12203 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12204 be consistent with other sources of this directory.
12205 (init_registers_amd64): Correct name of source file of this function
12206 in the comment.
12207
12208 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12209
12210 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12211 64-bit executables.
12212
12213 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12214
12215 * win32-i386-low.c: Add 64-bit support.
12216 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12217 (init_registers_amd64): Declare.
12218 (mappings): Add 64-bit version of array.
12219 (init_windows_x86): New function.
12220 (the_low_target): Change init_arch field to init_windows_x86.
12221
12222 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12223
12224 * win32-low.c: Adapt to support also 64-bit architecture.
12225 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12226 (get_image_name): Use SIZE_T type for local variable `done'.
12227 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12228 (toolhelp_get_dll_name): Idem.
12229 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12230 Use uintptr_t typecast to avoid warning.
12231 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12232 (handle_exception): Use phex_nz to avoid warning.
12233 (win32_wait): Remove unused local variable `process'.
12234
12235 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12236
12237 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12238 `amd64-avx.o'.
12239
12240 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12241
12242 * configure.ac: Use `ws2_32' library for srv_mingw.
12243 * configure: Regenerate.
12244 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12245 * remote-utils.c: Likewise.
12246
12247 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12248
12249 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12250 if __x86_64__ is defined.
12251
12252 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12253
12254 * configure: Regenerate.
12255
12256 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12257
12258 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12259 * target.h (target_ops): New get_tib_address field.
12260 * win32-low.h (win32_thread_info): Add thread_local_base field.
12261 * win32-low.c (child_add_thread): Add tlb argument.
12262 Set thread_local_base field to TLB.
12263 (get_child_debug_event): Adapt to child_add_thread change.
12264 (win32_get_tib_address): New function.
12265 (win32_target_ops): Set get_tib_address field to
12266 win32_get_tib_address.
12267 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12268
12269 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12270
12271 * linux-low.c (linux_mourn): Also remove the process.
12272 * server.c (handle_target_event): Don't remove the process here.
12273 * nto-low.c (nto_mourn): New.
12274 (nto_target_ops): Install it.
12275 * spu-low.c (spu_mourn): New.
12276 (spu_target_ops): Install it.
12277 * win32-low.c (win32_mourn): New.
12278 (win32_target_ops): Install it.
12279
12280 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12281
12282 * server.h (buffer_xml_printf): Remove redundant `;'.
12283
12284 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12285
12286 * regcache.c (set_register_cache): Invalidate regcaches before
12287 changing the register cache layout.
12288 (regcache_invalidate_one): Allow a NULL regcache.
12289 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12290 regcaches before changing the register cache layout or the target
12291 regsets.
12292
12293 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12294
12295 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12296 variable warning on Linux/x86-64.
12297
12298 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12299
12300 GDBserver disconnected tracing support.
12301
12302 * linux-low.c (linux_remove_process): Delete.
12303 (add_lwp): Don't set last_resume_kind here.
12304 (linux_kill): Use `mourn'.
12305 (linux_detach): Use `thread_db_detach', and `mourn'.
12306 (linux_mourn): New.
12307 (linux_attach_lwp_1): Adjust comment.
12308 (linux_attach): last_resume_kind moved the thread_info; adjust.
12309 (status_pending_p_callback): Adjust.
12310 (linux_wait_for_event_1): Adjust.
12311 (count_events_callback, select_singlestep_lwp_callback)
12312 (select_event_lwp_callback, cancel_breakpoints_callback)
12313 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12314 (proceed_one_lwp): Adjust.
12315 (linux_async): Add debug output.
12316 (linux_thread_stopped): New.
12317 (linux_pause_all): New.
12318 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12319 linux_pause_all.
12320 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12321 (thread_db_free): Delete declaration.
12322 (thread_db_detach, thread_db_mourn): Declare.
12323 * thread-db.c (thread_db_init): Use thread_db_mourn.
12324 (thread_db_free): Delete, split in two.
12325 (disable_thread_event_reporting): New.
12326 (thread_db_detach): New.
12327 (thread_db_mourn): New.
12328
12329 * server.h (struct thread_info) <last_resume_kind>: New field.
12330 <attached>: Add comment.
12331 <gdb_detached>: New field.
12332 (handler_func): Change return type to int.
12333 (handle_serial_event, handle_target_event): Ditto.
12334 (gdb_connected): Declare.
12335 (tracing): Delete.
12336 (disconnected_tracing): Declare.
12337 (stop_tracing): Declare.
12338
12339 * server.c (handle_query) <qSupported>: Report support for
12340 disconnected tracing.
12341 (queue_stop_reply_callback): Account for running threads.
12342 (gdb_wants_thread_stopped): New.
12343 (gdb_wants_all_threads_stopped): New.
12344 (gdb_reattached_process): New.
12345 (handle_status): Clear the `gdb_detached' flag of all processes.
12346 In all-stop, stop all threads.
12347 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12348 (process_serial_event): If the remote connection breaks, or if an
12349 exit was forced with "monitor exit", force an event loop exit.
12350 Handle disconnected tracing on detach.
12351 (handle_serial_event): Adjust.
12352 (handle_target_event): If GDB isn't connected, forward events back
12353 to the inferior, unless the last process exited, in which case,
12354 exit gdbserver. Adjust interface.
12355
12356 * remote-utils.c (remote_open): Don't block in accept. Instead
12357 register an event loop source on the listen socket file
12358 descriptor. Refactor bits into ...
12359 (listen_desc): ... this new global.
12360 (gdb_connected): ... this new function.
12361 (enable_async_notification): ... this new function.
12362 (handle_accept_event): ... this new function.
12363 (remote_close): Clear remote_desc.
12364
12365 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12366
12367 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12368 New fields.
12369 (mourn_inferior): Define.
12370 (target_process_qsupported): Avoid the dangling else problem.
12371 (thread_stopped): Define.
12372 (pause_all): Define.
12373 (target_waitstatus_to_string): Declare.
12374 * target.c (target_waitstatus_to_string): New.
12375
12376 * tracepoint.c (tracing): Make extern.
12377 (disconnected_tracing): New.
12378 (stop_tracing): Make extern. Handle tracing stops due to GDB
12379 disconnecting.
12380 (cmd_qtdisconnected): New.
12381 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12382 (handle_tracepoint_general_set): Handle QTDisconnected.
12383
12384 * event-loop.c (event_handler_func): Change return type to int.
12385 (process_event): Bail out if the event handler wants the event
12386 loop to stop.
12387 (handle_file_event): Ditto.
12388 (start_event_loop): Bail out if the event handler wants the event
12389 loop to stop.
12390
12391 * nto-low.c (nto_target_ops): Adjust.
12392 * spu-low.c (spu_wait): Don't remove the process here.
12393 (spu_target_ops): Adjust.
12394 * win32-low.c (win32_wait): Don't remove the process here.
12395 (win32_target_ops): Adjust.
12396
12397 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12398
12399 * regcache.c (realloc_register_cache): Invalidate inferior's
12400 regcache before recreating it.
12401
12402 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12403
12404 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12405
12406 2010-04-09 Stan Shebs <stan@codesourcery.com>
12407 Pedro Alves <pedro@codesourcery.com>
12408
12409 * server.h (LONGEST): New.
12410 (struct thread_info) <while_stepping>: New field.
12411 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12412 Declare.
12413 (initialize_tracepoint, handle_tracepoint_general_set)
12414 (handle_tracepoint_query, tracepoint_finished_step)
12415 (tracepoint_was_hit, release_while_stepping_state_list):
12416 (current_traceframe): Declare.
12417 * server.c (handle_general_set): Handle tracepoint packets.
12418 (read_memory): New.
12419 (write_memory): New.
12420 (handle_search_memory_1): Use read_memory.
12421 (handle_query): Report support for conditional tracepoints, trace
12422 state variables, and tracepoint sources. Handle tracepoint
12423 queries.
12424 (main): Initialize the tracepoints module.
12425 (process_serial_event): Handle traceframe reads/writes.
12426
12427 * linux-low.c (handle_tracepoints): New.
12428 (linux_wait_1): Call it.
12429 (linux_resume_one_lwp): Handle while-stepping.
12430 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12431 (linux_target_ops): Install them.
12432 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12433 New field.
12434 * linux-x86-low.c (x86_supports_tracepoints): New.
12435 (the_low_target). Install it.
12436
12437 * mem-break.h (delete_breakpoint): Declare.
12438 * mem-break.c (delete_breakpoint): Make external.
12439
12440 * target.h (struct target_ops): Add `supports_tracepoints',
12441 `read_pc', and `write_pc' fields.
12442 (target_supports_tracepoints): Define.
12443 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12444 (phex_nz): New.
12445
12446 * regcache.h (struct regcache) <registers_owned>: New field.
12447 (init_register_cache, regcache_cpy): Declare.
12448 (regcache_read_pc, regcache_write_pc): Declare.
12449 (register_cache_size): Declare.
12450 (supply_regblock): Declare.
12451 * regcache.c (init_register_cache): New.
12452 (new_register_cache): Use it.
12453 (regcache_cpy): New.
12454 (register_cache_size): New.
12455 (supply_regblock): New.
12456 (regcache_read_pc, regcache_write_pc): New.
12457
12458 * tracepoint.c: New.
12459
12460 * Makefile.in (OBS): Add tracepoint.o.
12461 (tracepoint.o): New rule.
12462
12463 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12464
12465 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12466 (i386-mmx.o): New.
12467 (i386-mmx.c): Likewise.
12468 (i386-mmx-linux.o): Likewise.
12469 (i386-mmx-linux.c): Likewise.
12470
12471 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12472 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12473 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12474 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12475
12476 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12477 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12478 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12479
12480 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12481
12482 * Makefile.in (clean): Updated.
12483 (i386-avx.o): New.
12484 (i386-avx.c): Likewise.
12485 (i386-avx-linux.o): Likewise.
12486 (i386-avx-linux.c): Likewise.
12487 (amd64-avx.o): Likewise.
12488 (amd64-avx.c): Likewise.
12489 (amd64-avx-linux.o): Likewise.
12490 (amd64-avx-linux.c): Likewise.
12491
12492 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12493 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12494 (srv_amd64_regobj): Add amd64-avx.o.
12495 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12496 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12497 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12498 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12499 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12500 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12501 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12502
12503 * i387-fp.c: Include "i386-xstate.h".
12504 (i387_xsave): New.
12505 (i387_cache_to_xsave): Likewise.
12506 (i387_xsave_to_cache): Likewise.
12507 (x86_xcr0): Likewise.
12508
12509 * i387-fp.h (i387_cache_to_xsave): Likewise.
12510 (i387_xsave_to_cache): Likewise.
12511 (x86_xcr0): Likewise.
12512
12513 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12514 * linux-crisv32-low.c (target_regsets): Likewise.
12515 * linux-m68k-low.c (target_regsets): Likewise.
12516 * linux-mips-low.c (target_regsets): Likewise.
12517 * linux-ppc-low.c (target_regsets): Likewise.
12518 * linux-s390-low.c (target_regsets): Likewise.
12519 * linux-sh-low.c (target_regsets): Likewise.
12520 * linux-sparc-low.c (target_regsets): Likewise.
12521 * linux-xtensa-low.c (target_regsets): Likewise.
12522
12523 * linux-low.c: Include <sys/uio.h>.
12524 (regsets_fetch_inferior_registers): Support nt_type.
12525 (regsets_store_inferior_registers): Likewise.
12526 (linux_process_qsupported): New.
12527 (linux_target_ops): Add linux_process_qsupported.
12528
12529 * linux-low.h (regset_info): Add nt_type.
12530 (linux_target_ops): Add process_qsupported.
12531
12532 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12533 and <sys/uio.h>.
12534 (init_registers_i386_avx_linux): New.
12535 (init_registers_amd64_avx_linux): Likewise.
12536 (xmltarget_i386_linux_no_xml): Likewise.
12537 (xmltarget_amd64_linux_no_xml): Likewise.
12538 (PTRACE_GETREGSET): Likewise.
12539 (PTRACE_SETREGSET): Likewise.
12540 (x86_fill_xstateregset): Likewise.
12541 (x86_store_xstateregset): Likewise.
12542 (use_xml): Likewise.
12543 (x86_linux_update_xmltarget): Likewise.
12544 (x86_linux_process_qsupported): Likewise.
12545 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12546 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12547 init_registers_i386_linux here. Call
12548 x86_linux_update_xmltarget.
12549 (the_low_target): Add x86_linux_process_qsupported.
12550
12551 * server.c (handle_query): Call target_process_qsupported.
12552
12553 * target.h (target_ops): Add process_qsupported.
12554 (target_process_qsupported): New.
12555
12556 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12557
12558 * inferiors.c (add_thread): Set last_status kind to
12559 TARGET_WAITKIND_IGNORE.
12560 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12561 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12562 (linux_wait_1): Move `thread' local definition to block that uses
12563 it. Don't NULL initialize `event_child'.
12564 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12565 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12566 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12567
12568 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12569
12570 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12571 an extended waitstatus, or by a watchpoint.
12572 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12573 thread was stepping or has been stopped by a watchpoint.
12574
12575 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12576
12577 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12578 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12579 of another, then delete the previous, and validate all
12580 breakpoints.
12581 (validate_inserted_breakpoint): New.
12582 (delete_disabled_breakpoints): New.
12583 (validate_breakpoints): New.
12584 (check_mem_read): Validate breakpoints before trusting their
12585 shadow. Delete disabled breakpoints.
12586 (check_mem_write): Validate breakpoints before trusting they
12587 should be inserted. Delete disabled breakpoints.
12588 * mem-break.h (validate_breakpoints):
12589 * server.c (handle_query): Validate breakpoints when we see a
12590 qSymbol query.
12591
12592 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12593
12594 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12595 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12596 if we could tell there's a GDB breakpoint at stop_pc.
12597 (need_step_over_p): Don't do a step over if we find a GDB
12598 breakpoint at the resume PC.
12599
12600 * mem-break.c (struct raw_breakpoint): New.
12601 (enum bkpt_type): New type `gdb_breakpoint'.
12602 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12603 fields. New field `raw'.
12604 (find_raw_breakpoint_at): New.
12605 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12606 breakpoint instead.
12607 (set_breakpoint_at): Adjust.
12608 (delete_raw_breakpoint): New.
12609 (release_breakpoint): New.
12610 (delete_breakpoint): Rename to...
12611 (delete_breakpoint_1): ... this. Add proc parameter. Use
12612 release_breakpoint. Return ENOENT.
12613 (delete_breakpoint): Reimplement.
12614 (find_breakpoint_at): Delete.
12615 (find_gdb_breakpoint_at): New.
12616 (delete_breakpoint_at): Delete.
12617 (set_gdb_breakpoint_at): New.
12618 (delete_gdb_breakpoint_at): New.
12619 (gdb_breakpoint_here): New.
12620 (set_reinsert_breakpoint): Use release_breakpoint.
12621 (uninsert_breakpoint): Rename to ...
12622 (uninsert_raw_breakpoint): ... this.
12623 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12624 (reinsert_raw_breakpoint): Change parameter type to
12625 raw_breakpoint.
12626 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12627 instead.
12628 (check_breakpoints): Adjust. Use release_breakpoint.
12629 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12630 (breakpoint_inserted_here): Ditto.
12631 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12632 Don't trust the breakpoint's shadow if it is not inserted.
12633 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12634 (delete_all_breakpoints): Adjust.
12635 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12636 use delete_breakpoint_1.
12637
12638 * mem-break.h (breakpoints_supported): Delete declaration.
12639 (set_gdb_breakpoint_at): Declare.
12640 (gdb_breakpoint_here): Declare.
12641 (delete_breakpoint_at): Delete.
12642 (delete_gdb_breakpoint_at): Declare.
12643
12644 * server.h (struct raw_breakpoint): Forward declare.
12645 (struct process_info): New field `raw_breakpoints'.
12646
12647 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12648 breakpoints.
12649
12650 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12651
12652 * linux-low.c (status_pending_p_callback): Fix comment.
12653 (linux_wait_for_event_1): Move most of the internal breakpoint
12654 handling from here...
12655 (linux_wait_1): ... to here.
12656 (count_events_callback): New.
12657 (select_singlestep_lwp_callback): New.
12658 (select_event_lwp_callback): New.
12659 (cancel_breakpoints_callback): New.
12660 (select_event_lwp): New.
12661 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12662 priority to all LWPs that have had events that should be reported
12663 to the client. Cancel breakpoints when about to reporting the
12664 event to the client, not while stopping lwps. No longer cancel
12665 finished single-steps here.
12666 (cancel_finished_single_step): Delete.
12667 (cancel_finished_single_steps): Delete.
12668
12669 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12670
12671 * mem-break.c (enum bkpt_type): New.
12672 (struct breakpoint): New field `type'.
12673 (set_breakpoint_at): Change return type to struct breakpoint
12674 pointer. Set type to `other_breakpoint' by default.
12675 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12676 in the breakpoint list.
12677 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12678 (reinsert_breakpoint): Rename to ...
12679 (reinsert_raw_breakpoint): ... this.
12680 (reinsert_breakpoints_at): Adjust.
12681 * mem-break.h (struct breakpoint): Declare.
12682 (set_breakpoint_at): Change return type to struct breakpoint
12683 pointer.
12684
12685 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12686
12687 * server.c (handle_query): Assign, not compare.
12688
12689 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12690
12691 Teach linux gdbserver to step-over-breakpoints.
12692
12693 * linux-low.c (can_hardware_single_step): New.
12694 (supports_breakpoints): New.
12695 (handle_extended_wait): If stopping threads, read the stop pc of
12696 the new cloned LWP.
12697 (get_pc): New.
12698 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12699 low target doesn't support retrieving the PC.
12700 (add_lwp): Set last_resume_kind to resume_continue.
12701 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12702 (linux_attach): Don't clear stop_expected. Set the lwp's
12703 last_resume_kind to resume_stop.
12704 (linux_detach_one_lwp): Don't check for removed breakpoints.
12705 (check_removed_breakpoint): Delete.
12706 (status_pending_p): Rename to ...
12707 (status_pending_p_callback): ... this. Don't check for removed
12708 breakpoints. Don't consider threads that are stopped from GDB's
12709 perspective.
12710 (linux_wait_for_lwp): Always read the stop_pc here.
12711 (cancel_breakpoint): New.
12712 (step_over_bkpt): New global.
12713 (linux_wait_for_event_1): Implement stepping over breakpoints.
12714 (gdb_wants_lwp_stopped): New.
12715 (gdb_wants_all_stopped): New.
12716 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12717 single-step traps here. Store the thread's last reported target
12718 wait status.
12719 (send_sigstop): Don't clear stop_expected. Always set it,
12720 instead.
12721 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12722 (cancel_finished_single_step): New.
12723 (cancel_finished_single_steps): New.
12724 (wait_for_sigstop): Don't cancel finished single-step traps here.
12725 (linux_resume_one_lwp): Don't check for removed breakpoints.
12726 Don't set `step' on non-hardware step archs.
12727 (linux_set_resume_request): Ignore resume_stop requests if already
12728 stopping or stopped. Set the lwp's last_resume_kind.
12729 (resume_status_pending_p): Don't check for removed breakpoints.
12730 (need_step_over_p): New.
12731 (start_step_over): New.
12732 (finish_step_over): New.
12733 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12734 requests. Clear the thread's last reported target waitstatus.
12735 Don't use the `suspended' flag. Don't consider pending breakpoints.
12736 (linux_resume): Start a step-over if necessary.
12737 (proceed_one_lwp): New.
12738 (proceed_all_lwps): New.
12739 (unstop_all_lwps): New.
12740 * linux-low.h (struct lwp_info): Rewrite comment for the
12741 `suspended' flag. Add the `stop_pc' field. Delete the
12742 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12743 Add `'last_resume_kind' and `need_step_over' fields.
12744 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12745 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12746 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12747 (set_raw_breakpoint_at): New.
12748 (set_breakpoint_at): Rewrite to use it.
12749 (reinsert_breakpoint_handler): Delete.
12750 (set_reinsert_breakpoint): New.
12751 (reinsert_breakpoint_by_bp): Delete.
12752 (delete_reinsert_breakpoints): New.
12753 (uninsert_breakpoint): Rewrite.
12754 (uninsert_breakpoints_at): New.
12755 (reinsert_breakpoint): Rewrite.
12756 (reinsert_breakpoints_at): New.
12757 (check_breakpoints): Rewrite.
12758 (breakpoint_here): New.
12759 (breakpoint_inserted_here): New.
12760 (check_mem_read): Adjust.
12761 * mem-break.h (breakpoints_supported, breakpoint_here)
12762 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12763 (reinsert_breakpoint_by_bp): Delete declaration.
12764 (delete_reinsert_breakpoints): Declare.
12765 (reinsert_breakpoint): Delete declaration.
12766 (reinsert_breakpoints_at): Declare.
12767 (uninsert_breakpoint): Delete declaration.
12768 (uninsert_breakpoints_at): Declare.
12769 (check_breakpoints): Adjust prototype.
12770 * server.h: Adjust include order.
12771 (struct thread_info): Declare here. Add a `last_status' field.
12772
12773 2010-03-23 Michael Snyder <msnyder@vmware.com>
12774
12775 * server.c (crc32): New function.
12776 (handle_query): Add handling for 'qCRC:' request.
12777
12778 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12779
12780 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12781 lwp had been stopped by a watchpoint.
12782
12783 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12784
12785 * server.h (internal_error): Declare.
12786 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12787 * utils.c (internal_error): New function.
12788
12789 2010-03-15 Andreas Schwab <schwab@redhat.com>
12790
12791 * configure.srv: Fix typo setting srv_regobj.
12792
12793 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12794
12795 * linux-low.c (fetch_register): Avoid passing a non string literal
12796 format to `error'.
12797 (usr_store_inferior_registers): Ditto.
12798
12799 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12800
12801 * linux-low.c (linux_write_memory): Bail out early if peeking
12802 memory failed.
12803
12804 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12805
12806 * linux-low.h (struct lwp_info): New fields
12807 `stopped_by_watchpoint' and `stopped_data_address'.
12808 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12809 here, and cache them in the lwp object.
12810 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12811 directly.
12812 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12813 field.
12814 (linux_stopped_by_watchpoint): Rewrite.
12815 (linux_stopped_data_address): Rewrite.
12816
12817 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12818
12819 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12820 switching the current inferior, not before.
12821
12822 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12823
12824 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12825 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12826 i386-linux.c and amd64-linux.c.
12827 (reg-i386.o): Removed.
12828 (reg-i386.c): Likewise.
12829 (reg-i386-linux.o): Likewise.
12830 (reg-i386-linux.c): Likewise.
12831 (reg-x86-64.o): Likewise.
12832 (reg-x86-64.c): Likewise.
12833 (reg-x86-64-linux.o): Likewise.
12834 (reg-x86-64-linux.c): Likewise.
12835 (i386.o): New.
12836 (i386.c): Likewise.
12837 (i386-linux.o): Likewise.
12838 (i386-linux.c): Likewise.
12839 (amd64.o): Likewise.
12840 (amd64.c): Likewise.
12841 (amd64-linux.o): Likewise.
12842 (amd64-linux.c): Likewise.
12843
12844 * configure.srv (srv_i386_regobj): New.
12845 (srv_i386_linux_regobj): Likewise.
12846 (srv_amd64_regobj): Likewise.
12847 (srv_amd64_linux_regobj): Likewise.
12848 (srv_i386_32bit_xmlfiles): Likewise.
12849 (srv_i386_64bit_xmlfiles): Likewise.
12850 (srv_i386_xmlfiles): Likewise.
12851 (srv_amd64_xmlfiles): Likewise.
12852 (srv_i386_linux_xmlfiles): Likewise.
12853 (srv_amd64_linux_xmlfiles): Likewise.
12854 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12855 srv_xmlfiles to $srv_i386_xmlfiles.
12856 (i[34567]86-*-mingw32ce*): Likewise.
12857 (i[34567]86-*-mingw*): Likewise.
12858 (i[34567]86-*-nto*): Likewise.
12859 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12860 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12861 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12862 (x86_64-*-linux*): Likewise.
12863
12864 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12865 (init_registers_amd64_linux): New.
12866 (x86_arch_setup): Replace init_registers_x86_64_linux with
12867 init_registers_amd64_linux.
12868
12869 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12870
12871 * configure.ac: Check for libdl. If it is not available link against
12872 static libthread_db.
12873 * configure: Regenerate.
12874
12875 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12876
12877 PR9605
12878
12879 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12880 handing a read watchpoint.
12881 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12882
12883 2010-02-12 Doug Evans <dje@google.com>
12884
12885 * linux-low.c (linux_supports_tracefork_flag): Document.
12886 (linux_look_up_symbols): Add comment.
12887
12888 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12889
12890 * regcache.c (supply_register): Clear regcache if buf is NULL.
12891
12892 2010-02-02 Nicolas Roche <roche@sourceware.org>
12893 Joel Brobecker <brobecker@adacore.com>
12894
12895 * inferiors.c (find_inferior): Add function documentation.
12896 (unloaded_dll): Handle the case where the unloaded dll has not
12897 been previously registered in the dll list.
12898
12899 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12900
12901 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12902 (thumb2_breakpoint): New.
12903 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12904
12905 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12906
12907 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12908 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12909 breakpoints.
12910
12911 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12912
12913 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12914
12915 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12916
12917 * linux-s390-low.c (s390_collect_ptrace_register)
12918 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12919
12920 2010-01-21 Doug Evans <dje@google.com>
12921
12922 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12923 (PTRACE_ARG4_TYPE): New macro.
12924 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12925 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12926 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12927 (usr_store_inferior_registers): Ditto.
12928 (linux_read_memory, linux_write_memory): Ditto.
12929 (linux_test_for_tracefork): Ditto.
12930
12931 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12932 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12933
12934 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12935
12936 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12937 target.
12938
12939 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12940
12941 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12942 prototype to take a regcache. Adjust.
12943
12944 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12945
12946 * regcache.h (struct thread_info): Forward declare.
12947 (struct regcache): New.
12948 (new_register_cache): Adjust prototype.
12949 (get_thread_regcache): Declare.
12950 (free_register_cache): Adjust prototype.
12951 (registers_to_string, registers_from_string): Ditto.
12952 (supply_register, supply_register_by_name, collect_register)
12953 (collect_register_as_string, collect_register_by_name): Ditto.
12954 * regcache.c (struct inferior_regcache_data): Delete.
12955 (get_regcache): Rename to ...
12956 (get_thread_regcache): ... this. Adjust. Switch inferior before
12957 fetching registers.
12958 (regcache_invalidate_one): Adjust.
12959 (regcache_invalidate): Fix prototype.
12960 (new_register_cache): Return the new register cache.
12961 (free_register_cache): Change prototype.
12962 (realloc_register_cache): Adjust.
12963 (registers_to_string): Change prototype to take a regcache. Adjust.
12964 (registers_from_string): Ditto.
12965 (register_data): Ditto.
12966 (supply_register): Ditto.
12967 (supply_register_by_name): Ditto.
12968 (collect_register): Ditto.
12969 (collect_register_as_string): Ditto.
12970 (collect_register_by_name): Ditto.
12971 * server.c (process_serial_event): Adjust.
12972 * linux-low.h (regset_fill_func, regset_store_func): Change
12973 prototype.
12974 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12975 Change prototype.
12976 * linux-low.c (get_stop_pc): Adjust.
12977 (check_removed_breakpoint): Adjust.
12978 (linux_wait_for_event): Adjust.
12979 (linux_resume_one_lwp): Adjust.
12980 (fetch_register): Add regcache parameter. Adjust.
12981 (usr_store_inferior_registers): Ditto.
12982 (regsets_fetch_inferior_registers): Ditto.
12983 (regsets_store_inferior_registers): Ditto.
12984 (linux_fetch_registers, linux_store_registers): Ditto.
12985 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12986 regcache. Adjust.
12987 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12988 Ditto.
12989 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12990 prototype to take a regcache.
12991 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12992 * remote-utils.c (convert_ascii_to_int, outreg)
12993 (prepare_resume_reply): Change prototype to take a regcache.
12994 Adjust.
12995 * target.h (struct target_ops) <fetch_registers, store_registers>:
12996 Change prototype to take a regcache.
12997 (fetch_inferior_registers, store_inferior_registers): Change
12998 prototype to take a regcache. Adjust.
12999 * proc-service.c (ps_lgetregs): Adjust.
13000 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13001 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13002 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13003 take a regcache. Adjust.
13004 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13005 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13006 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13007 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13008 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13009 (cris_cannot_fetch_register):
13010 (cris_breakpoint_at): Change prototype to take a regcache.
13011 Adjust.
13012 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13013 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13014 to take a regcache. Adjust.
13015 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13016 Adjust.
13017 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13018 take a regcache. Adjust.
13019 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13020 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13021 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13022 * linux-mips-low.c (mips_get_pc):
13023 (mips_set_pc): Change prototype to take a regcache. Adjust.
13024 (mips_reinsert_addr): Adjust.
13025 (mips_collect_register): Change prototype to take a regcache.
13026 Adjust.
13027 (mips_supply_register):
13028 (mips_collect_register_32bit, mips_supply_register_32bit)
13029 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13030 (mips_store_fpregset): Ditto.
13031 * linux-ppc-low.c (ppc_supply_ptrace_register)
13032 (ppc_supply_ptrace_register): Ditto.
13033 (parse_spufs_run): Adjust.
13034 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13035 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13036 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13037 take a regcache. Adjust.
13038 * linux-s390-low.c (s390_collect_ptrace_register)
13039 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13040 (s390_set_pc): Change prototype to take a regcache. Adjust.
13041 (s390_arch_setup): Adjust.
13042 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13043 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13044 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13045 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13046 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13047 regcache. Adjust.
13048 (sparc_breakpoint_at): Adjust.
13049 * linux-xtensa-low.c (xtensa_fill_gregset):
13050 (xtensa_store_gregset):
13051 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13052 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13053 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13054 prototype to take a regcache. Adjust.
13055 * win32-arm-low.c (arm_fetch_inferior_register)
13056 (arm_store_inferior_register): Change prototype to take a
13057 regcache. Adjust.
13058 * win32-i386-low.c (i386_fetch_inferior_register)
13059 (i386_store_inferior_register): Change prototype to take a
13060 regcache. Adjust.
13061 * win32-low.c (child_fetch_inferior_registers)
13062 (child_store_inferior_registers): Change prototype to take a
13063 regcache. Adjust.
13064 (win32_wait): Adjust.
13065 (win32_fetch_inferior_registers): Change prototype to take a
13066 regcache. Adjust.
13067 (win32_store_inferior_registers): Adjust.
13068 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13069 store_inferior_register>: Change prototype to take a regcache.
13070
13071 2010-01-20 Doug Evans <dje@google.com>
13072
13073 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13074 #ifdef.
13075 (linux_wait_for_event1, linux_init_signals): Ditto.
13076 (W_STOPCODE): Provide definition if missing.
13077
13078 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13079
13080 * linux-low.c (linux_core_of_thread): New.
13081 (compare_ints, show_process, list_threads): New.
13082 (linux_qxfer_osdata): Report threads and cores.
13083 (linux_target_op): Register linux_core_of_thread.
13084 * remote-utils.c (prepare_resume_reply): Report the core.
13085 (buffer_xml_printf): Support %d specifier.
13086 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13087 New.
13088 (handle_query): Handle qXfer:threads. Announce availability
13089 thereof.
13090 * target.h (struct target_ops): New field core_of_thread.
13091
13092 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13093
13094 * Makefile.in (clean): Remove new generated files.
13095 (reg-s390.o, reg-s390.c): Remove rules.
13096 (reg-s390x.o, reg-s390x.c): Likewise.
13097 (s390-linux32.o, s390-linux32.c): Add rules.
13098 (s390-linux64.o, s390-linux64.c): Likewise.
13099 (s390x-linux64.o, s390x-linux64.c): Likewise.
13100 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13101 * linux-s390-low.c: Include <elf.h>.
13102 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13103 (init_registers_s390): Remove prototype.
13104 (init_registers_s390x): Likewise.
13105 (init_registers_s390_linux32): Add prototype.
13106 (init_registers_s390_linux64): Likewise.
13107 (init_registers_s390x_linux64): Likewise.
13108 (s390_num_regs_3264): New define.
13109 (s390_regmap_3264): New global variable.
13110 (s390_cannot_fetch_register): Remove obsolete check.
13111 (s390_cannot_store_register): Likewise.
13112 (s390_collect_ptrace_register): Handle upper/lower register halves.
13113 (s390_supply_ptrace_register): Likewise.
13114 (s390_fill_gregset): Update to register number changes.
13115 (s390_get_hwcap): New routine.
13116 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13117 Install appropriate regmap and register set.
13118
13119 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13120
13121 * server.c (gdbserver_version): Update copyright year to 2010.
13122 * gdbreplay.c (gdbreplay_version): Likewise.
13123
13124 2009-12-28 Doug Evans <dje@google.com>
13125
13126 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13127 elf/external.h. Include <elf.h> instead but only if necessary.
13128
13129 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13130
13131 * linux-low.c (linux_remove_process): Remove `detaching'
13132 parameter. Don't release/detach from thread_db here.
13133 (linux_kill): Release/detach from thread_db here, ...
13134 (linux_detach): ... and here, before actually detaching.
13135 (linux_wait_1): ... and here, when a process exits.
13136 * thread-db.c (any_thread_of): New.
13137 (thread_db_free): Switch the current inferior to a thread of the
13138 passed in process.
13139
13140 2009-12-21 Doug Evans <dje@google.com>
13141
13142 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13143
13144 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13145 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13146 warning ifndef __NR_tkill. Move setting of errno there too.
13147 Delete unnecessary resetting of errno after syscall.
13148 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13149
13150 * configure.ac: Check for dladdr.
13151 * config.in: Regenerate.
13152 * configure: Regenerate.
13153 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13154 (try_thread_db_load): Update.
13155
13156 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13157
13158 2009-12-18 Doug Evans <dje@google.com>
13159
13160 * event-loop.c: Include unistd.h if it exists.
13161
13162 * linux-low.c (my_waitpid): Move definition away from being in
13163 between linux_tracefork_child/linux_test_for_tracefork.
13164
13165 * gdb_proc_service.h (psaddr_t): Fix type.
13166 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13167 signature to match glibc.
13168
13169 2009-12-16 Doug Evans <dje@google.com>
13170
13171 * linux-low.c (linux_read_memory): Fix argument to read.
13172
13173 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13174
13175 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13176 events, don't leave current_inferior pointing at null.
13177
13178 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13179
13180 * win32-low.c (LOG): Delete.
13181 (OUTMSG): Output to stderr.
13182 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13183 on compile time LOG macro.
13184 (win32_wait): Fix debug output.
13185
13186 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13187
13188 * win32-low.c (win32_add_one_solib): If the dll name is
13189 "ntdll.dll", prepend the system directory to the dll path.
13190
13191 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13192
13193 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13194
13195 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13196 Vladimir Prus <vladimir@codesourcery.com>
13197
13198 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13199 * configure.ac: Check for __mcoldfire__ and set
13200 gdb_cv_m68k_is_coldfire.
13201 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13202 reg-cf.o and reg-m68k.o.
13203 * configure: Regenerated.
13204
13205 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13206
13207 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13208 Pass it to thread_db_free.
13209 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13210 proper `detaching' argument to linux_remove_process.
13211 * linux-low.h (thread_db_free): Add `detaching' parameter.
13212 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13213 to thread_db_free.
13214 (thread_db_free): Add `detaching' parameter. Only
13215 call td_ta_clear_event if detaching from process.
13216
13217 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13218
13219 * thread-db.c (thread_db_free): Fix typo.
13220
13221 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13222
13223 PR gdb/10838
13224 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13225
13226 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13227
13228 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13229 with an i686 compiler.
13230 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13231 needed.
13232 * configure: Rebuilt.
13233
13234 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13235
13236 PR gdb/10783
13237
13238 * server.c (handle_search_memory_1): Correct read_addr initialization
13239 in loop for searching subsequent chunks.
13240
13241 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13242
13243 * configure.ac: New --with-libthread-db option.
13244 * thread-db.c: Allow direct dependence on libthread_db.
13245 (thread_db_free): Adjust.
13246 * config.in: Regenerate.
13247 * configure: Likewise.
13248
13249 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13250
13251 PR gdb/10757
13252 * thread-db.c (attach_thread): New function.
13253 (maybe_attach_thread): Return success/failure.
13254 (find_new_threads_callback): Adjust.
13255 (thread_db_find_new_threads): Loop until no new threads.
13256
13257 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13258
13259 * proc-service.c (ps_lgetregs): Formatting.
13260
13261 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13262
13263 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13264 * configure.ac: Adjust.
13265 * linux-low.h (struct process_info_private): Move members to struct
13266 thread_db.
13267 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13268 * linux-low.c (linux_remove_process): Adjust.
13269 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13270 * server.c (handle_query): Move code ...
13271 (handle_monitor_command): ... here. New function.
13272 * target.h (struct target_ops): New member.
13273 * thread-db.c (struct thread_db): New.
13274 (libthread_db_search_path): New variable.
13275 (thread_db_create_event, thread_db_enable_reporting)
13276 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13277 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13278 (try_thread_db_load_1, dladdr_to_soname): New functions.
13279 (try_thread_db_load, thread_db_load_search): New functions.
13280 (thread_db_init): Search for libthread_db.
13281 (thread_db_free): New function.
13282 (thread_db_handle_monitor_command): Likewise.
13283 * config.in: Regenerate.
13284 * configure: Regenerate.
13285
13286 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13287
13288 * spu-low.c (spu_kill): Wait for inferior to terminate.
13289 Call clear_inferiors.
13290 (spu_detach): Call clear_inferiors.
13291
13292 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13293
13294 * aclocal.m4: Regenerate.
13295 * config.in: Likewise.
13296 * configure: Likewise.
13297
13298 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13299
13300 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13301 (parse_spufs_run): New function.
13302 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13303 (ppc_breakpoint_at): Handle SPU breakpoints.
13304
13305 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13306
13307 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13308 (SPUFS_MAGIC): Define.
13309 (spu_enumerate_spu_ids): New function.
13310 (linux_qxfer_spu): New function.
13311 (linux_target_ops): Install linux_qxfer_spu.
13312
13313 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13314
13315 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13316 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13317 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13318 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13319 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13320 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13321 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13322 (init_registers_powerpc_cell32l): Add prototype.
13323 (init_registers_powerpc_cell64l): Likewise.
13324 (ppc_arch_setup): Detect Cell/B.E. architecture.
13325
13326 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13327
13328 * Makefile.in (datarootdir): New variable.
13329
13330 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13331
13332 * linux-low.c (linux_write_memory): Update debugging output.
13333 * Makefile.in (clean): Add new descriptions.
13334 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13335 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13336 * configure.srv: Add new files for arm*-*-linux*.
13337 * linux-arm-low.c: Add new declarations.
13338 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13339 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13340 (HWCAP_VFPv3D16): New.
13341 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13342 instead of __IWMMXT__.
13343 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13344 (arm_arch_setup): New.
13345 (target_regsets): Remove #ifdef. Add VFP regset.
13346 (the_low_target): Use arm_arch_setup.
13347
13348 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13349
13350 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13351 the main thread again.
13352
13353 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13354
13355 Adding Neutrino gdbserver.
13356 * configure: Regenerated.
13357 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13358 * configure.srv (i[34567]86-*-nto*): New target.
13359 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13360 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13361 (nto_comctrl) [__QNX__]: New function.
13362 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13363
13364 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13365
13366 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13367 srv_tgtobj.
13368
13369 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13370 Pedro Alves <pedro@codesourcery.com>
13371
13372 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13373 don't support CONTEXT_EXTENDED_REGISTERS.
13374 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13375 (the_low_target): Install them.
13376 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13377 failing with ERROR_PIPE_NOT_CONNECTED.
13378
13379 2009-06-30 Doug Evans <dje@google.com>
13380 Pierre Muller <muller@ics.u-strasbg.fr>
13381
13382 Add h/w watchpoint support to x86-linux, win32-i386.
13383 * Makefile.in (SFILES): Add i386-low.c
13384 (i386_low_h): Define.
13385 (i386-low.o): Add dependencies.
13386 (linux-x86-low.o): Add i386-low.h dependency.
13387 (win32-i386-low.o): Ditto.
13388 * i386-low.c: New file.
13389 * i386-low.h: New file.
13390 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13391 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13392 * linux-low.c (linux_add_process): Initialize arch_private.
13393 (linux_remove_process): Free arch_private.
13394 (add_lwp): Initialize arch_private.
13395 (delete_lwp): Free arch_private.
13396 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13397 provided.
13398 * linux-low.h (process_info_private): New member arch_private.
13399 (lwp_info): New member arch_private.
13400 (linux_target_ops): New members new_process, new_thread,
13401 prepare_to_resume.
13402 (ptid_of): New macro.
13403 * linux-x86-low.c: Include stddef.h, i386-low.h.
13404 (arch_process_info): New struct.
13405 (arch_lwp_info): New struct.
13406 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13407 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13408 (i386_dr_low_get_status): New function.
13409 (x86_insert_point, x86_remove_point): New functions.
13410 (x86_stopped_by_watchpoint): New function.
13411 (x86_stopped_data_address): New function.
13412 (x86_linux_new_process, x86_linux_new_thread): New functions.
13413 (x86_linux_prepare_to_resume): New function.
13414 (the_low_target): Add entries for insert_point, remove_point,
13415 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13416 prepare_to_resume.
13417 * server.c (debug_hw_points): New global.
13418 (monitor_show_help): Document set debug-hw-points.
13419 (handle_query): Process "set debug-hw-points".
13420 * server.h (debug_hw_points): Declare.
13421 (paddress): Declare.
13422 * utils.c (NUMCELLS, CELLSIZE): New macros.
13423 (get_sell, xsnprintf, paddress): New functions.
13424 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13425 remove_point, stopped_by_watchpoint, stopped_data_address.
13426 * win32-i386-low.c: Include i386-low.h.
13427 (debug_reg_state): Replaces dr.
13428 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13429 (i386_dr_low_get_status): New function.
13430 (i386_insert_point, i386_remove_point): New functions.
13431 (i386_stopped_by_watchpoint): New function.
13432 (i386_stopped_data_address): New function.
13433 (i386_initial_stuff): Update.
13434 (get_thread_context,set_thread_context,i386_thread_added): Update.
13435 (the_low_target): Add entries for insert_point,
13436 remove_point, stopped_by_watchpoint, stopped_data_address.
13437 * win32-low.c (win32_insert_watchpoint): New function.
13438 (win32_remove_watchpoint): New function.
13439 (win32_stopped_by_watchpoint): New function.
13440 (win32_stopped_data_address): New function.
13441 (win32_target_ops): Add entries for insert_watchpoint,
13442 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13443 * win32-low.h (win32_target_ops): New members insert_point,
13444 remove_point, stopped_by_watchpoint, stopped_data_address.
13445
13446 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13447
13448 * server.c (process_serial_event): Re-return unsupported, not
13449 error, if the type isn't recognized. Re-allow supporting only
13450 insert or remove packets. Also call require_running for
13451 breakpoints. Add missing break statement to default case. Tidy.
13452 * target.h (struct target_ops): Rename insert_watchpoint to
13453 insert_point, and remove_watchpoint to remove_point.
13454
13455 * linux-low.h (struct linux_target_ops): Likewise.
13456 * linux-low.c (linux_insert_watchpoint): Rename to ...
13457 (linux_insert_point): ... this. Adjust.
13458 (linux_remove_watchpoint): Rename to ...
13459 (linux_remove_point): ... this. Adjust.
13460 (linux_target_ops): Adjust.
13461 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13462 (cris_insert_point): ... this.
13463 (cris_remove_watchpoint): Rename to ...
13464 (cris_remove_point): ... this.
13465 (the_low_target): Adjust.
13466
13467 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13468
13469 * server.c (handle_v_kill): Pass signal_pid to
13470 kill_inferior if multi_process is zero.
13471
13472 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13473
13474 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13475 * target.h (target_ops): Comment for *_watchpoint to make it clear
13476 the functions can get types '0' and '1'.
13477
13478 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13479
13480 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13481 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13482 * regcache.c (get_regcache): Likewise.
13483 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13484 * win32-low.c (child_fetch_inferior_registers): Remove check for
13485 regno 0.
13486
13487 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13488 Pedro Alves <pedro@codesourcery.com>
13489
13490 * target.h (struct target_ops) <supports_multi_process>: New
13491 callback.
13492 (target_supports_multi_process): New.
13493 * server.c (handle_query): Even if GDB reports support, only
13494 enable multi-process if the target also supports it. Report
13495 multi-process support only if the target backend supports it.
13496 * linux-low.c (linux_supports_multi_process): New function.
13497 (linux_target_ops): Install it as target_supports_multi_process
13498 callback.
13499
13500 2009-05-24 Doug Evans <dje@google.com>
13501
13502 Global renaming of find_thread_pid to find_thread_ptid.
13503 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13504 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13505 All callers updated.
13506
13507 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13508 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13509 directly.
13510
13511 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13512 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13513 (linux_resume_one_lwp): Ditto.
13514
13515 2009-05-23 Doug Evans <dje@google.com>
13516
13517 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13518 from struct inferior_list_entry * to struct lwp_info *.
13519 All callers updated.
13520
13521 2009-05-13 Doug Evans <dje@google.com>
13522
13523 * linux-x86-low.c: Don't include assert.h.
13524 (x86_siginfo_fixup): Use fatal, not assert.
13525 (x86_arch_setup): Fix comment.
13526
13527 2009-05-12 Doug Evans <dje@google.com>
13528
13529 Biarch support for i386/amd64 gdbserver.
13530 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13531 Add linux-x86-low.c.
13532 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13533 (linux-x86-low.o): Add.
13534 * linux-x86-64-low.c: Delete.
13535 * linux-i386-low.c: Delete.
13536 * linux-x86-low.c: New file.
13537 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13538 linux-x86-low.o.
13539 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13540 linux-x86-low.o.
13541 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13542 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13543 (linux_child_pid_to_exec_file): New function.
13544 (elf_64_header_p, elf_64_file_p): New functions.
13545 (siginfo_fixup): New function.
13546 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13547 give target a chance to convert layout.
13548 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13549 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13550
13551 2009-05-07 Doug Evans <dje@google.com>
13552
13553 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13554 (regsets_store_inferior_registers): Ditto.
13555
13556 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13557
13558 PR server/10048
13559
13560 * linux-low.c (must_set_ptrace_flags): Delete.
13561 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13562 of the global.
13563 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13564 `lwp->must_set_ptrace_flags' instead.
13565 (linux_wait_for_event_1): Set ptrace options here.
13566 (linux_wait_1): ... not here.
13567
13568 2009-04-30 Doug Evans <dje@google.com>
13569
13570 * inferiors.c (started_inferior_callback): New function.
13571 (attached_inferior_callback): New function.
13572 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13573 * server.c (print_started_pid, print_attached_pid): New functions.
13574 (detach_or_kill_for_exit): New function.
13575 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13576 * server.h (have_started_inferiors_p): Declare.
13577 (have_attached_inferiors_p): Declare.
13578
13579 * inferiors.c (remove_process): Fix memory leak, free process.
13580 * linux-low.c (linux_remove_process): New function.
13581 (linux_kill): Call it instead of remove_process.
13582 (linux_detach, linux_wait_1): Ditto.
13583
13584 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13585
13586 * configure.srv: Add x86 Windows CE target.
13587
13588 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13589
13590 * inferiors.c (get_thread_process): Make global.
13591 * server.h (get_thread_process): Add prototype.
13592 * thread-db.c (find_one_thread): Use get_thread_process
13593 instead of current_process.
13594 (thread_db_get_tls_address): Do not crash if called when
13595 thread layer is not yet initialized.
13596
13597 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13598
13599 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13600 * spu-low.c (current_tid): Rename to ...
13601 (current_ptid): ... this.
13602 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13603 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13604 ptid_get_lwp (current_ptid) instead of current_tid.
13605 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13606 instead of current_tid. Use find_process_pid to verify pid
13607 argument is valid. Pass proper argument to remove_process.
13608 (spu_thread_alive): Compare current_ptid instead of current_tid.
13609 (spu_resume): Likewise.
13610
13611 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13612
13613 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13614 variable.
13615
13616 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13617
13618 Implement the multiprocess extensions, and add linux multiprocess
13619 support.
13620
13621 * server.h (ULONGEST): Declare.
13622 (struct ptid, ptid_t): New.
13623 (minus_one_ptid, null_ptid): Declare.
13624 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13625 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13626 (struct inferior_list_entry): Change `id' type from unsigned from
13627 to ptid_t.
13628 (struct sym_cache, struct breakpoint, struct
13629 process_info_private): Forward declare.
13630 (struct process_info): Declare.
13631 (current_process): Declare.
13632 (all_processes): Declare.
13633 (initialize_inferiors): Declare.
13634 (add_thread): Adjust to use ptid_t.
13635 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13636 (add_process, remove_process, find_thread_pid): Declare.
13637 (find_inferior_id): Adjust to use ptid_t.
13638 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13639 (multi_process): Declare.
13640 (push_event): Adjust to use ptid_t.
13641 (read_ptid, write_ptid): Declare.
13642 (prepare_resume_reply): Adjust to use ptid_t.
13643 (clear_symbol_cache): Declare.
13644 * inferiors.c (all_processes): New.
13645 (null_ptid, minus_one_ptid): New.
13646 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13647 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13648 (add_thread): Change unsigned long to ptid. Remove gdb_id
13649 parameter. Adjust.
13650 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13651 (gdb_id_to_thread): Rename to ...
13652 (find_thread_pid): ... this. Change unsigned long to ptid.
13653 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13654 (loaded_dll, pull_pid_from_list): Adjust.
13655 (add_process, remove_process, find_process_pid)
13656 (get_thread_process, current_process, initialize_inferiors): New.
13657 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13658 (struct target_waitstatus) <related_pid>: Ditto.
13659 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13660 return type to int.
13661 (struct target_ops) <join>: Add `pid' argument.
13662 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13663 (struct target_ops) <wait>: Add `ptid' field. Change return type
13664 to ptid.
13665 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13666 (mywait): Add `ptid' argument. Change return type to ptid_t.
13667 (target_pid_to_str): Declare.
13668 * target.c (set_desired_inferior): Adjust to use ptids.
13669 (mywait): Add new `ptid' argument. Adjust.
13670 (target_pid_to_str): New.
13671 * mem-break.h (free_all_breakpoints): Declare.
13672 * mem-break.c (breakpoints): Delelete.
13673 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13674 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13675 to use per-process breakpoint list.
13676 (free_all_breakpoints): New.
13677 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13678 (symbol_cache, all_symbols_looked_up): Delete.
13679 (hexchars): New.
13680 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13681 read_ptid): New.
13682 (prepare_resume_reply): Change ptid argument's type from unsigned
13683 long to ptid_t. Adjust. Implement W;process and X;process.
13684 (free_sym_cache, clear_symbol_cache): New.
13685 (look_up_one_symbol): Adjust to per-process symbol cache. *
13686 * server.c (cont_thread, general_thread, step_thread): Change type
13687 to ptid_t.
13688 (attached): Delete.
13689 (multi_process): New.
13690 (last_ptid): Change type to ptid_t.
13691 (struct vstop_notif) <ptid>: Change type to ptid_t.
13692 (queue_stop_reply, push_event): Change `ptid' argument's type to
13693 ptid_t.
13694 (discard_queued_stop_replies): Add `pid' argument.
13695 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13696 changes. Don't reference the `attached' global.
13697 (attach_inferior): Adjust to mywait interface changes.
13698 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13699 features. Handle and report "multiprocess+". Handle
13700 "qAttached:PID".
13701 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13702 changes.
13703 (handle_v_kill): New.
13704 (handle_v_stopped): Adjust to use target_pid_to_str.
13705 (handle_v_requests): Allow multiple attaches and runs when
13706 multiprocess extensions are in effect. Handle "vKill".
13707 (myresume): Adjust to use ptids.
13708 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13709 (handle_status): Adjust to discard_queued_stop_replies interface
13710 change.
13711 (first_thread_of, kill_inferior_callback)
13712 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13713 (main): Call initialize_inferiors. Adjust to use ptids, killing
13714 and detaching from all inferiors. Handle multiprocess packet
13715 variants.
13716 * linux-low.h: Include gdb_proc_service.h.
13717 (struct process_info_private): New.
13718 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13719 <lwpid_of>: Use ptid_get_lwp.
13720 (get_lwp_thread): Adjust.
13721 (struct lwp_info): Add `dead' member.
13722 (find_lwp_pid): Declare.
13723 * linux-low.c (thread_db_active): Delete.
13724 (new_inferior): Adjust comment.
13725 (inferior_pid): Delete.
13726 (linux_add_process): New.
13727 (handle_extended_wait): Adjust.
13728 (add_lwp): Change unsigned long to ptid.
13729 (linux_create_inferior): Add process to processes table. Adjust
13730 to use ptids. Don't set new_inferior here.
13731 (linux_attach_lwp): Rename to ...
13732 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13733 it. Adjust to use ptids.
13734 (linux_attach_lwp): New.
13735 (linux_attach): Add process to processes table. Don't set
13736 new_inferior here.
13737 (struct counter): New.
13738 (second_thread_of_pid_p, last_thread_of_process_p): New.
13739 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13740 multiple processes.
13741 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13742 processes. Remove process from process table.
13743 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13744 to multiple processes.
13745 (any_thread_of): New.
13746 (linux_detach): Add `pid' argument, and handle it. Remove process
13747 from processes table.
13748 (linux_join): Add `pid' argument. Handle it.
13749 (linux_thread_alive): Change unsighed long argument to ptid_t.
13750 Consider dead lwps as not being alive.
13751 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13752 threads we're not interested in.
13753 (same_lwp, find_lwp_pid): New.
13754 (linux_wait_for_lwp): Change `pid' argument's type from int to
13755 ptid_t. Adjust.
13756 (linux_wait_for_event): Rename to ...
13757 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13758 from int to ptid_t. Adjust.
13759 (linux_wait_for_event): New.
13760 (linux_wait_1): Add `ptid' argument. Change return type to
13761 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13762 that exit from the process table.
13763 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13764 Adjust.
13765 (mark_lwp_dead): New.
13766 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13767 stopping all threads, mark its main lwp as dead.
13768 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13769 ptids.
13770 (fetch_register, usr_store_inferior_registers)
13771 (regsets_fetch_inferior_registers)
13772 (regsets_store_inferior_registers, linux_read_memory)
13773 (linux_write_memory): Inline `inferior_pid'.
13774 (linux_look_up_symbols): Adjust to use per-process
13775 `thread_db_active'.
13776 (linux_request_interrupt): Adjust to use ptids.
13777 (linux_read_auxv): Inline `inferior_pid'.
13778 (initialize_low): Don't reference thread_db_active.
13779 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13780 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13781 (ps_getpid): Return the pid of the current inferior.
13782 * thread-db.c (proc_handle, thread_agent): Delete.
13783 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13784 per-process data.
13785 (find_one_thread): Change argument type to ptid_t. Adjust to
13786 per-process data.
13787 (maybe_attach_thread): Adjust to per-process data and ptids.
13788 (thread_db_find_new_threads): Ditto.
13789 (thread_db_init): Ditto.
13790 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13791 processes table. Adjust to use ptids.
13792 (spu_kill, spu_detach): Adjust interface. Remove process from
13793 processes table.
13794 (spu_join, spu_thread_alive): Adjust interface.
13795 (spu_wait): Adjust interface. Remove process from processes
13796 table. Adjust to use ptids.
13797 * win32-low.c (current_inferior_tid): Delete.
13798 (current_inferior_ptid): New.
13799 (debug_event_ptid): New.
13800 (thread_rec): Take a ptid. Adjust.
13801 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13802 (child_delete_thread): Ditto.
13803 (do_initial_child_stuff): Add `attached' argument. Add process to
13804 processes table.
13805 (child_fetch_inferior_registers, child_store_inferior_registers):
13806 Adjust.
13807 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13808 (win32_attach): Pass 1 to do_initial_child_stuff.
13809 (win32_kill): Adjust interface. Remove process from processes
13810 table.
13811 (win32_detach): Ditto.
13812 (win32_join): Adjust interface.
13813 (win32_thread_alive): Take a ptid.
13814 (win32_resume): Adjust to use ptids.
13815 (get_child_debug_event): Ditto.
13816 (win32_wait): Adjust interface. Remove exiting process from
13817 processes table.
13818
13819 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13820
13821 Non-stop mode support.
13822
13823 * server.h (non_stop): Declare.
13824 (gdb_client_data, handler_func): Declare.
13825 (delete_file_handler, add_file_handler, start_event_loop):
13826 Declare.
13827 (handle_serial_event, handle_target_event, push_event)
13828 (putpkt_notif): Declare.
13829 * target.h (enum resume_kind): New.
13830 (struct thread_resume): Replace `step' field by `kind' field.
13831 (TARGET_WNOHANG): Define.
13832 (struct target_ops) <wait>: Add `options' argument.
13833 <supports_non_stop, async, start_non_stop>: New fields.
13834 (target_supports_non_stop, target_async): New.
13835 (start_non_stop): Declare.
13836 (mywait): Add `options' argument.
13837 * target.c (mywait): Add `options' argument. Print child exit
13838 notifications here.
13839 (start_non_stop): New.
13840 * server.c (non_stop, own_buf, mem_buf): New globals.
13841 (struct vstop_notif): New.
13842 (notif_queue): New global.
13843 (queue_stop_reply, push_event, discard_queued_stop_replies)
13844 (send_next_stop_reply): New.
13845 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13846 interface changes.
13847 (attach_inferior): In non-stop mode, don't wait for the target
13848 here.
13849 (handle_general_set): Handle QNonStop.
13850 (handle_query): When handling qC, return the current general
13851 thread, instead of the first thread of the list.
13852 (handle_query): If the backend supports non-stop mode, include
13853 QNonStop+ in the qSupported query response.
13854 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13855 and non-stop mode.
13856 (handle_v_attach, handle_v_run): Handle non-stop mode.
13857 (handle_v_stopped): New.
13858 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13859 (myresume): Adjust to use resume_kind. Handle non-stop.
13860 (queue_stop_reply_callback): New.
13861 (handle_status): Handle non-stop mode.
13862 (main): Clear non_stop flag on reconnection. Use the event-loop.
13863 Refactor serial protocol handling from here ...
13864 (process_serial_event): ... to this new function. When GDB
13865 selects any thread, select one here. In non-stop mode, wait until
13866 GDB acks all pending events before exiting.
13867 (handle_serial_event, handle_target_event): New.
13868 * remote-utils.c (remote_open): Install remote_desc in the event
13869 loop.
13870 (remote_close): Remove remote_desc from the event loop.
13871 (putpkt_binary): Rename to...
13872 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13873 (putpkt_binary): New as wrapper around putpkt_binary_1.
13874 (putpkt_notif): New.
13875 (prepare_resume_reply): In non-stop mode, don't change the
13876 general_thread.
13877 * event-loop.c: New.
13878 * Makefile.in (OBJ): Add event-loop.o.
13879 (event-loop.o): New rule.
13880
13881 * linux-low.h (pid_of): Moved here.
13882 (lwpid_of): New.
13883 (get_lwp_thread): Use lwpid_of.
13884 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13885 * linux-low.c (pid_of): Delete.
13886 (inferior_pid): Use lwpid_of.
13887 (linux_event_pipe): New.
13888 (target_is_async_p): New.
13889 (delete_lwp): New.
13890 (handle_extended_wait): Use lwpid_of.
13891 (add_lwp): Don't set lwpid field.
13892 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13893 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13894 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13895 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13896 first. Adjust to linux_wait_for_event interface changes. Use
13897 lwpid_of.
13898 (linux_detach): Don't delete the main lwp here.
13899 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13900 (status_pending_p): Don't consider explicitly suspended lwps.
13901 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13902 pointer. Add OPTIONS argument. Change return type to int. Use
13903 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13904 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13905 pointer. Add status pointer argument. Return a pid instead of a
13906 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13907 changes. In non-stop mode, don't switch to a random thread.
13908 (linux_wait): Rename to...
13909 (linux_wait_1): ... this. Add target_options argument, and handle
13910 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13911 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13912 clean exit and signal exit code. Don't stop all threads in
13913 non-stop mode. In all-stop mode, only stop all threads when
13914 reporting a stop to GDB. Handle explicit thread stop requests.
13915 (async_file_flush, async_file_mark): New.
13916 (linux_wait): New.
13917 (send_sigstop): Use lwpid_of.
13918 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13919 interface changes. In non-stop mode, don't switch to a random
13920 thread.
13921 (linux_resume_one_lwp): Use lwpid_of.
13922 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13923 (linux_resume_one_thread): ... this. Handle resume_stop. In
13924 non-stop mode, don't look for pending flag in all threads.
13925 (resume_status_pending_p): Don't consider explicitly suspended
13926 threads.
13927 (my_waitpid): Reimplement. Emulate __WALL.
13928 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13929 Use lwpid_of.
13930 (sigchld_handler, linux_supports_non_stop, linux_async)
13931 (linux_start_non_stop): New.
13932 (linux_target_ops): Register linux_supports_non_stop, linux_async
13933 and linux_start_non_stop.
13934 (initialize_low): Install SIGCHLD handler.
13935 * thread-db.c (thread_db_create_event, find_one_thread)
13936 (thread_db_get_tls_address): Use lwpid_of.
13937 * win32-low.c (win32_detach): Adjust to use resume_kind.
13938 (win32_wait): Add `options' argument.
13939 * spu-low.c (spu_resume): Adjust to use resume_kind.
13940 (spu_wait): Add `options' argument.
13941
13942 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13943
13944 Decouple target code from remote protocol.
13945
13946 * target.h (enum target_waitkind): New.
13947 (struct target_waitstatus): New.
13948 (struct target_ops) <wait>: Return an unsigned long. Take a
13949 target_waitstatus pointer instead of a char pointer.
13950 (mywait): Likewise.
13951 * target.c (mywait): Change prototype to return an unsigned long.
13952 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13953 * server.h (thread_from_wait, old_thread_from_wait): Delete
13954 declarations.
13955 (prepare_resume_reply): Change prototype to take a
13956 target_waitstatus.
13957 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13958 (last_status, last_ptid): New.
13959 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13960 pid instead of a signal.
13961 (attach_inferior): Remove "status" and "signal" parameters.
13962 Adjust.
13963 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13964 not as an address.
13965 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13966 (handle_v_requests, myresume): Remove "status" and "signal"
13967 parameters. Adjust.
13968 (handle_status): New.
13969 (main): Delete local `status'. Adjust.
13970 * remote-utils.c: Include target.h.
13971 (prepare_resume_reply): Change prototype to take a
13972 target_waitstatus. Adjust.
13973
13974 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13975 interface.
13976 * spu-low.c (spu_wait): Adjust.
13977 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13978 Delete.
13979 (win32_wait): Adjust.
13980
13981 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13982
13983 * target.h (struct thread_resume): Delete leave_stopped member.
13984 (struct target_ops): Add a `n' argument to the `resume' callback.
13985 * server.c (start_inferior): Adjust.
13986 (handle_v_cont, myresume): Adjust.
13987 * linux-low.c (check_removed_breakpoint): Adjust to resume
13988 interface change, and to removed leave_stopped field.
13989 (resume_ptr): Delete.
13990 (struct thread_resume_array): New.
13991 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13992 resume interface change.
13993 (linux_continue_one_thread, linux_queue_one_thread)
13994 (resume_status_pending_p): Check if the resume field is NULL
13995 instead of checking the leave_stopped member.
13996 (linux_resume): Adjust to the target resume interface change.
13997 * spu-low.c (spu_resume): Adjust to the target resume interface
13998 change.
13999 * win32-low.c (win32_detach, win32_resume): Ditto.
14000
14001 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14002
14003 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14004 flag.
14005 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14006 pending.
14007 (linux_continue_one_thread): Only preserve the stepping flag if
14008 there's a pending breakpoint.
14009
14010 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14011
14012 * server.c (main): After the inferior having exited, call
14013 remote_close before exiting gdbserver.
14014
14015 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14016
14017 Fix size of FPSCR in Power 7 processors.
14018 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14019 (PPC_FEATURE_HAS_DFP): New #define.
14020 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14021 size of the FPSCR.
14022
14023 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14024
14025 * server.c (handle_query) Whitespace and formatting.
14026
14027 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14028
14029 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14030 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14031 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14032 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14033 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14034 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14035 Makefile.in, configure.ac: Fix whitespace throughout.
14036 * configure: Regenerate.
14037
14038 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14039
14040 * inferiors.c (find_inferior): Make it safe for the callback
14041 function to delete the currently iterated inferior.
14042
14043 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14044
14045 * Makefile.in (linuw_low_h): Move higher.
14046 (thread-db.o): Depend on $(linux_low_h).
14047
14048 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14049
14050 Rename "process" to "lwp" throughout.
14051
14052 * linux-low.c (all_processes): Rename to...
14053 (all_lwps): ... this.
14054 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14055 (add_process): Rename to ...
14056 (add_lwp): ... this. Adjust.
14057 (linux_create_inferior): Adjust.
14058 (linux_attach_lwp): Adjust.
14059 (linux_attach): Adjust.
14060 (linux_kill_one_process): Rename to ...
14061 (linux_kill_one_lwp): ... this. Adjust.
14062 (linux_kill): Adjust.
14063 (linux_detach_one_process): Rename to ...
14064 (linux_detach_one_lwp): ... this. Adjust.
14065 (linux_detach): Adjust.
14066 (check_removed_breakpoint): Adjust.
14067 (status_pending_p): Adjust.
14068 (linux_wait_for_process): Rename to ...
14069 (linux_wait_for_lwp): ... this. Adjust.
14070 (linux_wait_for_event): Adjust.
14071 (send_sigstop): Adjust.
14072 (wait_for_sigstop): Adjust.
14073 (stop_all_processes): Rename to ...
14074 (stop_all_lwps): ... this.
14075 (linux_resume_one_process): Rename to ...
14076 (linux_resume_one_lwp): ... this. Adjust.
14077 (linux_set_resume_request, linux_continue_one_thread)
14078 (linux_queue_one_thread, resume_status_pending_p)
14079 (usr_store_inferior_registers, regsets_store_inferior_registers)
14080 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14081 Adjust.
14082 * linux-low.h (get_process): Rename to ...
14083 (get_lwp): ... this. Adjust.
14084 (get_thread_process): Rename to ...
14085 (get_thread_lwp): ... this. Adjust.
14086 (get_process_thread): Rename to ...
14087 (get_lwp_thread): ... this. Adjust.
14088 (struct process_info): Rename to ...
14089 (struct lwp_info): ... this.
14090 (all_processes): Rename to ...
14091 (all_lwps): ... this.
14092 * proc-service.c (ps_lgetregs): Adjust.
14093 * thread-db.c (thread_db_create_event, find_one_thread)
14094 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14095
14096 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14097
14098 * server.c (handle_query): Handle "qAttached".
14099
14100 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14101
14102 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14103 GPLv3, update license URL.
14104
14105 2009-03-01 Doug Evans <dje@google.com>
14106
14107 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14108 (server_h): Add gdb_signals.h.
14109 (signals.o): Update.
14110 * server.h (target_signal_from_host,target_signal_to_host_p)
14111 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14112
14113 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14114
14115 * remote-utils.c (getpkt): Also generate remote-debug
14116 information if noack_mode is set.
14117
14118 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14119
14120 * server.c (handle_query): Report qXfer:siginfo:read and
14121 qXfer:siginfo:write as supported and handle them.
14122 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14123 * linux-low.c (linux_xfer_siginfo): New.
14124 (linux_target_ops): Set it.
14125
14126 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14127
14128 * server.c (gdbserver_usage): Mention --remote-debug.
14129 (main): Accept '--remote-debug' switch.
14130
14131 2009-01-18 Doug Evans <dje@google.com>
14132
14133 * regcache.c (new_register_cache): No need to check result of xcalloc.
14134 * server.c (handle_search_memory): Back out calls to xmalloc,
14135 result is checked and error is returned to user upon failure.
14136 (handle_query): Ditto. Add more checks for result of malloc.
14137 (handle_v_cont): Check result of malloc, report error back to
14138 user upon failure.
14139 (handle_v_run): Ditto. Call freeargv.
14140 * server.h (freeargv): Declare.
14141 * utils.c (freeargv): New fn.
14142
14143 2009-01-15 Doug Evans <dje@google.com>
14144
14145 * gdbreplay.c (perror_with_name): Make arg const char *.
14146 * server.h (target_signal_to_name): Make return type const char *.
14147 * thread-db.c (thread_db_err_str): Make return type const char *.
14148 * utils.c (perror_with_name): Make arg const char *.
14149
14150 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14151
14152 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14153 when handling a EXIT_PROCESS_DEBUG_EVENT.
14154
14155 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14156
14157 * gdbreplay.c (gdbreplay_version): Update copyright year.
14158 * server.c (gdbserver_version): Likewise.
14159
14160 2009-01-05 Doug Evans <dje@google.com>
14161
14162 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14163 (handle_extended_wait): Improve comment.
14164
14165 2008-12-13 Doug Evans <dje@google.com>
14166
14167 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14168 * server.h (ATTR_MALLOC): New macro.
14169 (xmalloc,xcalloc,xstrdup): Declare.
14170 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14171 * inferiors.c: Ditto.
14172 * linux-low.c: Ditto.
14173 * mem-break.c: Ditto.
14174 * regcache.c: Ditto.
14175 * remote-utils.c: Ditto.
14176 * server.c: Ditto.
14177 * target.c: Ditto.
14178 * win32-low.c: Ditto.
14179
14180 2008-12-12 Doug Evans <dje@google.com>
14181
14182 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14183 in debugging printf.
14184
14185 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14186
14187 2008-12-09 Doug Evans <dje@google.com>
14188
14189 * linux-low.h (struct process_info): Delete member tid, unused.
14190 * thread-db.c (find_one_thread): Update.
14191 (maybe_attach_thread): Update.
14192
14193 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14194
14195 * target.h (struct target_ops): Add qxfer_osdata member.
14196 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14197 and dirent.h.
14198 (linux_qxfer_osdata): New functions.
14199 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14200 callback.
14201 * server.c (handle_query): Handle "qXfer:osdata:read:".
14202 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14203 (buffer_xml_printf): New functions.
14204 * server.h (struct buffer): New.
14205 (buffer_grow_str, buffer_grow_str0): New macros.
14206 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14207 (buffer_xml_printf): Declare.
14208
14209 2008-11-24 Doug Evans <dje@google.com>
14210
14211 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14212
14213 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14214
14215 * server.c (handle_v_run): Always use the supplied argument list.
14216
14217 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14218
14219 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14220 (xtensa_regmap_table): Add entry for scompare1.
14221
14222 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14223
14224 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14225 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14226 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14227 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14228 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14229 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14230 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14231 XML target descriptions.
14232 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14233 when inferior is running on an ISA 2.05 or later processor. Add
14234 special case to return offset for full 64-bit slot of FPSCR when
14235 in 32-bits.
14236
14237 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14238
14239 * Makefile.in (SFILES, clean): Added sparc64 files.
14240 (reg-sparc64.o, reg-sparc64.c): New.
14241 * configure.srv (sparc*-*-linux*): New configuration.
14242 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14243 syscall arguments for SPARC.
14244 (regsets_store_inferior_registers): Likewise.
14245 * linux-sparc-low.c: New file.
14246
14247 2008-10-21 Doug Evans <dje@google.com>
14248
14249 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14250 (READLINE_DIR,READLINE_DEP): Delete.
14251 (INTERNAL_CFLAGS): Update.
14252 (LINTFLAGS): Update.
14253
14254 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14255
14256 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14257 whole argv from the last run, not just argv[0].
14258
14259 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14260
14261 * regcache.c (new_register_cache): Return NULL if the register
14262 cache size isn't known yet.
14263 (free_register_cache): Avoid dereferencing a NULL regcache.
14264
14265 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14266
14267 * configure.srv: Merge MIPS and MIPS64.
14268
14269 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14270
14271 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14272
14273 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14274
14275 * Makefile.in: Add required vsx dependencies.
14276
14277 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14278 Declare init_registers_powerpc_vsx32l.
14279 Declare init_registers_powerpc_vsx64l.
14280 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14281 (ppc_arch_setup): Check for VSX in hwcap.
14282 (ppc_fill_vsxregset): New function.
14283 (ppc_store_vsxregset): New function.
14284 Add new VSX entry in regset_info target_regsets.
14285
14286 * configure.srv: Add new VSX dependencies.
14287
14288 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14289
14290 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14291 (remote_open): Set or clear transport_is_reliable.
14292 (putpkt_binary): Don't expect acks in noack mode.
14293 (getpkt): Don't send ack/nac in noack mode.
14294 * server.c (handle_general_set): Handle QStartNoAckMode.
14295 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14296 qSupported.
14297 (main): Reset noack_mode on every connection.
14298 * server.h (noack_mode): Declare.
14299
14300 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14301
14302 * Makefile.in (GDBREPLAY_OBS): New variable.
14303 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14304
14305 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14306 Daniel Jacobowitz <dan@codesourcery.com>
14307
14308 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14309 (usr_store_inferior_registers): Likewise.
14310 (regsets_store_inferior_registers): Likewise.
14311
14312 2008-07-31 Rolf Jansen <rj@surtec.com>
14313 Pedro Alves <pedro@codesourcery.com>
14314
14315 * configure.ac: Check for memmem declaration.
14316 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14317 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14318 (disable_packet_qfThreadInfo): Unconditionally compile.
14319 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14320 * configure, config.in: Regenerate.
14321
14322 2008-07-28 Doug Kwan <dougkwan@google.com>
14323
14324 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14325 (linux_write_memory): Remove declaration of errno.
14326
14327 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14328
14329 * linux-low.c (handle_extended_wait): Do not use "status"
14330 variable uninitialized.
14331
14332 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14333
14334 * server.c (handle_v_attach): Inhibit reporting dll changes.
14335
14336 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14337
14338 * remote-utils.c (prepare_resume_reply): If requested, don't
14339 output "thread:TID" in the T stop reply.
14340
14341 * server.c (disable_packet_vCont, disable_packet_Tthread)
14342 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14343 (handle_query): If requested, disable support for qC, qfThreadInfo
14344 and qsThreadInfo.
14345 (handle_v_requests): If requested, disable support for vCont.
14346 (gdbserver_show_disableable): New.
14347 (main): Handle --disable-packet and --disable-packet=LIST.
14348
14349 * server.h (disable_packet_vCont, disable_packet_Tthread)
14350 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14351
14352 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14353
14354 * server.c (gdbserver_usage): Mention --version.
14355
14356 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14357
14358 * Makefile.in (gdbreplay.o): New rule.
14359
14360 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14361
14362 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14363 message, not gdbserver.
14364
14365 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14366 Nathan Sidwell <nathan@codesourcery.com>
14367 Joseph Myers <joseph@codesourcery.com>
14368
14369 * acinclude.m4: Include ../../config/acx.m4.
14370 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14371 * configure, config.in: Regenerate.
14372 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14373 * server.c (gdbserver_version): Print PKGVERSION.
14374 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14375 (main): Adjust gdbserver_usage calls.
14376 * gdbreplay.c (version, host_name): Add declarations.
14377 (gdbreplay_version, gdbreplay_usage): New.
14378 (main): Accept --version and --help options.
14379
14380 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14381
14382 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14383 (arm_breakpoint_at): Handle Thumb.
14384 (the_low_target): Add comment.
14385
14386 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14387
14388 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14389
14390 2008-05-09 Doug Evans <dje@google.com>
14391
14392 * server.h (decode_search_memory_packet): Declare.
14393 * remote-utils.c (decode_search_memory_packet): New fn.
14394 * server.c (handle_search_memory_1): New fn.
14395 (handle_search_memory): New fn.
14396 (handle_query): Process qSearch:memory packets.
14397
14398 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14399
14400 * regcache.c (registers_length): Remove.
14401 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14402 full register packet.
14403 * regcache.h (registers_length): Remove prototype.
14404 * server.h (PBUFSIZ): Define to 16384.
14405
14406 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14407
14408 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14409 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14410 powerpc-64l.o, and powerpc-altivec64l.o.
14411 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14412 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14413 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14414 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14415 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14416 to srv_xmlfiles.
14417
14418 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14419 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14420 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14421 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14422 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14423 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14424 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14425 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14426 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14427 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14428 (clean): Update.
14429
14430 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14431 (init_registers_powerpc_32l): ... this new prototype.
14432 (init_registers_powerpc_32): Remove, replace by ...
14433 (init_registers_powerpc_altivec32l): ... this new prototype.
14434 (init_registers_powerpc_e500): Remove, replace by ...
14435 (init_registers_powerpc_e500l): ... this new prototype.
14436 (init_registers_ppc64): Remove, replace by ...
14437 (init_registers_powerpc_64l): ... this new prototype.
14438 (init_registers_powerpc_64): Remove, replace by ...
14439 (init_registers_powerpc_altivec64l): ... this new prototype.
14440 (ppc_num_regs): Set to 73.
14441 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14442 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14443 (ppc_cannot_store_register): Handle orig_r3 and trap.
14444 (ppc_arch_setup): Update init_registers_... calls.
14445 (ppc_fill_gregset): Handle orig_r3 and trap.
14446
14447 * inferiors.c (clear_inferiors): Reset current_inferior.
14448
14449 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14450
14451 * acinclude.m4: Add override.m4.
14452 * configure: Regenerate.
14453
14454 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14455
14456 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14457 initial call to init_register_ppc64.
14458
14459 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14460
14461 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14462 single powerpc*-*-linux* case.
14463 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14464
14465 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14466
14467 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14468 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14469 from reg_xmlfiles.
14470 * linux-ppc-low.c: Include <elf.h>.
14471 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14472 (ppc_hwcap): New global variable.
14473 (ppc_regmap): Remove __SPE__ #ifdef sections.
14474 (ppc_regmap_e500): New global variable.
14475 (ppc_cannot_store_register): Update __SPE__ special case.
14476 (ppc_get_hwcap): New function.
14477 (ppc_arch_setup): Use it to determine whether inferior supports
14478 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14479 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14480 Do not access registers if target does not support AltiVec.
14481 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14482 Do not access registers if target does not support SPE.
14483 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14484
14485 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14486
14487 * linux-low.c (disabled_regsets, num_regsets): New.
14488 (use_regsets_p): Delete.
14489 (linux_wait_for_process): Clear disabled_regsets.
14490 (regsets_fetch_inferior_registers): Check and set it.
14491 (regsets_store_inferior_registers): Likewise.
14492 (linux_fetch_registers, linux_store_registers): Do not use
14493 use_regsets_p.
14494 (initialize_low): Allocate disabled_regsets.
14495
14496 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14497
14498 * Makefile.in (LIBOBJS): New.
14499 (OBS): Use LIBOBJS.
14500 (memmem.o): New rule.
14501 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14502 * configure: Regenerated.
14503
14504 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14505
14506 * server.c (handle_query): Never return "unsupported" for
14507 qXfer:features:read queries.
14508
14509 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14510
14511 * server.c (get_features_xml): Fix inverted condition.
14512 (handle_query): Always support qXfer:feature:read.
14513
14514 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14515
14516 * server.c (wrapper_argv): New.
14517 (start_inferior): Handle wrapper_argv. If set, expect an extra
14518 trap.
14519 (gdbserver_usage): Document --wrapper.
14520 (main): Parse --wrapper.
14521
14522 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14523
14524 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14525 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14526 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14527 (ppc_set_pc): Likewise.
14528 (ppc_arch_setup): New function.
14529 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14530 of collect_register.
14531 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14532
14533 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14534
14535 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14536 instead of linux-ppc64-low.o.
14537 * linux-ppc64-low.c: Remove file.
14538 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14539 (linux-ppc64-low.o): Remove rule.
14540
14541 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14542 (init_registers_powerpc_64): Likewise.
14543 (ppc_regmap): Conditionally define depending on __powerpc64__.
14544 (ppc_cannot_store_register): Do not special-case "fpscr" when
14545 compiled on __powerpc64__.
14546 (ppc_collect_ptrace_register): New function.
14547 (ppc_supply_ptrace_register): New function.
14548 (ppc_breakpoint): Change type to "unsigned int".
14549 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14550 (the_low_target): Conditionally provide initializers for the
14551 arch_setup member depending on __powerpc64__. Install
14552 collect_ptrace_register and supply_ptrace_register members.
14553
14554 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14555
14556 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14557 * server.c (gdbserver_xmltarget): Define.
14558 (get_features_xml): Use it to replace "target.xml" and arch_string.
14559
14560 * configure.srv: Remove srv_xmltarget. Add XML files that were
14561 mentioned there to srv_xmlfiles instead. Remove conditional tests
14562 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14563 srv_xmlfiles and srv_regobj to include all possible choices.
14564 * configure.ac (srv_xmltarget): Remove.
14565 (srv_xmlfiles): Do not add "target.xml".
14566 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14567 checks for supplementary target information.
14568 * configure: Regenerate.
14569 * Makefile.in (XML_TARGET): Remove.
14570 (target.xml): Remove rule.
14571 (clean): Do not clean up target.xml.
14572 (.PRECIOUS): Do not mention target.xml.
14573
14574 * target.h (struct target_ops): Remove arch_string member.
14575 * linux-low.c (linux_arch_string): Remove.
14576 (linux_target_ops): Remove arch_string initializer.
14577 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14578 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14579 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14580 * spu-low.c (spu_arch_string): Remove.
14581 (spu_target_ops): Remove arch_string initializer.
14582 * win32-low.c (win32_arch_string): Remove.
14583 (win32_target_ops): Remove arch_string initializer.
14584 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14585 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14586 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14587
14588 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14589
14590 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14591 by collect_ptrace_register and supply_ptrace_register hooks.
14592 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14593 instead of checking for the_low_target.left_pad_xfer.
14594 (usr_store_inferior_registers): Use collect_ptrace_register callback
14595 instead of checking for the_low_target.left_pad_xfer.
14596
14597 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14598 (s390_supply_ptrace_register): Likewise.
14599 (s390_fill_gregset): Call s390_collect_ptrace_register.
14600 (the_low_target): Update.
14601
14602 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14603 (ppc_supply_ptrace_register): Likewise.
14604 (the_low_target): Update.
14605
14606 * linux-i386-low.c (the_low_target): Update.
14607 * linux-x86-64-low.c (the_low_target): Update.
14608
14609 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14610
14611 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14612 reg-s390.o and reg-s390x.o.
14613
14614 * linux-low.c (new_inferior): New global variable.
14615 (linux_create_inferior, linux_attach): Set it.
14616 (linux_wait_for_process): Call the_low_target.arch_setup after the
14617 target has stopped for the first time.
14618 (initialize_low): Do not call the_low_target.arch_setup.
14619
14620 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14621 (s390_set_pc): Likewise.
14622 (s390_arch_setup): New function.
14623 (the_low_target): Use s390_arch_setup as arch_setup routine.
14624
14625 * regcache.c (realloc_register_cache): New function.
14626 (set_register_cache): Call it for each existing regcache.
14627
14628 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14629
14630 * server.h (init_registers): Remove prototype.
14631
14632 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14633 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14634 instead of init_registers ().
14635 * linux-arm-low.c (init_registers_arm): Add prototype.
14636 (init_registers_arm_with_iwmmxt): Likewise.
14637 (the_low_target): Add initializer for arch_setup field.
14638 * linux-cris-low.c (init_registers_cris): Add prototype.
14639 (the_low_target): Add initializer for arch_setup field.
14640 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14641 (the_low_target): Add initializer for arch_setup field.
14642 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14643 (the_low_target): Add initializer for arch_setup field.
14644 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14645 (the_low_target): Add initializer for arch_setup field.
14646 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14647 (the_low_target): Add initializer for arch_setup field.
14648 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14649 (the_low_target): Add initializer for arch_setup field.
14650 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14651 (init_registers_mips64_linux): Likewise.
14652 (the_low_target): Add initializer for arch_setup field.
14653 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14654 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14655 (the_low_target): Add initializer for arch_setup field.
14656 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14657 (init_registers_powerpc_64): Likewise.
14658 (the_low_target): Add initializer for arch_setup field.
14659 * linux-s390-low.c (init_registers_s390): Add prototype.
14660 (init_registers_s390x): Likewise.
14661 (the_low_target): Add initializer for arch_setup field.
14662 * linux-sh-low.c (init_registers_sh): Add prototype.
14663 (the_low_target): Add initializer for arch_setup field.
14664 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14665 (the_low_target): Add initializer for arch_setup field.
14666 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14667 (the_low_target): Add initializer for arch_setup field.
14668
14669 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14670 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14671 instead of init_registers ().
14672 * win32-arm-low.c (init_registers_arm): Add prototype.
14673 (the_low_target): Add initializer for arch_setup field.
14674 * win32-i386-low.c (init_registers_i386): Add prototype.
14675 (the_low_target): Add initializer for arch_setup field.
14676
14677 * spu-low.c (init_registers_spu): Add prototype.
14678 (initialize_low): Call initialie_registers_spu () instead of
14679 initialize_registers ().
14680
14681 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14682
14683 * server.c (handle_v_requests): When handling the vRun and vAttach
14684 packets, if already debugging a process, don't kill it. Return an
14685 error instead.
14686
14687 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14688
14689 * server.c (handle_query): Correct length check.
14690
14691 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14692
14693 * win32-low.c (do_initial_child_stuff): Add process handle
14694 parameter. Set current_process_handle and current_process_id from the
14695 parameters. Clear globals.
14696 (win32_create_inferior): Don't set current_process_handle and
14697 current_process_id here. Instead pass them on the call to
14698 do_initial_child_stuff.
14699 (win32_attach): Likewise.
14700 (win32_clear_inferiors): New.
14701 (win32_kill): Don't close the current process handle or the
14702 current thread handle here. Instead call win32_clear_inferiors.
14703 (win32_detach): Don't open a new handle to the process. Call
14704 win32_clear_inferiors.
14705 (win32_join): Don't rely on current_process_handle; open a new
14706 handle using the process id.
14707 (win32_wait): Call win32_clear_inferiors when the inferior process
14708 has exited.
14709
14710 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14711
14712 * server.c (monitor_show_help): Add "exit".
14713
14714 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14715
14716 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14717 (clean): Add reg-xtensa.c.
14718 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14719 * configure.srv (xtensa*-*-linux*) New target.
14720 * linux-xtensa-low.c: New.
14721 * xtensa-xtregs.c: New.
14722
14723 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14724
14725 * hostio.c: Don't include errno.h.
14726 (errno_to_fileio_errno): Move to hostio-errno.
14727 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14728 error number outputting to the target->hostio_last_error callback.
14729 (hostio_packet_error): Use FILEIO_EINVAL directly.
14730 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14731 calls to hostio_error.
14732 * hostio-errno.c: New.
14733 * server.h (hostio_last_error_from_errno): Declare.
14734 * target.h (target_ops): Add hostio_last_error member.
14735 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14736 as hostio_last_error handler.
14737 * spu-low.c (spu_target_ops): Likewise.
14738 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14739 (wince_hostio_last_error): New functions.
14740 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14741 as hostio_last_error handler.
14742 (win32_target_ops) [!_WIN32_WCE]: Register
14743 hostio_last_error_from_errno as hostio_last_error handler.
14744 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14745 (hostio-errno.o): New rule.
14746 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14747 * configure.srv (srv_hostio_err_objs): New variable. Default to
14748 hostio-errno.o.
14749 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14750 * configure: Regenerate.
14751
14752 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14753
14754 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14755 (linux_kill, linux_detach): Clean up the process list.
14756 * remote-utils.c (remote_open): Improve port number parsing.
14757 (putpkt_binary, input_interrupt): Only send interrupts if the target
14758 is running.
14759 * server.c (extended_protocol): Make static.
14760 (attached): Define earlier.
14761 (exit_requested, response_needed, program_argv): New variables.
14762 (target_running): New.
14763 (start_inferior): Clear attached here.
14764 (attach_inferior): Set attached here.
14765 (require_running): Define.
14766 (handle_query): Use require_running and target_running. Implement
14767 "monitor exit".
14768 (handle_v_attach, handle_v_run): New.
14769 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14770 (gdbserver_usage): Update.
14771 (main): Redo argument parsing. Handle --debug and --multi. Handle
14772 --attach along with other options or after the port. Save
14773 program_argv. Support no initial program. Resynchronize
14774 communication with GDB after an error. Handle "monitor exit".
14775 Use require_running and target_running. Always allow the extended
14776 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14777 restart in extended mode.
14778 * README: Refer to the GDB manual. Update --attach usage.
14779
14780 2007-12-20 Andreas Schwab <schwab@suse.de>
14781
14782 * linux-low.c (STACK_SIZE): Define.
14783 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14784 (linux_test_for_tracefork): Likewise.
14785
14786 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14787
14788 * linux-low.c (linux_wait_for_event): Update messages. Do not
14789 reinsert auto-delete breakpoints.
14790 * mem-break.c (struct breakpoint): Change return type of handler to
14791 int.
14792 (set_breakpoint_at): Update handler type.
14793 (reinsert_breakpoint_handler): Return 1 instead of calling
14794 delete_breakpoint.
14795 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14796 setting a new one.
14797 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14798 * mem-break.h (set_breakpoint_at): Update handler type.
14799 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14800 * win32-low.c (auto_delete_breakpoint): New.
14801 (get_child_debug_event): Use it.
14802
14803 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14804
14805 * configure.ac: Check for pread and pwrite.
14806 * hostio.c (handle_pread): Fall back to lseek and read.
14807 (handle_pwrite): Fall back to lseek and write.
14808 * config.in, configure: Regenerated.
14809
14810 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14811
14812 * server.c (myresume): Add own_buf argument.
14813 (main): Update calls.
14814
14815 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14816
14817 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14818 * remote-utils.c (remote_open): Do not call disable_async_io.
14819 (block_async_io): Delete.
14820 (unblock_async_io): Make static.
14821 (initialize_async_io): New.
14822 * server.c (handle_v_cont): Handle async I/O here.
14823 (myresume): Likewise. Move other common resume tasks here...
14824 (main): ... from here. Call initialize_async_io. Disable async
14825 I/O before the main loop.
14826 * server.h (initialize_async_io): Declare.
14827 (block_async_io, unblock_async_io): Delete prototypes.
14828 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14829
14830 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14831
14832 * remote-utils.c (readchar): Allow binary data in received messages.
14833
14834 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14835
14836 * win32-low.c (attaching): New global.
14837 (win32_create_inferior): Clear the `attaching' global.
14838 (win32_attach): Set the `attaching' global.
14839 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14840 attaching. Only set a breakpoint at the entry point if not
14841 attaching.
14842
14843 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14844
14845 * server.c (main): Don't report dll events on the initial
14846 connection on attaches.
14847
14848 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14849
14850 * server.c (main): Relax numerical bases supported for the pid of
14851 the --attach command line argument.
14852
14853 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14854
14855 * win32-low.c (win32_attach): Call OpenProcess before
14856 DebugActiveProcess, not after. Add last error output to error
14857 call.
14858
14859 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14860
14861 * win32-low.c (win32_get_thread_context)
14862 (win32_set_thread_context): New functions.
14863 (thread_rec): Use win32_get_thread_context.
14864 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14865 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14866 field.
14867
14868 2007-12-03 Leo Zayas
14869 Pedro Alves <pedro_alves@portugalmail.pt>
14870
14871 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14872 global variables.
14873 (child_add_thread): Minor cleanup.
14874 (child_continue): Resume artificially suspended threads before
14875 calling ContinueDebugEvent.
14876 (suspend_one_thread): New.
14877 (fake_breakpoint_event): New.
14878 (get_child_debug_event): Change return type to int. Check here if
14879 gdb sent an interrupt request. If a soft interrupt was requested,
14880 fake a breakpoint event. Return 0 if there is no event to handle,
14881 and 1 otherwise.
14882 (win32_wait): Don't check here if gdb sent an interrupt request.
14883 Ensure there is a valid event to handle.
14884 (win32_request_interrupt): Add soft interruption method as last
14885 resort.
14886
14887 2007-12-03 Leo Zayas
14888 Pedro Alves <pedro_alves@portugalmail.pt>
14889
14890 * win32-low.h (win32_thread_info): Add descriptions to the
14891 structure members. Replace `suspend_count' counter by a
14892 `suspended' flag.
14893 * win32-low.c (thread_rec): Update condition of when to get the
14894 context from the inferior. Rely on ContextFlags being set if it
14895 has already been retrieved. Only suspend the inferior thread if
14896 we haven't already. Warn if that fails.
14897 (continue_one_thread): s/suspend_count/suspended/. Only call
14898 ResumeThread once. Warn if that fails.
14899
14900 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14901
14902 * win32-low.c (win32_wait): Don't read from the inferior when it
14903 has already exited.
14904
14905 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14906
14907 * Makefile.in (win32_low_h): New variable.
14908 (win32-low.o): Add dependency on $(win32_low_h).
14909 (win32-arm-low.o, win32-i386-low.o): New rules.
14910
14911 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14912
14913 * hostio.c: Correct copyright year.
14914
14915 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14916
14917 * Makefile.in (OBS): Add hostio.o.
14918 (hostio.o): New rule.
14919 * server.h (handle_vFile): Declare.
14920 * hostio.c: New file.
14921 * server.c (handle_v_requests): Take packet_len and new_packet_len
14922 for binary packets. Call handle_vFile.
14923 (main): Update call to handle_v_requests.
14924
14925 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14926
14927 * linux-low.c: Include <sched.h>.
14928
14929 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14930
14931 * linux-low.c (linux_tracefork_grandchild): New.
14932 (linux_tracefork_child): Use clone.
14933 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14934
14935 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14936
14937 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14938
14939 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14940
14941 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14942
14943 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14944
14945 * inferiors.c (change_inferior_id): Delete.
14946 (add_pid_to_list, pull_pid_from_list): New.
14947 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14948 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14949 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14950 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14951 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14952 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14953 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14954 (using_threads): Always set to 1.
14955 (handle_extended_wait): New.
14956 (add_process): Do not set TID.
14957 (linux_create_inferior): Set must_set_ptrace_flags.
14958 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14959 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14960 (linux_thread_alive): Rename TID argument to LWPID.
14961 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14962 (linux_wait_for_event): Do not use TID or check using_threads. Update
14963 call to dead_thread_notify. Call handle_extended_wait.
14964 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14965 (send_sigstop): Delete sigstop_sent.
14966 (wait_for_sigstop): Avoid TID.
14967 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14968 (linux_test_for_tracefork): New.
14969 (linux_lookup_signals): Use thread_db_active and
14970 linux_supports_tracefork_flag.
14971 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14972 * linux-low.h (get_process_thread): Avoid TID.
14973 (struct process_ifo): Move thread_known and tid to the end. Remove
14974 sigstop_sent.
14975 (linux_attach_lwp, thread_db_init): Update prototypes.
14976 * server.h (change_inferior_id): Delete prototype.
14977 (add_pid_to_list, pull_pid_from_list): New prototypes.
14978 * thread-db.c (thread_db_use_events): New.
14979 (find_first_thread): Rename to...
14980 (find_one_thread): ...this. Update callers and messages. Do not
14981 call fatal. Check thread_db_use_events. Do not call
14982 change_inferior_id or new_thread_notify.
14983 (maybe_attach_thread): Update. Do not call new_thread_notify.
14984 (thread_db_init): Set thread_db_use_events. Check use_events.
14985 * utils.c (fatal, warning): Correct message prefix.
14986
14987 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14988
14989 * Makefile.in (clean): Remove new files.
14990 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14991 (powerpc-64.o, powerpc-64.c): New rules.
14992 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14993 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14994 with SPE.
14995 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14996 SPE targets.
14997 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14998 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14999 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15000 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15001 (target_regsets): Add AltiVec and SPE register sets.
15002 * configure.ac: Check for AltiVec and SPE.
15003 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15004 (ppc_fill_vrregset, ppc_store_vrregset): New.
15005 (target_regsets): Add AltiVec register set.
15006 * configure: Regenerated.
15007
15008 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15009
15010 * linux-low.c (O_LARGEFILE): Define.
15011 (linux_read_memory): Use /proc/PID/mem.
15012 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15013 * configure, config.in: Regenerated.
15014
15015 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15016
15017 * linux-low.c (linux_wait_for_event): Do not pass signals while
15018 single-stepping.
15019
15020 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15021
15022 * win32-low.c (create_process): New.
15023 (win32_create_inferior): Use create_process instead of
15024 CreateProcess. If create_process failed retry appending an ".exe"
15025 suffix. Store the GetLastError result immediatelly after
15026 create_process calls and use it on the call to error.
15027
15028 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15029
15030 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15031
15032 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15033
15034 * configure.ac: Switch license to GPLv3.
15035
15036 2007-08-01 Michael Snyder <msnyder@access-company.com>
15037
15038 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15039
15040 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15041
15042 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15043 typedef.
15044 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15045 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15046 CloseToolhelp32Snapshot.
15047 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15048 CloseToolhelp32Snapshot.
15049
15050 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15051
15052 * server.c (main): Check for inferior exit before main loop.
15053
15054 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15055
15056 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15057 instead of on tmp_desc.
15058
15059 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15060 Daniel Jacobowitz <dan@codesourcery.com>
15061
15062 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15063 (add_thread): Minor cleanups.
15064 (clear_inferiors): Move lower in the file. Clear the DLL
15065 list.
15066 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15067 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15068 (xml_escape_text): New.
15069 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15070 for qSupported.
15071 (handle_v_cont): Report errors.
15072 (gdbserver_version): Update.
15073 (main): Correct size of own_buf. Do not report initial DLL events.
15074 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15075 (unloaded_dll, xml_escape_text): New.
15076 * win32-low.c (enum target_waitkind): Update comments.
15077 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15078 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15079 (win32_EnumProcessModules, win32_GetModuleInformation)
15080 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15081 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15082 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15083 (win32_Module32First, win32_Module32Next, load_toolhelp)
15084 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15085 (get_child_debug_event): Handle DLL events.
15086 (win32_wait): Likewise.
15087
15088 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15089
15090 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15091 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15092
15093 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15094
15095 * win32-low.c (handle_output_debug_string): Ignore event if not
15096 waiting.
15097
15098 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15099
15100 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15101
15102 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15103
15104 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15105
15106 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15107
15108 * inferiors.c (change_inferior_id): Add comment.
15109 * linux-low.c (check_removed_breakpoint): Add an early
15110 prototype. Improve debug output.
15111 (linux_attach): Doc update.
15112 (linux_detach_one_process, linux_detach): Clean up before releasing
15113 each process.
15114 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15115 * linux-low.h (struct process_info): Doc improvement.
15116 * mem-break.c (delete_all_breakpoints): New.
15117 * mem-break.h (delete_all_breakpoints): New prototype.
15118 * thread-db.c (find_first_thread): New.
15119 (thread_db_create_event): Call it instead of
15120 thread_db_find_new_threads. Clean up unused variables.
15121 (maybe_attach_thread): Remove first thread handling.
15122 (thread_db_find_new_threads): Use find_first_thread.
15123 (thread_db_get_tls_address): Likewise.
15124
15125 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15126
15127 * thread-db.c (thread_db_find_new_threads): Add prototype.
15128 (thread_db_create_event): Check for the main thread before adding
15129 a new thread.
15130 (maybe_attach_thread): Only enable event reporting if TID == 0.
15131 (thread_db_get_tls_address): Check for new threads.
15132
15133 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15134
15135 * linux-low.c (linux_create_inferior): Try execv before execvp.
15136 * spu-low.c (spu_create_inferior): Likewise.
15137
15138 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15139
15140 * linux-low.c (linux_create_inferior): Change execv to execvp.
15141 * spu-low.c (spu_create_inferior): Likewies.
15142
15143 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15144
15145 * Makefile.in (clean): Clean new files instead of deleted ones.
15146 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15147 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15148 rules.
15149 * configure.srv: Specify XML files and new regformats for MIPS and
15150 MIPS64 GNU/Linux.
15151 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15152 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15153 an entry for the restart register.
15154 (mips_cannot_fetch_register, mips_cannot_store_register)
15155 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15156 register names to match the XML descriptions.
15157 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15158 restart register instead of $0.
15159
15160 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15161 Markus Deuling <deuling@de.ibm.com>
15162
15163 * remote-utils.c (decode_xfer_write): New function.
15164 * server.h (decode_xfer_write): Add prototype.
15165 * server.c (handle_query): Add PACKET_LEN argument. Support
15166 qXfer:spu:read and qXfer:spu:write packets.
15167 (main): Pass packet_len to handle_query.
15168 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15169 * target.h (target_ops): Add qxfer_spu.
15170
15171 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15172
15173 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15174 accessing non-seekable spufs files.
15175
15176 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15177
15178 * server.c (handle_query): Add reply for qC packet.
15179
15180 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15181 Leo Zayas <lerele@champenstudios@com>
15182
15183 * server.h (check_remote_input_interrupt_request): New function.
15184 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15185 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15186 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15187 (check_remote_input_interrupt_request): New function.
15188 * server.h (check_remote_input_interrupt_request): Declare.
15189 * win32-low.c (winapi_DebugBreakProcess,
15190 winapi_GenerateConsoleCtrlEvent): New typedefs.
15191 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15192 to 250 ms.
15193 (win32_wait): Check for remote interrupt request
15194 with check_remote_input_interrupt_request.
15195 (win32_request_interrupt): New function.
15196 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15197
15198 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15199
15200 * win32-low.c (debug_registers_changed,
15201 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15202 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15203 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15204 (thread_rec): Get context using the low target.
15205 (child_add_thread): Call thread_added on the low target,
15206 which does the same thing.
15207 (regptr): Delete.
15208 (do_initial_child_stuff): Remove debug registers references.
15209 Set context using the low target. Resume threads after
15210 setting the contexts.
15211 (child_continue): Remove dead variable. Remove debug
15212 registers references.
15213 (child_fetch_inferior_registers): Go through the low target.
15214 (do_child_store_inferior_registers): Remove.
15215 (child_store_inferior_registers): Go through the low target.
15216 (win32_resume): Remove debug registers references.
15217 Set context using the low target.
15218 (handle_exception): Change return type to void. Don't record
15219 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15220 first chance exception.
15221 (get_child_debug_event): Change return type to void. Remove
15222 goto loop. Always return after waiting for debug event.
15223 (win32_wait): Convert to switch statement. Handle spurious
15224 events.
15225
15226 * win32-i386-low.c (debug_registers_changed,
15227 debug_registers_used): New.
15228 (initial_stuff): Rename to ...
15229 (i386_initial_stuff): ... this. Clear debug registers
15230 state variables.
15231 (store_debug_registers): Delete.
15232 (i386_get_thread_context): New.
15233 (load_debug_registers): Delete.
15234 (i386_set_thread_context): New.
15235 (i386_thread_added): New.
15236 (single_step): Rename to ...
15237 (i386_single_step): ... this.
15238 (do_fetch_inferior_registers): Rename to ...
15239 (i386_fetch_inferior_register): ... this.
15240 (i386_store_inferior_register): New.
15241 (the_low_target): Adapt to new interface.
15242
15243 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15244 (arm_get_thread_context): New.
15245 (arm_set_thread_context): New.
15246 (regptr): New.
15247 (do_fetch_inferior_registers): Rename to ...
15248 (arm_fetch_inferior_register): ... this.
15249 (arm_store_inferior_register): New.
15250 (arm_wince_breakpoint): Reimplement as unsigned long.
15251 (arm_wince_breakpoint_len): Define.
15252 (the_low_target): Adapt to new interface.
15253
15254 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15255 load_debug_registers. Add get_thread_context, set_thread_context,
15256 thread_added and store_inferior_register. Rename
15257 fetch_inferior_registers to fetch_inferior_register.
15258 (regptr): Remove declaration.
15259
15260 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15261
15262 * linux-low.c (linux_detach): Change return type to int. Return 0.
15263 * spu-low.c (spu_detach): Likewise.
15264
15265 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15266
15267 * target.h (target_ops): Change return type of detach to int.
15268 Add join.
15269 (join_inferior): New.
15270 * server.c (main): Don't skip detach support on mingw32.
15271 If the inferior doesn't support detaching return error.
15272 Call join_inferior instead of using waitpid.
15273 * linux-low.c (linux_join): New.
15274 (linux_target_op): Add linux_join.
15275 * spu-low.c (spu_join): New.
15276 (spu_target_ops): Add spu_join.
15277 * win32-low.c (win32_detach): Adapt to new interface.
15278 Reopen current_process_handle before detaching. Issue a child
15279 resume before detaching.
15280 (win32_join): New.
15281 (win32_target_op): Add win32_join.
15282
15283 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15284
15285 * win32-low.c (win32-attach): Fix return value.
15286 * target.h (target_ops): Describe ATTACH return values.
15287
15288 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15289
15290 * win32-low.c (GETPROCADDRESS): Define.
15291 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15292 (winapi_DebugSetProcessKillOnExit): Likewise.
15293 (win32_create_inferior): Force usage of ansi CreateProcessA.
15294 (win32_attach): Use GETPROCADDRESS.
15295 (win32_detach): Likewise.
15296
15297 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15298
15299 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15300
15301 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15302
15303 * win32-low.c: Commit leftover changes from 2007-03-29.
15304
15305 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15306
15307 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15308 fields short instead of int. Add explicit padding.
15309 (i387_cache_to_fsave): Remove unnecessary casts.
15310 (i387_fsave_to_cache): Doc fix.
15311 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15312
15313 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15314
15315 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15316 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15317
15318 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15319
15320 * configure.srv (arm*-*-mingw32ce*): Move near the other
15321 arm targets.
15322
15323 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15324
15325 * configure.ac: Add errno checking.
15326 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15327 sys/file.h and malloc.h.
15328 (AC_CHECK_DECLS): Add perror.
15329 (srv_mingwce): Handle.
15330 * configure.srv (i[34567]86-*-cygwin*): Add
15331 win32-i386-low.o to srv_tgtobj.
15332 (i[34567]86-*-mingw*): Likewise.
15333 (arm*-*-mingw32ce*): Add case.
15334 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15335 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15336 [__MINGW32CE__] (strerror): New function.
15337 [__MINGW32CE__] (errno): Define to GetLastError.
15338 [__MINGW32CE__] (COUNTOF): New macro.
15339 (remote_open): Remove extra close call.
15340 * mem-break.c (delete_breakpoint_at): New function.
15341 * mem-break.h (delete_breakpoint_at): Declare.
15342 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15343 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15344 [USE_WIN32API] (read, write): Add char* casts.
15345 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15346 * server.h: Include wincecompat.h on Windows CE.
15347 [HAVE_ERRNO_H]: Check.
15348 (perror): Declare if not declared.
15349 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15350 (perror_with_name): Remove errno declaration.
15351 * wincecompat.h: New.
15352 * wincecompat.c: New.
15353 * win32-low.h: New.
15354 * win32-arm-low.c: New.
15355 * win32-i386-low.c: New.
15356 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15357 (OUTMSG2): Make it safe.
15358 (_T): New macro.
15359 (COUNTOF): New macro.
15360 (NUM_REGS): Get it from the low target.
15361 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15362 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15363 (thread_rec): Let low target handle debug registers.
15364 (child_add_thread): Likewise.
15365 (child_init_thread_list): Likewise.
15366 (continue_one_thread): Likewise.
15367 (regptr): New.
15368 (do_child_fetch_inferior_registers): Move to ...
15369 * win32-i386-low.c: ... here, and rename to ...
15370 (do_fetch_inferior_registers): ... this.
15371 * win32-low.c (child_fetch_inferior_registers):
15372 Go through the low target.
15373 (do_child_store_inferior_registers): Use regptr.
15374 (strwinerror): New function.
15375 (win32_create_inferior): Handle Windows CE.
15376 Use strwinerror instead of strerror on Windows error
15377 codes. Add program to the error output.
15378 Don't close the main thread handle on Windows CE.
15379 (win32_attach): Use coredll.dll on Windows CE.
15380 (win32_kill): Close current process and current
15381 thread handles.
15382 (win32_detach): Use coredll.dll on Windows CE.
15383 (win32_resume): Let low target handle debug registers, and
15384 step request.
15385 (handle_exception): Add/Remove initial breakpoint. Avoid
15386 non-existant WSTOPSIG on Windows CE.
15387 (win32_read_inferior_memory): Cast to remove warning.
15388 (win32_arch_string): Go through the low target.
15389 (initialize_low): Call set_breakpoint_data with the low
15390 target's breakpoint.
15391 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15392 FOP_REGNUM, mappings): Move to ...
15393 * win32-i386-low.c: ... here.
15394 * win32-low.c (win32_thread_info): Move to ...
15395 * win32-low.h: ... here.
15396 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15397 win32-arm-low.c and wincecompat.c.
15398 (all:): Add $EXEEXT.
15399 (install-only:): Likewise.
15400 (gdbserver:): Likewise.
15401 (gdbreplay:): Likewise.
15402 * config.in: Regenerate.
15403 * configure: Regenerate.
15404
15405 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15406
15407 * win32-low.c: Rename typedef thread_info to
15408 win32_thread_info throughout.
15409
15410 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15411
15412 * win32-i386-low.c: Rename to ...
15413 * win32-low.c: ... this.
15414 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15415 * Makefile.in: Likewise.
15416
15417 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15418
15419 * remote-utils.c (monitor_output): Constify msg parameter.
15420 * server.h (monitor_output): Likewise.
15421 * win32-i386-low.c (handle_output_debug_string): New.
15422 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15423 handle_output_debug_string.
15424 (get_child_debug_event): Likewise.
15425
15426 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15427
15428 * server.c (main): Correct strtoul check.
15429
15430 2007-03-27 Jon Ringle <jon@ringle.org>
15431
15432 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15433
15434 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15435
15436 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15437
15438 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15439
15440 * terminal.h: Check HAVE_SGTTY_H.
15441
15442 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15443
15444 * remote-utils.c (remote_open): Print out the assigned port number.
15445
15446 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15447
15448 * remote-utils.c (monitor_output): New function.
15449 * server.c (debug_threads): Define here.
15450 (monitor_show_help): New function.
15451 (handle_query): Handle qRcmd.
15452 (main): Do not handle 'd' packet.
15453 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15454 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15455 of debug_threads.
15456
15457 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15458
15459 * Makefile.in (EXEEXT): New.
15460 (clean): Use $(EXEEXT).
15461
15462 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15463
15464 * target.h (target_ops): Rename send_signal to request_interrupt,
15465 and remove enum target_signal parameter.
15466 * linux-low.c (linux_request_interrupt): Rename from
15467 linux_send_signal, and always send SIGINT.
15468 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15469 and always send SIGINT.
15470 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15471 of send_signal.
15472 (input_interrupt): Likewise.
15473
15474 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15475
15476 * server.c (get_features_xml): Check if target implemented
15477 arch_string.
15478 * win32-i386-low.c (win32_arch_string): New.
15479 (win32_target_ops): Add win32_arch_string as arch_string member.
15480
15481 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15482
15483 * spu-low.c (spu_arch_string): New.
15484 (spu_target_ops): Add spu_arch_string.
15485
15486 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15487
15488 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15489 * configure.ac: Do not check for terminal.h.
15490 * configure, config.in: Regenerated.
15491
15492 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15493
15494 * Makefile.in (OBS): Add $(XML_BUILTIN).
15495 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15496 (clean): Update.
15497 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15498 (arm-with-iwmmxt.c): New.
15499 * config.in, configure: Regenerate.
15500 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15501 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15502 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15503 (arm*-*-linux*): Add iWMMXt and regset support.
15504 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15505 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15506 (arm_store_wmmxregset, target_regsets): New.
15507 * server.c (get_features_xml): Take annex argument. Check builtin
15508 XML documents.
15509 (handle_query): Handle multiple annexes.
15510
15511 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15512
15513 * remote-utils.c [USE_WIN32API] (read, write): Define.
15514 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15515 write.
15516
15517 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15518
15519 * linux-i386-low.c (the_low_target): Set arch_string.
15520 * linux-x86-64-low.c (the_low_target): Likewise.
15521 * linux-low.c (linux_arch_string): New.
15522 (linux_target_ops): Add it.
15523 * linux-low.h (struct linux_target_ops): Add arch_string.
15524 * server.c (write_qxfer_response): Use const void * for DATA.
15525 (get_features_xml): New.
15526 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15527 * target.h (struct target_ops): Add arch_string method.
15528
15529 2007-01-03 Denis Pilat <denis.pilat@st.com>
15530 Daniel Jacobowitz <dan@codesourcery.com>
15531
15532 * linux-low.c (linux_kill): Handle being called with no threads.
15533 * win32-i386-low.c (win32_kill): Likewise.
15534 (get_child_debug_event): Clear current_process_handle.
15535
15536 2006-12-30 Denis PILAT <denis.pilat@st.com>
15537 Daniel Jacobowitz <dan@codesourcery.com>
15538
15539 * remote-utils.c (remote_open): Check the type of specified
15540 serial port devices before opening them.
15541 * server.c (main): Kill the inferior if an error occurs during
15542 the first remote_open.
15543
15544 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15545
15546 * README: Update supported targets.
15547
15548 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15549
15550 * Makefile.in (clean): Remove reg-mips64.c.
15551 (reg-mips64.c, reg-mips64.o): New rules.
15552 * configure.srv: Handle mips64. Include regset support for mips.
15553 * linux-mips-low.c (union mips_register): New.
15554 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15555 (mips_breakpoint, mips_breakpoint_at): Use int.
15556 (mips_collect_register, mips_supply_register)
15557 (mips_collect_register_32bit, mips_supply_register_32bit)
15558 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15559 (mips_store_fpregset, target_regsets): New.
15560 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15561
15562 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15563
15564 * configure.srv: Add target "spu*-*-*".
15565 * Makefile.in (clean): Remove reg-spu.c.
15566 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15567 * spu-low.c: New file.
15568
15569 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15570
15571 * configure.ac: Correct td_thr_tls_get_addr test.
15572 * configure: Regenerated.
15573
15574 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15575
15576 * linux-low.c (linux_wait_for_event): Reformat. Use the
15577 pass_signals array.
15578 * remote-utils.c (decode_address_to_semicolon): New.
15579 * server.c (pass_signals, handle_general_set): New.
15580 (handle_query): Mention QPassSignals for qSupported.
15581 (main): Call handle_general_set.
15582 * server.h (pass_signals, decode_address_to_semicolon): New.
15583
15584 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15585
15586 * server.c (handle_query): Correct error handling for read_auxv.
15587
15588 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15589
15590 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15591 and srv_linux_thread_db to yes.
15592 * linux-s390-low.c (s390_fill_gregset): New function.
15593 (target_regsets): Define data structure.
15594
15595 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15596
15597 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15598 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15599 * config.in, configure: Regenerated.
15600 * inferiors.c (gdb_id_to_thread): New function.
15601 (gdb_id_to_thread_id): Use it.
15602 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15603 * linux-low.h (struct process_info): Add th member.
15604 (thread_db_get_tls_address): New prototype.
15605 * remote-utils.c (decode_address): Make non-static.
15606 * server.c (handle_query): Handle qGetTLSAddr.
15607 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15608 * target.h (struct target_ops): Add get_tls_address.
15609 * thread-db.c (maybe_attach_thread): Save the thread handle.
15610 (thread_db_get_tls_address): New.
15611
15612 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15613
15614 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15615 (linux_resume_one_process): Take a siginfo_t *. Update all
15616 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15617 (struct pending_signals): Add a siginfo_t.
15618 (linux_wait_for_process): Always set last_status.
15619 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15620 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15621 * linux-low.h (struct process_info): Add last_status.
15622
15623 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15624
15625 * remote-utils.c (try_rle): New function.
15626 (putpkt_binary): Use it.
15627
15628 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15629
15630 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15631 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15632 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15633 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15634 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15635 point registers.
15636
15637 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15638
15639 * server.c (terminal_fd): New variable.
15640 (old_foreground_pgrp): Likewise.
15641 (restore_old_foreground_pgrp): New function.
15642 (start_inferior): Record the terminal file descriptor in terminal_fd
15643 and its original foreground group in old_foreground_pgrp. Register
15644 restore_old_foreground_pgrp with atexit().
15645
15646 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15647
15648 * server.c (handle_query): Correct qPart to qXfer.
15649
15650 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15651
15652 * configure.ac: Check for more headers which are missing on
15653 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15654 * configure.srv: Add Cygwin and mingw32.
15655 * remote-utils.c: Don't include headers unconditionally which
15656 are missing on mingw32. Include <winsock.h> for mingw32.
15657 (remote_open): Adjust for mingw32 support. Flush
15658 standard error after writing to it.
15659 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15660 (unblock_async_io, enable_async_io, disable_async_io)
15661 (readchar, getpkt): Update for Winsock support.
15662 (prepare_resume_reply): Expect a protocol signal number.
15663 * server.c: Disable <sys/wait.h> on mingw32.
15664 (start_inferior): Adjust for mingw32 support. Flush
15665 standard error after writing to it.
15666 (attach_inferior): Likewise. Use protocol signal
15667 numbers.
15668 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15669 and names.
15670 * win32-i386-low.c: New file.
15671 * Makefile.in (XM_CLIBS): Set.
15672 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15673 (win32-i386-low.o): New dependency rule.
15674 * linux-low.c (linux_wait): Use target signal numbers.
15675 * target.h (struct target_ops): Doc fix.
15676 * server.h (target_signal_to_name): New prototype.
15677 * gdbreplay.c: Don't include headers unconditionally which
15678 are missing on mingw32. Include <winsock.h> for mingw32.
15679 (remote_close, remote_open): Adjust for Winsock support.
15680 * configure, config.in: Regenerated.
15681
15682 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15683
15684 * server.c (decode_xfer_read, write_qxfer_response): New.
15685 (handle_query): Take a packet length argument. Handle
15686 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15687 the qSupported response.
15688 (main): Update call to handle_query.
15689
15690 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15691
15692 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15693 (putpkt_binary): Renamed from putpkt and adjusted for binary
15694 data.
15695 (putpkt): New wrapper for putpkt_binary.
15696 (readchar): Don't mask off the high bit.
15697 (decode_X_packet): New function.
15698 * server.c (main): Call putpkt_binary if a handler sets the packet
15699 length. Save the length of the incoming packet. Handle 'X'.
15700 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15701
15702 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15703
15704 * server.c (handle_query): Handle qSupported.
15705
15706 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15707
15708 * remote-utils.c (all_symbols_looked_up): New variable.
15709 (look_up_one_symbol): Check it.
15710 * server.h (look_up_one_symbol): New declaration.
15711 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15712
15713 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15714
15715 * Makefile.in (linux-arm-low.o): Update dependencies.
15716 * linux-arm-low.c: Include "gdb_proc_service.h".
15717 (PTRACE_GET_THREAD_AREA): Define.
15718 (ps_get_thread_area): New function.
15719
15720 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15721
15722 * configure.srv (m68k*-*-uclinux*): New target.
15723 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15724 (linux_resume_one_process): Remove extraneous cast.
15725 (linux_read_offsets): New.
15726 (linux_target_op): Add linux_read_offsets on mmuless systems.
15727 * server.c (handle_query): Add qOffsets logic.
15728 * target.h (struct target_ops): Add read_offsets.
15729
15730 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15731
15732 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15733 (PTRACE_GET_THREAD_AREA): Define.
15734 (ps_get_thread_area): New function.
15735 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15736 (linux-x86-64-low.o): Update.
15737
15738 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15739
15740 * configure.ac: Remove checks for prfpregset_t.
15741 * gdb_proc_service.h: New file.
15742 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15743 new "gdb_proc_service.h".
15744 * proc-service.c: Likewise.
15745 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15746 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15747 * Makefile.in (gdb_proc_service_h): Updated.
15748 * configure, config.in: Regenerated.
15749
15750 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15751
15752 * remote-utils.c (prepare_resume_reply): Move declaration
15753 of gdb_id_from_wait to the top of the block.
15754
15755 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15756
15757 * linux-low.c (regsets_store_inferior_registers): Read the regset
15758 from the target before filling it.
15759
15760 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15761
15762 * server.c (attach_inferior): Return SIGTRAP for a successful
15763 attach.
15764
15765 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15766
15767 * Makefile.in (OBS): Add version.o.
15768 (STAGESTUFF): Delete.
15769 (version.o): Add dependencies.
15770 (version.c): Replace rule.
15771 (clean): Remove version.c.
15772 * server.c (gdbserver_version): New.
15773 (gdbserver_usage): Use printf.
15774 (main): Handle --version and --help.
15775 * server.h (version, host_name): Add declarations.
15776
15777 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15778
15779 * linux-arm-low.c:
15780 * linux-arm-low.c:
15781 * inferiors.c:
15782 * i387-fp.h:
15783 * i387-fp.c:
15784 * gdbreplay.c:
15785 * regcache.c:
15786 * proc-service.c:
15787 * mem-break.h:
15788 * mem-break.c:
15789 * linux-x86-64-low.c:
15790 * linux-sh-low.c:
15791 * linux-s390-low.c:
15792 * linux-ppc64-low.c:
15793 * linux-ppc-low.c:
15794 * linux-mips-low.c:
15795 * linux-m68k-low.c:
15796 * linux-m32r-low.c:
15797 * linux-low.h:
15798 * linux-low.c:
15799 * linux-ia64-low.c:
15800 * linux-i386-low.c:
15801 * linux-crisv32-low.c:
15802 * thread-db.c:
15803 * terminal.h:
15804 * target.h:
15805 * target.c:
15806 * server.h:
15807 * server.c:
15808 * remote-utils.c:
15809 * regcache.h:
15810 * utils.c:
15811 * Makefile.in:
15812 * configure.ac:
15813 * gdbserver.1: Add (C) after Copyright. Update the FSF
15814 address.
15815
15816 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15817
15818 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15819 (arm_breakpoint_at): Recognize both breakpoints.
15820 (the_low_target): Use the correct breakpoint instruction.
15821
15822 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15823
15824 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15825 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15826 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15827 (the_low_target): Update.
15828
15829 2005-10-25 Andreas Schwab <schwab@suse.de>
15830
15831 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15832
15833 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15834 (ia64_num_regs): Reduce to 462.
15835
15836 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15837
15838 * acinclude.m4: Correct quoting.
15839 * aclocal.m4: Regenerated.
15840
15841 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15842 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15843 (thread_db_init): Call thread_db_err_str.
15844 * configure.ac: Check for TD_VERSION.
15845 * config.in, configure: Regenerated.
15846
15847 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15848
15849 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15850
15851 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15852
15853 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15854 is not available. Define HAVE_PTRACE_GETREGS if it is.
15855 * config.in, configure: Regenerated.
15856 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15857 * linux-i386-low.c, linux-m68k-low.c: Update to use
15858 HAVE_PTRACE_GETREGS.
15859 * linux-low.c (regsets_fetch_inferior_registers)
15860 (regsets_store_inferior_registers): Only return 0 if we processed
15861 GENERAL_REGS.
15862 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15863 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15864
15865 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15866
15867 * inferiors.c (struct thread_info): Add gdb_id.
15868 (add_thread): Add gdb_id argument.
15869 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15870 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15871 calls to add_thread.
15872 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15873 * server.c (handle_query): Use thread_to_gdb_id.
15874 (handle_v_cont, main): Use gdb_id_to_thread_id.
15875 * server.h (add_thread): Update prototype.
15876 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15877 prototypes.
15878
15879 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15880
15881 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15882 left-padded registers.
15883 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15884 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15885
15886 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15887
15888 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15889 * configure: Regenerate.
15890 * config.in: Regenerate.
15891 * server.h (NEED_DECLARATION_STRERROR):
15892 Replace with !HAVE_DECL_STRERROR.
15893
15894 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15895
15896 * linux-low.c (linux_wait, linux_send_signal): Don't test
15897 an unsigned long variable for > 0 if it could be MAX_ULONG.
15898 * server.c (myresume): Likewise.
15899 * target.c (set_desired_inferior): Likewise.
15900
15901 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15902
15903 * configure.ac: Simplify and improve check for socklen_t.
15904 * configure, config.in: Regenerate.
15905
15906 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15907
15908 * acconfig.h: Remove.
15909 * configure.ac: Add a test for socklen_t. Use three-argument
15910 AC_DEFINE throughout.
15911 * config.in: Regenerated using autoheader 2.59.
15912 * configure: Regenerated.
15913
15914 * gdbreplay.c (socklen_t): Provide a default.
15915 (remote_open): Use socklen_t.
15916 * remote-utils.c (socklen_t): Provide a default.
15917 (remote_open): Use socklen_t.
15918 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15919 unsigned char.
15920
15921 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15922 char for buffers.
15923 * linux-low.c (linux_read_memory, linux_write_memory)
15924 (linux_read_auxv): Likewise.
15925 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15926 (check_mem_write): Likewise.
15927 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15928 Likewise.
15929 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15930 (registers_from_string, register_data): Likewise.
15931 * server.c (handle_query, main): Likewise.
15932 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15933 (decode_M_packet): Likewise.
15934 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15935 * target.h (struct target_ops): Update read_memory, write_memory,
15936 and read_auxv.
15937 (read_inferior_memory, write_inferior_memory): Update.
15938 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15939 to unsigned char *.
15940 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15941 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15942 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15943 linux-s390-low.c, linux-sh-low.c: Update for changes in
15944 read_inferior_memory and the_low_target->breakpoint.
15945
15946 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15947
15948 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15949 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15950 * configure.srv: Add powerpc64-*-linux*.
15951 * linux-ppc64-low.c: New file.
15952
15953 2005-05-23 Orjan Friberg <orjanf@axis.com>
15954
15955 * linux-cris-low.c: New file with support for CRIS.
15956 * linux-crisv32-low.c: Ditto for CRISv32.
15957 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15958 (clean): Add reg-cris.c and reg-crisv32.c.
15959 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15960 reg-crisv32.o, and reg-crisv32.c to make rules.
15961 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15962 recognized targets.
15963
15964 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15965
15966 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15967 of sizeof (PTRACE_XFER_TYPE).
15968 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15969
15970 2005-05-12 Orjan Friberg <orjanf@axis.com>
15971
15972 * target.h (struct target_ops): Add insert_watchpoint,
15973 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15974 pointers for hardware watchpoint support.
15975 * linux-low.h (struct linux_target_ops): Ditto.
15976 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15977 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15978 to linux_target_ops.
15979 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15980 reply packet.
15981 * server.c (main): Recognize 'Z' and 'z' packets.
15982
15983 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15984
15985 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15986 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15987 (the_low_target): Add new members.
15988
15989 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15990
15991 * proc-service.c (ps_lgetregs): Search all_processes instead of
15992 all_threads.
15993
15994 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15995
15996 * server.c (start_inferior): Change return type to int.
15997 (attach_inferior): Change sigptr to int *.
15998 (handle_v_cont, handle_v_requests): Change signal to int *.
15999 (main): Change signal to int.
16000
16001 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16002
16003 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16004 * configure.srv: Add m32r*-*-linux*.
16005 * linux-m32r-low.c: New file.
16006
16007 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16008
16009 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16010
16011 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16012
16013 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16014 Take unsigned long arguments for PIDs.
16015 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16016 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16017 (wait_for_sigstop, linux_resume_one_process)
16018 (regsets_fetch_inferior_registers, linux_send_signal)
16019 (linux_read_auxv): Likewise. Update the types of variables holding
16020 PIDs. Update format string specifiers.
16021 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16022 * remote-utils.c (prepare_resume_reply): Likewise.
16023 * server.c (cont_thread, general_thread, step_thread)
16024 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16025 unsigned long.
16026 (handle_query): Update format specifiers.
16027 (handle_v_cont, main): Use strtoul for thread IDs.
16028 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16029 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16030 (general_thread, step_thread, thread_from_wait)
16031 (old_thread_from_wait): Update.
16032 * target.h (struct thread_resume): Use unsigned long for THREAD.
16033 (struct target_ops): Use unsigned long for arguments to attach and
16034 thread_alive.
16035
16036 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16037
16038 * acinclude.m4: Include bfd/bfd.m4 directly.
16039 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16040 <agriffis@toolchain.org>.
16041 * aclocal.m4, configure: Regenerated.
16042
16043 2005-01-07 Andrew Cagney <cagney@gnu.org>
16044
16045 * configure.ac: Rename configure.in, require autoconf 2.59.
16046 * configure: Re-generate.
16047
16048 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16049
16050 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16051 LIBS when finished.
16052 * aclocal.m4: Regenerated.
16053 * configure: Regenerated.
16054
16055 2004-11-21 Andreas Schwab <schwab@suse.de>
16056
16057 * linux-m68k-low.c (m68k_num_gregs): Define.
16058 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16059 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16060 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16061 (m68k_breakpoint_at): New. Add to the_low_target.
16062
16063 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16064 srv_linux_thread_db to yes.
16065
16066 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16067
16068 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16069 (ARCH_SET_FS): Likewise.
16070 (ARCH_GET_FS): Likewise.
16071 (ARCH_GET_GS): Likewise.
16072
16073 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16074
16075 * linux-i386-low.c (ps_get_thread_area): New.
16076 * linux-x86-64-low.c (ps_get_thread_area): New.
16077 * linux-low.c: Include <sys/syscall.h>.
16078 (linux_kill_one_process): Don't kill the first thread here.
16079 (linux_kill): Kill the first thread here.
16080 (kill_lwp): New function.
16081 (send_sigstop, linux_send_signal): Use it.
16082 * proc-service.c: Clean up #ifdefs.
16083 (fpregset_info): Delete.
16084 (ps_lgetregs): Update and enable implementation.
16085 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16086 implementations.
16087 * remote-utils.c (struct sym_cache, symbol_cache): New.
16088 (input_interrupt): Print a clearer message.
16089 (async_io_enabled): New variable.
16090 (enable_async_io, disable_async_io): Use it. Update comments.
16091 (look_up_one_symbol): Use the symbol cache.
16092 * thread-db.c (thread_db_look_up_symbols): New function.
16093 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16094
16095 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16096
16097 * configure.in: Test for -rdynamic.
16098 * configure: Regenerated.
16099 * Makefile (INTERNAL_LDFLAGS): New.
16100 (gdbserver, gdbreplay): Use it.
16101
16102 2004-09-02 Andrew Cagney <cagney@gnu.org>
16103
16104 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16105
16106 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16107
16108 * linux-low.c (linux_wait): Clear all_processes list also.
16109
16110 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16111
16112 * linux-low.c: Include <errno.h>. Remove extern declaration of
16113 errno.
16114
16115 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16116
16117 * gdbreplay.c, server.h, utils.c: Update copyright years.
16118
16119 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16120
16121 * server.c (main): Print child status or termination signal from
16122 variable 'signal', not 'sig'.
16123
16124 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16125
16126 * linux-low.c (linux_read_memory): Change return type to
16127 int. Check for and return error from ptrace().
16128 * target.c (read_inferior_memory): Change return type to int. Pass
16129 back return status from the_target->read_memory().
16130 * target.h (struct target_ops): Adapt *read_memory() prototype.
16131 Update comment.
16132 (read_inferior_memory): Adapt prototype.
16133 * server.c (main): Return an error packet if
16134 read_inferior_memory() returns an error.
16135
16136 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16137
16138 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16139 Unify with other clean targets.
16140
16141 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16142
16143 * server.c (handle_v_cont): Call set_desired_inferior.
16144
16145 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16146
16147 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16148
16149 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16150
16151 * linux-low.c (linux_wait): Unblock async I/O.
16152 (linux_resume): Block and enable async I/O.
16153 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16154 * server.h (block_async_io, unblock_async_io): Add prototypes.
16155
16156 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16157
16158 * remote-utils.c (remote_open): Print a status notice after
16159 opening a TCP port.
16160 * server.c (attach_inferior): Print a status notice after
16161 attaching.
16162
16163 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16164
16165 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16166
16167 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16168
16169 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16170 error packet.
16171 * server.c, target.h: Update copyright years.
16172
16173 2004-02-25 Roland McGrath <roland@redhat.com>
16174
16175 * target.h (struct target_ops): New member `read_auxv'.
16176 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16177 * linux-low.c (linux_read_auxv): New function.
16178 (linux_target_ops): Initialize `read_auxv' member to that.
16179
16180 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16181
16182 Committed by Jim Blandy <jimb@redhat.com>.
16183
16184 * linux-s390-low.c (s390_num_regs): Update.
16185 (s390_regmap): Remove control registers. Use __s390x__ predefine
16186 instead of GPR_SIZE to distiguish s390 and s390x targets.
16187
16188 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16189
16190 * linux-low.c: Update copyright year.
16191 (check_removed_breakpoint): Clear pending_is_breakpoint.
16192 (linux_set_resume_request, linux_queue_one_thread)
16193 (resume_status_pending_p): New functions.
16194 (linux_continue_one_thread): Use process->resume.
16195 (linux_resume): Only resume threads if there are no pending events.
16196 * linux-low.h (struct process_info): Add resume request
16197 pointer.
16198
16199 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16200
16201 * regcache.c (new_register_cache): Clear the allocated register
16202 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16203
16204 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16205
16206 * linux-low.c (linux_resume): Take a struct thread_resume *
16207 argument.
16208 (linux_wait): Update call.
16209 (resume_ptr): New static variable.
16210 (linux_continue_one_thread): Renamed from
16211 linux_continue_one_process. Use resume_ptr.
16212 (linux_resume): Use linux_continue_one_thread.
16213 * server.c (handle_v_cont, handle_v_requests): New functions.
16214 (myresume): New function.
16215 (main): Handle 'v' case.
16216 * target.h (struct thread_resume): New type.
16217 (struct target_ops): Change argument of "resume" to struct
16218 thread_resume *.
16219 (myresume): Delete macro.
16220
16221 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16222
16223 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16224 (uninstall): Support DESTDIR.
16225
16226 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16227
16228 * configure.srv: Add xscale*linux copy of arm*linux entry.
16229
16230 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16231
16232 * linux-arm-low.c (arm_reinsert_addr): New function.
16233 (the_low_target): Add arm_reinsert_addr.
16234
16235 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16236
16237 * mem-break.c: Remove whitespace at end of file.
16238
16239 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16240
16241 * configure.in: Check whether we need to prototype strerror.
16242 * server.h: Optionally prototype strerror.
16243 * gdbreplay.c (perror_with_name): Use strerror.
16244 * linux-low.c (linux_attach_lwp): Use strerror.
16245 * utils.c (perror_with_name): Use strerror.
16246 * config.in, configure: Regenerated.
16247
16248 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16249
16250 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16251 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16252
16253 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16254
16255 * Makefile.in (SFILES): Update.
16256 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16257 low-sun3.c: Remove files.
16258
16259 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16260
16261 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16262 (linux_detach_one_process, linux_detach): New functions.
16263 (linux_target_ops): Add linux_detach.
16264 * server.c (main): Handle 'D' packet.
16265 * target.h (struct target_ops): Add "detach" member.
16266 (detach_inferior): Define.
16267
16268 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16269
16270 From Kelley Cook <kelleycook@wideopenwest.com>:
16271 * configure.srv: Accept i[34567]86 variants.
16272
16273 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16274
16275 * linux-low.c (linux_wait_for_event): Correct comment typos.
16276 (linux_resume_one_process): Call check_removed_breakpoint.
16277 (linux_send_signal): New function.
16278 (linux_target_ops): Add linux_send_signal.
16279 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16280 of kill.
16281 * target.h (struct target_ops): Add send_signal.
16282
16283 2003-05-29 Jim Blandy <jimb@redhat.com>
16284
16285 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16286 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16287 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16288 away part of the register's value.
16289
16290 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16291
16292 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16293 (linux_wait_for_event, linux_init_signals): Likewise.
16294
16295 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16296
16297 * configure.in: Check for stdlib.h.
16298 * configure: Regenerated.
16299 * config.in: Regenerated.
16300
16301 2003-01-04 Andreas Schwab <schwab@suse.de>
16302
16303 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16304
16305 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16306
16307 * Makefile.in: Remove obsolete code.
16308
16309 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16310
16311 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16312 defined(PT_FPR0_HI).
16313
16314 2002-11-17 Stuart Hughes <seh@zee2.com>
16315
16316 * linux-arm-low.c (arm_num_regs): Increase.
16317 (arm_regmap): Include status register.
16318
16319 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16320
16321 * linux-low.c (register_addr): Remove incorrect -1 check.
16322
16323 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16324
16325 * linux-low.c (linux_create_inferior): Call setpgid. Return
16326 the new PID.
16327 (unstopped_p, linux_signal_pid): Remove.
16328 (linux_target_ops): Remove linux_signal_pid.
16329 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16330 global instead of target method.
16331 * target.h (struct target_ops): Remove signal_pid. Update comment
16332 for create_inferior.
16333 * server.c (signal_pid): New variable.
16334 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16335 gdbserver. Set the child to be the foreground process group.
16336 (attach_inferior): Set signal_pid.
16337
16338 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16339
16340 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16341
16342 2002-08-20 Jim Blandy <jimb@redhat.com>
16343
16344 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16345 default for this.
16346
16347 2002-08-01 Andrew Cagney <cagney@redhat.com>
16348
16349 * Makefile.in: Make chill references obsolete.
16350
16351 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16352
16353 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16354 * configure: Regenerate.
16355 * config.in: Regenerate.
16356
16357 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16358
16359 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16360 (perror_with_name, remote_close, remote_open, expect, play): Static.
16361
16362 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16363
16364 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16365 byte offsets instead of an array of indexes.
16366 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16367
16368 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16369
16370 * regcache.c: Add comment.
16371
16372 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16373
16374 * thread-db.c: New file.
16375 * proc-service.c: New file.
16376 * acinclude.m4: New file.
16377 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16378 proc-service.o, and thread-db.o.
16379 (linux-low.o): Add USE_THREAD_DB.
16380 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16381 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16382 * aclocal.m4: Regenerated.
16383 * config.in: Regenerated.
16384 * configure: Regenerated.
16385 * configure.in: Check for proc_service.h, sys/procfs.h,
16386 thread_db.h, and linux/elf.h headrs.
16387 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16388 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16389 Check for -lthread_db and thread support.
16390 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16391 PowerPC, and SuperH.
16392 * i387-fp.c: Constify arguments.
16393 * i387-fp.h: Likewise.
16394 * inferiors.c: (struct thread_info): Renamed from
16395 `struct inferior_info'. Remove PID member. Use generic inferior
16396 list header. All uses updated.
16397 (inferiors, signal_pid): Removed.
16398 (all_threads): New variable.
16399 (get_thread): Define.
16400 (add_inferior_to_list): New function.
16401 (for_each_inferior): New function.
16402 (change_inferior_id): New function.
16403 (add_inferior): Removed.
16404 (remove_inferior): New function.
16405 (add_thread): New function.
16406 (free_one_thread): New function.
16407 (remove_thread): New function.
16408 (clear_inferiors): Use for_each_inferior and free_one_thread.
16409 (find_inferior): New function.
16410 (find_inferior_id): New function.
16411 (inferior_target_data): Update argument type.
16412 (set_inferior_target_data): Likewise.
16413 (inferior_regcache_data): Likewise.
16414 (set_inferior_regcache_data): Likewise.
16415 * linux-low.c (linux_bp_reinsert): Remove.
16416 (all_processes, stopping_threads, using_thrads)
16417 (struct pending_signals, debug_threads, pid_of): New.
16418 (inferior_pid): Replace with macro.
16419 (struct inferior_linux_data): Remove.
16420 (get_stop_pc, add_process): New functions.
16421 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16422 Use add_process and add_thread.
16423 (linux_attach_lwp): New function, based on old linux_attach. Use
16424 add_process and add_thread. Set stop_expected for new threads.
16425 (linux_attach): New function.
16426 (linux_kill_one_process): New function.
16427 (linux_kill): Kill all LWPs.
16428 (linux_thread_alive): Use find_inferior_id.
16429 (check_removed_breakpoints, status_pending_p): New functions.
16430 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16431 Update. Use WNOHANG. Wait for cloned processes also. Update process
16432 struct for the found process.
16433 (linux_wait_for_event): New function.
16434 (linux_wait): Use it. Support LWPs.
16435 (send_sigstop, wait_for_sigstop, stop_all_processes)
16436 (linux_resume_one_process, linux_continue_one_process): New functions.
16437 (linux_resume): Support LWPs.
16438 (REGISTER_RAW_SIZE): Remove.
16439 (fetch_register): Use register_size instead. Call supply_register.
16440 (usr_store_inferior_registers): Likewise. Call collect_register.
16441 Fix recursive case.
16442 (regsets_fetch_inferior_registers): Improve error message.
16443 (regsets_store_inferior_registers): Add debugging.
16444 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16445 (unstopped_p, linux_signal_pid): New functions.
16446 (linux_target_ops): Add linux_signal_pid.
16447 (linux_init_signals): New function.
16448 (initialize_low): Call it. Initialize using_threads.
16449 * regcache.c (inferior_regcache_data): Add valid
16450 flag.
16451 (get_regcache): Fetch registers lazily. Add fetch argument
16452 and update all callers.
16453 (regcache_invalidate_one, regcache_invalidate): New
16454 functions.
16455 (new_register_cache): Renamed from create_register_cache.
16456 Return the new regcache.
16457 (free_register_cache): Change argument to a void *.
16458 (registers_to_string, registers_from_string): Call get_regcache
16459 with fetch flag set.
16460 (register_data): Make static. Pass fetch flag to get_regcache.
16461 (supply_register): Call get_regcache with fetch flag clear.
16462 (collect_register): Call get_regcache with fetch flag set.
16463 (collect_register_as_string): New function.
16464 * regcache.h: Update.
16465 * remote-utils.c (putpkt): Flush after debug output and use
16466 stderr.
16467 Handle input interrupts while waiting for an ACK.
16468 (input_interrupt): Use signal_pid method.
16469 (getpkt): Flush after debug output and use stderr.
16470 (outreg): Use collect_register_as_string.
16471 (new_thread_notify, dead_thread_notify): New functions.
16472 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16473 and general_thread.
16474 (look_up_one_symbol): Flush after debug output.
16475 * server.c (step_thread, server_waiting): New variables.
16476 (start_inferior): Don't use signal_pid. Update call to mywait.
16477 (attach_inferior): Update call to mywait.
16478 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16479 (main): Don't fetch/store registers explicitly. Use
16480 set_desired_inferior. Support proposed ``Hs'' packet. Update
16481 calls to mywait.
16482 * server.h: Update.
16483 (struct inferior_list, struct_inferior_list_entry): New.
16484 * target.c (set_desired_inferior): New.
16485 (write_inferior_memory): Constify.
16486 (mywait): New function.
16487 * target.h: Update.
16488 (struct target_ops): New signal_pid method.
16489 (mywait): Removed macro, added prototype.
16490
16491 * linux-low.h (regset_func): Removed.
16492 (regset_fill_func, regset_store_func): New.
16493 (enum regset_type): New.
16494 (struct regset_info): Add type field. Use new operation types.
16495 (struct linux_target_ops): stop_pc renamed to get_pc.
16496 Add decr_pc_after_break and breakpoint_at.
16497 (get_process, get_thread_proess, get_process_thread)
16498 (strut process_info, all_processes, linux_attach_lwp)
16499 (thread_db_init): New.
16500
16501 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16502 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16503 (the_low_target): Add new members.
16504 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16505 (i386_store_fpxregset): Constify.
16506 (target_regsets): Add new kind identifier.
16507 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16508 (i386_set_pc): Add debugging.
16509 (i386_breakpoint_at): New function.
16510 (the_low_target): Add new members.
16511 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16512 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16513 (mips_breakpoint_at): New.
16514 (the_low_target): Add new members.
16515 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16516 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16517 (the_low_target): Add new members.
16518 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16519 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16520 (the_low_target): Add new members.
16521 * linux-x86-64-low.c (target_regsets): Add new kind
16522 identifier.
16523
16524 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16525
16526 From Martin Pool <mbp@samba.org>:
16527 * server.c (gdbserver_usage): New function.
16528 (main): Call it.
16529
16530 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16531
16532 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16533 stop_at -> stop_pc.
16534
16535 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16536
16537 * Makefile.in: Remove obsolete code.
16538
16539 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16540
16541 * linux-low.c (regsets_fetch_inferior_registers),
16542 (regsets_store_inferior_registers): Removed cast to int from
16543 ptrace() calls.
16544 * regcache.h: Added declaration of struct inferior_info.
16545
16546 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16547
16548 * inferiors.c (struct inferior_info): Add regcache_data.
16549 (add_inferior): Call create_register_cache.
16550 (clear_inferiors): Call free_register_cache.
16551 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16552 * regcache.c (struct inferior_regcache_data): New.
16553 (registers): Remove.
16554 (get_regcache): New function.
16555 (create_register_cache, free_register_cache): New functions.
16556 (set_register_cache): Don't initialize the register cache here.
16557 (registers_to_string, registers_from_string, register_data): Call
16558 get_regcache.
16559 * regcache.h: Add prototypes.
16560 * server.h: Likewise.
16561
16562 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16563
16564 * mem-break.c: New file.
16565 * mem-break.h: New file.
16566 * Makefile.in: Add mem-break.o rule; update server.h
16567 dependencies.
16568 * inferiors.c (struct inferior_info): Add target_data
16569 member.
16570 (clear_inferiors): Free target_data member if set.
16571 (inferior_target_data, set_inferior_target_data): New functions.
16572 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16573 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16574 * linux-low.c (linux_bp_reinsert): New variable.
16575 (struct inferior_linux_data): New.
16576 (linux_create_inferior): Use set_inferior_target_data.
16577 (linux_attach): Likewise. Call add_inferior.
16578 (linux_wait_for_one_inferior): New function.
16579 (linux_wait): Call it.
16580 (linux_write_memory): Add const.
16581 (initialize_low): Call set_breakpoint_data.
16582 * linux-low.h (struct linux_target_ops): Add breakpoint
16583 handling members.
16584 * server.c (attach_inferior): Remove extra add_inferior
16585 call.
16586 * server.h: Include mem-break.h. Update inferior.c
16587 prototypes.
16588 * target.c (read_inferior_memory)
16589 (write_inferior_memory): New functions.
16590 * target.h (read_inferior_memory)
16591 (write_inferior_memory): Change macros to prototypes.
16592 (struct target_ops): Update comments. Add const to write_memory
16593 definition.
16594
16595 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16596
16597 * linux-low.c (usr_store_inferior_registers): Support
16598 registers which are allowed to fail to store.
16599 * linux-low.h (linux_target_ops): Likewise.
16600 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16601 (ppc_cannot_store_register): FPSCR may not be storable.
16602
16603 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16604
16605 * server.h: Include <string.h> if HAVE_STRING_H.
16606 * ChangeLog: Correct paths in last ChangeLog entry.
16607
16608 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16609
16610 * linux-low.h: Remove obsolete prototypes.
16611 (struct linux_target_ops): New.
16612 (extern the_low_target): New.
16613 * linux-low.c (num_regs, regmap): Remove declarations.
16614 (register_addr): Use the_low_target explicitly.
16615 (fetch_register): Likewise.
16616 (usr_fetch_inferior_registers): Likewise.
16617 (usr_store_inferior_registers): Likewise.
16618 * linux-arm-low.c (num_regs): Remove.
16619 (arm_num_regs): Define.
16620 (arm_regmap): Renamed from regmap, made static.
16621 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16622 made static.
16623 (arm_cannot_store_register): Renamed from cannot_store_register,
16624 made static.
16625 (the_low_target): New.
16626 * linux-i386-low.c (num_regs): Remove.
16627 (i386_num_regs): Define.
16628 (i386_regmap): Renamed from regmap, made static.
16629 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16630 made static.
16631 (i386_cannot_store_register): Renamed from cannot_store_register,
16632 made static.
16633 (the_low_target): New.
16634 * linux-ia64-low.c (num_regs): Remove.
16635 (ia64_num_regs): Define.
16636 (ia64_regmap): Renamed from regmap, made static.
16637 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16638 made static.
16639 (ia64_cannot_store_register): Renamed from cannot_store_register,
16640 made static.
16641 (the_low_target): New.
16642 * linux-m68k-low.c (num_regs): Remove.
16643 (m68k_num_regs): Define.
16644 (m68k_regmap): Renamed from regmap, made static.
16645 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16646 made static.
16647 (m68k_cannot_store_register): Renamed from cannot_store_register,
16648 made static.
16649 (the_low_target): New.
16650 * linux-mips-low.c (num_regs): Remove.
16651 (mips_num_regs): Define.
16652 (mips_regmap): Renamed from regmap, made static.
16653 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16654 made static.
16655 (mips_cannot_store_register): Renamed from cannot_store_register,
16656 made static.
16657 (the_low_target): New.
16658 * linux-ppc-low.c (num_regs): Remove.
16659 (ppc_num_regs): Define.
16660 (ppc_regmap): Renamed from regmap, made static.
16661 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16662 made static.
16663 (ppc_cannot_store_register): Renamed from cannot_store_register,
16664 made static.
16665 (the_low_target): New.
16666 * linux-s390-low.c (num_regs): Remove.
16667 (s390_num_regs): Define.
16668 (s390_regmap): Renamed from regmap, made static.
16669 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16670 made static.
16671 (s390_cannot_store_register): Renamed from cannot_store_register,
16672 made static.
16673 (the_low_target): New.
16674 * linux-sh-low.c (num_regs): Remove.
16675 (sh_num_regs): Define.
16676 (sh_regmap): Renamed from regmap, made static.
16677 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16678 made static.
16679 (sh_cannot_store_register): Renamed from cannot_store_register,
16680 made static.
16681 (the_low_target): New.
16682 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16683 (the_low_target): New.
16684
16685 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16686
16687 * Makefile.in: Add stamp-h target.
16688 * configure.in: Create stamp-h.
16689 * configure: Regenerated.
16690
16691 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16692
16693 * inferiors.c: New file.
16694 * target.c: New file.
16695 * target.h: New file.
16696 * Makefile.in: Add target.o and inferiors.o. Update
16697 dependencies.
16698 * linux-low.c (inferior_pid): New static variable,
16699 moved from server.c.
16700 (linux_create_inferior): Renamed from create_inferior.
16701 Call add_inferior. Return 0 on success instead of a PID.
16702 (linux_attach): Renamed from myattach.
16703 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16704 (linux_thread_alive): Renamed from mythread_alive.
16705 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16706 child dies.
16707 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16708 (regsets_store_inferior_registers): Correct error message.
16709 Add missing ``return 0''.
16710 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16711 (linux_store_registers): Renamed from store_inferior_registers.
16712 (linux_read_memory): Renamed from read_inferior_memory.
16713 (linux_write_memory): Renamed from write_inferior_memory.
16714 (linux_target_ops): New structure.
16715 (initialize_low): Call set_target_ops ().
16716 * remote-utils.c (unhexify): New function.
16717 (hexify): New function.
16718 (input_interrupt): Send signals to ``signal_pid''.
16719 * server.c (inferior_pid): Remove.
16720 (start_inferior): Update create_inferior call.
16721 (attach_inferior): Call add_inferior.
16722 (handle_query): New function.
16723 (main): Call handle_query for `q' packets.
16724 * server.h: Include "target.h". Remove obsolete prototypes.
16725 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16726
16727 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16728
16729 * Makefile.in: Add WARN_CFLAGS. Update configury
16730 dependencies.
16731 * configure.in: Check for <string.h>
16732 * configure: Regenerate.
16733 * config.in: Regenerate.
16734 * gdbreplay.c: Include needed system headers.
16735 (remote_open): Remove strchr prototype.
16736 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16737 * regcache.c (supply_register): Change buf argument to const void *.
16738 (supply_register_by_name): Likewise.
16739 (collect_register): Change buf argument to void *.
16740 (collect_register_by_name): Likewise.
16741 * regcache.h: Add missing prototypes.
16742 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16743 * server.c (handle_query): New function.
16744 (attached): New static variable, moved out of main.
16745 (main): Quiet longjmp clobber warnings.
16746 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16747 * utils.c (error): Remove NORETURN.
16748 (fatal): Likewise.
This page took 0.377363 seconds and 4 git commands to generate.