Increase gdbsever PBUFSIZ
[binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2
3 * server.h (PBUFSIZ): Increase size
4
5 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6
7 * regcache.c (regcache::raw_compare): New function.
8 * regcache.h (regcache::raw_compare): New declaration.
9
10 2018-06-11 Alan Hayward <alan.hayward@arm.com>
11
12 * regcache.c (new_register_cache): Use new.
13 (free_register_cache): Use delete.
14 (register_data): Use const.
15 (supply_register): Move body inside regcache.
16 (regcache::raw_supply): New override function.
17 (collect_register): Move body inside regcache.
18 (regcache::raw_collect): New override function.
19 (regcache::get_register_status): New override function.
20 * regcache.h (struct regcache): Inherit from reg_buffer_common.
21
22 2018-06-09 Tom Tromey <tom@tromey.com>
23
24 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
25 declare queue.
26 (event_queue): Use std::queue.
27 (gdb_event_xfree): Remove.
28 (initialize_event_loop, process_event, wait_for_event): Update.
29
30 2018-06-08 Stan Cox <scox@redhat.com>
31
32 * win32-low.c (win32_create_inferior): last_ptid and last_status
33 moved to client_state.
34
35 2018-06-08 Pedro Alves <palves@redhat.com>
36
37 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
38 common/common-exceptions.o, common/common-utils.o,
39 common/errors.o, common/print-utils.o and utils.o.
40 * gdbreplay.c: Include "common-defs.h" instead of the two
41 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
42 string.h or alloca.h.
43 (perror_with_name): Delete.
44 (remote_open): Use xstrdup instead of strdup.
45 (main): Rename to ...
46 (captured_main): ... this.
47 (main): New.
48
49 2018-06-08 Tom Tromey <tom@tromey.com>
50
51 * linux-low.c (linux_low_read_btrace): Update.
52
53 2018-06-04 Stan Cox <scox@redhat.com>
54
55 * server.h (struct client_state): New.
56 * server.c (cont_thread, general_thread, multi_process)
57 (report_fork_events, report_vfork_events, report_exec_events)
58 (report_thread_events, swbreak_feature, hwbreak_feature)
59 (vCont_supported, disable_randomization, pass_signals)
60 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
61 Moved to client_state.
62 * remote-utils.c (remote_debug, noack_mode)
63 (transport_is_reliable): Moved to client_state.
64 * tracepoint.c (current_traceframe): Moved to client_state.
65
66 Update all callers.
67 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
68 linux-low.c, remote-utils.h, target.c: Use client_state.
69
70 2018-05-31 Alan Hayward <alan.hayward@arm.com>
71
72 * configure.srv: Add new c/h file.
73
74 2018-05-31 Alan Hayward <alan.hayward@arm.com>
75
76 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
77 null VQ.
78
79 2018-05-25 Maciej W. Rozycki <macro@mips.com>
80
81 * gdb.arch/mips-fpregset-core.exp: New test.
82 * gdb.arch/mips-fpregset-core.c: New test source.
83
84 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
85
86 PR server/23198
87 * hostio.c (require_int): Do not report overflow for integers
88 between 0xfffffff and 0x7fffffff.
89
90 2018-05-22 Maciej W. Rozycki <macro@mips.com>
91
92 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
93 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
94 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
95 functions.
96 (the_low_target): Wire them.
97
98 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
99
100 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
101 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
102 mode. Call collect_register_by_name with vscr using
103 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
104 (ppc_store_vrregset): Add and set vscr_offset variable as in
105 ppc_fill_vrregset. Call supply_register_by_name with vscr using
106 vscr_offset.
107
108 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
109
110 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
111 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
112 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
113
114 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
115
116 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
117 (ppc_store_vsxregset): Likewise.
118 (ppc_fill_vrregset): Likewise.
119 (ppc_store_vrregset): Likewise.
120 (ppc_fill_evrregset): Likewise.
121 (ppc_store_evrregset): Likewise.
122 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
123 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
124 needed.
125
126 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
127
128 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
129 wordsize of the inferior. Call ppc_linux_target_wordsize.
130
131 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
132
133 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
134 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
135 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
136 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
137 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
138 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
139 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
140 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
141 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
142 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
143 (tdesc_powerpc_e500l): Remove.
144 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
145 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
146 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
147 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
148 linux-ppc-tdesc.h.
149 (ppc_arch_setup): Remove target description matching code. Fill a
150 ppc_linux_features struct and call ppc_linux_match_description
151 with it.
152
153 2018-05-22 Maciej W. Rozycki <macro@mips.com>
154
155 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
156 width of the requested register exceeds the width of the
157 `ptrace' data type.
158 (mips_cannot_store_register): Likewise.
159
160 2018-05-21 Maciej W. Rozycki <macro@mips.com>
161
162 * linux-mips-low.c (mips_fetch_register): New function. Update
163 preceding comment.
164 (mips_store_gregset): Supply 0 rather than $restart for $zero.
165 (the_low_target): Wire `mips_fetch_register'.
166
167 2018-05-10 Joel Brobecker <brobecker@adacore.com>
168
169 * lynx-i386-low.c (LYNXOS_178): New macro.
170 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
171 the layout on LynxOS-178.
172 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
173 handle floating point registers that are not supported by
174 LynxOS-178.
175
176 2018-05-10 Tom Tromey <tom@tromey.com>
177
178 * configure: Rebuild.
179
180 2018-05-10 Joel Brobecker <brobecker@adacore.com>
181
182 PR server/23158:
183 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
184 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
185 Use it to set the expedite_regs field in the given tdesc.
186 * x86-tdesc.h: New file.
187 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
188 Adjust following the addition of the new expedite_regs parameter
189 to init_target_desc.
190 * linux-tic6x-low.c (tic6x_read_description): Likewise.
191 * linux-x86-tdesc.c: #include "x86-tdesc.h".
192 (i386_linux_read_description, amd64_linux_read_description):
193 Adjust following the addition of the new expedite_regs parameter
194 to init_target_desc.
195 * lynx-i386-low.c: #include "x86-tdesc.h".
196 (lynx_i386_arch_setup): Adjust following the addition of the new
197 expedite_regs parameter to init_target_desc.
198 * nto-x86-low.c: #include "x86-tdesc.h".
199 (nto_x86_arch_setup): Adjust following the addition of the new
200 expedite_regs parameter to init_target_desc.
201 * win32-i386-low.c: #include "x86-tdesc.h".
202 (i386_arch_setup): Adjust following the addition of the new
203 expedite_regs parameter to init_target_desc.
204
205 2018-05-10 Joel Brobecker <brobecker@adacore.com>
206
207 PR server/23158:
208 * win32-low.c (win32_create_inferior): Add call to my_wait
209 setting last_status global.
210
211 2018-05-10 Joel Brobecker <brobecker@adacore.com>
212
213 PR server/23158:
214 * win32-low.c (create_process): Only call gdb_tilde_expand if
215 inferior_cwd is not NULL.
216
217 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
218
219 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
220 registers to the cache if their values have changed.
221 (i387_xsave_to_cache): Provide default values for x87 control
222 registers when these features are available, but disabled.
223 * regcache.c (supply_register_by_name_zeroed): New function.
224 * regcache.h (supply_register_by_name_zeroed): Declare new
225 function.
226
227 2018-05-07 Tom Tromey <tom@tromey.com>
228
229 * configure: Rebuild.
230
231 2018-05-04 Tom Tromey <tom@tromey.com>
232
233 * configure: Rebuild.
234
235 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
236 Pedro Alves <palves@redhat.com>
237
238 * linux-aarch64-low.c (aarch64_stopped_data_address):
239 Likewise.
240
241 2018-04-27 Tom Tromey <tom@tromey.com>
242
243 * configure: Rebuild.
244
245 2018-04-23 Tom Tromey <tom@tromey.com>
246
247 * configure: Rebuild.
248
249 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
250
251 * Makefile.in (depcomp): Add "..".
252 (all_deps_files): New and use it.
253
254 2018-04-18 Alan Hayward <alan.hayward@arm.com>
255
256 * configure.srv (aarch64*-*-linux*): Don't include xml.
257 (i[34567]86-*-cygwin*): Likewise.
258 (i[34567]86-*-linux*): Likewise.
259 (i[34567]86-*-lynxos*): Likewise.
260 (i[34567]86-*-mingw32ce*): Likewise.
261 (i[34567]86-*-mingw*): Likewise.
262 (i[34567]86-*-nto*): Likewise.
263 (tic6x-*-uclinux): Likewise.
264 (x86_64-*-linux*): Likewise.
265 (x86_64-*-mingw*): Likewise.
266 (x86_64-*-cygwin*): Likewise.
267
268 2018-04-18 Alan Hayward <alan.hayward@arm.com>
269
270 * tdesc.c: Remove xml parameter.
271
272 2018-04-18 Alan Hayward <alan.hayward@arm.com>
273
274 * server.c (get_features_xml): Remove cast.
275 * tdesc.c (void target_desc::accept): Fill in function.
276 (tdesc_get_features_xml): Remove old xml creation.
277 (print_xml_feature::visit_pre): Add xml vistor.
278 * tdesc.h (struct target_desc): Make xmltarget mutable.
279 (tdesc_get_features_xml): Remove declaration.
280
281 2018-04-18 Alan Hayward <alan.hayward@arm.com>
282
283 * tdesc.c (tdesc_architecture_name): Add new function.
284 (tdesc_osabi_name): Likewise.
285 (tdesc_get_features_xml): Use new functions.
286
287 2018-04-18 Alan Hayward <alan.hayward@arm.com>
288
289 * tdesc.c (tdesc_create_flags): Remove.
290 (tdesc_add_flag): Likewise.
291 (tdesc_named_type): Likewise.
292 (tdesc_create_union): Likewise.
293 (tdesc_create_struct): Likewise.
294 (tdesc_create_vector): Likewise.
295 (tdesc_add_bitfield): Likewise.
296 (tdesc_add_field): Likewise.
297 (tdesc_set_struct_size): Likewise.
298
299 2018-04-18 Alan Hayward <alan.hayward@arm.com>
300
301 * tdesc.c (~target_desc): Remove implictly deleted items.
302 (init_target_desc): Iterate all features.
303 (tdesc_get_features_xml): Use vector.
304 (tdesc_create_feature): Create feature.
305 * tdesc.h (tdesc_feature) Remove
306 (target_desc): Add features.
307
308 2018-04-18 Alan Hayward <alan.hayward@arm.com>
309
310 * Makefile.in: Add common/tdesc.c
311 * tdesc.c (init_target_desc): init all reg_defs from register
312 vector.
313 (tdesc_create_reg): Create tdesc_reg.
314 * tdesc.h (tdesc_feature): Add register vector.
315
316 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
317
318 * tdesc.h (struct target_desc) <features>: Change type to
319 std::vector<std::string>.
320 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
321 changes.
322 (tdesc_get_features_xml): Likewise.
323 (tdesc_create_feature): Likewise.
324
325 2018-03-26 Alan Hayward <alan.hayward@arm.com>
326
327 * regcache.c (find_register_by_number): Return a ref.
328 (find_regno): Use references.
329 (register_size): Likewise.
330 (register_data): Likewise.
331 * tdesc.c (target_desc::~target_desc): Remove free calls.
332 (target_desc::operator==): Use std::vector compare.
333 (init_target_desc): Use reference.
334 (tdesc_create_reg): Use reg constructors.
335 * tdesc.h (struct target_desc): Replace pointer with object.
336
337 2018-03-23 Alan Hayward <alan.hayward@arm.com>
338
339 * regcache.c (find_register_by_number): Make static.
340 (find_regno): Use find_register_by_number
341 * regcache.h (struct reg): Remove declaration.
342
343 2018-03-23 Alan Hayward <alan.hayward@arm.com>
344
345 * tdesc.c (target_desc::~target_desc): Move to here.
346 (target_desc::operator==): Likewise.
347 * tdesc.h (target_desc::~target_desc): Move from here.
348 (target_desc::operator==): Likewise.
349
350 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
351
352 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
353
354 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
355
356 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
357 S390_TDESC_GS.
358 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
359 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
360 and init_registers_s390_gs_linux64.
361
362 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
363
364 * linux-s390-low.c (s390_fill_gs): Remove function.
365 (s390_fill_gsbc): Remove function.
366 (s390_regsets): Set fill functions for the guarded storage regsets
367 to NULL.
368
369 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
370
371 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
372 the word size. Add comment.
373 (s390_get_wordsize): New function.
374 (s390_arch_setup): No longer select a temporary tdesc to fetch the
375 pswm with it. Instead, use s390_get_wordsize to determine the
376 word size first and derive the correct tdesc from that directly.
377
378 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
379
380 * Makefile.in: Include silent-rules.mk.
381 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
382 (COMPILE): Add ECHO_CXX.
383 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
384 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
385 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
386 (version-generated.c): Add ECHO_GEN.
387 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
388 (IPAGENT_COMPILE): Add ECHO_CXX.
389 (%-generated.c): Add ECHO_REGDAT.
390
391 2018-03-14 Tom Tromey <tom@tromey.com>
392
393 PR cli/14977:
394 * ax.c (ax_printf): Special case for NULL.
395
396 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
397
398 * linux-low.c (linux_qxfer_libraries_svr4): Use
399 xml_escape_text_append.
400
401 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
402
403 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
404
405 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
406
407 * server.c (handle_general_set): Remove unnecessary xstrdup.
408
409 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
410
411 * server.c (parse_debug_format_options): Adjust to
412 delim_string_to_char_ptr_vec changes.
413 * thread-db.c (thread_db_load_search): Adjust to
414 dirnames_to_char_ptr_vec changes.
415
416 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
417
418 * target.h (target_enable_btrace, target_disable_btrace)
419 (target_read_btrace, target_read_btrace_conf): Turn macro into
420 inline function. Throw error if target method is not defined.
421 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
422 check for btrace target method. Be prepared to handle exceptions
423 from btrace target methods.
424
425 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
426
427 * server.c (captured_main): Change order of error message printed
428 when the current working directory cannot be found.
429
430 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
431
432 * server.c: Include "filenames.h" and "pathstuff.h".
433 (program_name): Delete variable.
434 (program_path): New anonymous class.
435 (get_exec_wrapper): Use "program_path" instead of
436 "program_name".
437 (handle_v_run): Likewise.
438 (captured_main): Likewise.
439 (process_serial_event): Likewise.
440
441 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
442
443 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
444 (OBJS): Add "pathstuff.o".
445 * server.c (current_directory): New global variable.
446 (captured_main): Initialize "current_directory".
447
448 2018-02-26 Alan Hayward <alan.hayward@arm.com>
449
450 * tdesc.c: Use common/tdesc.h.
451 * tdesc.h: Likewise.
452
453 2018-02-20 Alan Hayward <alan.hayward@arm.com>
454 Simon Marchi <simon.marchi@ericsson.com>
455
456 * Makefile.in: Switch order of make rules.
457
458 2018-02-19 Alan Hayward <alan.hayward@arm.com>
459
460 * Makefile.in: Add common directory in build.
461 * configure.ac: Add common reference.
462 * configure: Regenerate.
463
464 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
465
466 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
467 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
468 * spu-low.c (spu_target_ops): Likewise.
469 * win32-low.c (win32_target_ops): Likewise.
470 * server.c (supported_btrace_packets): Report packets unconditionally.
471 * target.h (target_ops) <supports_btrace>: Remove.
472 (target_supports_btrace): Remove.
473
474 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
475
476 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
477 (handle_btrace_disable): Change return type to void. Use exceptions
478 to report errors.
479 (handle_btrace_general_set): Catch exception and copy message to
480 return message.
481
482 2018-02-08 Tom Tromey <tom@tromey.com>
483
484 * linux-low.c (install_software_single_step_breakpoints): Use
485 make_scoped_restore.
486 * inferiors.c (make_cleanup_restore_current_thread): Remove.
487 (do_restore_current_thread_cleanup): Remove.
488 * gdbthread.h (make_cleanup_restore_current_thread): Don't
489 declare.
490
491 2018-02-08 Tom Tromey <tom@tromey.com>
492
493 * mem-break.c (set_raw_breakpoint_at): Use
494 gdb::unique_xmalloc_ptr.
495
496 2018-01-30 Pedro Alves <palves@redhat.com>
497
498 PR gdb/13211
499 * target.c (target_terminal::terminal_state): Rename to ...
500 (target_terminal::m_terminal_state): ... this.
501
502 2018-01-19 James Clarke <jrtc27@jrtc27.com>
503
504 * linux-low.c (handle_extended_wait): Surround call to
505 thread_db_notice_clone with #ifdef USE_THREAD_DB.
506
507 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
508
509 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
510 linux_ptrace_attach_fail_reason_string now returning an
511 std::string.
512 (linux_attach): Likewise.
513 * thread-db.c (attach_thread): Likewise.
514
515 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
516
517 PR gdb/21559
518 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
519 checking for fs_base/gs_base fields in struct user_regs_struct.
520 * configure: Regenerate.
521
522 2018-01-16 Yao Qi <yao.qi@linaro.org>
523
524 PR gdb/18749
525 * linux-low.c (fetch_register): Call supply_register instead of
526 error.
527
528 2018-01-08 Yao Qi <yao.qi@linaro.org>
529 Simon Marchi <simon.marchi@ericsson.com>
530
531 * Makefile.in (OBS): Remove selftest.o.
532 * configure.ac: Set srv_selftest_objs if $development is true.
533 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
534 * configure: Re-generated.
535 * server.c (captured_main): Wrap variable selftest_filter with
536 GDB_SELF_TEST.
537
538 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
539
540 * server.c (parse_debug_format_options): Return std::string.
541 (handle_monitor_command, captured_main): Adjust.
542
543 2018-01-05 Pedro Alves <palves@redhat.com>
544
545 PR gdb/18653
546 * server.c (captured_main): Pass quiet=false to
547 save_original_signals_state.
548
549 2018-01-01 Joel Brobecker <brobecker@adacore.com>
550
551 * gdbreplay.c (gdbreplay_version): Update copyright year in
552 version message.
553 * server.c (gdbserver_version): Likewise.
554
555 2017-12-08 Tom Tromey <tom@tromey.com>
556
557 * ax.c (ax_printf): Update.
558
559 2017-12-07 Yao Qi <yao.qi@linaro.org>
560
561 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
562 aarch64_linux_read_description.
563 * linux-amd64-ipa.c (idx2mask): New array.
564 (get_ipa_tdesc): Move idx2mask out.
565 (initialize_low_tracepoint): Initialize target descriptions.
566 * linux-i386-ipa.c (idx2mask): New array.
567 (get_ipa_tdesc): Move idx2mask out.
568 (initialize_low_tracepoint): Initialize target descriptions.
569
570 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
571
572 * tdesc.c (struct tdesc_type): Change return type.
573 (tdesc_add_flag): Change parameter type.
574 (tdesc_add_bitfield): Likewise.
575 (tdesc_add_field): Likewise.
576 (tdesc_set_struct_size): Likewise.
577
578 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
579
580 * regcache.c (registers_to_string): Remove unused variable.
581
582 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
583
584 * inferiors.c (for_each_inferior_with_data): Remove.
585 * inferiors.h (for_each_inferior_with_data): Remove.
586 * server.c (handle_qxfer_threads_worker): Change parameter type.
587 (handle_qxfer_threads_proper): Use for_each_thread.
588
589 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
590
591 * inferiors.c (for_each_inferior): Remove.
592 (clear_inferiors): Use for_each_thread.
593 * inferiors.h (for_each_inferior): Remove.
594 * linux-low.c (linux_wait_for_event_filtered): Use
595 for_each_thread.
596 (linux_stabilize_threads): Likewise.
597 * regcache.c (regcache_release): Likewise.
598 * server.c (gdb_wants_all_threads_stopped): Likewise.
599 (clear_pending_status_callback): Remove.
600 (handle_status): Use for_each_thread.
601 (captured_main): Likewise.
602 * win32-low.c (child_init_thread_list): Likewise.
603 (win32_clear_inferiors): Likewise.
604 (fake_breakpoint_event): Likewise.
605
606 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
607
608 * inferiors.h (find_inferior): Remove.
609 * inferiors.c (find_inferior): Remove.
610
611 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
612
613 * linux-low.c (resume_status_pending_p): Update comment.
614 (need_step_over_p): Update comment.
615
616 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
617
618 * linux-low.c (proceed_one_lwp): Return void, change parameter
619 type.
620 (unsuspend_and_proceed_one_lwp): Likewise.
621 (proceed_all_lwps): Use for_each_thread.
622 (unstop_all_lwps): Likewise.
623
624 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
625
626 * linux-low.c (linux_resume_one_thread): Return void, take
627 parameter directly.
628 (linux_resume): Use for_each_thread.
629
630 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
631
632 * linux-low.c (send_sigstop_callback): Return void, change
633 parameter type. Rename to...
634 (send_sigstop): ... this.
635 (suspend_and_send_sigstop_callback): Return void, change parameter
636 type. Rename to...
637 (suspend_and_send_sigstop): ... this.
638 (stop_all_lwps): Use for_each_thread.
639
640 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
641
642 * linux-low.c (lwp_running): Return bool, remove unused
643 argument.
644 (linux_stabilize_threads): Use find_thread.
645
646 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
647
648 * linux-low.c (select_singlestep_lwp_callback): Remove.
649 (count_events_callback): Remove.
650 (select_event_lwp_callback): Remove.
651 (select_event_lwp): Use find_thread/for_each_thread.
652
653 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
654
655 * linux-low.c (not_stopped_callback): Return bool, take filter
656 argument directly.
657 (linux_wait_for_event_filtered): Use find_thread.
658 (linux_wait_1): Likewise.
659
660 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
661
662 * linux-low.c (same_lwp): Remove.
663 (find_lwp_pid): Use find_thread.
664
665 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
666
667 * linux-low.c (delete_lwp_callback): Remove.
668 (linux_mourn): Use for_each_thread.
669
670 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
671
672 * linux-low.c (linux_detach_lwp_callback): Return void, remove
673 args parameter, don't check for pid.
674 (linux_detach): Use for_each_thread.
675
676 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
677
678 * linux-low.c (struct counter): Remove.
679 (second_thread_of_pid_p): Remove.
680 (last_thread_of_process_p): Use find_thread.
681
682 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
683
684 * inferiors.c (find_inferior_in_random): Remove.
685 * inferiors.h (find_inferior_in_random): Remove.
686 * linux-low.c (status_pending_p_callback): Return bool, accept
687 parameter ptid directly.
688 (linux_wait_for_event_filtered): Use find_thread_in_random.
689 (linux_wait_1): Likewise.
690
691 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
692
693 * inferiors.c (find_inferior_id): Remove.
694 (find_thread_ptid): Move implemention from find_inferior_id to
695 here.
696 * inferiors.h (find_inferior_id): Remove.
697 * server.c (handle_status): Use find_thread_ptid.
698 (process_serial_event): Likewise.
699 * thread-db.c (find_one_thread): Likewise.
700 (thread_db_thread_handle): Likewise.
701 * win32-low.c (thread_rec): Likewise.
702 (child_delete_thread): Likewise.
703 (win32_thread_alive): Likewise.
704 (get_child_debug_event): Likewise.
705
706 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
707
708 * linux-mips-low.c (update_watch_registers_callback): Return
709 void, remove pid_p parameter, don't check for pid.
710 (mips_insert_point, mips_remove_point): Use for_each_thread.
711
712 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
713
714 * lynx.low (lynx_delete_thread_callback): Remove.
715 (lynx_mourn): Use for_each_thread.
716
717 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
718
719 * regcache.c (regcache_invalidate_one): Remove.
720 (regcache_invalidate_pid): use for_each_thread.
721
722 2017-11-26 Tom Tromey <tom@tromey.com>
723
724 * linux-low.c (linux_create_inferior): Update.
725
726 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
727
728 * spu-low.c (spu_create_inferior): Fix typo in argument name.
729
730 2017-11-24 Alan Hayward <alan.hayward@arm.com>
731
732 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
733 * linux-aarch64-low.c (initialize_low_arch): Call init func.
734 * linux-aarch64-tdesc-selftest.c: New file.
735 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
736
737 2017-11-24 Alan Hayward <alan.hayward@arm.com>
738
739 * configure.srv: Add new file.
740 * linux-aarch64-low.c (initialize_low_arch): Call init func.
741 * linux-aarch64-tdesc-selftest.c: New file.
742 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
743
744 2017-11-24 Alan Hayward <alan.hayward@arm.com>
745
746 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
747 * linux-aarch64-low.c (initialize_low_arch): Remove init.
748 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
749
750 2017-11-24 Alan Hayward <alan.hayward@arm.com>
751
752 * configure.srv: Add new files.
753 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
754 aarch64_linux_read_description.
755 * linux-aarch64-low.c (aarch64_linux_read_description):
756 Merge with aarch64_arch_setup.
757 (aarch64_arch_setup): Call aarch64_linux_read_description.
758 * linux-aarch64-tdesc.c: New file.
759 * linux-aarch64-tdesc.h: New file.
760
761 2017-11-24 Yao Qi <yao.qi@linaro.org>
762
763 * configure.srv: Set $srv_regobj for tic6x-linux.
764 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
765 (tic6x_read_description): Move some code to tic6x_arch_setup.
766 (tic6x_tdesc_test): New function.
767 (initialize_low_arch): Call selftests::register_test.
768
769 2017-11-22 Yao Qi <yao.qi@linaro.org>
770
771 * remote-utils.c (prepare_resume_reply): Use memcpy.
772
773 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
774
775 * linux-low.c (kill_one_lwp_callback): Return void, take
776 argument directly, don't filter on pid.
777 (linux_kill): Use for_each_thread.
778
779 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
780
781 * linux-low.c (need_step_over_p): Return bool, remove dummy
782 argument.
783 (linux_resume, proceed_all_lwps): Use find_thread.
784
785 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
786
787 * linux-low.c (resume_status_pending_p): Return bool, remove
788 flag_p argument.
789 (linux_resume): Use find_thread.
790
791 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
792
793 * linux-low.c (struct thread_resume_array): Remove.
794 (linux_set_resume_request): Return void, take arguments
795 directly.
796 (linux_resume): Use for_each_thread.
797
798 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
799
800 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
801 return bool, remove data argument.
802 (linux_stabilize_threads): Use find_thread.
803
804 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
805
806 * linux-low.c (unsuspend_one_lwp): Remove.
807 (unsuspend_all_lwps): Use for_each_thread, inline code from
808 unsuspend_one_lwp.
809
810 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
811
812 * gdbthread.h (find_thread): Add overload with ptid_t filter.
813 * linux-low.c (struct iterate_over_lwps_args): Remove.
814 (iterate_over_lwps_filter): Remove.
815 (iterate_over_lwps): Use find_thread.
816
817 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
818
819 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
820 (linux_handle_new_gdb_connection): Use for_each_thread, inline
821 code from reset_lwp_ptrace_options_callback.
822
823 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
824
825 * linux-arm-low.c (struct update_registers_data): Remove.
826 (update_registers_callback): Return void, take arguments
827 directly, don't check thread's pid.
828 (arm_insert_point, arm_remove_point): Use for_each_thread.
829
830 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
831
832 * win32-low.c (continue_one_thread): Return void, take argument
833 directly.
834 (child_continue): Use for_each_thread.
835
836 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
837
838 * win32-i386-low.c (update_debug_registers_callback): Rename
839 to ...
840 (update_debug_registers): ... this, return void, remove pid_p arg.
841 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
842
843 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
844
845 * inferiors.h (struct process_info): Add constructor, initialize
846 fields..
847 <syscalls_to_catch>: Change type to std::vector<int>.
848 * inferiors.c (add_process): Allocate process_info with new.
849 (remove_process): Free process_info with delete.
850 * linux-low.c (handle_extended_wait): Adjust.
851 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
852 * server.c (handle_general_set): Adjust.
853
854 2017-11-16 Pedro Alves <palves@redhat.com>
855
856 * remote-utils.c (remote_close): Block SIGIO signals instead of
857 uninstalling the SIGIO handler.
858
859 2017-11-16 Alan Hayward <alan.hayward@arm.com>
860
861 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
862
863 2017-11-16 Yao Qi <yao.qi@linaro.org>
864
865 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
866 (tic6x_store_gregset): Likewise.
867 (tic6x_usrregs_info): Move it up.
868
869 2017-11-15 Alan Hayward <alan.hayward@arm.com>
870
871 * Makefile.in: Update arch rules.
872 * configure.srv: Explicitly mark arch/ files.
873
874 2017-11-13 Andreas Schwab <schwab@suse.de>
875
876 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
877 function.
878 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
879
880 2017-11-06 Pedro Alves <palves@redhat.com>
881
882 * config.in, configure: Regenerate.
883
884 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
885
886 * target.c (struct thread_search): Remove.
887 (thread_search_callback): Remove.
888 (prepare_to_access_memory): Use for_each_thread instead of
889 find_inferior. Inline code from thread_search_callback.
890
891 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
892
893 * server.c (struct visit_actioned_threads_data): Remove.
894 (visit_actioned_threads): Change prototype to take arguments
895 directly.
896 (resume): Use find_thread instead of find_inferior.
897
898 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
899
900 * server.c (queue_stop_reply_callback): Change prototype, return
901 void.
902 (find_status_pending_thread_callback): Remove.
903 (handle_status): Replace find_inferior with find_thread and
904 for_each_thread.
905
906 2017-10-25 Alan Hayward <alan.hayward@arm.com>
907
908 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
909 with REGNO.
910 (aarch64_store_gregset): Likewise.
911 (aarch64_fill_fpregset): Likewise.
912 (aarch64_store_fpregset): Likewise.
913
914 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
915
916 * gdbthread.h (find_thread, for_each_thread): New functions.
917 * inferiors.c (thread_of_pid): Remove.
918 (find_any_thread_of_pid): Use find_thread.
919 * linux-low.c (num_lwps): Use for_each_thread.
920
921 2017-10-17 Yao Qi <yao.qi@linaro.org>
922
923 * Makefile.in: Remove one rule.
924 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
925
926 2017-10-17 Yao Qi <yao.qi@linaro.org>
927
928 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
929 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
930
931 2017-10-17 Yao Qi <yao.qi@linaro.org>
932
933 * configure.srv: Rename arm.o with arch/arm.o.
934
935 2017-10-17 Yao Qi <yao.qi@linaro.org>
936
937 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
938 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
939 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
940 (arch-i386.o, arch-amd64.o): Remove rules.
941 (arch/%.o): New rule.
942 Update POSTCOMPILE and COMPILE.pre.
943 * configure.ac: Invoke AC_CONFIG_COMMANDS.
944 * configure: Re-generated.
945 * configure.srv: Replace arch-i386.o with arch/i386.o.
946 Replace arch-amd64.o with arch/amd64.o.
947
948 2017-10-16 Yao Qi <yao.qi@linaro.org>
949
950 * configure: Regenerated.
951
952 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
953
954 * inferiors.h: (struct inferior_list): Remove.
955 (struct inferior_list_entry); Remove.
956 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
957 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
958 get_first_inferior): Remove.
959 (for_each_inferior, for_each_inferior_with_data, find_inferior,
960 find_inferior_id, find_inferior_in_random): Change signature.
961 * inferiors.c (all_threads): Change type to
962 std::list<thread_info *>.
963 (get_thread): Remove macro.
964 (find_inferior, find_inferior_id): Change signature, implement
965 using find_thread.
966 (find_inferior_in_random): Change signature, implement using
967 find_thread_in_random.
968 (for_each_inferior, for_each_inferior_with_data): Change
969 signature, implement using for_each_thread.
970 (add_inferior_to_list, remove_inferior): Remove.
971 (add_thread, get_first_thread, thread_of_pid,
972 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
973 (get_first_inferior, one_inferior_p, clear_inferior_list):
974 Remove.
975 (clear_inferiors, get_thread_process): Update.
976 * gdbthread.h: Include <list>.
977 (struct thread_info) <entry>: Remove field.
978 <id>: New field.
979 (all_threads): Change type to std::list<thread_info *>.
980 (get_first_inferior): Add doc.
981 (find_thread, for_each_thread, find_thread_in_random): New
982 functions.
983 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
984 * linux-arm-low.c (update_registers_callback): Update.
985 * linux-low.c (second_thread_of_pid_p): Update.
986 (kill_one_lwp_callback, linux_detach_lwp_callback,
987 delete_lwp_callback, status_pending_p_callback, same_lwp,
988 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
989 iterate_over_lwps, not_stopped_callback,
990 resume_stopped_resumed_lwps, count_events_callback,
991 select_singlestep_lwp_callback, select_event_lwp_callback,
992 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
993 suspend_and_send_sigstop_callback, wait_for_sigstop,
994 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
995 lwp_running, linux_set_resume_request, resume_status_pending_p,
996 need_step_over_p, start_step_over, linux_resume_one_thread,
997 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
998 reset_lwp_ptrace_options_callback): Update.
999 * linux-mips-low.c (update_watch_registers_callback): Update.
1000 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1001 Update.
1002 (free_register_cache_thread_one): Remove.
1003 (regcache_release): Update.
1004 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1005 handle_qxfer_threads_worker): Update.
1006 (handle_query): Update, use list iterator.
1007 (visit_actioned_threads, handle_pending_status,
1008 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1009 clear_pending_status_callback, set_pending_status_callback,
1010 find_status_pending_thread_callback, handle_status,
1011 process_serial_event): Update.
1012 * target.c (thread_search_callback): Update.
1013 * thread-db.c (thread_db_get_tls_address): Update.
1014 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1015 Update.
1016 * win32-i386-low.c (update_debug_registers_callback): Update.
1017 * win32-low.c (delete_thread_info, child_delete_thread,
1018 continue_one_thread, suspend_one_thread,
1019 get_child_debug_event): Adjust.
1020
1021 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1022
1023 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1024 * inferiors.h: Include <list>.
1025 (struct process_info) <entry>: Remove field.
1026 <pid>: New field.
1027 (pid_of): Change macro to function.
1028 (ptid_of, lwpid_of): Remove macro.
1029 (all_processes): Change type to std::list<process_info *>.
1030 (ALL_PROCESSES): Remove macro.
1031 (for_each_process, find_process): New function.
1032 * inferiors.c (all_processes): Change type to
1033 std::list<process_info *>.
1034 (find_thread_process): Adjust.
1035 (add_process): Likewise.
1036 (remove_process): Likewise.
1037 (find_process_pid): Likewise.
1038 (get_first_process): Likewise.
1039 (started_inferior_callback): Remove.
1040 (have_started_inferiors_p): Adjust.
1041 (attached_inferior_callback): Remove.
1042 (have_attached_inferiors_p): Adjust.
1043 * linux-low.c (check_zombie_leaders): Likewise.
1044 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1045 (x86_linux_update_xmltarget): Adjust.
1046 * server.c (handle_query): Likewise.
1047 (gdb_reattached_process): Remove.
1048 (handle_status): Adjust.
1049 (kill_inferior_callback): Likewise.
1050 (detach_or_kill_inferior): Remove.
1051 (print_started_pid): Likewise.
1052 (print_attached_pid): Likewise.
1053 (detach_or_kill_for_exit): Update.
1054 (process_serial_event): Likewise.
1055 * linux-arm-low.c (arm_new_fork): Likewise.
1056
1057 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1058
1059 * dll.h: Include <list>.
1060 (struct dll_info): Add constructor.
1061 <entry>: Remove field.
1062 (all_dlls): Change type to std::list<dll_info>.
1063 * dll.c: Include <algorithm>.
1064 (get_dll): Remove macro.
1065 (all_dlls): Change type to std::list<dll_info *>.
1066 (free_one_dll): Remove.
1067 (match_dll): Likewise.
1068 (loaded_dll): Adjust.
1069 (unloaded_dll): Adjust to all_dlls type change, use
1070 std::find_if. Inline code from match_dll.
1071 (clear_dlls): Adjust to all_dlls type change.
1072 * server.c (emit_dll_description): Remove.
1073 (handle_qxfer_libraries): Adjust to all_dlls type change,
1074 integrate emit_dll_description's functionality.
1075
1076 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1077
1078 * linux-low.h (struct linux_target_ops) <delete_process>: New
1079 field.
1080 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1081 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1082 (struct linux_target_ops): Add delete_process callback.
1083 * linux-arm-low.c (arm_delete_process): New.
1084 (struct linux_target_ops): Add delete_process callback.
1085 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1086 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1087 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1088 * linux-mips-low.c (mips_linux_delete_process): New.
1089 (struct linux_target_ops): Add delete_process callback.
1090 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1091 * linux-s390-low.c (struct linux_target_ops): Likewise.
1092 * linux-sh-low.c (struct linux_target_ops): Likewise.
1093 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1094 * linux-tile-low.c (struct linux_target_ops): Likewise.
1095 * linux-x86-low.c (x86_linux_delete_process): New.
1096 (struct linux_target_ops): Add delete_process callback.
1097 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1098
1099 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1100
1101 * linux-aarch64-low.c (the_low_target): Add thread delete
1102 callback.
1103 * linux-arm-low.c (arm_delete_thread): New function.
1104 (the_low_target): Add thread delete callback.
1105 * linux-bfin-low.c (the_low_target): Likewise.
1106 * linux-crisv32-low.c (the_low_target): Likewise.
1107 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1108 set.
1109 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1110 field.
1111 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1112 * linux-mips-low.c (mips_linux_delete_thread): New function.
1113 (the_low_target): Add thread delete callback.
1114 * linux-ppc-low.c (the_low_target): Likewise.
1115 * linux-s390-low.c (the_low_target): Likewise.
1116 * linux-sh-low.c (the_low_target): Likewise.
1117 * linux-tic6x-low.c (the_low_target): Likewise.
1118 * linux-tile-low.c (the_low_target): Likewise.
1119 * linux-x86-low.c (the_low_target): Likewise.
1120 * linux-xtensa-low.c (the_low_target): Likewise.
1121
1122 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1123
1124 * win32-low.c: Include "common-inferior.h".
1125
1126 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1127
1128 * inferiors.c (set_inferior_cwd): New function.
1129 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1130 (handle_query): Inform that QSetWorkingDir is supported.
1131 * win32-low.c (create_process): Pass the inferior's cwd to
1132 CreateProcess.
1133
1134 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1135
1136 * inferiors.c (current_inferior_cwd): New global variable.
1137 (get_inferior_cwd): New function.
1138 * inferiors.h (struct process_info) <cwd>: New field.
1139
1140 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1141
1142 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1143 (OBS): Add gdb_tilde_expand.o.
1144
1145 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1146
1147 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1148 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1149
1150 2017-09-29 Pedro Alves <palves@redhat.com>
1151
1152 * ax.c (gdb_parse_agent_expr): Constify.
1153 * ax.h (gdb_parse_agent_expr): Constify.
1154 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1155 Constify.
1156 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1157 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1158 * remote-utils.h (read_ptid): Constify.
1159 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1160 (process_point_options, process_serial_event): Constify.
1161 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1162 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1163 (cmd_qtbuffer): Constify.
1164
1165 2017-09-29 Pedro Alves <palves@redhat.com>
1166
1167 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1168 fails.
1169
1170 2017-09-29 Pedro Alves <palves@redhat.com>
1171
1172 * linux-low.c (handle_extended_wait): Pass parent thread instead
1173 of process to thread_db_notice_clone.
1174 * linux-low.h (thread_db_notice_clone): Replace parent process
1175 parameter with parent thread parameter.
1176 * thread-db.c (find_one_thread): Add comment.
1177 (thread_db_notice_clone): Replace parent process parameter with
1178 parent thread parameter. Temporarily switch to the parent thread.
1179
1180 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1181
1182 * gdbthread.h: Include "common-gdbthread.h".
1183 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1184 "if" when validating the ptid.
1185 * remote-utils.c: Include "gdbthread.h".
1186 (prepare_resume_reply): Use "switch_to_thread".
1187 * target.c (done_accessing_memory): Likewise.
1188
1189 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1190
1191 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1192 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1193 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1194 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1195 s390x-gs-linux64-ipa.o to ipa_obj.
1196 * linux-s390-low.c (HWCAP_S390_GS): New define.
1197 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1198 New functions.
1199 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1200 (s390_arch_setup): Check for guarded-storage support and choose
1201 appropriate tdesc.
1202 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1203 init_registers_s390x_gs_linux64.
1204 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1205 enum value.
1206 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1207 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1208
1209 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1210
1211 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1212
1213 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1214
1215 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1216 (thread_db_thread_handle): Declare.
1217 * linux-low.c (linux_target_ops): Initialize thread_handle.
1218 * server.c (handle_qxfer_threads_worker): Add support for
1219 "handle" attribute.
1220 * target.h (struct target_ops): Add new function pointer,
1221 thread_handle.
1222 (target_thread_handle): Define.
1223 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1224 field in lwp.
1225 (thread_db_thread_handle): New function.
1226
1227 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1228
1229 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1230 * linux-low.h (thread_db_notice_clone): Declare.
1231 * thread-db.c (thread_db_notice_clone): New function.
1232
1233 2017-09-21 Pedro Alves <palves@redhat.com>
1234
1235 * server.c (gdb_read_memory, handle_status, process_serial_event)
1236 (handle_serial_event, handle_target_event): Adjust to
1237 set_desired_thread prototype change.
1238 * target.c (set_desired_thread): Remove 'use_general' parameter
1239 and adjust.
1240 * target.h (set_desired_thread): Remove 'use_general' parameter.
1241
1242 2017-09-20 Tom Tromey <tom@tromey.com>
1243
1244 * target.c (target_terminal::terminal_state): Define.
1245 (target_terminal::init): Rename from target_terminal_init.
1246 (target_terminal::inferior): Rename from
1247 target_terminal_inferior.
1248 (target_terminal::ours): Rename from target_terminal_ours.
1249 (target_terminal::ours_for_output, target_terminal::info): New.
1250
1251 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1252
1253 * server.c (accumulate_file_name_length): Remove.
1254 (emit_dll_description): Adjust to std::string change.
1255 (handle_qxfer_libraries): Use std::string to hold document.
1256
1257 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1258
1259 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1260 return type of xml_escape_text.
1261 * server.c (emit_dll_description): Likewise.
1262
1263 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1264
1265 * server.c (captured_main): Accept argument for --selftest.
1266 Update run_tests call.
1267 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1268 when registering selftests.
1269
1270 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1271
1272 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1273 instead of "VEC" for "target_desc.reg_defs".
1274 (regcache_cpy): Likewise.
1275 (registers_to_string): Likewise.
1276 (registers_from_string): Likewise.
1277 (find_regno): Likewise.
1278 (supply_regblock): Likewise.
1279 (regcache_raw_read_unsigned): Likewise.
1280 * tdesc.c (init_target_desc): Likewise.
1281 (tdesc_create_reg): Likewise.
1282 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1283 (struct target_desc) <reg_defs>: Convert to "std::vector".
1284 (target_desc): Do not initialize "reg_defs".
1285 (~target_desc): Update code to use "std::vector" instead of "VEC"
1286 for "target_desc.reg_defs".
1287 (operator==): Likewise.
1288
1289 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1290
1291 * inferiors.h (thread_to_gdb_id): Remove.
1292 * inferiors.c (thread_to_gdb_id): Remove.
1293 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1294 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1295 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1296 Likewise.
1297 * nto-low.c (nto_fetch_registers, nto_store_registers,
1298 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1299
1300 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1301
1302 * inferiors.h (gdb_id_to_thread_id): Remove.
1303 * inferiors.c (gdb_id_to_thread_id): Remove.
1304 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1305 removal. Move pid declaration closer to where it's used.
1306
1307 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1308
1309 * server.c (handle_detach): New function.
1310 (process_serial_event): Move code out, call handle_detach.
1311
1312 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1313
1314 * server.c (require_running): Rename to ...
1315 (require_running_or_return): ... this ...
1316 (require_running_or_break): ... and this.
1317 (handle_query, process_serial_event): Adjust.
1318
1319 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1320
1321 * linux-low.c (linux_set_resume_request): Remove unused
1322 variables.
1323
1324 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1325
1326 * server.c (first_thread_of): Remove.
1327 (process_serial_event): Replace usage of first_thread_of with
1328 find_any_thread_of_pid.
1329 * tracepoint.c (same_process_p): Remove.
1330 (gdb_agent_about_to_close): Replace usage of same_process_p with
1331 find_any_thread_of_pid.
1332 * linux-x86-low.c (same_process_callback): Remove.
1333 (x86_arch_setup_process_callback): Replace usage of
1334 same_process_callback with find_any_thread_of_pid.
1335 * thread-db.c (any_thread_of): Remove.
1336 (switch_to_process): Replace usage of any_thread_of with
1337 find_any_thread_of_pid.
1338 * inferiors.c (thread_pid_matches_callback): Remove.
1339 (find_thread_process): Adjust to use find_any_thread_of_pid.
1340
1341 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1342
1343 * regcache.c (get_thread_regcache): Guard calls to "memset"
1344 with "!VEC_empty".
1345
1346 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1347
1348 * linux-low.c (handle_extended_wait): Use
1349 "allocate_target_description" instead of "XNEW".
1350 * linux-x86-low.c (initialize_low_arch): Likewise.
1351
1352 2017-09-05 Yao Qi <yao.qi@linaro.org>
1353
1354 * configure.srv (srv_i386_regobj): Remove.
1355 (srv_amd64_regobj): Remove.
1356 (srv_regobj): Set it to "" for x86 non-linux targets.
1357 * linux-x86-tdesc.c (i386_linux_read_description):
1358 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1359 (init_registers_i386): Remove the declaration.
1360 (tdesc_i386): Remove the declaration.
1361 (lynx_i386_arch_setup): Call i386_create_target_description.
1362 * nto-x86-low.c: Likewise.
1363 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1364 [!__x86_64__]: include arch/i386.h.
1365 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1366
1367 2017-09-05 Yao Qi <yao.qi@linaro.org>
1368
1369 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1370 i386/amd64-XXX-linux from it.
1371
1372 2017-09-05 Yao Qi <yao.qi@linaro.org>
1373
1374 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1375 false.
1376 (ipa_amd64_linux_regobj): Remove.
1377 (ipa_x32_linux_regobj): Remove.
1378
1379 2017-09-05 Yao Qi <yao.qi@linaro.org>
1380
1381 * Makefile.in (arch-amd64.o): New rule.
1382 * configure.srv: Append arch-amd64.o.
1383 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1384 (get_ipa_tdesc): Call amd64_linux_read_description.
1385 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1386 and init_registers_amd64_XXX.
1387 * linux-x86-low.c (x86_linux_read_description): Call
1388 amd64_linux_read_description.
1389 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1390 (initialize_low_arch): Don't call init_registers_x32_XXX and
1391 init_registers_amd64_XXX.
1392 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1393 and tdesc_amd64_XXX.
1394 [__x86_64__] (amd64_tdesc_test): New function.
1395 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1396 and init_registers_amd64_XXX.
1397 * linux-x86-tdesc.c: Include arch/amd64.h.
1398 (xcr0_to_tdesc_idx): New function.
1399 (i386_linux_read_description): New function.
1400 (amd64_get_ipa_tdesc_idx): New function.
1401 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1402 (amd64_get_ipa_tdesc): Declare.
1403
1404 2017-09-05 Yao Qi <yao.qi@linaro.org>
1405
1406 * configure.srv (srv_i386_linux_xmlfiles): Remove
1407 i386/i386-XXX-linux.xml from it.
1408
1409 2017-09-05 Yao Qi <yao.qi@linaro.org>
1410
1411 * configure.srv: Set srv_i386_linux_regobj empty if $development
1412 is false.
1413 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1414 initialize_low_tdesc.
1415 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1416 with #if initialize_low_tdesc.
1417 * linux-x86-tdesc-selftest.c: New file.
1418 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1419
1420 2017-09-05 Yao Qi <yao.qi@linaro.org>
1421
1422 * Makefile.in (arch-i386.o): New rule.
1423 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1424 (x86_64-*-linux*): Likewise.
1425 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1426 include arch/i386.h.
1427 (i386_linux_read_description): Remove code and call
1428 i386_create_target_description.
1429 * tdesc.c (allocate_target_description): New function.
1430 * tdesc.h (set_tdesc_architecture): Remove declaration.
1431 (set_tdesc_osabi): Likewise.
1432
1433 2017-09-05 Yao Qi <yao.qi@linaro.org>
1434
1435 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1436 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1437 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1438 .xmltarget.
1439 * server.c (get_features_xml): Call tdesc_get_features_xml.
1440 * tdesc.c (set_tdesc_architecture): New function.
1441 (set_tdesc_osabi): New function.
1442 (tdesc_get_features_xml): New function.
1443 (tdesc_create_feature): Add an argument.
1444 * tdesc.h (struct target_desc) <features>: New field.
1445 <arch, osabi>: New field.
1446 (~target_desc): xfree features, arch, and osabi.
1447 (target_desc::oerator==): Don't compare .xmltarget.
1448 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1449 (set_tdesc_osabi): Likewise.
1450 (tdesc_get_features_xml): Likewise.
1451
1452 2017-09-05 Yao Qi <yao.qi@linaro.org>
1453
1454 * linux-x86-tdesc.c: Include selftest.h.
1455 (i386_tdesc_test): New function.
1456 (initialize_low_tdesc): Call selftests::register_test.
1457 * tdesc.h: Include regdef.h.
1458 (target_desc): Override operator == and !=.
1459
1460 2017-09-05 Yao Qi <yao.qi@linaro.org>
1461
1462 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1463 (ipa_obj): Likewise.
1464 * linux-i386-ipa.c: Include common/x86-xstate.h
1465 (get_ipa_tdesc): Call i386_linux_read_description.
1466 (initialize_low_tracepoint): Don't call init_registers_XXX
1467 functions, call initialize_low_tdesc instead.
1468 * linux-x86-low.c (x86_linux_read_description): Call
1469 i386_linux_read_description.
1470 (initialize_low_arch): Don't call init_registers_i386_XXX
1471 functions, call initialize_low_tdesc.
1472 * linux-x86-tdesc.c: New file.
1473 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1474 (i386_get_ipa_tdesc_idx): Declare.
1475 (i386_get_ipa_tdesc): Declare.
1476 (initialize_low_tdesc): Declare.
1477
1478 2017-09-05 Yao Qi <yao.qi@linaro.org>
1479
1480 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1481 instead of 0.
1482
1483 2017-09-05 Yao Qi <yao.qi@linaro.org>
1484
1485 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1486 * regcache.c (get_thread_regcache): Use VEC_length.
1487 (init_register_cache): Likewise.
1488 (regcache_cpy): Likewise.
1489 (registers_to_string): Iterate reg_defs via VEC_iterate.
1490 (find_regno): Likewise.
1491 (find_register_by_number): Use VEC_index.
1492 (register_size): Call find_register_by_number.
1493 (register_data): Call find_register_by_number.
1494 (supply_regblock): Use VEC_length.
1495 (regcache_raw_read_unsigned): Likewise.
1496 * tdesc.c (init_target_desc): Iterate reg_defs via
1497 VEC_iterate.
1498 (default_description): Update initializer.
1499 (copy_target_description): Don't update field num_registers.
1500 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1501 <num_registers>: Remove.
1502
1503 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1504
1505 * Makefile.in (.SECONDARY): Define target.
1506
1507 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1508
1509 * linux-low.c (linux_wait_1): Adjust.
1510 * server.c (queue_stop_reply_callback): Adjust.
1511
1512 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1513
1514 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1515 QEnvironmentUnset and QEnvironmentReset packets.
1516 (handle_query): Inform remote that QEnvironmentHexEncoded,
1517 QEnvironmentUnset and QEnvironmentReset are supported.
1518
1519 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1520
1521 * inferiors.h (inferior_target_data): Rename to ...
1522 (thread_target_data): ... this.
1523 (inferior_regcache_data): Rename to ...
1524 (thread_regcache_data): ... this.
1525 (set_inferior_regcache_data): Rename to ...
1526 (set_thread_regcache_data): ... this.
1527 * inferiors.c (inferior_target_data): Rename to ...
1528 (thread_target_data): ... this.
1529 (inferior_regcache_data): Rename to ...
1530 (thread_regcache_data): ... this.
1531 (set_inferior_regcache_data): Rename to ...
1532 (set_thread_regcache_data): ... this.
1533 (free_one_thread): Update.
1534 * linux-low.h (get_thread_lwp): Update.
1535 * regcache.c (get_thread_regcache): Update.
1536 (regcache_invalidate_thread): Update.
1537 (free_register_cache_thread): Update.
1538 * win32-i386-low.c (update_debug_registers_callback): Update.
1539 (win32_get_current_dr): Update.
1540 * win32-low.c (thread_rec): Update.
1541 (delete_thread_info): Update.
1542 (continue_one_thread): Update.
1543 (suspend_one_thread): Update.
1544
1545 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1546
1547 * inferiors.c (set_inferior_target_data): Remove.
1548 * inferiors.h (set_inferior_target_data): Remove.
1549
1550 2017-08-18 Yao Qi <yao.qi@linaro.org>
1551
1552 * Makefile.in (OBS): Add selftest.o.
1553 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1554 * configure, config.in: Re-generated.
1555 * server.c: Include common/sefltest.h.
1556 (captured_main): Handle option --selftest.
1557
1558 2017-08-09 Yao Qi <yao.qi@linaro.org>
1559
1560 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1561 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1562 i386-avx-mpx.o and i386-mmx.o.
1563 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1564 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1565 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1566 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1567 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1568 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1569 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1570 i386/amd64-avx-mpx.xml.
1571
1572 2017-08-09 Yao Qi <yao.qi@linaro.org>
1573
1574 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1575 and x32-avx-avx512.o.
1576 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1577 i386/x32-avx-avx512.xml.
1578
1579 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1580
1581 * tracepoint.h (enum class fast_tpoint_collect_result): New
1582 enumeration.
1583 (fast_tracepoint_collecting): Change return type to
1584 fast_tpoint_collect_result.
1585 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1586 * linux-low.h: Include tracepoint.h.
1587 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1588 fast_tpoint_collect_result.
1589 * linux-low.c (handle_tracepoints): Adjust.
1590 (linux_fast_tracepoint_collecting): Change return type to
1591 fast_tpoint_collect_result.
1592 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1593 linux_wait_1, stuck_in_jump_pad_callback,
1594 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1595 proceed_one_lwp): Adjust to type change.
1596
1597 2017-07-10 Yao Qi <yao.qi@linaro.org>
1598
1599 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1600
1601 2017-06-29 Yao Qi <yao.qi@linaro.org>
1602
1603 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1604 Remove.
1605 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1606
1607 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1608
1609 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1610
1611 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1612
1613 * linux-low.c (linux_create_inferior): Adjust code to access the
1614 environment information via 'gdb_environ' class.
1615 * lynx-low.c (lynx_create_inferior): Likewise.
1616 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1617 (get_environ): Return a pointer to 'our_environ'.
1618 (captured_main): Initialize 'our_environ'.
1619 * server.h (get_environ): Adjust prototype.
1620 * spu-low.c (spu_create_inferior): Adjust code to access the
1621 environment information via 'gdb_environ' class.
1622
1623 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1624
1625 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1626 usage of "register" keyword.
1627
1628 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1629
1630 * configure: Re-generate.
1631
1632 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1633
1634 * configure: Re-generate.
1635
1636 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1637
1638 * Makefile.in (COMPILE.pre): Add "-x c++".
1639
1640 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1641
1642 * fork-child.c: Conditionally include <signal.h>.
1643
1644 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1645
1646 * server.c (handle_general_set): Handle new packet
1647 "QStartupWithShell".
1648 (handle_query): Add "QStartupWithShell" to the list of supported
1649 packets.
1650 (gdbserver_usage): Add help text explaining the
1651 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1652 options.
1653 (captured_main): Recognize and act upon the presence of the new
1654 CLI options.
1655
1656 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1657 Pedro Alves <palves@redhat.com>
1658
1659 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1660 * configure: Regenerate.
1661 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1662 "fork-inferior.o".
1663 (i[34567]86-*-lynxos*): Likewise.
1664 (spu*-*-*): Likewise.
1665 * fork-child.c: New file.
1666 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1667 and "environ.h".
1668 (linux_ptrace_fun): New function.
1669 (linux_create_inferior): Adjust function prototype to reflect
1670 change on "target.h". Adjust function code to use
1671 "fork_inferior".
1672 (linux_request_interrupt): Delete "signal_pid".
1673 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1674 (lynx_ptrace_fun): New function.
1675 (lynx_create_inferior): Adjust function prototype to reflect
1676 change on "target.h". Adjust function code to use
1677 "fork_inferior".
1678 * nto-low.c (nto_create_inferior): Adjust function prototype and
1679 code to reflect change on "target.h". Update comments.
1680 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1681 "common-terminal.h" and "environ.h".
1682 (terminal_fd): Moved to fork-child.c.
1683 (old_foreground_pgrp): Likewise.
1684 (restore_old_foreground_pgrp): Likewise.
1685 (last_status): Make it global.
1686 (last_ptid): Likewise.
1687 (our_environ): New variable.
1688 (startup_with_shell): Likewise.
1689 (program_name): Likewise.
1690 (program_argv): Rename to...
1691 (program_args): ...this.
1692 (wrapper_argv): New variable.
1693 (start_inferior): Delete function.
1694 (get_exec_wrapper): New function.
1695 (get_exec_file): Likewise.
1696 (get_environ): Likewise.
1697 (prefork_hook): Likewise.
1698 (post_fork_inferior): Likewise.
1699 (postfork_hook): Likewise.
1700 (postfork_child_hook): Likewise.
1701 (handle_v_run): Update code to deal with arguments coming from the
1702 remote host. Update calls from "start_inferior" to
1703 "create_inferior".
1704 (captured_main): Likewise. Initialize environment variable. Call
1705 "have_job_control".
1706 * server.h (post_fork_inferior): New prototype.
1707 (get_environ): Likewise.
1708 (last_status): Declare.
1709 (last_ptid): Likewise.
1710 (signal_pid): Likewise.
1711 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1712 (spu_ptrace_fun): New function.
1713 (spu_create_inferior): Adjust function prototype to reflect change
1714 on "target.h". Adjust function code to use "fork_inferior".
1715 * target.c (target_terminal_init): New function.
1716 (target_terminal_inferior): Likewise.
1717 (target_terminal_ours): Likewise.
1718 * target.h: Include <vector>.
1719 (struct target_ops) <create_inferior>: Update prototype.
1720 (create_inferior): Update macro.
1721 * utils.c (gdb_flush_out_err): New function.
1722 * win32-low.c (win32_create_inferior): Adjust function prototype
1723 and code to reflect change on "target.h".
1724
1725 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1726
1727 * inferiors.c (switch_to_thread): New function.
1728
1729 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1730
1731 * Makefile.in (SFILE): Add "common/job-control.c".
1732 (OBS): Add "job-control.o".
1733
1734 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1735
1736 * Makefile: Remove "@host_makefile_frag@".
1737
1738 2017-05-05 Pedro Alves <palves@redhat.com>
1739
1740 * configure: Regenerate.
1741
1742 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1743
1744 * configure: Regenerate.
1745
1746 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1747
1748 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1749 software_single_step change of return type to
1750 std::vector<CORE_ADDR>.
1751 * linux-low.c (install_software_single_step_breakpoints):
1752 Likewise.
1753 * linux-low.h (install_software_single_step_breakpoints):
1754 Likewise.
1755
1756 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1757
1758 * remote-utils.c: Include "gdb_termios.h" instead of
1759 "terminal.h".
1760 * terminal.h: Delete file.
1761
1762 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1763
1764 * server.c: Include <vector>.
1765 <program_argv, wrapper_argv>: Convert to std::vector.
1766 (start_inferior): Rewrite function to use C++.
1767 (handle_v_run): Likewise. Update code that calculates the argv
1768 based on the vRun packet; use C++.
1769 (captured_main): Likewise.
1770
1771 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1772
1773 * server.c (handle_v_cont): Initialize thread_resume::thread
1774 with null_ptid.
1775
1776 2017-04-05 Pedro Alves <palves@redhat.com>
1777
1778 * configure: Regenerate.
1779
1780 2017-04-05 Pedro Alves <palves@redhat.com>
1781
1782 * gdbreplay.c (sync_error): Constify.
1783 * linux-x86-low.c (push_opcode): Constify.
1784
1785 2017-04-05 Pedro Alves <palves@redhat.com>
1786
1787 * win32-low.c (get_child_debug_event)
1788 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1789 Report TARGET_WAITKIND_SPURIOUS instead.
1790
1791 2017-04-05 Pedro Alves <palves@redhat.com>
1792
1793 * remote-utils.c (remote_prepare, remote_open): Constify.
1794 * remote-utils.h (remote_prepare, remote_open): Constify.
1795 * server.c (captured_main): Constify 'port' handling.
1796
1797 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1798
1799 * Makefile.in (clean): Clear .deps.
1800
1801 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1802
1803 * .gitignore: Remove generated files, replace with wildcard.
1804 * (clean): Replace removal of generated files with wildcard.
1805 (version.c): Replace with...
1806 (version-generated.c): ...this.
1807 (xml-builtin.c): Replace with...
1808 (xml-builtin-generated.c): ...this.
1809 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1810 (%.c: *regformats*): Replace with...
1811 (%-generated.c: *regformats*): ...this.
1812
1813 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1814
1815 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1816 (xtensa_fill_gregset): Call collect_register_by_name for
1817 threadptr register.
1818 (xtensa_store_gregset): Call supply_register_by_name for
1819 threadptr register.
1820
1821 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1822
1823 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1824 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1825 (xtensa_store_gregset): Call supply_register for all registers in
1826 a0_regnum..a0_regnum + C0_NREGS range.
1827
1828 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1829
1830 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1831 (ax-ipa.o: ax.c): Remove.
1832 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1833 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1834 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1835 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1836 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1837
1838 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1839
1840 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1841 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1842 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1843 (errors-ipa.o: ../common/errors.c): Remove.
1844 (format-ipa.o: ../common/format.c): Remove.
1845 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1846
1847 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1848
1849 * Makefile.in (%-ipa.o: %.c): New rule.
1850 (tracepoint-ipa.o: tracepoint.c): Remove.
1851 (utils-ipa.o: utils.c): Remove.
1852 (remote-utils-ipa.o: remote-utils.c): Remove.
1853 (regcache-ipa.o: regcache.c): Remove.
1854 (i386-linux-ipa.o: i386-linux.c): Remove.
1855 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1856 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1857 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1858 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1859 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1860 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1861 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1862 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1863 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1864 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1865 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1866 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1867 (aarch64-ipa.o: aarch64.c): Remove.
1868 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1869 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1870 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1871 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1872 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1873 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1874 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1875 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1876 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1877 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1878 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1879 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1880 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1881 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1882 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1883 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1884 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1885 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1886 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1887 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1888 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1889 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1890 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1891 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1892 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1893 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1894 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1895 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1896 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1897 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1898 (tdesc-ipa.o: tdesc.c): Remove.
1899 (x32-linux-ipa.o: x32-linux.c): Remove.
1900 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1901 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1902
1903 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1904
1905 * Makefile.in (%.o: ../arch/%.c): New rule.
1906 (arm.o: ../arch/arm.c): Remove.
1907 (arm-linux.o: ../arch/arm-linux.c): Remove.
1908 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1909 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1910
1911 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1912
1913 * Makefile.in (%.o: ../nat/%.c): New rule.
1914 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1915 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1916 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1917 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1918 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1919 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1920 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1921 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1922 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1923 (linux-personality.o: ../nat/linux-personality.c): Remove.
1924 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1925 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1926 (x86-linux.o: ../nat/x86-linux.c): Remove.
1927 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1928 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1929
1930 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1931
1932 * Makefile.in (%.o: ../common/%.c): New rule.
1933 (signals.o: ../common/signals.c): Remove.
1934 (print-utils.o: ../common/print-utils.c): Remove.
1935 (rsp-low.o: ../common/rsp-low.c): Remove.
1936 (common-utils.o: ../common/common-utils.c): Remove.
1937 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1938 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1939 (vec.o: ../common/vec.c): Remove.
1940 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1941 (xml-utils.o: ../common/xml-utils.c): Remove.
1942 (ptid.o: ../common/ptid.c): Remove.
1943 (buffer.o: ../common/buffer.c): Remove.
1944 (format.o: ../common/format.c): Remove.
1945 (filestuff.o: ../common/filestuff.c): Remove.
1946 (agent.o: ../common/agent.c): Remove.
1947 (errors.o: ../common/errors.c): Remove.
1948 (environ.o: ../common/environ.c): Remove.
1949 (common-debug.o: ../common/common-debug.c): Remove.
1950 (cleanups.o: ../common/cleanups.c): Remove.
1951 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1952 (fileio.o: ../common/fileio.c): Remove.
1953 (common-regcache.o: ../common/common-regcache.c): Remove.
1954 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1955 (new-op.o: ../common/new-op.c): Remove.
1956 (btrace-common.o: ../common/btrace-common.c): Remove.
1957
1958 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1959
1960 * Makefile.in (%.o: ../target/%.c): New rule.
1961 (waitstatus.o: ../target/waitstatus.c): Remove.
1962
1963 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1964
1965 * Makefile.in
1966 (%.c: ../regformats/%.dat,
1967 (%.c: ../regformats/arm/%.dat,
1968 (%.c: ../regformats/i386/%.dat,
1969 (%.c: ../regformats/rs6000/%.dat): New rules.
1970 (aarch64.c): Remove.
1971 (reg-arm.c): Remove.
1972 (arm-with-iwmmxt.c): Remove.
1973 (arm-with-vfpv2.c): Remove.
1974 (arm-with-vfpv3.c): Remove.
1975 (arm-with-neon.c): Remove.
1976 (reg-bfin.c): Remove.
1977 (reg-cris.c): Remove.
1978 (reg-crisv32.c): Remove.
1979 (i386.c): Remove.
1980 (i386-linux.c): Remove.
1981 (i386-avx.c): Remove.
1982 (i386-avx-linux.c): Remove.
1983 (i386-avx-avx512.c): Remove.
1984 (i386-avx-avx512-linux.c): Remove.
1985 (i386-mpx.c): Remove.
1986 (i386-mpx-linux.c): Remove.
1987 (i386-avx-mpx-avx512-pku.c): Remove.
1988 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1989 (i386-avx-mpx.c): Remove.
1990 (i386-avx-mpx-linux.c): Remove.
1991 (i386-mmx.c): Remove.
1992 (i386-mmx-linux.c): Remove.
1993 (reg-ia64.c): Remove.
1994 (reg-m32r.c): Remove.
1995 (reg-m68k.c): Remove.
1996 (reg-cf.c): Remove.
1997 (mips-linux.c): Remove.
1998 (mips-dsp-linux.c): Remove.
1999 (mips64-linux.c): Remove.
2000 (mips64-dsp-linux.c): Remove.
2001 (nios2-linux.c): Remove.
2002 (powerpc-32.c): Remove.
2003 (powerpc-32l.c): Remove.
2004 (powerpc-altivec32l.c): Remove.
2005 (powerpc-cell32l.c): Remove.
2006 (powerpc-vsx32l.c): Remove.
2007 (powerpc-isa205-32l.c): Remove.
2008 (powerpc-isa205-altivec32l.c): Remove.
2009 (powerpc-isa205-vsx32l.c): Remove.
2010 (powerpc-e500l.c): Remove.
2011 (powerpc-64l.c): Remove.
2012 (powerpc-altivec64l.c): Remove.
2013 (powerpc-cell64l.c): Remove.
2014 (powerpc-vsx64l.c): Remove.
2015 (powerpc-isa205-64l.c): Remove.
2016 (powerpc-isa205-altivec64l.c): Remove.
2017 (powerpc-isa205-vsx64l.c): Remove.
2018 (s390-linux32.c): Remove.
2019 (s390-linux32v1.c): Remove.
2020 (s390-linux32v2.c): Remove.
2021 (s390-linux64.c): Remove.
2022 (s390-linux64v1.c): Remove.
2023 (s390-linux64v2.c): Remove.
2024 (s390-te-linux64.c): Remove.
2025 (s390-vx-linux64.c): Remove.
2026 (s390-tevx-linux64.c): Remove.
2027 (s390x-linux64.c): Remove.
2028 (s390x-linux64v1.c): Remove.
2029 (s390x-linux64v2.c): Remove.
2030 (s390x-te-linux64.c): Remove.
2031 (s390x-vx-linux64.c): Remove.
2032 (s390x-tevx-linux64.c): Remove.
2033 (tic6x-c64xp-linux.c): Remove.
2034 (tic6x-c64x-linux.c): Remove.
2035 (tic6x-c62x-linux.c): Remove.
2036 (reg-sh.c): Remove.
2037 (reg-sparc64.c): Remove.
2038 (reg-spu.c): Remove.
2039 (amd64.c): Remove.
2040 (amd64-linux.c): Remove.
2041 (amd64-avx.c): Remove.
2042 (amd64-avx-linux.c): Remove.
2043 (amd64-avx-avx512.c): Remove.
2044 (amd64-avx-avx512-linux.c): Remove.
2045 (amd64-mpx.c): Remove.
2046 (amd64-mpx-linux.c): Remove.
2047 (amd64-avx-mpx-avx512-pku.c): Remove.
2048 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2049 (amd64-avx-mpx.c): Remove.
2050 (amd64-avx-mpx-linux.c): Remove.
2051 (x32.c): Remove.
2052 (x32-linux.c): Remove.
2053 (x32-avx.c): Remove.
2054 (x32-avx-linux.c): Remove.
2055 (x32-avx-avx512.c): Remove.
2056 (x32-avx-avx512-linux.c): Remove.
2057 (reg-xtensa.c): Remove.
2058 (reg-tilegx.c): Remove.
2059 (reg-tilegx32.c): Remove.
2060
2061 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2062
2063 * Makefile.in (SFILES): Add "common/environ.c".
2064 (OBJS): Add "common/environ.h".
2065
2066 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2067
2068 * configure.ac: Check if the fs_base and gs_base members of
2069 `struct user_regs_struct' exist.
2070 * config.in: Regenerated.
2071 * configure: Likewise.
2072
2073 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2074
2075 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2076 target_read_memory.
2077 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2078 (get_next_pcs_syscall_next_pc): Likewise.
2079
2080 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2081
2082 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2083 * nto-x86-low.c: Likewise.
2084
2085 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2086
2087 * Makefile.in: Include disable-implicit-rules.mk.
2088
2089 2016-11-23 Pedro Alves <palves@redhat.com>
2090
2091 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2092 (debug_vprintf): Use std::chrono::steady_clock instead of
2093 gettimeofday. Use '.' instead of ':'.
2094 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2095 (get_timestamp): Use std::chrono::steady_clock instead of
2096 gettimeofday.
2097
2098 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2099
2100 * Makefile.in: Fix whitespace formatting.
2101
2102 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2103
2104 * Makefile.in (SFILES, OBS): Flatten list and order
2105 alphabetically.
2106
2107 2016-11-23 Pedro Alves <palves@redhat.com>
2108
2109 * event-loop.c (handle_file_event): Use warning.
2110 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2111 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2112 Use warning.
2113
2114 2016-11-23 Pedro Alves <palves@redhat.com>
2115
2116 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2117 output.
2118 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2119 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2120 debug_printf and debug_flush for debug output.
2121 * server.c (handle_general_set): Likewise.
2122 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2123 output.
2124
2125 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2126
2127 * Makefile.in (.c.o): Replace rule with ...
2128 (%.o: %.c): ... this one.
2129
2130 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2131
2132 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2133 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2134 make.
2135 * configure.ac: Remove checks for the make program.
2136 * configure: Re-generate.
2137
2138 2016-10-28 Pedro Alves <palves@redhat.com>
2139
2140 * Makefile.in (CXX_DIALECT): Get from configure.
2141 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2142 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2143 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2144 * config.in: Regenerate.
2145 * configure: Regenerate.
2146
2147 2016-10-27 Yao Qi <yao.qi@linaro.org>
2148
2149 * linux-low.c (linux_supports_range_stepping): Return true if
2150 can_software_single_step return true.
2151
2152 2016-10-27 Yao Qi <yao.qi@linaro.org>
2153
2154 * inferiors.c (find_inferior_in_random): New function.
2155 * inferiors.h (find_inferior_in_random): Declare.
2156 * linux-low.c (linux_wait_for_event_filtered): Call
2157 find_inferior_in_random instead of find_inferior.
2158
2159 2016-10-27 Yao Qi <yao.qi@linaro.org>
2160
2161 * linux-low.c (linux_wait_1): If single-step breakpoints are
2162 inserted, remove them.
2163
2164 2016-10-26 Pedro Alves <palves@redhat.com>
2165
2166 * linux-low.c (handle_extended_wait): Link parent/child fork
2167 threads.
2168 (linux_wait_1): Unlink them.
2169 (linux_set_resume_request): Ignore resume requests for
2170 already-resumed and unhandled fork child threads.
2171 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2172 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2173 New functions.
2174 (handle_v_requests) <vCont>: Don't call require_running.
2175 * server.h (in_queued_stop_replies): New declaration.
2176
2177 2016-10-24 Yao Qi <yao.qi@linaro.org>
2178
2179 PR server/20733
2180 * linux-aarch64-low.c (append_insns): Cast the return value to
2181 'uint32_t *'.
2182
2183 2016-10-10 Yao Qi <yao.qi@linaro.org>
2184
2185 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2186
2187 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2188
2189 * target.c (target_supports_multi_process): New function, moved
2190 from...
2191 * target.h (target_supports_multi_process): ... here. Remove
2192 macro.
2193
2194 2016-10-05 Tom Tromey <tom@tromey.com>
2195
2196 PR remote/20655:
2197 * tracepoint.c (handle_tracepoint_bkpts): Check
2198 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2199
2200 2016-10-05 Yao Qi <yao.qi@linaro.org>
2201
2202 * configure.srv: Update the path of arm-*.xml files.
2203
2204 2016-10-05 Terry Guo <terry.guo@arm.com>
2205 Yao Qi <yao.qi@linaro.org>
2206
2207 * Makefile.in: Adjust the path of rules.
2208 * configure.srv: Update the path of xml files.
2209 * regformats/arm-with-iwmmxt.dat: Regenerated.
2210 * regformats/arm-with-neon.dat: Likewise.
2211 * regformats/arm-with-vfpv2.dat: Likewise.
2212 * regformats/arm-with-vfpv3.dat Likewise.
2213
2214 2016-09-30 Yao Qi <yao.qi@linaro.org>
2215
2216 PR gdbserver/20627
2217 * target.c (target_stop_and_wait): Don't call
2218 target_continue_no_signal, use resume_stop instead.
2219
2220 2016-09-26 Yao Qi <yao.qi@linaro.org>
2221
2222 * linux-low.c (linux_wait_1): Call debug_exit.
2223
2224 2016-09-23 Pedro Alves <palves@redhat.com>
2225
2226 * Makefile.in (SFILES): Add common/new-op.c.
2227 (OBS): Add common/new-op.o.
2228 (new-op.o): New rule.
2229
2230 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2231
2232 * .gitinore: Ignore more files.
2233
2234 2016-09-21 Yao Qi <yao.qi@linaro.org>
2235
2236 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2237 23.
2238
2239 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2240
2241 * server.c (start_inferior): Call target_mourn_inferior instead of
2242 mourn_inferior; pass ptid_t argument to it.
2243 (resume): Likewise.
2244 (handle_target_event): Likewise.
2245 * target.c (target_mourn_inferior): New function.
2246 * target.h (mourn_inferior): Delete macro.
2247
2248 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2249
2250 * linux-low.c (lwp_is_stepping): New function.
2251
2252 2016-09-06 Carl Love <cel@us.ibm.com>
2253
2254 * server.c (start_inferior): Fixed comment, requested comment change
2255 didn't get updated correctly. Removed reference to ptrace () call as
2256 it is only true on Linux systems.
2257
2258 2016-09-06 Carl Love <cel@us.ibm.com>
2259
2260 * server.c (start_inferior): Do not call
2261 function target_post_create_inferior () if the
2262 inferior process has already exited.
2263
2264 2016-09-05 Pedro Alves <palves@redhat.com>
2265
2266 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2267 (COMPILE.pre, CC_LD): Use CXX directly.
2268 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2269 * acinclude.m4: Don't include build-with-cxx.m4.
2270 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2271 * configure: Regenerate.
2272
2273 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2274
2275 PR gdb/19495
2276 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2277 call writing data to own_buf.
2278
2279 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2280
2281 * target.c (mywait): Call target_wait instead of
2282 the_target->wait.
2283 (target_wait): New function.
2284
2285 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2286
2287 * server.c (start_inferior): New variable 'ptid'. Replace calls
2288 to the_target->resume by target_continue{,_no_signal}, depending
2289 on the case.
2290 * target.c (target_stop_and_wait): Call target_continue_no_signal
2291 instead of the_target->resume.
2292 (target_continue): New function.
2293
2294 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2295
2296 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2297
2298 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2299
2300 PR server/20491
2301 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2302 ps_prochandle.
2303 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2304 * linux-arm-low.c (ps_get_thread_area): Likewise.
2305 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2306 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2307 * linux-mips-low.c (ps_get_thread_area): Likewise.
2308 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2309 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2310 * linux-x86-low.c (ps_get_thread_area): Likewise.
2311 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2312
2313 2016-08-19 Pedro Alves <palves@redhat.com>
2314
2315 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2316
2317 2016-08-19 Pedro Alves <palves@redhat.com>
2318
2319 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2320 comment. Use memcpy instead of casting through unsigned long.
2321
2322 2016-08-19 Pedro Alves <palves@redhat.com>
2323
2324 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2325 allocating around 0x80000000.
2326
2327 2016-08-19 Pedro Alves <palves@redhat.com>
2328
2329 PR gdb/20415
2330 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2331 (x32-avx512-linux-ipa.o): New rules.
2332 * configure.ac (x86_64-*-linux*): New x32 check.
2333 * configure.srv (ipa_x32_linux_regobj): New.
2334 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2335 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2336 descriptions.
2337 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2338 descriptions.
2339 * configure: Regenerate.
2340
2341 2016-08-09 Pedro Alves <palves@redhat.com>
2342
2343 PR gdb/18653
2344 * Makefile.in (OBS): Add signals-state-save-restore.o.
2345 (signals-state-save-restore.o): New rule.
2346 * config.in: Regenerate.
2347 * configure: Regenerate.
2348 * linux-low.c: Include "signals-state-save-restore.h".
2349 (linux_create_inferior): Call
2350 restore_original_signals_state.
2351 * server.c: Include "dispositions-save-restore.h".
2352 (captured_main): Call save_original_signals_state.
2353
2354 2016-08-05 Pedro Alves <palves@redhat.com>
2355
2356 * configure: Regenerate.
2357
2358 2016-08-04 Yao Qi <yao.qi@linaro.org>
2359
2360 * linux-low.c (regsets_fetch_inferior_registers): Check
2361 errno is ESRCH or not.
2362
2363 2016-08-02 Yao Qi <yao.qi@linaro.org>
2364
2365 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2366 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2367 (thread_db_load_search): Update.
2368 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2369 td_ta_set_event and td_ta_event_getmsg.
2370
2371 2016-07-26 Pedro Alves <palves@redhat.com>
2372
2373 PR server/20414
2374 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2375 of unsigned long for 64-bit registers and use uint32_t instead of
2376 unsigned int for 32-bit registers.
2377
2378 2016-07-26 Pedro Alves <palves@redhat.com>
2379
2380 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2381 to 'ptrace'.
2382
2383 2016-07-21 Tom Tromey <tom@tromey.com>
2384
2385 * configure: Rebuild.
2386
2387 2016-07-21 Yao Qi <yao.qi@linaro.org>
2388
2389 * mem-break.c (find_gdb_breakpoint): Cast bp to
2390 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2391
2392 2016-07-21 Yao Qi <yao.qi@linaro.org>
2393
2394 * server.c (handle_v_requests): Support s and S actions
2395 if target_supports_software_single_step return true.
2396
2397 2016-07-21 Yao Qi <yao.qi@linaro.org>
2398
2399 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2400 is resume_step, call maybe_hw_step.
2401 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2402 and unstop them.
2403 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2404 breakpoints or not.
2405 (proceed_one_lwp): If resume request is resume_step, install
2406 reinsert breakpoints and call maybe_hw_step.
2407
2408 2016-07-21 Yao Qi <yao.qi@linaro.org>
2409
2410 * linux-low.c (proceed_one_lwp): Declare.
2411 (linux_resume_one_thread): Remove local variable 'step'.
2412 Lift code enqueue signal. Call proceed_one_lwp instead of
2413 linux_resume_one_lwp.
2414
2415 2016-07-21 Yao Qi <yao.qi@linaro.org>
2416
2417 * linux-low.c (linux_resume_one_thread): Call
2418 enqueue_pending_signal.
2419
2420 2016-07-21 Yao Qi <yao.qi@linaro.org>
2421
2422 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2423 * inferiors.c (do_restore_current_thread_cleanup): New function.
2424 (make_cleanup_restore_current_thread): Likewise.
2425 * linux-low.c (install_software_single_step_breakpoints): Call
2426 make_cleanup_restore_current_thread. Switch current_thread to
2427 thread.
2428
2429 2016-07-21 Yao Qi <yao.qi@linaro.org>
2430
2431 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2432 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2433 (clone_one_breakpoint): Likewise.
2434 (delete_reinsert_breakpoints): Change parameter to thread.
2435 Callers updated.
2436 (has_reinsert_breakpoints): Likewise.
2437 (uninsert_reinsert_breakpoints): Likewise.
2438 (reinsert_reinsert_breakpoints): Likewise.
2439 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2440 (delete_reinsert_breakpoints): Likewise.
2441 (reinsert_reinsert_breakpoints): Likewise.
2442 (uninsert_reinsert_breakpoints): Likewise.
2443 (has_reinsert_breakpoints): Likewise.
2444
2445 2016-07-21 Yao Qi <yao.qi@linaro.org>
2446
2447 * inferiors.c (get_thread_process): Make parameter const.
2448 * inferiors.h (get_thread_process): Update declaration.
2449 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2450 Add new parameters child_thread and parent_thread. Callers
2451 updated.
2452 * mem-break.h (clone_all_breakpoints): Update declaration.
2453
2454 2016-07-21 Yao Qi <yao.qi@linaro.org>
2455
2456 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2457 <command_list, handler>: Remove.
2458 (struct gdb_breakpoint): New.
2459 (struct other_breakpoint): New.
2460 (struct reinsert_breakpoint): New.
2461 (is_gdb_breakpoint): New function.
2462 (any_persistent_commands): Update command_list if
2463 is_gdb_breakpoint returns true.
2464 (set_breakpoint): Create breakpoints according to their types.
2465 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2466 (set_gdb_breakpoint_1): Likewise.
2467 (set_gdb_breakpoint): Likewise.
2468 (clear_breakpoint_conditions): Change parameter type to
2469 'struct gdb_breakpoint *'.
2470 (clear_breakpoint_commands): Likewise.
2471 (clear_breakpoint_conditions_and_commands): Likewise.
2472 (add_condition_to_breakpoint): Likewise.
2473 (add_breakpoint_condition): Likewise.
2474 (add_commands_to_breakpoint): Likewise.
2475 (check_breakpoints): Check other_breakpoint.
2476 (clone_one_breakpoint): Clone breakpopint according to its type.
2477 * mem-break.h (struct gdb_breakpoint): Declare.
2478 (set_gdb_breakpoint): Update declaration.
2479 (clear_breakpoint_conditions_and_commands): Likewise.
2480 (add_breakpoint_condition): Likewise.
2481 (add_breakpoint_commands): Likewise.
2482 * server.c (process_point_options): Change parameter type to
2483 'struct gdb_breakpoint *'.
2484
2485 2016-07-21 Yao Qi <yao.qi@linaro.org>
2486
2487 * mem-break.c (set_breakpoint_at): Rename it to ...
2488 (set_breakpoint_type_at): ... it.
2489 (set_breakpoint_at): Call set_breakpoint_type_at.
2490 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2491 * mem-break.h (set_breakpoint_at): Update comments.
2492
2493 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2494
2495 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2496 to buf parameter.
2497 (nios2_store_gregset): Likewise.
2498
2499 2016-07-01 Pedro Alves <palves@redhat.com>
2500 Antoine Tremblay <antoine.tremblay@ericsson.com>
2501
2502 * linux-low.c: Change interface to take the target lwp_info
2503 pointer directly and return void. Handle detaching from a zombie
2504 thread.
2505 (linux_detach_lwp_callback): New function.
2506 (linux_detach): Detach from the leader thread after detaching from
2507 the clone threads.
2508
2509 2016-06-28 Yao Qi <yao.qi@linaro.org>
2510
2511 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2512 for variable new_offset.
2513 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2514 (aarch64_ftrace_insn_reloc_cb): Likewise.
2515 (aarch64_ftrace_insn_reloc_tb): Likewise.
2516 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2517 PRIx64 instead of PRIx32.
2518
2519 2016-06-28 Yao Qi <yao.qi@linaro.org>
2520
2521 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2522 (the_low_target): Install arm_get_syscall_trapinfo.
2523
2524 2016-06-28 Yao Qi <yao.qi@linaro.org>
2525
2526 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2527 function.
2528 (the_low_target): Install aarch64_get_syscall_trapinfo.
2529
2530 2016-06-28 Yao Qi <yao.qi@linaro.org>
2531
2532 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2533 Callers updated.
2534 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2535 Remove parameter sysno.
2536 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2537 sysret.
2538
2539 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2540
2541 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2542 (s390_emit_ne_goto): Likewise.
2543 (s390_emit_lt_goto): Likewise.
2544 (s390_emit_le_goto): Likewise.
2545 (s390_emit_gt_goto): Likewise.
2546 (s390_emit_ge_goto): Likewise.
2547 (s390x_emit_eq_goto): Likewise.
2548 (s390x_emit_ne_goto): Likewise.
2549 (s390x_emit_lt_goto): Likewise.
2550 (s390x_emit_le_goto): Likewise.
2551 (s390x_emit_gt_goto): Likewise.
2552 (s390x_emit_ge_goto): Likewise.
2553 (s390_emit_ops_impl): Mark variable static.
2554 (s390x_emit_ops): Likewise.
2555
2556 2016-06-17 Yao Qi <yao.qi@linaro.org>
2557
2558 * linux-low.c (handle_extended_wait): Call
2559 uninsert_reinsert_breakpoints for the parent process. Remove
2560 reinsert breakpoints from the child process. Reinsert them to
2561 the parent process when vfork is done.
2562 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2563 (reinsert_reinsert_breakpoints): New function.
2564 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2565 (reinsert_reinsert_breakpoints): Declare.
2566
2567 2016-06-17 Yao Qi <yao.qi@linaro.org>
2568
2569 * linux-low.c (handle_extended_wait): If the parent is doing
2570 step-over, remove the reinsert breakpoints from the forked child.
2571
2572 2016-06-17 Yao Qi <yao.qi@linaro.org>
2573
2574 * linux-low.c (unsuspend_all_lwps): Declare.
2575 (linux_low_filter_event): If thread exited, call finish_step_over.
2576 If step-over is finished, unsuspend other threads.
2577
2578 2016-06-17 Yao Qi <yao.qi@linaro.org>
2579
2580 * linux-low.c (linux_resume_one_lwp_throw): Assert
2581 has_reinsert_breakpoints returns false.
2582 * mem-break.c (delete_disabled_breakpoints): Assert
2583 bp type isn't reinsert_breakpoint.
2584
2585 2016-06-17 Yao Qi <yao.qi@linaro.org>
2586
2587 * linux-low.c (maybe_hw_step): New function.
2588 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2589 (finish_step_over): Switch current_thread to lwp temporarily,
2590 and assert has_reinsert_breakpoints returns true.
2591 (proceed_one_lwp): Call maybe_hw_step.
2592 * mem-break.c (has_reinsert_breakpoints): New function.
2593 * mem-break.h (has_reinsert_breakpoints): Declare.
2594
2595 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2596
2597 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2598
2599 2016-05-17 Yao Qi <yao.qi@linaro.org>
2600
2601 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2602 instead of find_inferior.
2603
2604 2016-05-05 Yao Qi <yao.qi@linaro.org>
2605
2606 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2607 Initialize res to zero.
2608
2609 2016-05-05 Yao Qi <yao.qi@linaro.org>
2610
2611 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2612 to uint32_t.
2613
2614 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2615
2616 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2617 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2618 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2619
2620 2016-04-28 Par Olsson <par.olsson@windriver.com>
2621 Simon Marchi <simon.marchi@ericsson.com>
2622
2623 * tracepoint.c (write_inferior_int8): New function.
2624 (cmd_qtenable_disable): Write enable flag using
2625 write_inferior_int8.
2626
2627 2016-04-25 Yao Qi <yao.qi@linaro.org>
2628
2629 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2630 (need_step_over_p): Return zero if the LWP has pending signals
2631 can be delivered on software single step target.
2632
2633 2016-04-25 Yao Qi <yao.qi@linaro.org>
2634
2635 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2636 return instead of error.
2637
2638 2016-04-22 Yao Qi <yao.qi@linaro.org>
2639
2640 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2641 to 23.
2642
2643 2016-04-22 Yao Qi <yao.qi@linaro.org>
2644
2645 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2646 signal when stepping over breakpoint with software single
2647 step.
2648
2649 2016-04-21 Pedro Alves <palves@redhat.com>
2650
2651 * linux-s390-low.c (s390_collect_ptrace_register)
2652 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2653 add casts.
2654 (s390_check_regset): Use void * instead of gdb_byte *.
2655
2656 2016-04-20 Pedro Alves <palves@redhat.com>
2657
2658 * configure: Renegerate.
2659
2660 2016-04-20 Yao Qi <yao.qi@linaro.org>
2661
2662 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2663 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2664 number 16.
2665 (arm_store_gregset): Likewise.
2666
2667 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2668
2669 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2670 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2671 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2672 (amd64-avx-mpx-linux.c): New rules.
2673 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2674 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2675 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2676 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2677 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2678 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2679 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2680 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2681 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2682 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2683 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2684 * linux-x86-low.c (x86_linux_read_description): Add case for
2685 X86_XSTATE_AVX_MPX_MASK.
2686 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2687 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2688 init_registers_i386_avx_mpx_linux.
2689 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2690 (initialize_low_tracepoint): Call
2691 init_registers_i386_avx_mpx_linux.
2692 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2693 (initialize_low_tracepoint): Call
2694 init_registers_amd64_avx_mpx_linux.
2695 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2696 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2697 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2698 declarations.
2699
2700 2016-04-18 Pedro Alves <palves@redhat.com>
2701
2702 * configure: Regenerate.
2703
2704 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2705
2706 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2707 (aarch64_emit_sub): Likewise.
2708
2709 2016-04-12 Pedro Alves <palves@redhat.com>
2710
2711 * utils.c (prepare_to_throw_exception): Delete.
2712
2713 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2714
2715 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2716
2717 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2718
2719 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2720
2721 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2722
2723 * linux-aarch64-ipa.c: Add <elf.h> include.
2724 * linux-ppc-ipa.c: Add <elf.h> include.
2725 * linux-s390-ipa.c: Add <elf.h> include.
2726
2727 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2728
2729 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2730 (get_raw_reg_ptr): Likewise.
2731 (get_trace_state_variable_value_ptr): Likewise.
2732 (set_trace_state_variable_value_ptr): Likewise.
2733 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2734 char *.
2735
2736 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2737 Marcin Kościelnicki <koriakin@0x04.net>
2738
2739 PR/17221
2740 * linux-ppc-low.c (emit_insns): New function.
2741 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2742 (ppc_emit_prologue): New function.
2743 (ppc_emit_epilogue): New function.
2744 (ppc_emit_add): New function.
2745 (ppc_emit_sub): New function.
2746 (ppc_emit_mul): New function.
2747 (ppc_emit_lsh): New function.
2748 (ppc_emit_rsh_signed): New function.
2749 (ppc_emit_rsh_unsigned): New function.
2750 (ppc_emit_ext): New function.
2751 (ppc_emit_zero_ext): New function.
2752 (ppc_emit_log_not): New function.
2753 (ppc_emit_bit_and): New function.
2754 (ppc_emit_bit_or): New function.
2755 (ppc_emit_bit_xor): New function.
2756 (ppc_emit_bit_not): New function.
2757 (ppc_emit_equal): New function.
2758 (ppc_emit_less_signed): New function.
2759 (ppc_emit_less_unsigned): New function.
2760 (ppc_emit_ref): New function.
2761 (ppc_emit_const): New function.
2762 (ppc_emit_reg): New function.
2763 (ppc_emit_pop): New function.
2764 (ppc_emit_stack_flush): New function.
2765 (ppc_emit_swap): New function.
2766 (ppc_emit_stack_adjust): New function.
2767 (ppc_emit_call): New function.
2768 (ppc_emit_int_call_1): New function.
2769 (ppc_emit_void_call_2): New function.
2770 (ppc_emit_if_goto): New function.
2771 (ppc_emit_goto): New function.
2772 (ppc_emit_eq_goto): New function.
2773 (ppc_emit_ne_goto): New function.
2774 (ppc_emit_lt_goto): New function.
2775 (ppc_emit_le_goto): New function.
2776 (ppc_emit_gt_goto): New function.
2777 (ppc_emit_ge_goto): New function.
2778 (ppc_write_goto_address): New function.
2779 (ppc_emit_ops_impl): New static variable.
2780 (ppc64v1_emit_prologue): New function.
2781 (ppc64v2_emit_prologue): New function.
2782 (ppc64_emit_epilogue): New function.
2783 (ppc64_emit_add): New function.
2784 (ppc64_emit_sub): New function.
2785 (ppc64_emit_mul): New function.
2786 (ppc64_emit_lsh): New function.
2787 (ppc64_emit_rsh_signed): New function.
2788 (ppc64_emit_rsh_unsigned): New function.
2789 (ppc64_emit_ext): New function.
2790 (ppc64_emit_zero_ext): New function.
2791 (ppc64_emit_log_not): New function.
2792 (ppc64_emit_bit_and): New function.
2793 (ppc64_emit_bit_or): New function.
2794 (ppc64_emit_bit_xor): New function.
2795 (ppc64_emit_bit_not): New function.
2796 (ppc64_emit_equal): New function.
2797 (ppc64_emit_less_signed): New function.
2798 (ppc64_emit_less_unsigned): New function.
2799 (ppc64_emit_ref): New function.
2800 (ppc64_emit_const): New function.
2801 (ppc64v1_emit_reg): New function.
2802 (ppc64v2_emit_reg): New function.
2803 (ppc64_emit_pop): New function.
2804 (ppc64_emit_stack_flush): New function.
2805 (ppc64_emit_swap): New function.
2806 (ppc64v1_emit_call): New function.
2807 (ppc64v2_emit_call): New function.
2808 (ppc64v1_emit_int_call_1): New function.
2809 (ppc64v2_emit_int_call_1): New function.
2810 (ppc64v1_emit_void_call_2): New function.
2811 (ppc64v2_emit_void_call_2): New function.
2812 (ppc64_emit_if_goto): New function.
2813 (ppc64_emit_eq_goto): New function.
2814 (ppc64_emit_ne_goto): New function.
2815 (ppc64_emit_lt_goto): New function.
2816 (ppc64_emit_le_goto): New function.
2817 (ppc64_emit_gt_goto): New function.
2818 (ppc64_emit_ge_goto): New function.
2819 (ppc64v1_emit_ops_impl): New static variable.
2820 (ppc64v2_emit_ops_impl): New static variable.
2821 (ppc_emit_ops): New function.
2822 (linux_low_target): Wire in ppc_emit_ops.
2823
2824 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2825 Marcin Kościelnicki <koriakin@0x04.net>
2826
2827 PR/17221
2828 * Makefile.in: Add powerpc-*-ipa.o
2829 * configure.srv: Add ipa_obj for powerpc*-linux.
2830 * linux-ppc-ipa.c: New file.
2831 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2832 includes.
2833 (PPC_FIELD): New macro.
2834 (PPC_SEXT): New macro.
2835 (PPC_OP6): New macro.
2836 (PPC_BO): New macro.
2837 (PPC_LI): New macro.
2838 (PPC_BD): New macro.
2839 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2840 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2841 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2842 (ppc_get_thread_area): New function.
2843 (is_elfv2_inferior): New function.
2844 (gen_ds_form): New function.
2845 (GEN_STD): New macro.
2846 (GEN_STDU): New macro.
2847 (GEN_LD): New macro.
2848 (GEN_LDU): New macro.
2849 (gen_d_form): New function.
2850 (GEN_ADDI): New macro.
2851 (GEN_ADDIS): New macro.
2852 (GEN_LI): New macro.
2853 (GEN_LIS): New macro.
2854 (GEN_ORI): New macro.
2855 (GEN_ORIS): New macro.
2856 (GEN_LWZ): New macro.
2857 (GEN_STW): New macro.
2858 (GEN_STWU): New macro.
2859 (gen_xfx_form): New function.
2860 (GEN_MFSPR): New macro.
2861 (GEN_MTSPR): New macro.
2862 (GEN_MFCR): New macro.
2863 (GEN_MTCR): New macro.
2864 (GEN_SYNC): New macro.
2865 (GEN_LWSYNC): New macro.
2866 (gen_x_form): New function.
2867 (GEN_OR): New macro.
2868 (GEN_MR): New macro.
2869 (GEN_LWARX): New macro.
2870 (GEN_STWCX): New macro.
2871 (GEN_CMPW): New macro.
2872 (gen_md_form): New function.
2873 (GEN_RLDICL): New macro.
2874 (GEN_RLDICR): New macro.
2875 (gen_i_form): New function.
2876 (GEN_B): New macro.
2877 (GEN_BL): New macro.
2878 (gen_b_form): New function.
2879 (GEN_BNE): New macro.
2880 (GEN_LOAD): New macro.
2881 (GEN_STORE): New macro.
2882 (gen_limm): New function.
2883 (gen_atomic_xchg): New function.
2884 (gen_call): New function.
2885 (ppc_relocate_instruction): New function.
2886 (ppc_install_fast_tracepoint_jump_pad): New function.
2887 (ppc_get_min_fast_tracepoint_insn_len): New function.
2888 (ppc_get_ipa_tdesc_idx): New function.
2889 (the_low_target): Wire in the new functions.
2890 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2891 tdescs.
2892 * linux-ppc-tdesc.h: New file.
2893
2894 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2895
2896 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2897 (alloc_jump_pad_buffer): New function.
2898 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2899 (alloc_jump_pad_buffer): New function.
2900 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2901 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2902 (alloc_jump_pad_buffer): New function.
2903 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2904 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2905 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2906 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2907
2908 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2909
2910 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2911 * linux-amd64-ipa.c: Likewise.
2912 * linux-i386-ipa.c: Likewise.
2913 * linux-s390-ipa.c: Likewise.
2914 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2915 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2916 set_trace_state_variable_value_ptr.
2917 (struct ipa_sym_addresses): Likewise.
2918 (symbol_list): Likewise.
2919 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2920 accessing gdb_collect directly.
2921 (gdb_collect_ptr_type): New typedef.
2922 (get_raw_reg_ptr_type): New typedef.
2923 (get_trace_state_variable_value_ptr_type): New typedef.
2924 (set_trace_state_variable_value_ptr_type): New typedef.
2925 (gdb_collect_ptr): New global.
2926 (get_raw_reg_ptr): New global.
2927 (get_trace_state_variable_value_ptr): New global.
2928 (set_trace_state_variable_value_ptr): New global.
2929 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2930 accessing get_raw_reg directly.
2931 (get_get_tsv_func_addr): Likewise for
2932 get_trace_state_variable_value_ptr.
2933 (get_set_tsv_func_addr): Likewise for
2934 set_trace_state_variable_value_ptr.
2935 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2936
2937 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2938
2939 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2940
2941 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2942
2943 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2944 packets.
2945 (relocate_instruction): Remove own_buf.
2946 * server.c (own_buf): Make global.
2947 (handle_v_requests): Make global.
2948 * server.h (own_buf): New declaration.
2949 (handle_v_requests): New prototype.
2950
2951 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2952
2953 PR 18377
2954 * linux-s390-low.c (add_insns): New function.
2955 (s390_emit_prologue): New function.
2956 (s390_emit_epilogue): New function.
2957 (s390_emit_add): New function.
2958 (s390_emit_sub): New function.
2959 (s390_emit_mul): New function.
2960 (s390_emit_lsh): New function.
2961 (s390_emit_rsh_signed): New function.
2962 (s390_emit_rsh_unsigned): New function.
2963 (s390_emit_ext): New function.
2964 (s390_emit_log_not): New function.
2965 (s390_emit_bit_and): New function.
2966 (s390_emit_bit_or): New function.
2967 (s390_emit_bit_xor): New function.
2968 (s390_emit_bit_not): New function.
2969 (s390_emit_equal): New function.
2970 (s390_emit_less_signed): New function.
2971 (s390_emit_less_unsigned): New function.
2972 (s390_emit_ref): New function.
2973 (s390_emit_if_goto): New function.
2974 (s390_emit_goto): New function.
2975 (s390_write_goto_address): New function.
2976 (s390_emit_litpool): New function.
2977 (s390_emit_const): New function.
2978 (s390_emit_call): New function.
2979 (s390_emit_reg): New function.
2980 (s390_emit_pop): New function.
2981 (s390_emit_stack_flush): New function.
2982 (s390_emit_zero_ext): New function.
2983 (s390_emit_swap): New function.
2984 (s390_emit_stack_adjust): New function.
2985 (s390_emit_set_r2): New function.
2986 (s390_emit_int_call_1): New function.
2987 (s390_emit_void_call_2): New function.
2988 (s390_emit_eq_goto): New function.
2989 (s390_emit_ne_goto): New function.
2990 (s390_emit_lt_goto): New function.
2991 (s390_emit_le_goto): New function.
2992 (s390_emit_gt_goto): New function.
2993 (s390_emit_ge_goto): New function.
2994 (s390x_emit_prologue): New function.
2995 (s390x_emit_epilogue): New function.
2996 (s390x_emit_add): New function.
2997 (s390x_emit_sub): New function.
2998 (s390x_emit_mul): New function.
2999 (s390x_emit_lsh): New function.
3000 (s390x_emit_rsh_signed): New function.
3001 (s390x_emit_rsh_unsigned): New function.
3002 (s390x_emit_ext): New function.
3003 (s390x_emit_log_not): New function.
3004 (s390x_emit_bit_and): New function.
3005 (s390x_emit_bit_or): New function.
3006 (s390x_emit_bit_xor): New function.
3007 (s390x_emit_bit_not): New function.
3008 (s390x_emit_equal): New function.
3009 (s390x_emit_less_signed): New function.
3010 (s390x_emit_less_unsigned): New function.
3011 (s390x_emit_ref): New function.
3012 (s390x_emit_if_goto): New function.
3013 (s390x_emit_const): New function.
3014 (s390x_emit_call): New function.
3015 (s390x_emit_reg): New function.
3016 (s390x_emit_pop): New function.
3017 (s390x_emit_stack_flush): New function.
3018 (s390x_emit_zero_ext): New function.
3019 (s390x_emit_swap): New function.
3020 (s390x_emit_stack_adjust): New function.
3021 (s390x_emit_int_call_1): New function.
3022 (s390x_emit_void_call_2): New function.
3023 (s390x_emit_eq_goto): New function.
3024 (s390x_emit_ne_goto): New function.
3025 (s390x_emit_lt_goto): New function.
3026 (s390x_emit_le_goto): New function.
3027 (s390x_emit_gt_goto): New function.
3028 (s390x_emit_ge_goto): New function.
3029 (s390_emit_ops): New function.
3030 (struct linux_target_ops): Fill in emit_ops hook.
3031
3032 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3033
3034 PR 18377
3035 * Makefile.in: Add s390 IPA files.
3036 * configure.srv: Build IPA for s390.
3037 * linux-s390-ipa.c: New file.
3038 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3039 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3040 (tdesc_s390_linux32): Likewise.
3041 (init_registers_s390_linux32v1): Likewise.
3042 (tdesc_s390_linux32v1): Likewise.
3043 (init_registers_s390_linux32v2): Likewise.
3044 (tdesc_s390_linux32v2): Likewise.
3045 (init_registers_s390_linux64): Likewise.
3046 (tdesc_s390_linux64): Likewise.
3047 (init_registers_s390_linux64v1): Likewise.
3048 (tdesc_s390_linux64v1): Likewise.
3049 (init_registers_s390_linux64v2): Likewise.
3050 (tdesc_s390_linux64v2): Likewise.
3051 (init_registers_s390_te_linux64): Likewise.
3052 (tdesc_s390_te_linux64): Likewise.
3053 (init_registers_s390_vx_linux64): Likewise.
3054 (tdesc_s390_vx_linux64): Likewise.
3055 (init_registers_s390_tevx_linux64): Likewise.
3056 (tdesc_s390_tevx_linux64): Likewise.
3057 (init_registers_s390x_linux64): Likewise.
3058 (tdesc_s390x_linux64): Likewise.
3059 (init_registers_s390x_linux64v1): Likewise.
3060 (tdesc_s390x_linux64v1): Likewise.
3061 (init_registers_s390x_linux64v2): Likewise.
3062 (tdesc_s390x_linux64v2): Likewise.
3063 (init_registers_s390x_te_linux64): Likewise.
3064 (tdesc_s390x_te_linux64): Likewise.
3065 (init_registers_s390x_vx_linux64): Likewise.
3066 (tdesc_s390x_vx_linux64): Likewise.
3067 (init_registers_s390x_tevx_linux64): Likewise.
3068 (tdesc_s390x_tevx_linux64): Likewise.
3069 (have_hwcap_s390_vx): New static variable.
3070 (s390_arch_setup): Fill have_hwcap_s390_vx.
3071 (s390_get_thread_area): New function.
3072 (s390_ft_entry_gpr_esa): New const.
3073 (s390_ft_entry_gpr_zarch): New const.
3074 (s390_ft_entry_misc): New const.
3075 (s390_ft_entry_fr): New const.
3076 (s390_ft_entry_vr): New const.
3077 (s390_ft_main_31): New const.
3078 (s390_ft_main_64): New const.
3079 (s390_ft_exit_fr): New const.
3080 (s390_ft_exit_vr): New const.
3081 (s390_ft_exit_misc): New const.
3082 (s390_ft_exit_gpr_esa): New const.
3083 (s390_ft_exit_gpr_zarch): New const.
3084 (append_insns): New function.
3085 (s390_relocate_instruction): New function.
3086 (s390_install_fast_tracepoint_jump_pad): New function.
3087 (s390_get_min_fast_tracepoint_insn_len): New function.
3088 (s390_get_ipa_tdesc_idx): New function.
3089 (struct linux_target_ops): Wire in the above functions.
3090 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3091 * linux-s390-tdesc.h: New file.
3092
3093 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3094
3095 * linux-s390-low.c (s390_supports_tracepoints): New function.
3096 (struct linux_target_ops): Fill supports_tracepoints hook.
3097
3098 2016-03-18 Yao Qi <yao.qi@linaro.org>
3099
3100 * linux-low.c (lwp_signal_can_be_delivered): New function.
3101 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3102
3103 2016-03-18 Yao Qi <yao.qi@linaro.org>
3104
3105 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3106 0 if signal is enqueued. Remove 'signal' from one debugging
3107 message. Move one debugging message to some lines below.
3108 Remove code setting 'signal' to 0.
3109
3110 2016-03-18 Yao Qi <yao.qi@linaro.org>
3111
3112 * linux-low.c (linux_low_filter_event): Remove redundant
3113 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3114
3115 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3116
3117 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3118 (struct linux_target_ops): Wire in the above.
3119
3120 2016-03-03 Yao Qi <yao.qi@linaro.org>
3121
3122 * linux-low.c: Update comments to start_step_over.
3123
3124 2016-03-03 Yao Qi <yao.qi@linaro.org>
3125
3126 PR server/19736
3127 * linux-low.c (handle_extended_wait): Set child suspended
3128 if event_lwp->bp_reinsert isn't zero.
3129
3130 2016-03-02 Yao Qi <yao.qi@linaro.org>
3131
3132 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3133 enqueue_pending_signal.
3134
3135 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3136
3137 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3138 is actually loaded.
3139
3140 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3141
3142 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3143 (s390_regmap_3264) [!__s390x__]: New global.
3144 (s390_collect_ptrace_register): Skip map entries containing -1.
3145 (s390_supply_ptrace_register): Ditto.
3146 (s390_fill_gprs_high): New function.
3147 (s390_store_gprs_high): New function.
3148 (s390_regsets): Add NT_S390_HIGH_GPRS.
3149 (s390_get_hwcap): Enable on 31-bit.
3150 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3151 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3152 Detect NT_S390_HIGH_GPRS.
3153 (s390_usrregs_info_3264): Enable on 31-bit.
3154 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3155 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3156
3157 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3158
3159 PR gdb/13808
3160 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3161 * configure.srv: Ditto.
3162 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3163 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3164 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3165 (init_registers_amd64_linux): Remove prototype.
3166 (tdesc_amd64_linux): Remove declaration.
3167 (get_ipa_tdesc): New function.
3168 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3169 initialize remaining tdescs.
3170 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3171 (init_registers_i386_linux): Remove prototype.
3172 (tdesc_i386_linux): Remove declaration.
3173 (get_ipa_tdesc): New function.
3174 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3175 initialize remaining tdescs.
3176 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3177 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3178 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3179 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3180 (x86_get_ipa_tdesc_idx): New function.
3181 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3182 * linux-x86-tdesc.h: New file.
3183 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3184 (target_get_ipa_tdesc_idx): New macro.
3185 * tracepoint.c (ipa_tdesc_idx): New macro.
3186 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3187 (symbol_list): Add ipa_tdesc_idx.
3188 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3189 (ipa_tdesc): Remove.
3190 (ipa_tdesc_idx): New variable.
3191 (get_context_regcache): Use get_ipa_tdesc.
3192 (gdb_collect): Ditto.
3193 (gdb_probe): Ditto.
3194 * tracepoint.h (get_ipa_tdesc): New prototype.
3195 (ipa_tdesc): Remove.
3196
3197 2016-02-24 Pedro Alves <palves@redhat.com>
3198
3199 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3200 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3201 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3202 Factor out common code between the USE_SIGTRAP_SIGINFO and
3203 !USE_SIGTRAP_SIGINFO blocks.
3204 (linux_low_filter_event): Call save_stop_reason instead of
3205 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3206 Update comments.
3207 (linux_wait_1): Update comments.
3208
3209 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3210
3211 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3212 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3213 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3214 ppc_insert_point, ppc_remove_point.
3215
3216 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3217
3218 * linux-s390-low.c (s390_supports_z_point_type): New function.
3219 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3220
3221 2016-02-16 Yao Qi <yao.qi@linaro.org>
3222
3223 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3224 PC. Get pc from regcache_read_pc.
3225
3226 2016-02-12 Yao Qi <yao.qi@linaro.org>
3227
3228 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3229 or linux_get_pc_32bit.
3230 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3231
3232 2016-02-12 Yao Qi <yao.qi@linaro.org>
3233
3234 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3235 arm_linux_get_next_pcs_fixup.
3236
3237 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3238
3239 * tracepoint.c (x_tracepoint_action_download): Change
3240 write_inferior_data_ptr to write_inferior_data_pointer.
3241 (cmd_qtstart): Likewise.
3242 (write_inferior_data_ptr): Remove.
3243 (download_agent_expr): Change write_inferior_data_ptr to
3244 write_inferior_data_pointer.
3245 (download_tracepoint_1): Likewise.
3246 (download_tracepoint): Likewise.
3247 (download_trace_state_variables): Likewise.
3248
3249 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3250 Marcin Kościelnicki <koriakin@0x04.net>
3251
3252 * tracepoint.c (struct tracepoint_action_ops): Remove.
3253 (struct tracepoint_action): Remove ops.
3254 (m_tracepoint_action_download, r_tracepoint_action_download)
3255 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3256 size and offset accordingly.
3257 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3258 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3259 (tracepoint_action_send, tracepoint_action_download): New functions.
3260 Helpers for trace action handlers.
3261 (add_tracepoint_action): Remove setup actions ops.
3262 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3263
3264 2016-02-10 Yao Qi <yao.qi@linaro.org>
3265
3266 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3267
3268 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3269
3270 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3271 to AC_OUTPUT.
3272 * configure: Regenerate.
3273
3274 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3275
3276 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3277 void * to gdb_byte *.
3278 * linux-low.c (siginfo_fixup): Likewise.
3279 (linux_xfer_siginfo): Likewise.
3280 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3281 Likewise.
3282 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3283
3284 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3285
3286 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3287 to srv_tgtobj.
3288 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3289 to srv_tgtobj.
3290 * linux-x86-low.c [__x86_64__]: Include
3291 "nat/amd64-linux-siginfo.h".
3292 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3293 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3294 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3295 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3296 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3297 (cpt_si_fd, si_timerid, si_overrun): Move from
3298 nat/amd64-linux-siginfo.c.
3299 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3300
3301 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3302
3303 * server.c (skip_to_semicolon): Remove.
3304 (process_point_options): Use strchrnul instead of
3305 skip_to_semicolon.
3306
3307 2016-01-26 Yao Qi <yao.qi@linaro.org>
3308
3309 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3310 * linux-low.c (install_software_single_step_breakpoints): Don't
3311 call regcache_read_pc.
3312 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3313 argument pc.
3314
3315 2016-01-26 Yao Qi <yao.qi@linaro.org>
3316
3317 * linux-low.c (install_software_single_step_breakpoints): Call
3318 regcache_read_pc instead of get_pc.
3319
3320 2016-01-26 Yao Qi <yao.qi@linaro.org>
3321
3322 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3323 (unblock_async_io): Rename to ...
3324 (block_unblock_async_io): ... it. New function.
3325 (enable_async_io): Don't install SIGIO handler. Unblock it
3326 instead.
3327 (disable_async_io): Don't ignore SIGIO. Block it instead.
3328 (initialize_async_io): Install SIGIO handler. Don't call
3329 unblock_async_io.
3330
3331 2016-01-26 Yao Qi <yao.qi@linaro.org>
3332
3333 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3334 first character is '\003', call *the_target->request_interrupt.
3335
3336 2016-01-25 Yao Qi <yao.qi@linaro.org>
3337
3338 * remote-utils.c (new_thread_notify): Remove.
3339 (dead_thread_notify): Likewise.
3340 * remote-utils.h (new_thread_notify): Remove declaration.
3341 (dead_thread_notify): Likewise.
3342
3343 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3344
3345 * gdb.trace/pending.exp: Fix expected message on continue.
3346
3347 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3348
3349 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3350 it works properly on big-endian machines where sizeof (CORE_ADDR)
3351 != sizeof (void *).
3352
3353 2016-01-21 Pedro Alves <palves@redhat.com>
3354
3355 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3356 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3357 * configure: Regenerate.
3358
3359 2016-01-21 Yao Qi <yao.qi@linaro.org>
3360
3361 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3362 is_thumb and set it according to CPSR saved on the stack.
3363 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3364 arm_sigreturn_next_pc.
3365
3366 2016-01-18 Yao Qi <yao.qi@linaro.org>
3367
3368 * linux-low.c (linux_set_pc_64bit): New function.
3369 (linux_get_pc_64bit): New function.
3370 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3371 Declare.
3372 * linux-sparc-low.c (debug_threads): Remove declaration.
3373 (sparc_get_pc): Remove.
3374 (the_low_target): Use linux_get_pc_64bit instead of
3375 sparc_get_pc.
3376 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3377 (the_low_target): Use linux_get_pc_64bit and
3378 linux_set_pc_64bit.
3379
3380 2016-01-18 Yao Qi <yao.qi@linaro.org>
3381
3382 * linux-arm-low.c (debug_threads): Remove declaration.
3383 (arm_get_pc, arm_set_pc): Remove.
3384 (the_low_target): Use linux_get_pc_32bit and
3385 linux_set_pc_32bit.
3386 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3387 (the_low_target): Use linux_get_pc_32bit and
3388 linux_set_pc_32bit.
3389 * linux-cris-low.c (debug_threads): Remove declaration.
3390 (cris_get_pc, cris_set_pc,): Remove.
3391 (the_low_target): Use linux_get_pc_32bit and
3392 linux_set_pc_32bit.
3393 * linux-crisv32-low.c (debug_threads): Remove declaration.
3394 (cris_get_pc, cris_set_pc): Remove.
3395 (the_low_target): Use linux_get_pc_32bit and
3396 linux_set_pc_32bit.
3397 * linux-low.c: Include inttypes.h.
3398 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3399 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3400 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3401 (the_low_target): Use linux_get_pc_32bit and
3402 linux_set_pc_32bit.
3403 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3404 (the_low_target): Use linux_get_pc_32bit and
3405 linux_set_pc_32bit.
3406 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3407 (the_low_target): Use linux_get_pc_32bit and
3408 linux_set_pc_32bit.
3409 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3410 (the_low_target): Use linux_get_pc_32bit and
3411 linux_set_pc_32bit.
3412 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3413 (the_low_target): Use linux_get_pc_32bit and
3414 linux_set_pc_32bit.
3415
3416 2016-01-18 Gary Benson <gbenson@redhat.com>
3417
3418 * configure.ac (AC_FUNC_FORK): New check.
3419 * config.in: Regenerate.
3420 * configure: Likewise.
3421
3422 2016-01-14 Yao Qi <yao.qi@linaro.org>
3423
3424 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3425 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3426 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3427 arm_get_next_pcs_ctor.
3428
3429 2016-01-12 Josh Stone <jistone@redhat.com>
3430 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3431
3432 * inferiors.h: Include "gdb_vecs.h".
3433 (struct process_info): Add syscalls_to_catch.
3434 * inferiors.c (remove_process): Free syscalls_to_catch.
3435 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3436 syscall_return stops.
3437 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3438 * server.c (handle_general_set): Handle QCatchSyscalls.
3439 (handle_query): Report support for QCatchSyscalls.
3440 * target.h (struct target_ops): Add supports_catch_syscall.
3441 (target_supports_catch_syscall): New macro.
3442 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3443 (struct lwp_info): Add syscall_state.
3444 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3445 Maintain syscall_state and syscalls_to_catch across exec.
3446 (get_syscall_trapinfo): New function, proxy to the_low_target.
3447 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3448 (linux_low_filter_event): Toggle syscall_state entry/return for
3449 syscall traps, and set it ignored for all others.
3450 (gdb_catching_syscalls_p): New function.
3451 (gdb_catch_this_syscall_p): New function.
3452 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3453 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3454 (linux_supports_catch_syscall): New function.
3455 (linux_target_ops): Install it.
3456 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3457 (the_low_target): Install it.
3458
3459 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3460
3461 * acinclude.m4: Include new ../warning.m4 file.
3462 * configure: Regenerated.
3463 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3464
3465 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3466
3467 * ax.c (is_goto_target): Mark static.
3468 * linux-low.c (register_addr): Likewise.
3469 (linux_fetch_registers, linux_store_registers): Likewise.
3470 * mem-break.c (any_persistent_commands): Fix old prototype.
3471 (add_commands_to_breakpoint): Mark static.
3472 * regcache.c (find_register_by_name): Delete unused func.
3473 * remote-utils.c (hex_or_minus_one): Mark static.
3474 * server.c (monitor_show_help): Mark static.
3475 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3476 handle_v_requests): Likewise.
3477
3478 2016-01-12 Pedro Alves <palves@redhat.com>
3479
3480 Remove use of the registered trademark symbol throughout.
3481
3482 2016-01-08 Yao Qi <yao.qi@linaro.org>
3483
3484 * remote-utils.c (getpkt): If c is '\003', call target hook
3485 request_interrupt.
3486
3487 2016-01-06 Yao Qi <yao.qi@linaro.org>
3488
3489 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3490 linux-aarch32-low.c.
3491 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3492 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3493 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3494 (thumb2_breakpoint): Declare.
3495 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3496 linux-aarch32-low.h.
3497 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3498 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3499 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3500
3501 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3502
3503 * gdbreplay.c (gdbreplay_version): Change copyright year in
3504 version message.
3505 * server.c (gdbserver_version): Likewise.
3506
3507 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3508
3509 * server.c (crc32_table): Delete.
3510 (crc32): Use libiberty's xcrc32 function.
3511
3512 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3513
3514 * lynx-low.c (lynx_delete_thread_callback): New function.
3515 (lynx_mourn): Properly delete our process and all of its
3516 threads. Remove call to clear_inferiors.
3517
3518 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3519
3520 * target.c (thread_search_callback): Add check that
3521 the thread_stopped target callback is not NULL before
3522 calling it.
3523
3524 2015-12-21 Yao Qi <yao.qi@linaro.org>
3525
3526 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3527 arm breakpoint.
3528
3529 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3530
3531 * server.c (handle_query): Call target_supports_software_single_step.
3532
3533 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3534
3535 * linux-low.c (single_step): New function.
3536 (linux_resume_one_lwp_throw): Call single_step.
3537 (start_step_over): Likewise.
3538
3539 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3540
3541 * Makefile.in (SFILES): Append arch/arm-linux.c,
3542 arch/arm-get-next-pcs.c.
3543 (arm-linux.o): New rule.
3544 (arm-get-next-pcs.o): New rule.
3545 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3546 arm-linux.o.
3547 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3548 to linux-aarch32-low.c.
3549 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3550 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3551 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3552 (thumb2_breakpoint_len): Likewise.
3553 (arm_is_thumb_mode): Make non-static.
3554 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3555 from linux-aarch32-low.c.
3556 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3557 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3558 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3559 (thumb2_breakpoint_len): Likewise.
3560 (arm_is_thumb_mode): New declaration.
3561 * linux-arm-low.c: Include arch/arm-linux.h
3562 aarch/arm-get-next-pcs.h, sys/syscall.h.
3563 (get_next_pcs_ops): New struct.
3564 (get_next_pcs_addr_bits_remove): New function.
3565 (get_next_pcs_is_thumb): New function.
3566 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3567 (arm_sigreturn_next_pc): Likewise.
3568 (get_next_pcs_syscall_next_pc): Likewise.
3569 (arm_gdbserver_get_next_pcs): Likewise.
3570 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3571 Initialize.
3572 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3573 * server.h: Include gdb_vecs.h.
3574
3575 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3576
3577 * Makefile.in (SFILES): Append common/common-regcache.c.
3578 (OBS): Append common-regcache.o.
3579 (common-regcache.o): New rule.
3580 * regcache.c (init_register_cache): Initialize cache to
3581 REG_UNAVAILABLE.
3582 (regcache_raw_read_unsigned): New function.
3583 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3584 register_status enum.
3585
3586 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3587
3588 * linux-aarch64-low.c (the_low_targets): Rename
3589 breakpoint_reinsert_addr to get_next_pcs.
3590 * linux-arm-low.c (the_low_targets): Likewise.
3591 * linux-bfin-low.c (the_low_targets): Likewise.
3592 * linux-cris-low.c (the_low_targets): Likewise.
3593 * linux-crisv32-low.c (the_low_targets): Likewise.
3594 * linux-low.c (can_software_single_step): Likewise.
3595 (install_software_single_step_breakpoints): New function.
3596 (start_step_over): Use install_software_single_step_breakpoints.
3597 * linux-low.h: New CORE_ADDR vector.
3598 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3599 get_next_pcs.
3600 * linux-mips-low.c (the_low_targets): Likewise.
3601 * linux-nios2-low.c (the_low_targets): Likewise.
3602 * linux-sparc-low.c (the_low_targets): Likewise.
3603
3604 2015-12-17 Pedro Alves <palves@redhat.com>
3605
3606 * linux-low.c (linux_kill_one_lwp): Remove references to
3607 LinuxThreads.
3608 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3609 to 'kill'.
3610 (linux_init_signals): Delete.
3611 (initialize_low): Adjust.
3612 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3613
3614 2015-12-16 Pedro Alves <palves@redhat.com>
3615
3616 * configure.ac (compiler warning flags): When testing a
3617 -Wno-foo option, check whether -Wfoo works instead.
3618 * configure: Regenerate.
3619
3620 2015-12-11 Don Breazeal <donb@codesourcery.com>
3621
3622 * server.c (process_serial_event): Don't exit from gdbserver
3623 in remote mode if there are still active inferiors.
3624
3625 2015-12-11 Yao Qi <yao.qi@linaro.org>
3626
3627 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3628 arm_breakpoint_at if the process is 32-bit.
3629
3630 2015-12-11 Yao Qi <yao.qi@linaro.org>
3631
3632 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3633 arm breakpoint.
3634
3635 2015-12-07 Yao Qi <yao.qi@linaro.org>
3636
3637 * configure.srv: Append arm.o to srv_tgtobj for
3638 aarch64*-*-linux* target.
3639 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3640 from linux-arm-low.c.
3641 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3642 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3643 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3644 (thumb2_breakpoint_len): Likewise.
3645 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3646 (arm_breakpoint_kinds): Likewise.
3647 (arm_breakpoint_kind_from_pc): Likewise.
3648 (arm_sw_breakpoint_from_kind): Likewise.
3649 (arm_breakpoint_kind_from_current_state): Likewise.
3650 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3651 (arm_sw_breakpoint_from_kind): Declare.
3652 (arm_breakpoint_kind_from_current_state): Declare.
3653 (arm_breakpoint_at): Declare.
3654 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3655 arm_sw_breakpoint_from_kind if process is 32-bit.
3656 (aarch64_breakpoint_kind_from_pc): New function.
3657 (aarch64_breakpoint_kind_from_current_state): New function.
3658 (the_low_target): Initialize fields breakpoint_kind_from_pc
3659 and breakpoint_kind_from_current_state.
3660 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3661 linux-aarch32-low.c.
3662 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3663 (arm_breakpoint, arm_breakpoint_len): Likewise.
3664 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3665 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3666 (arm_is_thumb_mode): Likewise.
3667 (arm_breakpoint_at): Likewise.
3668 (arm_breakpoint_kind_from_pc): Likewise.
3669 (arm_sw_breakpoint_from_kind): Likewise.
3670 (arm_breakpoint_kind_from_current_state): Likewise.
3671
3672 Revert:
3673 2015-08-04 Yao Qi <yao.qi@linaro.org>
3674
3675 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3676 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3677 * server.c (extended_protocol): Remove "static".
3678 * server.h (extended_protocol): Declare it.
3679
3680 2015-12-04 Josh Stone <jistone@redhat.com>
3681
3682 * target.h (struct target_ops) <arch_setup>: Rename to ...
3683 (struct target_ops) <post_create_inferior>: ... this.
3684 (target_arch_setup): Rename to ...
3685 (target_post_create_inferior): ... this, calling post_create_inferior.
3686 * server.c (start_inferior): Update target_arch_setup calls to
3687 target_post_create_inferior.
3688 * linux-low.c (linux_low_ptrace_options): Forward declare.
3689 (linux_arch_setup): Update its comment for general use.
3690 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3691 (struct linux_target_ops): Use linux_post_create_inferior.
3692 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3693 to post_create_inferior.
3694 * nto-low.c (struct nto_target_ops): Likewise.
3695 * spu-low.c (struct spu_target_ops): Likewise.
3696 * win32-low.c (struct win32_target_ops): Likewise.
3697
3698 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3699
3700 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3701
3702 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3703
3704 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3705 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3706 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3707 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3708 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3709 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3710 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3711 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3712 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3713 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3714 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3715 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3716
3717 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3718
3719 * linux-low.c (linux_look_up_symbols): Don't call
3720 linux_supports_traceclone.
3721 * linux-low.h (thread_db_init): Remove use_events argument.
3722 * thread-db.c (thread_db_use_event): Remove global variable.
3723 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3724 (struct thread_db) <td_create_bp>: Remove field.
3725 (thread_db_create_event): Remove function.
3726 (thread_db_enable_reporting): Likewise.
3727 (find_one_thread): Don't check for thread_db_use_events.
3728 (attach_thread): Likewise.
3729 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3730 (try_thread_db_load_1): Don't check for thread_db_use_events.
3731 (thread_db_init): Remove use_events argument and thread events
3732 handling.
3733 (remove_thread_event_breakpoints): Remove function.
3734 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3735
3736 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3737
3738 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3739 New function.
3740 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3741 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3742 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3743 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3744 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3745 Initialize.
3746 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3747 New function.
3748 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3749 * linux-low.c (can_hardware_single_step): Use
3750 supports_hardware_single_step.
3751 (can_software_single_step): New function.
3752 (start_step_over): Call can_software_single_step.
3753 (linux_supports_hardware_single_step): New function.
3754 (struct target_ops) <supports_software_single_step>: Initialize.
3755 * linux-low.h (struct linux_target_ops)
3756 <supports_hardware_single_step>: Initialize.
3757 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3758 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3759 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3760 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3761 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3762 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3763 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3764 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3765 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3766 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3767 Initialize.
3768 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3769 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3770 Initialize.
3771 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3772 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3773 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3774 New function.
3775 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3776 * target.h (struct target_ops): <supports_software_single_step>:
3777 New field.
3778 (target_supports_software_single_step): New macro.
3779
3780 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3781
3782 * linux-low.c (linux_wait_1): Fix pc advance condition.
3783 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3784 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3785
3786 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3787
3788 * linux-arm-low.c (arm_is_thumb_mode): New function.
3789 (arm_breakpoint_at): Use arm_is_thumb_mode.
3790 (arm_breakpoint_kind_from_current_state): New function.
3791 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3792 Initialize.
3793 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3794 (linux_breakpoint_kind_from_current_state): New function.
3795 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3796 * linux-low.h (struct linux_target_ops)
3797 <breakpoint_kind_from_current_state>: New field.
3798 * target.h (struct target_ops): Likewise.
3799 (target_breakpoint_kind_from_current_state): New macro.
3800
3801 2015-11-30 Pedro Alves <palves@redhat.com>
3802
3803 * linux-low.c (linux_resume): Wake up the event loop before
3804 returning.
3805
3806 2015-11-30 Pedro Alves <palves@redhat.com>
3807
3808 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3809 check.
3810 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3811 to -1.
3812 * target.c (struct thread_search): New structure.
3813 (thread_search_callback): New function.
3814 (prev_general_thread): New global.
3815 (prepare_to_access_memory, done_accessing_memory): New functions.
3816 * target.h (prepare_to_access_memory, done_accessing_memory):
3817 Replace macros with function declarations.
3818
3819 2015-11-30 Pedro Alves <palves@redhat.com>
3820
3821 PR 14618
3822 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3823 report TARGET_WAITKIND_NO_RESUMED.
3824 * remote-utils.c (prepare_resume_reply): Handle
3825 TARGET_WAITKIND_NO_RESUMED.
3826 * server.c (report_no_resumed): New global.
3827 (handle_query) <qSupported>: Handle "no-resumed+". Report
3828 "no-resumed+" support.
3829 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3830 return error if the client doesn't support no-resumed events.
3831 (push_stop_notification): New function.
3832 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3833 events if the client supports them.
3834
3835 2015-11-30 Pedro Alves <palves@redhat.com>
3836
3837 * linux-low.c (thread_still_has_status_pending_p): Don't check
3838 vCont;t here.
3839 (lwp_resumed): New function.
3840 (status_pending_p_callback): Return early if the LWP is not
3841 supposed to be resumed.
3842
3843 2015-11-30 Pedro Alves <palves@redhat.com>
3844
3845 * linux-low.c (handle_extended_wait): Assert that the LWP's
3846 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3847 thread create events, leave the new child's status pending.
3848 (linux_low_filter_event): If GDB wants to hear about thread exit
3849 events, leave the LWP marked dead and don't delete it.
3850 (linux_wait_for_event_filtered): Don't check for thread exit.
3851 (filter_exit_event): New function.
3852 (linux_wait_1): Use it, when returning an exit event.
3853 (linux_resume_one_lwp_throw): Assert that the LWP's
3854 waitstatus is TARGET_WAITKIND_IGNORE.
3855 * remote-utils.c (prepare_resume_reply): Handle
3856 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3857 * server.c (report_thread_events): New global.
3858 (handle_general_set): Handle QThreadEvents.
3859 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3860 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3861 TARGET_WAITKIND_THREAD_EXITED.
3862 * server.h (report_thread_events): Declare.
3863
3864 2015-11-30 Pedro Alves <palves@redhat.com>
3865
3866 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3867 the thread's last_resume_kind was resume_stop.
3868
3869 2015-11-30 Pedro Alves <palves@redhat.com>
3870
3871 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3872 before returning.
3873
3874 2015-11-30 Pedro Alves <palves@redhat.com>
3875
3876 * server.c (handle_v_requests): Handle vCtrlC.
3877
3878 2015-11-30 Pedro Alves <palves@redhat.com>
3879
3880 * gdbthread.h (find_any_thread_of_pid): Declare.
3881 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3882 functions.
3883 * server.c (handle_query): If current_thread is NULL, look for
3884 another thread of the selected process.
3885
3886 2015-11-26 Daniel Colascione <dancol@dancol.org>
3887 Simon Marchi <simon.marchi@ericsson.com>
3888
3889 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3890 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3891 name in reply.
3892 * target.h (struct target_ops) <thread_name>: New field.
3893 (target_thread_name): New macro.
3894
3895 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3896
3897 * regcache.h (regcache_invalidate_pid): Add declaration.
3898 * regcache.c (regcache_invalidate_pid): New function, extracted
3899 from regcache_invalidate.
3900 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3901 Add trivial documentation comment.
3902 * lynx-low.c: Use regcache_invalidate_pid instead of
3903 regcache_invalidate.
3904
3905 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3906
3907 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3908 and Elf64_auxv_t if the target is Android.
3909
3910 2015-11-22 Doug Evans <xdje42@gmail.com>
3911
3912 * target.h: #include <sys/types.h>.
3913
3914 2015-11-19 Pedro Alves <palves@redhat.com>
3915
3916 * linux-low.c (linux_process_qsupported): Change prototype.
3917 Adjust.
3918 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3919 Change prototype.
3920 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3921 and adjust to loop over all features.
3922 * server.c (handle_query) <qSupported>: Adjust to call
3923 target_process_qsupported once, passing it a vector of unprocessed
3924 features.
3925 * target.h (struct target_ops) <process_qsupported>: Change
3926 prototype.
3927 (target_process_qsupported): Adjust.
3928
3929 2015-11-19 Pedro Alves <palves@redhat.com>
3930
3931 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3932 mode.
3933 * configure: Regenerate.
3934
3935 2015-11-19 Pedro Alves <palves@redhat.com>
3936
3937 * configure: Regenerate.
3938
3939 2015-11-19 Yao Qi <yao.qi@linaro.org>
3940
3941 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3942 type to uint32_t.
3943
3944 2015-11-19 Yao Qi <yao.qi@linaro.org>
3945
3946 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3947 (struct aarch64_operand): Move enum out.
3948
3949 2015-11-19 Yao Qi <yao.qi@linaro.org>
3950
3951 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3952 struct user_fpsimd_state *.
3953 (aarch64_store_fpregset): Likewise.
3954
3955 2015-11-19 Yao Qi <yao.qi@linaro.org>
3956
3957 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3958 struct user_pt_regs *.
3959 (aarch64_store_gregset): Likewise.
3960
3961 2015-11-18 Pedro Alves <palves@redhat.com>
3962
3963 * Makefile.in (all_object_files): Add $IPA_OBJS.
3964
3965 2015-11-17 Pedro Alves <palves@redhat.com>
3966
3967 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3968 GDB_SIGNAL_0 and gdb_signal_to_string.
3969
3970 2015-11-17 Pedro Alves <palves@redhat.com>
3971
3972 * win32-low.c (handle_output_debug_string): Remove parameter.
3973 (win32_kill): Remove our_status local and adjust call to
3974 handle_output_debug_string.
3975 (get_child_debug_event): Adjust call to
3976 handle_output_debug_string.
3977
3978 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3979
3980 * linux-mips-low.c (mips_fill_gregset): Add cast.
3981 (mips_store_gregset): Likewise.
3982 (mips_fill_fpregset): Likewise.
3983 (mips_store_fpregset): Likewise.
3984
3985 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3986
3987 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3988 priv.
3989
3990 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3991
3992 * linux-mips-low.c (mips_linux_new_thread): Change type of
3993 watch_type to enum target_hw_bp_type.
3994
3995 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3996
3997 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3998 Change return type to arm_hwbp_type.
3999
4000 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4001
4002 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4003 (arm_store_gregset): Likewise.
4004 * linux-arm-low.c (arm_get_hwcap): Likewise.
4005 (arm_read_description): Likewise.
4006
4007 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4008
4009 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4010
4011 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4012
4013 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4014 (ppc_fill_vsxregset): Likewise.
4015 (ppc_store_vsxregset): Likewise.
4016 (ppc_fill_vrregset): Likewise.
4017 (ppc_store_vrregset): Likewise.
4018 (ppc_fill_evrregset): Likewise.
4019 (ppc_store_evrregset): Likewise.
4020
4021 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4022
4023 * linux-ppc-low.c (ppc_usrregs_info): Remove
4024 forward-declaration.
4025 (ppc_arch_setup): Move lower in file.
4026
4027 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4028
4029 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4030 (ps_pdwrite): Likewise.
4031
4032 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4033
4034 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4035 to after assert checks.
4036
4037 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4038
4039 * proc-service.c (ps_pdread): Add/adjust casts.
4040 (ps_pdwrite): Add/adjust casts.
4041
4042 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4043
4044 * server.c (handle_search_memory_1): Cast return value of
4045 memmem.
4046
4047 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4048
4049 * server.c (write_qxfer_response): Change type of data to
4050 gdb_byte *.
4051
4052 2015-10-29 Pedro Alves <palves@redhat.com>
4053
4054 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4055
4056 2015-10-29 Pedro Alves <palves@redhat.com>
4057
4058 * tracepoint.c (clear_installed_tracepoints): Add casts.
4059
4060 2015-10-29 Pedro Alves <palves@redhat.com>
4061
4062 * server.c (handle_v_cont, process_serial_event): Add enum
4063 gdb_signal casts to signal parsing code.
4064
4065 2015-10-29 Pedro Alves <palves@redhat.com>
4066
4067 * linux-low.h (NULL_REGSET): Define.
4068 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4069 * linux-arm-low.c (arm_regsets): Likewise.
4070 * linux-crisv32-low.c (cris_regsets): Likewise.
4071 * linux-m68k-low.c (m68k_regsets): Likewise.
4072 * linux-mips-low.c (mips_regsets): Likewise.
4073 * linux-nios2-low.c (nios2_regsets): Likewise.
4074 * linux-ppc-low.c (ppc_regsets): Likewise.
4075 * linux-s390-low.c (s390_regsets): Likewise.
4076 * linux-sh-low.c (sh_regsets): Likewise.
4077 * linux-sparc-low.c (sparc_regsets): Likewise.
4078 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4079 * linux-tile-low.c (tile_regsets): Likewise.
4080 * linux-x86-low.c (x86_regsets): Likewise.
4081 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4082
4083 2015-10-29 Pedro Alves <palves@redhat.com>
4084
4085 * linux-low.h (NULL_REGSET): Define.
4086 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4087 * linux-arm-low.c (arm_regsets): Likewise.
4088 * linux-crisv32-low.c (cris_regsets): Likewise.
4089 * linux-m68k-low.c (m68k_regsets): Likewise.
4090 * linux-mips-low.c (mips_regsets): Likewise.
4091 * linux-nios2-low.c (nios2_regsets): Likewise.
4092 * linux-ppc-low.c (ppc_regsets): Likewise.
4093 * linux-s390-low.c (s390_regsets): Likewise.
4094 * linux-sh-low.c (sh_regsets): Likewise.
4095 * linux-sparc-low.c (sparc_regsets): Likewise.
4096 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4097 * linux-tile-low.c (tile_regsets): Likewise.
4098 * linux-x86-low.c (x86_regsets): Likewise.
4099 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4100
4101 2015-10-26 Doug Evans <dje@google.com>
4102
4103 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4104
4105 2015-10-26 Doug Evans <dje@google.com>
4106
4107 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4108
4109 2015-10-26 Doug Evans <dje@google.com>
4110
4111 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4112 for debug_printf.
4113 (attach_thread, find_new_threads_callback): Ditto.
4114
4115 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4116
4117 * mem-break.h (set_breakpoint_data): Remove.
4118
4119 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4120
4121 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4122 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4123 (initialize_low): Remove set_breakpoint_data call.
4124 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4125 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4126 (initialize_low): Remove set_breakpoint_data call.
4127 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4128 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4129 (initialize_low): Remove set_breakpoint_data call.
4130
4131 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4132
4133 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4134 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4135 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4136 * target.h (target_breakpoint_kind_from_pc): New macro.
4137
4138 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4139
4140 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4141 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4142 the default breakpoint kind.
4143
4144 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4145
4146 * linux-arm-low.c (arm_supports_z_point_type): Add software
4147 breakpoint support.
4148
4149 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4150
4151 * linux-arm-low.c: Refactor breakpoint definitions.
4152 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4153 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4154
4155 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4156
4157 * Makefile.in: Add arm.c/o.
4158 * configure.srv: Likewise.
4159 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4160 (arm_breakpoint_kind_from_pc): New function.
4161 (arm_sw_breakpoint_from_kind): Return proper kind.
4162 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4163
4164 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4165
4166 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4167 removal.
4168 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4169 (struct raw_breakpoint) <size>: Remove.
4170 (struct raw_breakpoint) <kind>: Add.
4171 (bp_size): New function.
4172 (bp_opcode): Likewise.
4173 (find_raw_breakpoint_at): Adjust for kind.
4174 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4175 (remove_memory_breakpoint): Adjust for kind call bp_size.
4176 (set_raw_breakpoint_at): Adjust for kind.
4177 (set_breakpoint): Likewise.
4178 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4179 (delete_raw_breakpoint): Adjust for kind.
4180 (delete_breakpoint): Likewise.
4181 (find_gdb_breakpoint): Likewise.
4182 (set_gdb_breakpoint_1): Likewise.
4183 (set_gdb_breakpoint): Likewise.
4184 (delete_gdb_breakpoint_1): Likewise.
4185 (delete_gdb_breakpoint): Likewise.
4186 (uninsert_raw_breakpoint): Likewise.
4187 (reinsert_raw_breakpoint): Likewise.
4188 (set_breakpoint_data): Remove.
4189 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4190 (check_mem_read): Adjust for kind call bp_size.
4191 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4192 (clone_one_breakpoint): Adjust for kind.
4193 * mem-break.h (set_gdb_breakpoint): Likewise.
4194 (delete_gdb_breakpoint): Likewise.
4195 * server.c (process_serial_event): Likewise.
4196
4197 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4198
4199 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4200 (struct linux_target_ops) <breakpoint>: Remove.
4201 (struct linux_target_ops) <breakpoint_len>: Remove.
4202 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4203 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4204 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4205 (arm_sw_breakpoint_from_kind): New function.
4206 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4207 (struct linux_target_ops) <breakpoint>: Remove.
4208 (struct linux_target_ops) <breakpoint_len>: Remove.
4209 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4210 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4211 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4212 (struct linux_target_ops) <breakpoint>: Remove.
4213 (struct linux_target_ops) <breakpoint_len>: Remove.
4214 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4215 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4216 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4217 (struct linux_target_ops) <breakpoint>: Remove.
4218 (struct linux_target_ops) <breakpoint_len>: Remove.
4219 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4220 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4221 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4222 and sw_breakpoint_from_kind to increment the pc.
4223 (linux_breakpoint_kind_from_pc): New function.
4224 (linux_sw_breakpoint_from_kind): New function.
4225 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4226 (initialize_low): Call breakpoint_kind_from_pc and
4227 sw_breakpoint_from_kind to replace breakpoint_data/len.
4228 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4229 New field.
4230 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4231 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4232 (struct linux_target_ops) <breakpoint>: Remove.
4233 (struct linux_target_ops) <breakpoint_len>: Remove.
4234 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4235 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4236 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4237 (struct linux_target_ops) <breakpoint>: Remove.
4238 (struct linux_target_ops) <breakpoint_len>: Remove.
4239 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4240 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4241 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4242 (struct linux_target_ops) <breakpoint>: Remove.
4243 (struct linux_target_ops) <breakpoint_len>: Remove.
4244 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4245 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4246 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4247 (struct linux_target_ops) <breakpoint>: Remove.
4248 (struct linux_target_ops) <breakpoint_len>: Remove.
4249 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4250 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4251 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4252 (struct linux_target_ops) <breakpoint>: Remove.
4253 (struct linux_target_ops) <breakpoint_len>: Remove.
4254 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4255 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4256 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4257 (struct linux_target_ops) <breakpoint>: Remove.
4258 (struct linux_target_ops) <breakpoint_len>: Remove.
4259 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4260 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4261 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4262 (struct linux_target_ops) <breakpoint>: Remove.
4263 (struct linux_target_ops) <breakpoint_len>: Remove.
4264 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4265 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4266 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4267 (struct linux_target_ops) <breakpoint>: Remove.
4268 (struct linux_target_ops) <breakpoint_len>: Remove.
4269 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4270 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4271 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4272 (struct linux_target_ops) <breakpoint>: Remove.
4273 (struct linux_target_ops) <breakpoint_len>: Remove.
4274 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4275 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4276 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4277 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4278 (struct linux_target_ops) <breakpoint>: Remove.
4279 (struct linux_target_ops) <breakpoint_len>: Remove.
4280 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4281 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4282 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4283 (struct linux_target_ops) <breakpoint>: Remove.
4284 (struct linux_target_ops) <breakpoint_len>: Remove.
4285 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4286 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4287
4288 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4289
4290 * linux-cris-low.c (cris_get_pc): Remove void arg.
4291
4292 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4293
4294 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4295 variable name.
4296
4297 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4298
4299 * inferiors.c (thread_pid_matches_callback): New function.
4300 (find_thread_process): New function.
4301 (remove_thread): Reset current_thread.
4302 (remove_process): Assert threads have been removed first.
4303
4304 2015-10-15 Yao Qi <yao.qi@linaro.org>
4305
4306 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4307 if it is 3.
4308 (aarch64_remove_point): Likewise.
4309 * regcache.c (regcache_register_size): New function.
4310
4311 2015-10-12 Yao Qi <yao.qi@linaro.org>
4312
4313 * linux-aarch64-low.c: Update all callers as emit_load_store
4314 is renamed to aarch64_emit_load_store.
4315
4316 2015-10-12 Yao Qi <yao.qi@linaro.org>
4317
4318 * linux-aarch64-low.c: Update all callers of function renaming
4319 from emit_insn to aarch64_emit_insn.
4320
4321 2015-10-12 Yao Qi <yao.qi@linaro.org>
4322
4323 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4324 arch/aarch64-insn.h.
4325 (struct aarch64_memory_operand): Likewise.
4326 (ENCODE): Likewise.
4327 (emit_insn): Move to arch/aarch64-insn.c.
4328 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4329 (emit_load_store): Move to arch/aarch64-insn.c.
4330 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4331 (can_encode_int32): Remove.
4332
4333 2015-10-12 Yao Qi <yao.qi@linaro.org>
4334
4335 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4336 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4337 (aarch64_relocate_instruction): Likewise.
4338 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4339 (struct aarch64_insn_visitor): Likewise.
4340
4341 2015-10-12 Yao Qi <yao.qi@linaro.org>
4342
4343 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4344 (struct aarch64_insn_visitor): New.
4345 (struct aarch64_insn_relocation_data): New.
4346 (aarch64_ftrace_insn_reloc_b): New function.
4347 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4348 (aarch64_ftrace_insn_reloc_cb): Likewise.
4349 (aarch64_ftrace_insn_reloc_tb): Likewise.
4350 (aarch64_ftrace_insn_reloc_adr): Likewise.
4351 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4352 (aarch64_ftrace_insn_reloc_others): Likewise.
4353 (visitor): New.
4354 (aarch64_relocate_instruction): Use visitor.
4355
4356 2015-10-12 Yao Qi <yao.qi@linaro.org>
4357
4358 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4359 int. Add argument buf.
4360 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4361 aarch64_relocate_instruction.
4362
4363 2015-10-12 Yao Qi <yao.qi@linaro.org>
4364
4365 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4366 argument insn. Remove local variable insn. Don't call
4367 target_read_uint32.
4368 (aarch64_install_fast_tracepoint_jump_pad): Call
4369 target_read_uint32.
4370
4371 2015-09-30 Yao Qi <yao.qi@linaro.org>
4372
4373 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4374 (emit_load_store_pair): Likewise.
4375
4376 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4377
4378 * dll.c (match_dll): Add cast(s).
4379 (unloaded_dll): Likewise.
4380 * linux-low.c (second_thread_of_pid_p): Likewise.
4381 (delete_lwp_callback): Likewise.
4382 (count_events_callback): Likewise.
4383 (select_event_lwp_callback): Likewise.
4384 (linux_set_resume_request): Likewise.
4385 * server.c (accumulate_file_name_length): Likewise.
4386 (emit_dll_description): Likewise.
4387 (handle_qxfer_threads_worker): Likewise.
4388 (visit_actioned_threads): Likewise.
4389 * thread-db.c (any_thread_of): Likewise.
4390 * tracepoint.c (same_process_p): Likewise.
4391 (match_blocktype): Likewise.
4392 (build_traceframe_info_xml): Likewise.
4393
4394 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4395
4396 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4397 assignment.
4398 (gdb_unparse_agent_expr): Likewise.
4399 * hostio.c (require_data): Likewise.
4400 (handle_pread): Likewise.
4401 * linux-low.c (disable_regset): Likewise.
4402 (fetch_register): Likewise.
4403 (store_register): Likewise.
4404 (get_dynamic): Likewise.
4405 (linux_qxfer_libraries_svr4): Likewise.
4406 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4407 (set_fast_tracepoint_jump): Likewise.
4408 (uninsert_fast_tracepoint_jumps_at): Likewise.
4409 (reinsert_fast_tracepoint_jumps_at): Likewise.
4410 (validate_inserted_breakpoint): Likewise.
4411 (clone_agent_expr): Likewise.
4412 * regcache.c (init_register_cache): Likewise.
4413 * remote-utils.c (putpkt_binary_1): Likewise.
4414 (decode_M_packet): Likewise.
4415 (decode_X_packet): Likewise.
4416 (look_up_one_symbol): Likewise.
4417 (relocate_instruction): Likewise.
4418 (monitor_output): Likewise.
4419 * server.c (handle_search_memory): Likewise.
4420 (handle_qxfer_exec_file): Likewise.
4421 (handle_qxfer_libraries): Likewise.
4422 (handle_qxfer): Likewise.
4423 (handle_query): Likewise.
4424 (handle_v_cont): Likewise.
4425 (handle_v_run): Likewise.
4426 (captured_main): Likewise.
4427 * target.c (write_inferior_memory): Likewise.
4428 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4429 * tracepoint.c (init_trace_buffer): Likewise.
4430 (add_tracepoint_action): Likewise.
4431 (add_traceframe): Likewise.
4432 (add_traceframe_block): Likewise.
4433 (cmd_qtdpsrc): Likewise.
4434 (cmd_qtdv): Likewise.
4435 (cmd_qtstatus): Likewise.
4436 (response_source): Likewise.
4437 (response_tsv): Likewise.
4438 (cmd_qtnotes): Likewise.
4439 (gdb_collect): Likewise.
4440 (initialize_tracepoint): Likewise.
4441
4442 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4443
4444 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4445 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4446 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4447 <NOP>: New.
4448 (enum aarch64_condition_codes): New enum.
4449 (w0): New static global.
4450 (fp): Likewise.
4451 (lr): Likewise.
4452 (struct aarch64_memory_operand) <type>: New
4453 MEMORY_OPERAND_POSTINDEX type.
4454 (postindex_memory_operand): New helper function.
4455 (emit_ret): New function.
4456 (emit_load_store_pair): New function, factored out of emit_stp
4457 with support for MEMORY_OPERAND_POSTINDEX.
4458 (emit_stp): Rewrite using emit_load_store_pair.
4459 (emit_ldp): New function.
4460 (emit_load_store): Likewise.
4461 (emit_ldr): Mention post-index instruction in comment.
4462 (emit_ldrh): New function.
4463 (emit_ldrb): New function.
4464 (emit_ldrsw): Mention post-index instruction in comment.
4465 (emit_str): Likewise.
4466 (emit_subs): New function.
4467 (emit_cmp): Likewise.
4468 (emit_and): Likewise.
4469 (emit_orr): Likewise.
4470 (emit_orn): Likewise.
4471 (emit_eor): Likewise.
4472 (emit_mvn): Likewise.
4473 (emit_lslv): Likewise.
4474 (emit_lsrv): Likewise.
4475 (emit_asrv): Likewise.
4476 (emit_mul): Likewise.
4477 (emit_sbfm): Likewise.
4478 (emit_sbfx): Likewise.
4479 (emit_ubfm): Likewise.
4480 (emit_ubfx): Likewise.
4481 (emit_csinc): Likewise.
4482 (emit_cset): Likewise.
4483 (emit_nop): Likewise.
4484 (emit_ops_insns): New helper function.
4485 (emit_pop): Likewise.
4486 (emit_push): Likewise.
4487 (aarch64_emit_prologue): New function.
4488 (aarch64_emit_epilogue): Likewise.
4489 (aarch64_emit_add): Likewise.
4490 (aarch64_emit_sub): Likewise.
4491 (aarch64_emit_mul): Likewise.
4492 (aarch64_emit_lsh): Likewise.
4493 (aarch64_emit_rsh_signed): Likewise.
4494 (aarch64_emit_rsh_unsigned): Likewise.
4495 (aarch64_emit_ext): Likewise.
4496 (aarch64_emit_log_not): Likewise.
4497 (aarch64_emit_bit_and): Likewise.
4498 (aarch64_emit_bit_or): Likewise.
4499 (aarch64_emit_bit_xor): Likewise.
4500 (aarch64_emit_bit_not): Likewise.
4501 (aarch64_emit_equal): Likewise.
4502 (aarch64_emit_less_signed): Likewise.
4503 (aarch64_emit_less_unsigned): Likewise.
4504 (aarch64_emit_ref): Likewise.
4505 (aarch64_emit_if_goto): Likewise.
4506 (aarch64_emit_goto): Likewise.
4507 (aarch64_write_goto_address): Likewise.
4508 (aarch64_emit_const): Likewise.
4509 (aarch64_emit_call): Likewise.
4510 (aarch64_emit_reg): Likewise.
4511 (aarch64_emit_pop): Likewise.
4512 (aarch64_emit_stack_flush): Likewise.
4513 (aarch64_emit_zero_ext): Likewise.
4514 (aarch64_emit_swap): Likewise.
4515 (aarch64_emit_stack_adjust): Likewise.
4516 (aarch64_emit_int_call_1): Likewise.
4517 (aarch64_emit_void_call_2): Likewise.
4518 (aarch64_emit_eq_goto): Likewise.
4519 (aarch64_emit_ne_goto): Likewise.
4520 (aarch64_emit_lt_goto): Likewise.
4521 (aarch64_emit_le_goto): Likewise.
4522 (aarch64_emit_gt_goto): Likewise.
4523 (aarch64_emit_ge_got): Likewise.
4524 (aarch64_emit_ops_impl): New static global variable.
4525 (aarch64_emit_ops): New target function, return
4526 &aarch64_emit_ops_impl.
4527 (struct linux_target_ops): Install it.
4528
4529 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4530
4531 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4532 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4533 aarch64-ipa.o.
4534 * linux-aarch64-ipa.c: New file.
4535 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4536 and endian.h.
4537 (aarch64_get_thread_area): New target method.
4538 (extract_signed_bitfield): New helper function.
4539 (aarch64_decode_ldr_literal): New function.
4540 (enum aarch64_opcodes): New enum.
4541 (struct aarch64_register): New struct.
4542 (struct aarch64_operand): New struct.
4543 (x0): New static global.
4544 (x1): Likewise.
4545 (x2): Likewise.
4546 (x3): Likewise.
4547 (x4): Likewise.
4548 (w2): Likewise.
4549 (ip0): Likewise.
4550 (sp): Likewise.
4551 (xzr): Likewise.
4552 (aarch64_register): New helper function.
4553 (register_operand): Likewise.
4554 (immediate_operand): Likewise.
4555 (struct aarch64_memory_operand): New struct.
4556 (offset_memory_operand): New helper function.
4557 (preindex_memory_operand): Likewise.
4558 (enum aarch64_system_control_registers): New enum.
4559 (ENCODE): New macro.
4560 (emit_insn): New helper function.
4561 (emit_b): New function.
4562 (emit_bcond): Likewise.
4563 (emit_cb): Likewise.
4564 (emit_tb): Likewise.
4565 (emit_blr): Likewise.
4566 (emit_stp): Likewise.
4567 (emit_ldp_q_offset): Likewise.
4568 (emit_stp_q_offset): Likewise.
4569 (emit_load_store): Likewise.
4570 (emit_ldr): Likewise.
4571 (emit_ldrsw): Likewise.
4572 (emit_str): Likewise.
4573 (emit_ldaxr): Likewise.
4574 (emit_stxr): Likewise.
4575 (emit_stlr): Likewise.
4576 (emit_data_processing_reg): Likewise.
4577 (emit_data_processing): Likewise.
4578 (emit_add): Likewise.
4579 (emit_sub): Likewise.
4580 (emit_mov): Likewise.
4581 (emit_movk): Likewise.
4582 (emit_mov_addr): Likewise.
4583 (emit_mrs): Likewise.
4584 (emit_msr): Likewise.
4585 (emit_sevl): Likewise.
4586 (emit_wfe): Likewise.
4587 (append_insns): Likewise.
4588 (can_encode_int32_in): New helper function.
4589 (aarch64_relocate_instruction): New function.
4590 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4591 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4592 (struct linux_target_ops): Install aarch64_get_thread_area,
4593 aarch64_install_fast_tracepoint_jump_pad and
4594 aarch64_get_min_fast_tracepoint_insn_len.
4595
4596 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4597
4598 * Makefile.in (aarch64-insn.o): New rule.
4599 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4600
4601 2015-09-21 Yao Qi <yao.qi@linaro.org>
4602
4603 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4604
4605 2015-09-21 Yao Qi <yao.qi@linaro.org>
4606
4607 * tracepoint.c (max_jump_pad_size): Remove.
4608
4609 2015-09-18 Yao Qi <yao.qi@linaro.org>
4610
4611 * linux-aarch64-low.c: Don't include sys/uio.h.
4612 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4613
4614 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4615
4616 * tracepoint.c (eval_result_type): Change prototype.
4617 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4618
4619 2015-09-15 Pedro Alves <palves@redhat.com>
4620
4621 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4622 Check whether to report exec events instead of checking whether
4623 multiprocess is enabled.
4624
4625 2015-09-15 Pedro Alves <palves@redhat.com>
4626
4627 PR remote/18965
4628 * remote-utils.c (prepare_resume_reply): Merge
4629 TARGET_WAITKIND_VFORK_DONE switch case with the
4630 TARGET_WAITKIND_FORKED case.
4631
4632 2015-09-15 Yao Qi <yao.qi@linaro.org>
4633
4634 * server.c (handle_query): Check string comparison using
4635 "else if" instead of "if".
4636
4637 2015-09-15 Yao Qi <yao.qi@linaro.org>
4638
4639 * server.c (vCont_supported): New global variable.
4640 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4641 matches. Append ";vContSupported+" to own_buf.
4642 (handle_v_requests): Append ";s;S" to own_buf if target supports
4643 hardware single step or vCont_supported is false.
4644 (capture_main): Set vCont_supported to zero.
4645
4646 2015-09-15 Yao Qi <yao.qi@linaro.org>
4647
4648 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4649 it to ...
4650 (linux_supports_hardware_single_step): ... New function.
4651 (linux_target_ops): Update.
4652 * lynx-low.c (lynx_target_ops): Set field
4653 supports_hardware_single_step to target_can_do_hardware_single_step.
4654 * nto-low.c (nto_target_ops): Likewise.
4655 * spu-low.c (spu_target_ops): Likewise.
4656 * win32-low.c (win32_target_ops): Likewise.
4657 * target.c (target_can_do_hardware_single_step): New function.
4658 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4659 Remove. <supports_hardware_single_step>: New field.
4660 (target_supports_conditional_breakpoints): Remove.
4661 (target_supports_hardware_single_step): New macro.
4662 (target_can_do_hardware_single_step): Declare.
4663 * server.c (handle_query): Use target_supports_hardware_single_step
4664 instead of target_supports_conditional_breakpoints.
4665
4666 2015-09-15 Yao Qi <yao.qi@linaro.org>
4667
4668 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4669 function.
4670 (struct linux_target_ops the_low_target): Install
4671 aarch64_linux_siginfo_fixup.
4672
4673 2015-09-11 Don Breazeal <donb@codesourcery.com>
4674 Luis Machado <lgustavo@codesourcery.com>
4675
4676 * linux-low.c (linux_mourn): Static declaration.
4677 (linux_arch_setup): Move in front of
4678 handle_extended_wait.
4679 (linux_arch_setup_thread): New function.
4680 (handle_extended_wait): Handle exec events. Call
4681 linux_arch_setup_thread. Make event_lwp argument a
4682 pointer-to-a-pointer.
4683 (check_zombie_leaders): Do not check stopped threads.
4684 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4685 (linux_low_filter_event): Add lwp and thread for exec'ing
4686 non-leader thread if leader thread has been deleted.
4687 Refactor code into linux_arch_setup_thread and call it.
4688 Pass child lwp pointer by reference to handle_extended_wait.
4689 (linux_wait_for_event_filtered): Update comment.
4690 (linux_wait_1): Prevent clobbering exec event status.
4691 (linux_supports_exec_events): New function.
4692 (linux_target_ops) <supports_exec_events>: Initialize new member.
4693 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4694 new member.
4695 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4696 * server.c (report_exec_events): New global variable.
4697 (handle_query): Handle qSupported query for exec-events feature.
4698 (captured_main): Initialize report_exec_events.
4699 * server.h (report_exec_events): Declare new global variable.
4700 * target.h (struct target_ops) <supports_exec_events>: New
4701 member.
4702 (target_supports_exec_events): New macro.
4703 * win32-low.c (win32_target_ops) <supports_exec_events>:
4704 Initialize new member.
4705
4706 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4707
4708 * linux-low.c (linux_low_enable_btrace): Remove.
4709 (linux_target_ops): Replace linux_low_enable_btrace with
4710 linux_enable_btrace.
4711
4712 2015-09-03 Yao Qi <yao.qi@linaro.org>
4713
4714 * linux-aarch64-low.c (aarch64_insert_point): Call
4715 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4716 returns true.
4717
4718 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4719
4720 * linux-low.c (check_stopped_by_breakpoint): Use
4721 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4722
4723 2015-08-27 Pedro Alves <palves@redhat.com>
4724
4725 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4726
4727 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4728
4729 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4730 the XNEW-family equivalent.
4731 (compile_bytecodes): Likewise.
4732 * dll.c (loaded_dll): Likewise.
4733 * event-loop.c (append_callback_event): Likewise.
4734 (create_file_handler): Likewise.
4735 (create_file_event): Likewise.
4736 * hostio.c (handle_open): Likewise.
4737 * inferiors.c (add_thread): Likewise.
4738 (add_process): Likewise.
4739 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4740 * linux-arm-low.c (arm_new_process): Likewise.
4741 (arm_new_thread): Likewise.
4742 * linux-low.c (add_to_pid_list): Likewise.
4743 (linux_add_process): Likewise.
4744 (handle_extended_wait): Likewise.
4745 (add_lwp): Likewise.
4746 (enqueue_one_deferred_signal): Likewise.
4747 (enqueue_pending_signal): Likewise.
4748 (linux_resume_one_lwp_throw): Likewise.
4749 (linux_resume_one_thread): Likewise.
4750 (linux_read_memory): Likewise.
4751 (linux_write_memory): Likewise.
4752 * linux-mips-low.c (mips_linux_new_process): Likewise.
4753 (mips_linux_new_thread): Likewise.
4754 (mips_add_watchpoint): Likewise.
4755 * linux-x86-low.c (initialize_low_arch): Likewise.
4756 * lynx-low.c (lynx_add_process): Likewise.
4757 * mem-break.c (set_raw_breakpoint_at): Likewise.
4758 (set_breakpoint): Likewise.
4759 (add_condition_to_breakpoint): Likewise.
4760 (add_commands_to_breakpoint): Likewise.
4761 (clone_agent_expr): Likewise.
4762 (clone_one_breakpoint): Likewise.
4763 * regcache.c (new_register_cache): Likewise.
4764 * remote-utils.c (look_up_one_symbol): Likewise.
4765 * server.c (queue_stop_reply): Likewise.
4766 (start_inferior): Likewise.
4767 (queue_stop_reply_callback): Likewise.
4768 (handle_target_event): Likewise.
4769 * spu-low.c (fetch_ppc_memory): Likewise.
4770 (store_ppc_memory): Likewise.
4771 * target.c (set_target_ops): Likewise.
4772 * thread-db.c (thread_db_load_search): Likewise.
4773 (try_thread_db_load_1): Likewise.
4774 * tracepoint.c (add_tracepoint): Likewise.
4775 (add_tracepoint_action): Likewise.
4776 (create_trace_state_variable): Likewise.
4777 (cmd_qtdpsrc): Likewise.
4778 (cmd_qtro): Likewise.
4779 (add_while_stepping_state): Likewise.
4780 * win32-low.c (child_add_thread): Likewise.
4781 (get_image_name): Likewise.
4782
4783 2015-08-25 Yao Qi <yao.qi@linaro.org>
4784
4785 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4786
4787 2015-08-25 Yao Qi <yao.qi@linaro.org>
4788
4789 * Makefile.in (aarch64-linux.o): New rule.
4790 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4791 srv_tgtobj.
4792 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4793 (aarch64_init_debug_reg_state): Make it extern.
4794 (aarch64_linux_prepare_to_resume): Remove.
4795
4796 2015-08-25 Yao Qi <yao.qi@linaro.org>
4797
4798 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4799 lwp_arch_private_info and ptid_of_lwp.
4800
4801 2015-08-25 Yao Qi <yao.qi@linaro.org>
4802
4803 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4804 Find proc_info by find_process_pid. All callers updated.
4805
4806 2015-08-25 Yao Qi <yao.qi@linaro.org>
4807
4808 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4809 Remove.
4810 (debug_reg_change_callback): Remove.
4811 (aarch64_notify_debug_reg_change): Remove.
4812
4813 2015-08-25 Yao Qi <yao.qi@linaro.org>
4814
4815 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4816 Call current_lwp_ptid.
4817
4818 2015-08-25 Yao Qi <yao.qi@linaro.org>
4819
4820 * linux-aarch64-low.c (debug_reg_change_callback): Use
4821 debug_printf.
4822
4823 2015-08-25 Yao Qi <yao.qi@linaro.org>
4824
4825 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4826
4827 2015-08-25 Yao Qi <yao.qi@linaro.org>
4828
4829 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4830
4831 2015-08-25 Yao Qi <yao.qi@linaro.org>
4832
4833 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4834 the code.
4835
4836 2015-08-25 Yao Qi <yao.qi@linaro.org>
4837
4838 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4839 Remove.
4840 (debug_reg_change_callback): Remove argument entry and add argument
4841 lwp. Remove local variable thread. Don't print thread id in the
4842 debugging output. Don't check whether pid of thread equals to pid.
4843 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4844 iterate_over_lwps instead find_inferior.
4845
4846 2015-08-24 Pedro Alves <palves@redhat.com>
4847
4848 * inferiors.c (get_first_process): New function.
4849 * inferiors.h (get_first_process): New declaration.
4850 * remote-utils.c (read_ptid): Default to the first process in the
4851 list, instead of to the current thread's process.
4852
4853 2015-08-24 Pedro Alves <palves@redhat.com>
4854
4855 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4856 * event-loop.c: Likewise.
4857 * remote-utils.c: Likewise.
4858 * tracepoint.c: Likewise.
4859
4860 2015-08-24 Pedro Alves <palves@redhat.com>
4861
4862 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4863 ptid_get_lwp.
4864
4865 2015-08-21 Pedro Alves <palves@redhat.com>
4866
4867 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4868 instead of literal 1.
4869
4870 2015-08-21 Pedro Alves <palves@redhat.com>
4871
4872 * tdesc.c (default_description): Explicitly zero-initialize.
4873
4874 2015-08-21 Pedro Alves <palves@redhat.com>
4875
4876 PR gdb/18749
4877 * inferiors.c (remove_thread): Discard any pending stop reply for
4878 this thread.
4879 * server.c (remove_all_on_match_pid): Rename to ...
4880 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4881 instead of a pid.
4882 (discard_queued_stop_replies): Change parameter to a ptid. Now
4883 extern.
4884 (handle_v_kill, kill_inferior_callback, captured_main)
4885 (process_serial_event): Adjust.
4886 * server.h (discard_queued_stop_replies): Declare.
4887
4888 2015-08-21 Pedro Alves <palves@redhat.com>
4889
4890 * linux-low.c (wait_for_sigstop): Always switch to no thread
4891 selected if the previously current thread dies.
4892 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4893 process instead of the current thread's.
4894 * remote-utils.c (input_interrupt): Don't check if there's no
4895 current thread.
4896 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4897 current thread to the general thread fails, error out.
4898 (handle_qxfer_auxv, handle_qxfer_libraries)
4899 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4900 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4901 (handle_query): Check if there's a thread selected instead of
4902 checking whether there's any thread in the thread list.
4903 (handle_qxfer_threads, handle_qxfer_btrace)
4904 (handle_qxfer_btrace_conf): Don't error out early if there's no
4905 thread in the thread list.
4906 (handle_v_cont, myresume): Don't set the current thread to the
4907 continue thread.
4908 (process_serial_event) <Hg handling>: Also set thread_id if the
4909 previous general thread is still alive.
4910 (process_serial_event) <g/G handling>: If setting the current
4911 thread to the general thread fails, error out.
4912 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4913 thread's lwp instead of the current thread's.
4914 * target.c (set_desired_thread): If the desired thread was not
4915 found, leave the current thread pointing to NULL. Return an int
4916 (boolean) indicating success.
4917 * target.h (set_desired_thread): Change return type to int.
4918
4919 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4920
4921 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4922 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4923 #includes.
4924 (ps_get_thread_area): New function.
4925
4926 2015-08-19 Gary Benson <gbenson@redhat.com>
4927
4928 * hostio.c (handle_pread): Do not attempt to read more data
4929 than hostio_reply_with_data can fit in a packet.
4930
4931 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4932
4933 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4934
4935 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4936
4937 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4938
4939 2015-08-06 Pedro Alves <palves@redhat.com>
4940
4941 * tracepoint.c (expr_eval_result): Now an int.
4942
4943 2015-08-06 Pedro Alves <palves@redhat.com>
4944
4945 * gdbthread.h (struct regcache): Forward declare.
4946 (struct thread_info) <regcache_data>: Now a struct regcache
4947 pointer.
4948 * inferiors.c (inferior_regcache_data)
4949 (set_inferior_regcache_data): Now work with struct regcache
4950 pointers.
4951 * inferiors.h (struct regcache): Forward declare.
4952 (inferior_regcache_data, set_inferior_regcache_data): Now work
4953 with struct regcache pointers.
4954 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4955 (free_register_cache_thread): Remove struct regcache pointer
4956 casts.
4957
4958 2015-08-06 Pedro Alves <palves@redhat.com>
4959
4960 * server.c (captured_main): On error, print the exception message
4961 to stderr, and if run_once is set, throw a quit.
4962
4963 2015-08-06 Pedro Alves <palves@redhat.com>
4964
4965 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4966 the current thread.
4967
4968 2015-08-06 Pedro Alves <palves@redhat.com>
4969
4970 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4971 reading beyond the passed in buffer length.
4972
4973 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4974
4975 * tracepoint.c (symbol_list) <required>: Remove.
4976
4977 2015-08-06 Pedro Alves <palves@redhat.com>
4978
4979 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4980 count if stopping and suspending threads.
4981 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4982 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4983 (linux_detach): Complete an ongoing step-over.
4984 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4985 throughout.
4986 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4987 (linux_wait_1): If passing a signal to the inferior after
4988 finishing a step-over, unsuspend and re-resume all lwps. If we
4989 see a single-step event but the thread should be continuing, don't
4990 pass the trap to gdb.
4991 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4992 internal_error instead of gdb_assert.
4993 (enqueue_pending_signal): New function.
4994 (check_ptrace_stopped_lwp_gone): Add debug output.
4995 (start_step_over): Use internal_error instead of gdb_assert.
4996 (complete_ongoing_step_over): New function.
4997 (linux_resume_one_thread): Don't resume a suspended thread.
4998 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4999 it stepping.
5000
5001 2015-08-06 Pedro Alves <palves@redhat.com>
5002
5003 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5004 (linux_thread_alive): Use lwp_is_marked_dead.
5005 (extended_event_reported): Delete.
5006 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5007 instead of extended_event_reported.
5008 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5009 as well.
5010 (lwp_is_marked_dead): New function.
5011 (lwp_running): Use lwp_is_marked_dead.
5012 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5013 comment.
5014
5015 2015-08-06 Pedro Alves <palves@redhat.com>
5016
5017 * linux-low.c (linux_wait_1): Move fork event output out of the
5018 !report_to_gdb check. Pass event_child->waitstatus to
5019 target_waitstatus_to_string instead of ourstatus.
5020
5021 2015-08-04 Yao Qi <yao.qi@linaro.org>
5022
5023 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5024 if current_thread is 32 bit.
5025
5026 2015-08-04 Yao Qi <yao.qi@linaro.org>
5027
5028 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5029 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5030 * server.c (extended_protocol): Remove "static".
5031 * server.h (extended_protocol): Declare it.
5032
5033 2015-08-04 Yao Qi <yao.qi@linaro.org>
5034
5035 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5036 both aarch64 and aarch32.
5037 (aarch64_set_pc): Likewise.
5038
5039 2015-08-04 Yao Qi <yao.qi@linaro.org>
5040
5041 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5042 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5043 arm-with-neon.xml to srv_xmlfiles.
5044 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5045 (is_64bit_tdesc): New function.
5046 (aarch64_linux_read_description): New function.
5047 (aarch64_arch_setup): Call aarch64_linux_read_description.
5048 (regs_info): Rename to regs_info_aarch64.
5049 (aarch64_regs_info): Return right regs_info.
5050 (initialize_low_arch): Call initialize_low_arch_aarch32.
5051
5052 2015-08-04 Yao Qi <yao.qi@linaro.org>
5053
5054 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5055 * linux-aarch32-low.c: New file.
5056 * linux-aarch32-low.h: New file.
5057 * linux-arm-low.c (arm_fill_gregset): Move it to
5058 linux-aarch32-low.c.
5059 (arm_store_gregset): Likewise.
5060 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5061 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5062 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5063 (regs_info): Rename to regs_info_arm.
5064 (arm_regs_info): Return regs_info_aarch32 if
5065 have_ptrace_getregset is 1 and target description is
5066 arm_with_neon or arm_with_vfpv3.
5067 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5068 Call initialize_low_arch_aarch32 instead.
5069
5070 2015-08-04 Yao Qi <yao.qi@linaro.org>
5071
5072 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5073 * linux-low.c: ... here.
5074 * linux-low.h (have_ptrace_getregset): Declare it.
5075
5076 2015-08-04 Pedro Alves <palves@redhat.com>
5077
5078 * thread-db.c (struct thread_db): Use new typedefs.
5079 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5080 CHK calls.
5081 (disable_thread_event_reporting): Cast result of dlsym to
5082 destination function pointer type.
5083 (thread_db_mourn): Use td_ta_delete_ftype.
5084
5085 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5086
5087 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5088 arch variant.
5089 (CDX_BREAKPOINT): Define for R2.
5090 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5091 (the_low_target): Add comments.
5092
5093 2015-07-30 Yao Qi <yao.qi@linaro.org>
5094
5095 * linux-arm-low.c (arm_hwcap): Remove it.
5096 (arm_read_description): New local variable arm_hwcap. Don't
5097 set arm_hwcap to zero.
5098
5099 2015-07-30 Yao Qi <yao.qi@linaro.org>
5100
5101 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5102 Use regcache->tdesc instead.
5103 (arm_store_wmmxregset): Likewise.
5104 (arm_fill_vfpregset): Likewise.
5105 (arm_store_vfpregset): Likewise.
5106
5107 2015-07-30 Yao Qi <yao.qi@linaro.org>
5108
5109 * linux-arm-low.c: Include arch/arm.h.
5110 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5111 (arm_store_gregset): Likewise.
5112
5113 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5114
5115 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5116 ptrace's 4th parameter.
5117
5118 2015-07-27 Yao Qi <yao.qi@linaro.org>
5119
5120 * configure.srv (case aarch64*-*-linux*): Don't set
5121 srv_linux_usrregs.
5122
5123 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5124
5125 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5126 sys/ptrace.h.
5127 * linux-arm-low.c: Likewise.
5128 * linux-cris-low.c: Likewise.
5129 * linux-crisv32-low.c: Likewise.
5130 * linux-low.c: Likewise.
5131 * linux-m68k-low.c: Likewise.
5132 * linux-mips-low.c: Likewise.
5133 * linux-nios2-low.c: Likewise.
5134 * linux-s390-low.c: Likewise.
5135 * linux-sparc-low.c: Likewise.
5136 * linux-tic6x-low.c: Likewise.
5137 * linux-tile-low.c: Likewise.
5138 * linux-x86-low.c: Likewise.
5139
5140 2015-07-24 Pedro Alves <palves@redhat.com>
5141
5142 * config.in: Regenerate.
5143 * configure: Regenerate.
5144
5145 2015-07-24 Pedro Alves <palves@redhat.com>
5146
5147 * acinclude.m4: Include ../ptrace.m4.
5148 * configure.ac: Call GDB_AC_PTRACE.
5149 * config.in, configure: Regenerate.
5150
5151 2015-07-24 Yao Qi <yao.qi@linaro.org>
5152
5153 * linux-low.c (linux_create_inferior): Remove setting to
5154 proc->priv->new_inferior.
5155 (linux_attach): Likewise.
5156 (linux_low_filter_event): Likewise.
5157 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5158
5159 2015-07-24 Yao Qi <yao.qi@linaro.org>
5160
5161 * linux-low.c (linux_arch_setup): New function.
5162 (linux_low_filter_event): If proc->tdesc is NULL and
5163 proc->attached is true, call the_low_target.arch_setup.
5164 Otherwise, keep status pending, and return.
5165 (linux_resume_one_lwp_throw): Don't call get_pc if
5166 thread->while_stepping isn't NULL. Don't call
5167 get_thread_regcache if proc->tdesc is NULL.
5168 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5169 (linux_target_ops): Install arch_setup.
5170 * server.c (start_inferior): Call the_target->arch_setup.
5171 * target.h (struct target_ops) <arch_setup>: New field.
5172 (target_arch_setup): New marco.
5173 * lynx-low.c (lynx_target_ops): Update.
5174 * nto-low.c (nto_target_ops): Update.
5175 * spu-low.c (spu_target_ops): Update.
5176 * win32-low.c (win32_target_ops): Update.
5177
5178 2015-07-24 Yao Qi <yao.qi@linaro.org>
5179
5180 * linux-low.c (linux_add_process): Don't set
5181 proc->priv->new_inferior.
5182 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5183 (linux_attach): Likewise.
5184
5185 2015-07-24 Yao Qi <yao.qi@linaro.org>
5186
5187 * server.c (start_inferior): Code refactor.
5188
5189 2015-07-24 Yao Qi <yao.qi@linaro.org>
5190
5191 * server.c (process_serial_event): Set general_thread.
5192
5193 2015-07-21 Yao Qi <yao.qi@linaro.org>
5194
5195 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5196 aarch64_linux_get_debug_reg_capacity.
5197
5198 2015-07-17 Yao Qi <yao.qi@linaro.org>
5199
5200 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5201 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5202 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5203 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5204 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5205 (AARCH64_HWP_ALIGNMENT): Likewise.
5206 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5207 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5208 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5209 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5210 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5211 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5212 (struct aarch64_debug_reg_state): Likewise.
5213 (struct arch_lwp_info): Likewise.
5214 (aarch64_align_watchpoint): Likewise.
5215 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5216 (aarch64_watchpoint_length): Likewise.
5217 (aarch64_point_encode_ctrl_reg): Likewise
5218 (aarch64_point_is_aligned): Likewise.
5219 (aarch64_align_watchpoint): Likewise.
5220 (aarch64_linux_set_debug_regs):
5221 (aarch64_dr_state_insert_one_point): Likewise.
5222 (aarch64_dr_state_remove_one_point): Likewise.
5223 (aarch64_handle_breakpoint): Likewise.
5224 (aarch64_handle_aligned_watchpoint): Likewise.
5225 (aarch64_handle_unaligned_watchpoint): Likewise.
5226 (aarch64_handle_watchpoint): Likewise.
5227
5228 2015-07-17 Yao Qi <yao.qi@linaro.org>
5229
5230 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5231 and don't aarch64_get_debug_reg_state. All callers update.
5232 (aarch64_handle_aligned_watchpoint): Likewise.
5233 (aarch64_handle_unaligned_watchpoint): Likewise.
5234 (aarch64_handle_watchpoint): Likewise.
5235 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5236 (aarch64_remove_point): Likewise.
5237
5238 2015-07-17 Yao Qi <yao.qi@linaro.org>
5239
5240 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5241 debug_printf.
5242 (aarch64_handle_unaligned_watchpoint): Likewise.
5243
5244 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5245
5246 Revert the previous 3 commits:
5247 Move gdb_regex* to common/
5248 Move linux_find_memory_regions_full & co.
5249 gdbserver build-id attribute generator
5250
5251 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5252 Jan Kratochvil <jan.kratochvil@redhat.com>
5253
5254 gdbserver build-id attribute generator.
5255 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5256 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5257 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5258 (find_phdr): New.
5259 (get_dynamic): Use find_pdhr to traverse program headers.
5260 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5261 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5262 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5263 (get_hex_build_id): New.
5264 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5265 to reply XML document.
5266
5267 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5268 Jan Kratochvil <jan.kratochvil@redhat.com>
5269
5270 * target.c: Include target/target-utils.h and fcntl.h.
5271 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5272 (target_fileio_read_stralloc): New functions.
5273
5274 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5275
5276 * Makefile.in (OBS): Add gdb_regex.o.
5277 (gdb_regex.o): New.
5278 * config.in: Rebuilt.
5279 * configure: Rebuilt.
5280
5281 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5282 Jan Kratochvil <jan.kratochvil@redhat.com>
5283
5284 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5285 * Makefile.in (OBS): Add target-utils.o.
5286 (linux-maps.o, target-utils.o): New.
5287 * configure.srv (srv_linux_obj): Add linux-maps.o.
5288
5289 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5290
5291 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5292 function, return 1.
5293 (the_low_target): Install it.
5294
5295 2015-07-14 Pedro Alves <palves@redhat.com>
5296
5297 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5298 Instead, ignore ECHILD, and throw an error for other errnos.
5299
5300 2015-07-10 Pedro Alves <palves@redhat.com>
5301
5302 * event-loop.c (struct callback_event) <data>: Change type to
5303 gdb_client_data instance instead of gdb_client_data pointer.
5304 (append_callback_event): Adjust.
5305
5306 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5307
5308 * linux-aarch64-low.c: Add comments for each linux_target_ops
5309 method. Remove comments already covered in target_ops and
5310 linux_target_ops definitions.
5311 (the_low_target): Add comments for each unimplemented method.
5312
5313 2015-07-09 Yao Qi <yao.qi@linaro.org>
5314
5315 * linux-aarch64-low.c (aarch64_regmap): Remove.
5316 (aarch64_usrregs_info): Remove.
5317 (regs_info): Set field usrregs to NULL.
5318
5319 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5320
5321 * linux-low.c: Include "rsp-low.h"
5322 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5323 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5324 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5325 (handle_btrace_enable_pt): New.
5326 (handle_btrace_general_set): Support "pt".
5327 (handle_btrace_conf_general_set): Support "pt:size".
5328
5329 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5330
5331 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5332 Z_PACKET_SW_BP.
5333
5334 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5335
5336 * linux-aarch64-low.c: Remove comment about endianness.
5337 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5338 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5339 memcmp.
5340
5341 2015-06-24 Gary Benson <gbenson@redhat.com>
5342
5343 * linux-i386-ipa.c (stdint.h): Do not include.
5344 * lynx-i386-low.c (stdint.h): Likewise.
5345 * lynx-ppc-low.c (stdint.h): Likewise.
5346 * mem-break.c (stdint.h): Likewise.
5347 * thread-db.c (stdint.h): Likewise.
5348 * tracepoint.c (stdint.h): Likewise.
5349 * win32-low.c (stdint.h): Likewise.
5350
5351 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5352
5353 * server.c (write_qxfer_response): Update call to
5354 remote_escape_output.
5355
5356 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5357 Jan Kratochvil <jan.kratochvil@redhat.com>
5358
5359 Merge multiple hex conversions.
5360 * gdbreplay.c (tohex): Rename to 'fromhex'.
5361 (logchar): Use fromhex.
5362
5363 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5364
5365 * server.c (handle_qxfer_libraries): Set `version' attribute for
5366 <library-list>.
5367
5368 2015-06-10 Gary Benson <gbenson@redhat.com>
5369
5370 * target.h (struct target_ops) <multifs_open>: New field.
5371 <multifs_unlink>: Likewise.
5372 <multifs_readlink>: Likewise.
5373 * linux-low.c (nat/linux-namespaces.h): New include.
5374 (linux_target_ops): Initialize the_target->multifs_open,
5375 the_target->multifs_unlink and the_target->multifs_readlink.
5376 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5377 * hostio.c (hostio_fs_pid): New static variable.
5378 (hostio_handle_new_gdb_connection): New function.
5379 (handle_setfs): Likewise.
5380 (handle_open): Use the_target->multifs_open as appropriate.
5381 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5382 (handle_readlink): Use the_target->multifs_readlink as
5383 appropriate.
5384 (handle_vFile): Handle vFile:setfs packets.
5385 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5386 after target_handle_new_gdb_connection.
5387
5388 2015-06-10 Gary Benson <gbenson@redhat.com>
5389
5390 * configure.ac (AC_CHECK_FUNCS): Add setns.
5391 * config.in: Regenerate.
5392 * configure: Likewise.
5393 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5394 (linux-namespaces.o): New rule.
5395 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5396
5397 2015-06-09 Gary Benson <gbenson@redhat.com>
5398
5399 * hostio.c (handle_open): Process mode argument with
5400 fileio_to_host_mode.
5401
5402 2015-06-01 Yao Qi <yao.qi@linaro.org>
5403
5404 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5405 * linux-x86-low.c: Likewise.
5406
5407 2015-05-28 Don Breazeal <donb@codesourcery.com>
5408
5409 * linux-low.c (handle_extended_wait): Initialize
5410 thread_info.last_resume_kind for new fork children.
5411
5412 2015-05-15 Pedro Alves <palves@redhat.com>
5413
5414 * target.h (target_handle_new_gdb_connection): Rewrite using if
5415 wrapped in do/while.
5416
5417 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5418
5419 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5420 * configure, config.in: Regenerate.
5421 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5422 Declare typedef.
5423
5424 2015-05-12 Don Breazeal <donb@codesourcery.com>
5425
5426 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5427 PTRACE_EVENT_VFORK_DONE.
5428 (linux_low_ptrace_options, extended_event_reported): Add vfork
5429 events.
5430 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5431 and "vforkdone" for RSP 'T' Stop Reply Packet.
5432 * server.h (report_vfork_events): Declare
5433 global variable.
5434
5435 2015-05-12 Don Breazeal <donb@codesourcery.com>
5436
5437 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5438 (the_low_target) <new_fork>: Initialize new member.
5439 * linux-arm-low.c (arm_new_fork): New function.
5440 (the_low_target) <new_fork>: Initialize new member.
5441 * linux-low.c (handle_extended_wait): Call new target function
5442 new_fork.
5443 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5444 * linux-mips-low.c (mips_add_watchpoint): New function
5445 extracted from mips_insert_point.
5446 (the_low_target) <new_fork>: Initialize new member.
5447 (mips_linux_new_fork): New function.
5448 (mips_insert_point): Call mips_add_watchpoint.
5449 * linux-x86-low.c (x86_linux_new_fork): New function.
5450 (the_low_target) <new_fork>: Initialize new member.
5451
5452 2015-05-12 Don Breazeal <donb@codesourcery.com>
5453
5454 * linux-low.c (handle_extended_wait): Implement return value,
5455 rename argument 'event_child' to 'event_lwp', handle
5456 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5457 (linux_low_ptrace_options): New function.
5458 (linux_low_filter_event): Call linux_low_ptrace_options,
5459 use different argument fo linux_enable_event_reporting,
5460 use return value from handle_extended_wait.
5461 (extended_event_reported): New function.
5462 (linux_wait_1): Call extended_event_reported and set
5463 status to report fork events.
5464 (linux_write_memory): Add pid to debug message.
5465 (reset_lwp_ptrace_options_callback): New function.
5466 (linux_handle_new_gdb_connection): New function.
5467 (linux_target_ops): Initialize new structure member.
5468 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5469 * lynx-low.c: Initialize new structure member.
5470 * remote-utils.c (prepare_resume_reply): Implement stop reason
5471 "fork" for "T" stop message.
5472 * server.c (handle_query): Call handle_new_gdb_connection.
5473 * server.h (report_fork_events): Declare global flag.
5474 * target.h (struct target_ops) <handle_new_gdb_connection>:
5475 New member.
5476 (target_handle_new_gdb_connection): New macro.
5477 * win32-low.c: Initialize new structure member.
5478
5479 2015-05-12 Don Breazeal <donb@codesourcery.com>
5480
5481 * mem-break.c (APPEND_TO_LIST): Define macro.
5482 (clone_agent_expr): New function.
5483 (clone_one_breakpoint): New function.
5484 (clone_all_breakpoints): New function.
5485 * mem-break.h: Declare new functions.
5486
5487 2015-05-12 Don Breazeal <donb@codesourcery.com>
5488
5489 * linux-low.c (linux_supports_fork_events): New function.
5490 (linux_supports_vfork_events): New function.
5491 (linux_target_ops): Initialize new structure members.
5492 (initialize_low): Call linux_check_ptrace_features.
5493 * lynx-low.c (lynx_target_ops): Initialize new structure
5494 members.
5495 * server.c (report_fork_events, report_vfork_events):
5496 New global flags.
5497 (handle_query): Add new features to qSupported packet and
5498 response.
5499 (captured_main): Initialize new global variables.
5500 * target.h (struct target_ops) <supports_fork_events>:
5501 New member.
5502 <supports_vfork_events>: New member.
5503 (target_supports_fork_events): New macro.
5504 (target_supports_vfork_events): New macro.
5505 * win32-low.c (win32_target_ops): Initialize new structure
5506 members.
5507
5508 2015-05-12 Gary Benson <gbenson@redhat.com>
5509
5510 * server.c (handle_qxfer_exec_file): Use current process
5511 if annex is empty.
5512
5513 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5514
5515 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5516 Remove HAVE_PTRACE_GETREGS conditionals.
5517 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5518 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5519
5520 2015-05-08 Yao Qi <yao.qi@linaro.org>
5521
5522 * linux-low.c (linux_supports_conditional_breakpoints): New
5523 function.
5524 (linux_target_ops): Install new target method.
5525 * lynx-low.c (lynx_target_ops): Install NULL hook for
5526 supports_conditional_breakpoints.
5527 * nto-low.c (nto_target_ops): Likewise.
5528 * spu-low.c (spu_target_ops): Likewise.
5529 * win32-low.c (win32_target_ops): Likewise.
5530 * server.c (handle_query): Check
5531 target_supports_conditional_breakpoints.
5532 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5533 New field.
5534 (target_supports_conditional_breakpoints): New macro.
5535
5536 2015-05-06 Pedro Alves <palves@redhat.com>
5537
5538 PR server/18081
5539 * server.c (start_inferior): If the process exits, mourn it.
5540
5541 2015-04-21 Gary Benson <gbenson@redhat.com>
5542
5543 * hostio.c (fileio_open_flags_to_host): Factored out to
5544 fileio_to_host_openflags in common/fileio.c. Single use
5545 updated.
5546
5547 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5548
5549 * linux-xtensa-low.c (xtensa_fill_gregset)
5550 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5551 XCHAL_HAVE_LOOP.
5552
5553 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5554
5555 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5556 (regs_info): Replace usrregs pointer with NULL.
5557
5558 2015-04-17 Gary Benson <gbenson@redhat.com>
5559
5560 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5561 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5562 * server.c (handle_qxfer_exec_file): New function.
5563 (qxfer_packets): Add exec-file entry.
5564 (handle_query): Report qXfer:exec-file:read as supported packet.
5565
5566 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5567
5568 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5569
5570 2015-04-09 Gary Benson <gbenson@redhat.com>
5571
5572 * hostio-errno.c (errno_to_fileio_error): Remove function.
5573 Update caller to use remote_fileio_to_fio_error.
5574
5575 2015-04-09 Yao Qi <yao.qi@linaro.org>
5576
5577 * linux-low.c (linux_insert_point): Call
5578 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5579 (linux_remove_point): Call remove_memory_breakpoint if type is
5580 raw_bkpt_type_sw.
5581 * linux-x86-low.c (x86_insert_point): Don't call
5582 insert_memory_breakpoint.
5583 (x86_remove_point): Don't call remove_memory_breakpoint.
5584
5585 2015-04-01 Pedro Alves <palves@redhat.com>
5586 Cleber Rosa <crosa@redhat.com>
5587
5588 * server.c (gdbserver_usage): Reorganize and extend the usage
5589 message.
5590
5591 2015-03-24 Pedro Alves <palves@redhat.com>
5592
5593 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5594 output. Also dump TRAP_TRACE.
5595 (linux_low_filter_event): In debug output, distinguish a
5596 resume_stop SIGSTOP from a delayed SIGSTOP.
5597
5598 2015-03-24 Gary Benson <gbenson@redhat.com>
5599
5600 * linux-x86-low.c (x86_linux_new_thread): Moved to
5601 nat/x86-linux.c.
5602 (x86_linux_prepare_to_resume): Likewise.
5603
5604 2015-03-24 Gary Benson <gbenson@redhat.com>
5605
5606 * Makefile.in (x86-linux-dregs.o): New rule.
5607 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5608 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5609 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5610 (x86_linux_dr_get): Likewise.
5611 (x86_linux_dr_set): Likewise.
5612 (update_debug_registers_callback): Likewise.
5613 (x86_linux_dr_set_addr): Likewise.
5614 (x86_linux_dr_get_addr): Likewise.
5615 (x86_linux_dr_set_control): Likewise.
5616 (x86_linux_dr_get_control): Likewise.
5617 (x86_linux_dr_get_status): Likewise.
5618 (x86_linux_update_debug_registers): Likewise.
5619
5620 2015-03-24 Gary Benson <gbenson@redhat.com>
5621
5622 * linux-x86-low.c (x86_linux_update_debug_registers):
5623 New function, factored out from...
5624 (x86_linux_prepare_to_resume): ...this.
5625
5626 2015-03-24 Gary Benson <gbenson@redhat.com>
5627
5628 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5629 (x86_linux_dr_set): Likewise.
5630 (update_debug_registers_callback): Likewise.
5631 (x86_linux_dr_set_addr): Likewise.
5632 (x86_linux_dr_get_addr): Likewise.
5633 (x86_linux_dr_set_control): Likewise.
5634 (x86_linux_dr_get_control): Likewise.
5635 (x86_linux_dr_get_status): Likewise.
5636 (x86_linux_prepare_to_resume): Likewise.
5637
5638 2015-03-24 Gary Benson <gbenson@redhat.com>
5639
5640 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5641 Use perror_with_name. Pass string through gettext.
5642 (x86_linux_dr_set): Likewise.
5643
5644 2015-03-24 Gary Benson <gbenson@redhat.com>
5645
5646 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5647 (x86_linux_dr_set_addr): ...this.
5648 (x86_dr_low_get_addr): Rename to...
5649 (x86_linux_dr_get_addr): ...this.
5650 (x86_dr_low_set_control): Rename to...
5651 (x86_linux_dr_set_control): ...this.
5652 (x86_dr_low_get_control): Rename to...
5653 (x86_linux_dr_get_control): ...this.
5654 (x86_dr_low_get_status): Rename to...
5655 (x86_linux_dr_get_status): ...this.
5656 (x86_dr_low): Update with new function names.
5657
5658 2015-03-24 Gary Benson <gbenson@redhat.com>
5659
5660 * Makefile.in (x86-linux.o): New rule.
5661 * configure.srv: Add x86-linux.o to relevant targets.
5662 * linux-low.c (lwp_set_arch_private_info): New function.
5663 (lwp_arch_private_info): Likewise.
5664 * linux-x86-low.c: Include nat/x86-linux.h.
5665 (arch_lwp_info): Removed structure.
5666 (update_debug_registers_callback):
5667 Use lwp_set_debug_registers_changed.
5668 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5669 and lwp_set_debug_registers_changed.
5670 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5671
5672 2015-03-24 Gary Benson <gbenson@redhat.com>
5673
5674 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5675 * linux-arm-low.c (arm_new_thread): Likewise.
5676 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5677 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5678 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5679 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5680
5681 2015-03-24 Gary Benson <gbenson@redhat.com>
5682
5683 * linux-low.c (ptid_of_lwp): New function.
5684 (lwp_is_stopped): Likewise.
5685 (lwp_stop_reason): Likewise.
5686 * linux-x86-low.c (update_debug_registers_callback):
5687 Use lwp_is_stopped.
5688 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5689 lwp_stop_reason.
5690
5691 2015-03-24 Gary Benson <gbenson@redhat.com>
5692
5693 * linux-low.h (linux_stop_lwp): Remove declaration.
5694
5695 2015-03-24 Gary Benson <gbenson@redhat.com>
5696
5697 * linux-low.h: Include nat/linux-nat.h.
5698 * linux-low.c (iterate_over_lwps_args): New structure.
5699 (iterate_over_lwps_filter): New function.
5700 (iterate_over_lwps): Likewise.
5701 * linux-x86-low.c (update_debug_registers_callback):
5702 Update signature to what iterate_over_lwps expects.
5703 Remove PID check that iterate_over_lwps now performs.
5704 (x86_dr_low_set_addr): Use iterate_over_lwps.
5705 (x86_dr_low_set_control): Likewise.
5706
5707 2015-03-24 Gary Benson <gbenson@redhat.com>
5708
5709 * linux-x86-low.c (x86_debug_reg_state): New function.
5710 (x86_linux_prepare_to_resume): Use the above.
5711
5712 2015-03-24 Gary Benson <gbenson@redhat.com>
5713
5714 * linux-low.c (current_lwp_ptid): New function.
5715 * linux-x86-low.c: Include nat/linux-nat.h.
5716 (x86_dr_low_get_addr): Use current_lwp_ptid.
5717 (x86_dr_low_get_control): Likewise.
5718 (x86_dr_low_get_status): Likewise.
5719
5720 2015-03-20 Pedro Alves <palves@redhat.com>
5721
5722 * tracepoint.c (cmd_qtstatus): Make "str" const.
5723
5724 2015-03-20 Pedro Alves <palves@redhat.com>
5725
5726 * server.c (handle_general_set): Make "req_str" const.
5727
5728 2015-03-19 Pedro Alves <palves@redhat.com>
5729
5730 * linux-low.c (linux_resume_one_lwp): Rename to ...
5731 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5732 instead call perror_with_name.
5733 (check_ptrace_stopped_lwp_gone): New function.
5734 (linux_resume_one_lwp): Reimplement as wrapper around
5735 linux_resume_one_lwp_throw that swallows errors if the LWP is
5736 gone.
5737
5738 2015-03-19 Pedro Alves <palves@redhat.com>
5739
5740 * linux-low.c (count_events_callback, select_event_lwp_callback):
5741 No longer check whether the thread has resume_stop as last resume
5742 kind.
5743
5744 2015-03-19 Pedro Alves <palves@redhat.com>
5745
5746 * linux-low.c (count_events_callback, select_event_lwp_callback):
5747 Use the lwp's status_pending_p field, not the thread's.
5748
5749 2015-03-19 Pedro Alves <palves@redhat.com>
5750
5751 * linux-low.c (select_event_lwp_callback): Update comments to
5752 no longer mention SIGTRAP.
5753
5754 2015-03-18 Gary Benson <gbenson@redhat.com>
5755
5756 * server.c (handle_query): Do not report vFile:fstat as supported.
5757
5758 2015-03-11 Gary Benson <gbenson@redhat.com>
5759
5760 * hostio.c (sys/types.h): New include.
5761 (sys/stat.h): Likewise.
5762 (common-remote-fileio.h): Likewise.
5763 (handle_fstat): New function.
5764 (handle_vFile): Handle vFile:fstat packets.
5765
5766 2015-03-11 Gary Benson <gbenson@redhat.com>
5767
5768 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5769 struct stat.st_blocks and struct stat.st_blksize.
5770 * configure: Regenerate.
5771 * config.in: Likewise.
5772 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5773 (OBS): Add common-remote-fileio.o.
5774 (common-remote-fileio.o): New rule.
5775
5776 2015-03-09 Pedro Alves <palves@redhat.com>
5777
5778 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5779 'struct sockaddr' pointer in 'accept' call.
5780
5781 2015-03-09 Pedro Alves <palves@redhat.com>
5782
5783 Revert:
5784 2015-03-07 Pedro Alves <palves@redhat.com>
5785 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5786 or <winsock2.h> here. Instead include "gdb_socket.h".
5787 (remote_open): Use union gdb_sockaddr_u.
5788 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5789 or <winsock2.h> here. Instead include "gdb_socket.h".
5790 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5791 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5792 or <sys/un.h>.
5793 (init_named_socket, gdb_agent_helper_thread): Use union
5794 gdb_sockaddr_u.
5795
5796 2015-03-07 Pedro Alves <palves@redhat.com>
5797
5798 * configure.ac (build_warnings): Move
5799 -Wdeclaration-after-statement to the C-specific set.
5800 * configure: Regenerate.
5801
5802 2015-03-07 Pedro Alves <palves@redhat.com>
5803
5804 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5805 or <winsock2.h> here. Instead include "gdb_socket.h".
5806 (remote_open): Use union gdb_sockaddr_u.
5807 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5808 or <winsock2.h> here. Instead include "gdb_socket.h".
5809 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5810 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5811 or <sys/un.h>.
5812 (init_named_socket, gdb_agent_helper_thread): Use union
5813 gdb_sockaddr_u.
5814
5815 2015-03-07 Pedro Alves <palves@redhat.com>
5816
5817 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5818 instead.
5819
5820 2015-03-06 Yao Qi <yao.qi@linaro.org>
5821
5822 * linux-aarch64-low.c (aarch64_insert_point): Use
5823 show_debug_regs as a boolean.
5824 (aarch64_remove_point): Likewise.
5825
5826 2015-03-05 Pedro Alves <palves@redhat.com>
5827
5828 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5829 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5830 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5831 * nto-low.c (nto_target_ops): Likewise.
5832 * spu-low.c (spu_target_ops): Likewise.
5833 * win32-low.c (win32_target_ops): Likewise.
5834
5835 2015-03-04 Pedro Alves <palves@redhat.com>
5836
5837 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5838 Decide whether a breakpoint triggered based on the SIGTRAP's
5839 siginfo.si_code.
5840 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5841 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5842 (linux_low_filter_event): Check for breakpoints before checking
5843 watchpoints.
5844 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5845 siginfo.si_code.
5846 (linux_stopped_by_sw_breakpoint)
5847 (linux_supports_stopped_by_sw_breakpoint)
5848 (linux_stopped_by_hw_breakpoint)
5849 (linux_supports_stopped_by_hw_breakpoint): New functions.
5850 (linux_target_ops): Install new target methods.
5851
5852 2015-03-04 Pedro Alves <palves@redhat.com>
5853
5854 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5855 * server.c (swbreak_feature, hwbreak_feature): New globals.
5856 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5857 (captured_main): Clear swbreak_feature and hwbreak_feature.
5858 * server.h (swbreak_feature, hwbreak_feature): Declare.
5859 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5860 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5861 supports_stopped_by_hw_breakpoint>: New fields.
5862 (target_supports_stopped_by_sw_breakpoint)
5863 (target_stopped_by_sw_breakpoint)
5864 (target_supports_stopped_by_hw_breakpoint)
5865 (target_stopped_by_hw_breakpoint): Declare.
5866
5867 2015-03-04 Pedro Alves <palves@redhat.com>
5868
5869 enum lwp_stop_reason -> enum target_stop_reason
5870 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5871 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5872 (linux_wait_1, stuck_in_jump_pad_callback)
5873 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5874 (linux_stopped_by_watchpoint):
5875 * linux-low.h (enum lwp_stop_reason): Delete.
5876 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5877 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5878
5879 2015-03-04 Yao Qi <yao.qi@linaro.org>
5880
5881 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5882
5883 2015-03-03 Gary Benson <gbenson@redhat.com>
5884
5885 * hostio.c (handle_vFile): Fix prefix lengths.
5886
5887 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5888
5889 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5890 ptr_bits.
5891
5892 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5893
5894 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5895 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5896 (clean): Add "rm -f" for above C files.
5897 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5898 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5899 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5900 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5901 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5902 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5903 (init_registers_s390x_vx_linux64)
5904 (init_registers_s390x_tevx_linux64)
5905 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5906 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5907 declarations.
5908 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5909 (s390_store_vxrs_high): New functions.
5910 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5911 NT_S390_VXRS_HIGH.
5912 (s390_arch_setup): Add logic for selecting one of the new target
5913 descriptions. Activate the new vector regsets if applicable.
5914 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5915 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5916 and init_registers_s390x_tevx_linux64.
5917
5918 2015-03-01 Pedro Alves <palves@redhat.com>
5919
5920 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5921 parameter.
5922
5923 2015-02-27 Pedro Alves <palves@redhat.com>
5924
5925 * linux-x86-low.c (u_debugreg_offset): New function.
5926 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5927
5928 2015-02-27 Pedro Alves <palves@redhat.com>
5929
5930 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5931 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5932 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5933 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5934 (ps_lsetfpregs, ps_getpid)
5935 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5936 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5937 (ps_lsetxregs, ps_plog): Declare.
5938
5939 2015-02-27 Pedro Alves <palves@redhat.com>
5940
5941 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5942 IP_AGENT_EXPORT_FUNC.
5943 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5944 IP_AGENT_EXPORT_FUNC.
5945 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5946 (IP_AGENT_EXPORT): Delete.
5947 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5948 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5949 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5950 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5951 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5952 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5953 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5954 (traceframe_read_count, traceframe_write_count)
5955 (traceframes_created, trace_state_variables, get_raw_reg)
5956 (get_trace_state_variable_value, set_trace_state_variable_value)
5957 (ust_loaded, helper_thread_id, cmd_buf): Use
5958 IPA_SYM_EXPORTED_NAME.
5959 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5960 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5961 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5962 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5963 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5964 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5965 EXTERN_C_PUSH/EXTERN_C_POP.
5966 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5967 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5968 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5969 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5970 (traceframe_write_count, traceframe_read_count)
5971 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5972 (about_to_request_buffer_space, get_trace_state_variable_value)
5973 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5974 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5975 EXTERN_C_PUSH/EXTERN_C_POP.
5976 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5977 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5978 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5979 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5980 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5981 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5982 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5983 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5984 Define.
5985 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5986 (IP_AGENT_EXPORT_VAR_DECL): Define.
5987 (tracing): Declare.
5988 (gdb_agent_get_raw_reg): Declare.
5989
5990 2015-02-27 Tom Tromey <tromey@redhat.com>
5991 Pedro Alves <palves@redhat.com>
5992
5993 Rename symbols whose names are reserved C++ keywords throughout.
5994
5995 2015-02-27 Pedro Alves <palves@redhat.com>
5996
5997 * Makefile.in (COMPILER): New, get it from autoconf.
5998 (CXX): Get from autoconf instead.
5999 (COMPILE.pre): Use COMPILER.
6000 (CC-LD): Rename to ...
6001 (CC_LD): ... this. Use COMPILER.
6002 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6003 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6004 * acinclude.m4: Include build-with-cxx.m4.
6005 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6006 Disable -Werror by default if building in C++ mode.
6007 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6008 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6009 the C++ compiler. Save/restore CXXFLAGS too.
6010 * configure: Regenerate.
6011
6012 2015-02-27 Pedro Alves <palves@redhat.com>
6013
6014 * acinclude.m4: Include libiberty.m4.
6015 * configure.ac: Call libiberty_INIT.
6016 * config.in, configure: Regenerate.
6017
6018 2015-02-26 Pedro Alves <palves@redhat.com>
6019
6020 * linux-low.c (linux_wait_1): When incrementing the PC past a
6021 program breakpoint always use the_low_target.breakpoint_len as
6022 increment, rather than the maximum between that and
6023 the_low_target.decr_pc_after_break.
6024
6025 2015-02-23 Pedro Alves <palves@redhat.com>
6026
6027 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6028 thread was doing a step-over; always adjust the PC if
6029 we stepped over a permanent breakpoint.
6030 (linux_wait_1): If we stepped over breakpoint that was on top of a
6031 permanent breakpoint, manually advance the PC past it.
6032
6033 2015-02-23 Pedro Alves <palves@redhat.com>
6034
6035 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6036 modes.
6037 (x86_fill_gregset, x86_store_gregset): Use it when handling
6038 $orig_eax.
6039
6040 2015-02-20 Pedro Alves <palves@redhat.com>
6041
6042 * thread-db.c: Include "nat/linux-procfs.h".
6043 (thread_db_init): Skip listing new threads if the kernel supports
6044 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6045
6046 2015-02-20 Pedro Alves <palves@redhat.com>
6047
6048 * linux-low.c (status_pending_p_callback): Use ptid_match.
6049
6050 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6051
6052 PR breakpoints/16812
6053 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6054 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6055 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6056
6057 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6058
6059 PR breakpoints/15956
6060 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6061
6062 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6063
6064 * linux-low.c (linux_low_btrace_conf): Print size.
6065 * server.c (handle_btrace_conf_general_set): New.
6066 (hanle_general_set): Call handle_btrace_conf_general_set.
6067 (handle_query): Report Qbtrace-conf:bts:size as supported.
6068
6069 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6070
6071 * linux-low.c (linux_low_enable_btrace): Update parameters.
6072 (linux_low_btrace_conf): New.
6073 (linux_target_ops)<to_btrace_conf>: Initialize.
6074 * server.c (current_btrace_conf): New.
6075 (handle_btrace_enable): Rename to ...
6076 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6077 to target_enable_btrace. Update comment. Update users.
6078 (handle_qxfer_btrace_conf): New.
6079 (qxfer_packets): Add btrace-conf entry.
6080 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6081 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6082 (target_ops)<read_btrace_conf>: New.
6083 (target_enable_btrace): Update parameters.
6084 (target_read_btrace_conf): New.
6085
6086 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6087
6088 * server.c (handle_btrace_general_set): Remove call to
6089 target_supports_btrace.
6090 (supported_btrace_packets): New.
6091 (handle_query): Call supported_btrace_packets.
6092 * target.h: include btrace-common.h.
6093 (btrace_target_info): Removed.
6094 (supports_btrace, target_supports_btrace): Update parameters.
6095
6096 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6097
6098 * Makefile.in (SFILES): Add common/btrace-common.c.
6099 (OBS): Add common/btrace-common.o.
6100 (btrace-common.o): Add build rules.
6101 * linux-low: Include btrace-common.h.
6102 (linux_low_read_btrace): Use struct btrace_data. Call
6103 btrace_data_init and btrace_data_fini.
6104
6105 2015-02-06 Pedro Alves <palves@redhat.com>
6106
6107 * thread-db.c (find_new_threads_callback): Add debug output.
6108
6109 2015-02-04 Pedro Alves <palves@redhat.com>
6110
6111 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6112 (resume_stopped_resumed_lwps): New function.
6113 (linux_wait_for_event_filtered): Use it.
6114
6115 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6116
6117 * Makefile.in (SFILES): Add linux-personality.c.
6118 (linux-personality.o): New rule.
6119 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6120 list of objects to be built.
6121 * linux-low.c: Include nat/linux-personality.h.
6122 (linux_create_inferior): Remove code to disable address space
6123 randomization (moved to ../nat/linux-personality.c). Create
6124 cleanup to disable address space randomization.
6125
6126 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6127
6128 * Makefile.in (posix-strerror.o): New rule.
6129 (mingw-strerror.o): Likewise.
6130 * configure: Regenerated.
6131 * configure.ac: Source file ../common/common.host. Initialize new
6132 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6133
6134 2015-01-14 Yao Qi <yao@codesourcery.com>
6135
6136 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6137 (ppc-linux.o): New rule.
6138 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6139 * configure.ac: AC_CHECK_FUNCS(getauxval).
6140 * config.in: Re-generated.
6141 * configure: Re-generated.
6142 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6143 ppc64_64bit_inferior_p
6144
6145 2015-01-14 Yao Qi <yao@codesourcery.com>
6146
6147 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6148 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6149 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6150 (PT_ORIG_R3, PT_TRAP): Likewise.
6151 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6152 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6153 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6154
6155 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6156
6157 * i387-fp.c (i387_cache_to_xsave): In look over
6158 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6159 zmmh_low_space field by use of zmmh_high_space.
6160
6161 2015-01-09 Pedro Alves <palves@redhat.com>
6162
6163 * linux-low.c (step_over_bkpt): Move higher up in the file.
6164 (handle_extended_wait): Don't store the stop_pc here.
6165 (get_stop_pc): Adjust comments and rename to ...
6166 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6167 stopped for a software breakpoint or hardware breakpoint.
6168 (thread_still_has_status_pending_p): New function.
6169 (status_pending_p_callback): Use
6170 thread_still_has_status_pending_p. If the event is no longer
6171 interesting, resume the LWP.
6172 (handle_tracepoints): Add assert.
6173 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6174 (wstatus_maybe_breakpoint): New function.
6175 (cancel_breakpoint): Delete function.
6176 (check_stopped_by_watchpoint): New function, factored out from
6177 linux_low_filter_event.
6178 (lp_status_maybe_breakpoint): Delete function.
6179 (linux_low_filter_event): Remove filter_ptid argument.
6180 Leave thread group exits pending here. Store the LWP's stop PC.
6181 Always leave events pending.
6182 (linux_wait_for_event_filtered): Pull all events out of the
6183 kernel, and leave them all pending.
6184 (count_events_callback, select_event_lwp_callback): Consider all
6185 events.
6186 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6187 (select_event_lwp): Only give preference to the stepping LWP in
6188 all-stop mode. Adjust comments.
6189 (ignore_event): New function.
6190 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6191 references to cancel_breakpoints. Adjust to renames. Also give
6192 equal priority to all LWPs that have had events in non-stop mode.
6193 If reporting a software breakpoint event, unadjust the LWP's PC.
6194 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6195 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6196 Adjust.
6197 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6198 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6199 (linux_stopped_by_watchpoint): Adjust.
6200 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6201 * linux-low.h (enum lwp_stop_reason): New.
6202 (struct lwp_info) <stop_pc>: Adjust comment.
6203 <stopped_by_watchpoint>: Delete field.
6204 <stop_reason>: New field.
6205 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6206 * mem-break.c (software_breakpoint_inserted_here)
6207 (hardware_breakpoint_inserted_here): New function.
6208 * mem-break.h (software_breakpoint_inserted_here)
6209 (hardware_breakpoint_inserted_here): Declare.
6210 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6211 (cancel_breakpoints): Delete.
6212 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6213 (upload_fast_traceframes): Remove references to
6214 cancel_breakpoints.
6215
6216 2015-01-09 Pedro Alves <palves@redhat.com>
6217
6218 * thread-db.c (find_new_threads_callback): Ignore thread if the
6219 kernel thread ID is -1.
6220
6221 2015-01-09 Pedro Alves <palves@redhat.com>
6222
6223 * linux-low.c (linux_attach_fail_reason_string): Move to
6224 nat/linux-ptrace.c, and rename.
6225 (linux_attach_lwp): Update comment.
6226 (attach_proc_task_lwp_callback): New function.
6227 (linux_attach): Adjust to rename and use
6228 linux_proc_attach_tgid_threads.
6229 (linux_attach_fail_reason_string): Delete declaration.
6230
6231 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6232
6233 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6234 * server.c (gdbserver_version): Likewise.
6235
6236 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6237
6238 * remote-utils.c: Include ctype.h.
6239 (input_interrupt): Explicitly handle the case when the char
6240 received is the NUL byte. Improve the printing of non-ASCII
6241 characters.
6242
6243 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6244
6245 * linux-low.c (linux_low_filter_event): Update call to
6246 linux_enable_event_reporting following the addition of
6247 a new parameter to that function.
6248
6249 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6250
6251 PR server/17457
6252 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6253 (AARCH64_FPCR_REGNO): Likewise.
6254 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6255 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6256 (aarch64_store_fpregset): Likewise.
6257
6258 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6259
6260 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6261 Remove FIXME comment about assumption about N.
6262
6263 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6264
6265 * configure.ac: If large-file support is disabled in GDBserver,
6266 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6267 * configure: Regenerate.
6268
6269 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6270
6271 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6272 warning upon ENODATA from ptrace.
6273 * linux-s390-low.c (s390_store_tdb): New.
6274 (s390_regsets): Add regset for NT_S390_TDB.
6275
6276 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6277
6278 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6279 without a fill_function.
6280 * linux-s390-low.c (s390_fill_last_break): Remove.
6281 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6282 (s390_arch_setup): Use regset's size instead of fill_function for
6283 loop end condition.
6284
6285 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6286
6287 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6288 the regset's store function when ptrace returned an error.
6289 * regcache.c (get_thread_regcache): Invalidate register cache
6290 before fetching inferior's registers.
6291
6292 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6293
6294 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6295 while-loop as for-loop.
6296 (regsets_store_inferior_registers): Likewise.
6297
6298 2014-11-28 Yao Qi <yao@codesourcery.com>
6299
6300 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6301 * config.in, configure: Re-generate.
6302 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6303 is defined.
6304
6305 2014-11-21 Yao Qi <yao@codesourcery.com>
6306
6307 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6308 (AC_CHECK_HEADERS): Remove malloc.h.
6309 * configure: Re-generated.
6310 * config.in: Re-generated.
6311 * server.h: Don't include alloca.h and malloc.h.
6312 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6313 Don't include malloc.h.
6314
6315 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6316
6317 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6318 corresponding ERRNO check in same block.
6319
6320 2014-11-12 Pedro Alves <palves@redhat.com>
6321
6322 * server.c (cont_thread): Update comment.
6323 (start_inferior, attach_inferior): No longer clear cont_thread.
6324 (handle_v_cont): No longer set cont_thread.
6325 (captured_main): Clear cont_thread each time a GDB connects.
6326
6327 2014-11-12 Pedro Alves <palves@redhat.com>
6328
6329 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6330 thread, and don't resume all threads if the Hc thread has exited.
6331
6332 2014-11-12 Pedro Alves <palves@redhat.com>
6333
6334 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6335 the process group instead of to a specific LWP.
6336
6337 2014-10-15 Pedro Alves <palves@redhat.com>
6338
6339 PR server/17487
6340 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6341 parameter.
6342 (arm_set_thread_context): Delete.
6343 (the_low_target): Adjust.
6344 * win32-i386-low.c (debug_registers_changed)
6345 (debug_registers_used): Delete.
6346 (update_debug_registers_callback): New function.
6347 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6348 needing to update their debug registers.
6349 (win32_get_current_dr): New function.
6350 (x86_dr_low_get_addr, x86_dr_low_get_control)
6351 (x86_dr_low_get_status): Fetch the debug register from the thread
6352 record's context.
6353 (i386_initial_stuff): Adjust.
6354 (i386_get_thread_context): Remove current_event parameter. Don't
6355 clear debug_registers_changed nor copy DR values to
6356 debug_reg_state.
6357 (i386_set_thread_context): Delete.
6358 (i386_prepare_to_resume): New function.
6359 (i386_thread_added): Mark the thread as needing to update irs
6360 debug registers.
6361 (the_low_target): Remove i386_set_thread_context and install
6362 i386_prepare_to_resume.
6363 * win32-low.c (win32_get_thread_context): Adjust.
6364 (win32_set_thread_context): Use SetThreadContext
6365 directly.
6366 (win32_prepare_to_resume): New function.
6367 (win32_require_context): New function, factored out from ...
6368 (thread_rec): ... this.
6369 (continue_one_thread): Call win32_prepare_to_resume on each thread
6370 we're about to continue.
6371 (win32_resume): Call win32_prepare_to_resume on the event thread.
6372 * win32-low.h (struct win32_thread_info)
6373 <debug_registers_changed>: New field.
6374 (struct win32_target_ops): Change prototype of set_thread_context,
6375 delete set_thread_context and add prepare_to_resume.
6376 (win32_require_context): New declaration.
6377
6378 2014-10-08 Gary Benson <gbenson@redhat.com>
6379
6380 * server.h: Do not include common-exceptions.h.
6381
6382 2014-10-08 Gary Benson <gbenson@redhat.com>
6383
6384 * server.h: Do not include cleanups.h.
6385
6386 2014-09-30 James Hogan <james.hogan@imgtec.com>
6387
6388 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6389 mips64-dsp-linux.c.
6390
6391 2014-09-23 Yao Qi <yao@codesourcery.com>
6392
6393 * linux-low.c (lp_status_maybe_breakpoint): New function.
6394 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6395 (count_events_callback): Likewise.
6396 (select_event_lwp_callback): Likewise.
6397 (cancel_breakpoints_callback): Likewise.
6398
6399 2014-09-19 Don Breazeal <donb@codesourcery.com>
6400
6401 * linux-low.c (handle_extended_wait): Call
6402 linux_ptrace_get_extended_event.
6403 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6404 linux_is_extended_waitstatus.
6405
6406 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6407
6408 * Makefile.in (CPPFLAGS): Define.
6409 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6410 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6411
6412 2014-09-16 Gary Benson <gbenson@redhat.com>
6413
6414 * inferiors.h (current_inferior): Renamed as...
6415 (current_thread): New variable. All uses updated.
6416 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6417 (maybe_move_out_of_jump_pad): Likewise.
6418 (cancel_breakpoint): Likewise.
6419 (linux_low_filter_event): Likewise.
6420 (wait_for_sigstop): Likewise.
6421 (linux_resume_one_lwp): Likewise.
6422 (need_step_over_p): Likewise.
6423 (start_step_over): Likewise.
6424 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6425 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6426 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6427 and save_inferior as saved_thread.
6428 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6429 saved_thread.
6430 (regcache_invalidate_thread): Likewise.
6431 * remote-utils.c (prepare_resume_reply): Likewise.
6432 * thread-db.c (thread_db_get_tls_address): Likewise.
6433 (disable_thread_event_reporting): Likewise.
6434 (remove_thread_event_breakpoints): Likewise.
6435 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6436 as saved_thread.
6437 * target.h (set_desired_inferior): Renamed as...
6438 (set_desired_thread): New declaration. All uses updated.
6439 * server.c (myresume): Updated comment to reference thread instead
6440 of inferior.
6441 (handle_serial_event): Likewise.
6442 (handle_target_event): Likewise.
6443
6444 2014-09-12 Tom Tromey <tromey@redhat.com>
6445 Gary Benson <gbenson@redhat.com>
6446
6447 * regcache.h: Include common-regcache.h.
6448 (regcache_read_pc): Don't declare.
6449 * regcache.c (get_thread_regcache_for_ptid): New function.
6450
6451 2014-09-11 Tom Tromey <tromey@redhat.com>
6452 Gary Benson <gbenson@redhat.com>
6453
6454 * symbol.c: New file.
6455 * Makefile.in (SFILES): Add symbol.c.
6456 (OBS): Add symbol.o.
6457
6458 2014-09-11 Gary Benson <gbenson@redhat.com>
6459
6460 * target.c (target_stop_ptid, target_continue_ptid): New
6461 functions.
6462
6463 2014-09-11 Tom Tromey <tromey@redhat.com>
6464 Gary Benson <gbenson@redhat.com>
6465
6466 * target.h: Include target/target.h.
6467 * target.c (target_read_memory, target_read_uint32)
6468 (target_write_memory): New functions.
6469
6470 2014-09-11 Gary Benson <gbenson@redhat.com>
6471
6472 * server.h (debug_hw_points): Don't declare.
6473 * server.c (debug_hw_points): Don't define. Replace all uses
6474 with show_debug_regs.
6475 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6476 all uses with show_debug_regs.
6477
6478 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6479
6480 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6481 endianness into account.
6482 (ppc_supply_ptrace_register): Likewise.
6483
6484 2014-09-03 James Hogan <james.hogan@imgtec.com>
6485
6486 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6487 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6488
6489 2014-09-03 Gary Benson <gbenson@redhat.com>
6490
6491 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6492 ALL_DEBUG_ADDRESS_REGISTERS.
6493
6494 2014-09-02 Gary Benson <gbenson@redhat.com>
6495
6496 * i386-low.h: Renamed as...
6497 * x86-low.h: New file. All type, function and variable name
6498 prefixes changed from "i386_" to "x86_". All references updated.
6499 * i386-low.c: Renamed as...
6500 * x86-low.c: New file. All type, function and variable name
6501 prefixes changed from "i386_" to "x86_". All references updated.
6502
6503 2014-09-02 Gary Benson <gbenson@redhat.com>
6504
6505 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6506 (x86_linux_new_thread): Likewise.
6507
6508 2014-08-29 Gary Benson <gbenson@redhat.com>
6509
6510 * server.h (setjmp.h): Do not include.
6511 (toplevel): Do not declare.
6512 (common-exceptions.h): Include.
6513 (cleanups.h): Likewise.
6514 * server.c (toplevel): Do not define.
6515 (exit_code): New static global.
6516 (detach_or_kill_for_exit_cleanup): New function.
6517 (main): New function. Original main renamed to...
6518 (captured_main): New function.
6519 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6520
6521 2014-08-29 Gary Benson <gbenson@redhat.com>
6522
6523 * Makefile.in (SFILES): Add common/common-exceptions.c.
6524 (OBS): Add common-exceptions.o.
6525 (common-exceptions.o): New rule.
6526 * utils.c (prepare_to_throw_exception): New function.
6527
6528 2014-08-29 Gary Benson <gbenson@redhat.com>
6529
6530 * config.in: Regenerate.
6531 * configure: Likewise.
6532
6533 2014-08-29 Gary Benson <gbenson@redhat.com>
6534
6535 * Makefile.in (SFILES): Add common/cleanups.c.
6536 (OBS): cleanups.o.
6537 (cleanups.o): New rule.
6538
6539 2014-08-29 Gary Benson <gbenson@redhat.com>
6540
6541 * utils.c (internal_vwarning): New function.
6542
6543 2014-08-28 Gary Benson <gbenson@redhat.com>
6544
6545 * utils.h (fatal): Remove declaration.
6546 * utils.c (fatal): Remove function.
6547
6548 2014-08-28 Gary Benson <gbenson@redhat.com>
6549
6550 * tracepoint.c (gdb_agent_init): Replace fatal with
6551 perror_with_name.
6552 (initialize_tracepoint): Likewise.
6553
6554 2014-08-28 Gary Benson <gbenson@redhat.com>
6555
6556 * remote-utils.c (remote_prepare): Replace fatal with error.
6557
6558 2014-08-28 Gary Benson <gbenson@redhat.com>
6559
6560 * linux-low.c (linux_async): Replace fatal with warning.
6561 Tidy up and return.
6562 (linux_start_non_stop): Return -1 if linux_async failed.
6563
6564 2014-08-28 Gary Benson <gbenson@redhat.com>
6565
6566 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6567 gdb_assert.
6568 (i386_dr_low_get_addr): Remove vague comment.
6569 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6570 gdb_assert.
6571
6572 2014-08-28 Gary Benson <gbenson@redhat.com>
6573
6574 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6575 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6576 internal_error.
6577 (linux_resume_one_lwp): Likewise.
6578 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6579 gdb_assert.
6580 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6581 with internal_error.
6582 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6583 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6584 (find_register_by_name): Replace fatal with internal_error.
6585 (find_regno): Likewise.
6586 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6587 * thread-db.c (thread_db_create_event): Likewise.
6588 (thread_db_load_search): Likewise.
6589 (try_thread_db_load_1): Likewise.
6590 * tracepoint.c (get_jump_space_head): Replace fatal with
6591 internal_error.
6592 (claim_trampoline_space): Likewise.
6593 (have_fast_tracepoint_trampoline_buffer): Likewise.
6594 (cmd_qtstart): Likewise.
6595 (stop_tracing): Likewise.
6596 (fast_tracepoint_collecting): Likewise.
6597 (target_malloc): Likewise.
6598 (download_tracepoint): Likewise.
6599 (download_trace_state_variables): Replace check with gdb_assert.
6600 (upload_fast_traceframes): Replace fatal with internal_error.
6601
6602 2014-08-19 Tom Tromey <tromey@redhat.com>
6603 Gary Benson <gbenson@redhat.com>
6604
6605 * Makefile.in (SFILES): Add common/common-debug.c.
6606 (OBS): Add common-debug.o.
6607 (common-debug.o): New rule.
6608 * debug.h (debug_printf): Don't declare.
6609 * debug.c (debug_printf): Renamed and rewritten as...
6610 (debug_vprintf): New function.
6611
6612 2014-08-19 Gary Benson <gbenson@redhat.com>
6613
6614 * utils.h: Do not include print-utils.h.
6615
6616 2014-08-19 Tom Tromey <tromey@redhat.com>
6617 Gary Benson <gbenson@redhat.com>
6618
6619 * server.h: Add static assertion.
6620 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6621
6622 2014-08-19 Tom Tromey <tromey@redhat.com>
6623 Gary Benson <gbenson@redhat.com>
6624
6625 * Makefile.in (SFILES): Add common/errors.c.
6626 (OBS): Add errors.o.
6627 (IPA_OBS): Add errors-ipa.o.
6628 (errors.o): New rule.
6629 (errors-ipa.o): Likewise.
6630 * utils.h (perror_with_name, error, warning): Don't declare.
6631 * utils.c (warning): Renamed and rewritten as...
6632 (vwarning): New function.
6633 (error): Renamed and rewritten as...
6634 (verror): New function.
6635 (internal_error): Renamed and rewritten as...
6636 (internal_verror): New function.
6637
6638 2014-08-07 Gary Benson <gbenson@redhat.com>
6639
6640 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6641 * configure: Regenerate.
6642 * config.in: Likewise.
6643 * server.h: Do not include errno.h.
6644 * event-loop.c: Likewise.
6645 * hostio-errno.c: Likewise.
6646 * linux-low.c: Likewise.
6647 * remote-utils.c: Likewise.
6648 * spu-low.c: Likewise.
6649 * utils.c: Likewise.
6650 * gdbreplay.c: Unconditionally include errno.h.
6651
6652 2014-08-07 Gary Benson <gbenson@redhat.com>
6653
6654 * server.h: Do not include string.h.
6655 * event-loop.c: Likewise.
6656 * linux-low.c: Likewise.
6657 * regcache.c: Likewise.
6658 * remote-utils.c: Likewise.
6659 * spu-low.c: Likewise.
6660 * utils.c: Likewise.
6661
6662 2014-08-07 Gary Benson <gbenson@redhat.com>
6663
6664 * server.h: Do not include gdb_assert.h.
6665
6666 2014-08-07 Gary Benson <gbenson@redhat.com>
6667
6668 * server.h: Do not include common-utils.h.
6669
6670 2014-08-07 Gary Benson <gbenson@redhat.com>
6671
6672 * server.h: Do not include ptid.h.
6673 * notif.h: Likewise.
6674
6675 2014-08-07 Gary Benson <gbenson@redhat.com>
6676
6677 * server.h: Do not include gdb_locale.h.
6678
6679 2014-08-07 Gary Benson <gbenson@redhat.com>
6680
6681 * server.h: Do not include gdb/signals.h.
6682 * win32-low.c: Likewise.
6683
6684 2014-08-07 Gary Benson <gbenson@redhat.com>
6685
6686 * server.h: Do not include pathmax.h.
6687
6688 2014-08-07 Gary Benson <gbenson@redhat.com>
6689
6690 * server.h: Do not include libiberty.h.
6691 * linux-bfin-low.c: Likewise.
6692
6693 2014-08-07 Gary Benson <gbenson@redhat.com>
6694
6695 * server.h: Do not include ansidecl.h.
6696
6697 2014-08-07 Gary Benson <gbenson@redhat.com>
6698
6699 * linux-x86-low.c: Do not include stddef.h.
6700 * lynx-ppc-low.c: Likewise.
6701 * tracepoint.c: Likewise.
6702
6703 2014-08-07 Gary Benson <gbenson@redhat.com>
6704
6705 * server.h: Do not include stdarg.h.
6706 * nto-low.c: Likewise.
6707
6708 2014-08-07 Gary Benson <gbenson@redhat.com>
6709
6710 * server.h: Do not include stdlib.h.
6711 * inferiors.c: Likewise.
6712 * linux-low.c: Likewise.
6713 * regcache.c: Likewise.
6714 * spu-low.c: Likewise.
6715 * tracepoint.c: Likewise.
6716 * utils.c: Likewise.
6717
6718 2014-08-07 Gary Benson <gbenson@redhat.com>
6719
6720 * server.h: Do not include stdio.h.
6721 * linux-low.c: Likewise.
6722 * remote-utils.c: Likewise.
6723 * spu-low.c: Likewise.
6724 * utils.c: Likewise.
6725 * wincecompat.c: Likewise.
6726
6727 2014-08-06 Gary Benson <gbenson@redhat.com>
6728
6729 * regcache.c (init_register_cache): Move conditionals inside if.
6730
6731 2014-08-06 Gary Benson <gbenson@redhat.com>
6732
6733 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6734
6735 2014-07-31 Gary Benson <gbenson@redhat.com>
6736
6737 * ax.h: Do not include server.h.
6738 * gdbthread.h: Likewise.
6739 * lynx-low.h: Likewise.
6740 * notif.h: Likewise.
6741
6742 2014-07-30 Gary Benson <gbenson@redhat.com>
6743
6744 * server.h: Include common-defs.h.
6745 Do not include config.h or build-gnulib-gdbserver/config.h.
6746
6747 2014-07-30 Gary Benson <gbenson@redhat.com>
6748
6749 * hostio-errno.c: Move server.h to top of includes list.
6750 * inferiors.c: Likewise.
6751 * linux-x86-low.c: Likewise.
6752 * notif.c: Include server.h.
6753
6754 2014-07-24 Tom Tromey <tromey@redhat.com>
6755 Gary Benson <gbenson@redhat.com>
6756
6757 * server.h (CORE_ADDR): Now unsigned.
6758
6759 2014-07-16 Pedro Alves <palves@redhat.com>
6760
6761 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6762
6763 2014-07-15 Pedro Alves <palves@redhat.com>
6764
6765 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6766 copy.
6767
6768 2014-07-11 Pedro Alves <palves@redhat.com>
6769
6770 * linux-low.c (kill_wait_lwp): New function, based on
6771 kill_one_lwp_callback, but use my_waitpid directly.
6772 (kill_one_lwp_callback, linux_kill): Use it.
6773
6774 2014-06-23 Pedro Alves <palves@redhat.com>
6775
6776 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6777 before setting DR0..DR3.
6778
6779 2014-06-20 Gary Benson <gbenson@redhat.com>
6780
6781 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6782 * configure: Regenerated.
6783 * config.in: Likewise.
6784
6785 2014-06-20 Gary Benson <gbenson@redhat.com>
6786
6787 * Makefile.in (SFILES): Update locations for files moved
6788 from common to nat.
6789 (object file files): Reordered.
6790
6791 2014-06-20 Gary Benson <gbenson@redhat.com>
6792
6793 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6794 (i386_dr_low_set_addr): Likewise.
6795 (i386_dr_low_get_addr): Likewise.
6796 (i386_dr_low_can_set_control): Likewise.
6797 (i386_dr_low_set_control): Likewise.
6798 (i386_dr_low_get_control): Likewise.
6799 (i386_dr_low_get_status): Likewise.
6800 (i386_get_debug_register_length): Likewise.
6801 * linux-x86-low.c (i386_dr_low_set_addr):
6802 Changed signature. Made static.
6803 (i386_dr_low_get_addr): Likewise.
6804 (i386_dr_low_set_control): Likewise.
6805 (i386_dr_low_get_control): Likewise.
6806 (i386_dr_low_get_status): Likewise.
6807 (i386_dr_low): New global variable.
6808 * win32-i386-low.c (i386_dr_low_set_addr):
6809 Changed signature. Made static.
6810 (i386_dr_low_get_addr): Likewise.
6811 (i386_dr_low_set_control): Likewise.
6812 (i386_dr_low_get_control): Likewise.
6813 (i386_dr_low_get_status): Likewise.
6814 (i386_dr_low): New global variable.
6815
6816 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6817
6818 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6819 * Makefile.in (AR, AR_FLAGS): Define.
6820 * configure: Regenerate.
6821
6822 2014-06-19 Gary Benson <gbenson@redhat.com>
6823
6824 * Makefile.in (i386-dregs.o): New rule.
6825 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6826 * i386-low.c (target.h): Remove include.
6827 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6828 (DR_CONTROL_SHIFT): Likewise.
6829 (DR_CONTROL_SIZE): Likewise.
6830 (DR_RW_EXECUTE): Likewise.
6831 (DR_RW_WRITE): Likewise.
6832 (DR_RW_READ): Likewise.
6833 (DR_RW_IORW): Likewise.
6834 (DR_LEN_1): Likewise.
6835 (DR_LEN_2): Likewise.
6836 (DR_LEN_4): Likewise.
6837 (DR_LEN_8): Likewise.
6838 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6839 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6840 (DR_ENABLE_SIZE): Likewise.
6841 (DR_LOCAL_SLOWDOWN): Likewise.
6842 (DR_GLOBAL_SLOWDOWN): Likewise.
6843 (DR_CONTROL_RESERVED): Likewise.
6844 (I386_DR_CONTROL_MASK): Likewise.
6845 (I386_DR_VACANT): Likewise.
6846 (I386_DR_LOCAL_ENABLE): Likewise.
6847 (I386_DR_GLOBAL_ENABLE): Likewise.
6848 (I386_DR_DISABLE): Likewise.
6849 (I386_DR_SET_RW_LEN): Likewise.
6850 (I386_DR_GET_RW_LEN): Likewise.
6851 (I386_DR_WATCH_HIT): Likewise.
6852 (i386_wp_op_t): Likewise.
6853 (i386_show_dr): Likewise.
6854 (i386_length_and_rw_bits): Likewise.
6855 (i386_insert_aligned_watchpoint): Likewise.
6856 (i386_remove_aligned_watchpoint): Likewise.
6857 (i386_handle_nonaligned_watchpoint): Likewise.
6858 i386_update_inferior_debug_regs(): Likewise.
6859 (i386_dr_insert_watchpoint): Likewise.
6860 (i386_dr_remove_watchpoint): Likewise.
6861 (i386_dr_region_ok_for_watchpoint): Likewise.
6862 (i386_dr_stopped_data_address): Likewise.
6863 (i386_dr_stopped_by_watchpoint): Likewise.
6864
6865 2014-06-19 Gary Benson <gbenson@redhat.com>
6866
6867 * i386-low.c (i386_dr_show): Renamed to
6868 i386_show_dr and made static. All uses updated.
6869 (i386_dr_length_and_rw_bits): Renamed to
6870 i386_length_and_rw_bits and made static.
6871 All uses updated.
6872 (i386_dr_insert_aligned_watchpoint): Renamed to
6873 i386_insert_aligned_watchpoint and made static.
6874 All uses updated.
6875 (i386_dr_remove_aligned_watchpoint): Renamed to
6876 i386_remove_aligned_watchpoint and made static.
6877 All uses updated.
6878 (i386_dr_update_inferior_debug_regs): Renamed to
6879 i386_update_inferior_debug_regs and made static.
6880 All uses updated.
6881
6882 2014-06-18 Gary Benson <gbenson@redhat.com>
6883
6884 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6885 (i386_dr_low_can_set_control): Likewise.
6886 (i386_get_debug_register_length): Likewise.
6887 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6888 (i386_dr_low_can_set_control): Likewise.
6889 (i386_get_debug_register_length): Likewise.
6890
6891 2014-06-17 Gary Benson <gbenson@redhat.com>
6892
6893 * i386-low.h (i386-dregs.h): New include.
6894 (DR_FIRSTADDR): Now in i386-dregs.h.
6895 (DR_LASTADDR): Likewise.
6896 (DR_NADDR): Likewise.
6897 (DR_STATUS): Likewise.
6898 (DR_CONTROL): Likewise.
6899 (i386_debug_reg_state): Likewise.
6900 (i386_dr_insert_watchpoint): Likewise.
6901 (i386_dr_remove_watchpoint): Likewise.
6902 (i386_dr_region_ok_for_watchpoint): Likewise.
6903 (i386_dr_stopped_data_address): Likewise.
6904 (i386_dr_stopped_by_watchpoint): Likewise.
6905 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6906
6907 2014-06-18 Gary Benson <gbenson@redhat.com>
6908
6909 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6910 i386_dr_insert_watchpoint.
6911 (i386_low_remove_watchpoint): Renamed to
6912 i386_dr_remove_watchpoint.
6913 (i386_low_region_ok_for_watchpoint): Renamed to
6914 i386_dr_region_ok_for_watchpoint.
6915 (i386_low_stopped_data_address): Renamed to
6916 i386_dr_stopped_data_address.
6917 (i386_low_stopped_by_watchpoint): Renamed to
6918 i386_dr_stopped_by_watchpoint.
6919 * i386-low.c (i386_show_dr): Renamed to
6920 i386_dr_show and made nonstatic. All uses updated.
6921 (i386_length_and_rw_bits): Renamed to
6922 i386_dr_length_and_rw_bits and made nonstatic.
6923 All uses updated.
6924 (i386_insert_aligned_watchpoint): Renamed to
6925 i386_dr_insert_aligned_watchpoint and made nonstatic.
6926 All uses updated.
6927 (i386_remove_aligned_watchpoint): Renamed to
6928 i386_dr_remove_aligned_watchpoint and made nonstatic.
6929 All uses updated.
6930 (i386_update_inferior_debug_regs): Renamed to
6931 i386_dr_update_inferior_debug_regs and made nonstatic.
6932 All uses updated.
6933 (i386_low_insert_watchpoint): Renamed to
6934 i386_dr_insert_watchpoint. All uses updated.
6935 (i386_low_remove_watchpoint): Renamed to
6936 i386_dr_remove_watchpoint. All uses updated.
6937 (i386_low_region_ok_for_watchpoint): Renamed to
6938 i386_dr_region_ok_for_watchpoint. All uses updated.
6939 (i386_low_stopped_data_address): Renamed to
6940 i386_dr_stopped_data_address. All uses updated.
6941 (i386_low_stopped_by_watchpoint): Renamed to
6942 i386_dr_stopped_by_watchpoint. All uses updated.
6943
6944 2014-06-18 Gary Benson <gbenson@redhat.com>
6945
6946 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6947 (i386_dr_low_can_set_control): Likewise.
6948 (i386_insert_aligned_watchpoint): New check.
6949
6950 2014-06-18 Gary Benson <gbenson@redhat.com>
6951
6952 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6953 Renamed to state.
6954
6955 2014-06-18 Gary Benson <gbenson@redhat.com>
6956
6957 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6958 instead of fatal and error.
6959 (i386_handle_nonaligned_watchpoint): Likewise.
6960
6961 2014-06-18 Gary Benson <gbenson@redhat.com>
6962
6963 * i386-low.c (i386_get_debug_register_length): New macro.
6964 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6965 (i386_show_dr): Use debug_printf instead of fprintf. Use
6966 phex to format values.
6967
6968 2014-06-18 Gary Benson <gbenson@redhat.com>
6969
6970 * i386-low.h: Comment changes.
6971 * i386-low.c: Likewise.
6972
6973 2014-06-18 Gary Benson <gbenson@redhat.com>
6974
6975 * i386-low.c: Whitespace changes.
6976
6977 2014-06-12 Tom Tromey <tromey@redhat.com>
6978
6979 * utils.c (freeargv): Remove.
6980
6981 2014-06-12 Tom Tromey <tromey@redhat.com>
6982
6983 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6984 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6985 (parse_debug_format_options): Likewise.
6986 (gdbserver_usage): Likewise.
6987 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6988 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6989 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6990 against libiberty.
6991 ($(LIBGNU)): Depend on libiberty.
6992 (all-lib): Recurse into all subdirs.
6993 (install-only): Invoke "install" target in subdirs.
6994 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6995 targets.
6996 * configure: Rebuild.
6997 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6998 for vasprintf, vsnprintf, or gettimeofday.
6999 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7000 srv_tgtobj.
7001
7002 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7003
7004 * development.sh: Delete.
7005 * Makefile.in (config.status): Adjust dependency on development.sh.
7006 * configure.ac: Adjust development.sh source call.
7007 * configure: Regenerate.
7008
7009 2014-06-02 Pedro Alves <palves@redhat.com>
7010
7011 * ax.c (gdb_free_agent_expr): New function.
7012 * ax.h (gdb_free_agent_expr): New declaration.
7013 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7014 list.
7015 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7016 static.
7017 (clear_breakpoint_conditions_and_commands): New function.
7018 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7019 (clear_breakpoint_conditions_and_commands): New declaration.
7020
7021 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7022
7023 * linux-aarch64-low.c (asm/ptrace.h): Include.
7024
7025 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7026
7027 Fix TLS access for -static -pthread.
7028 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7029 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7030 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7031
7032 2014-05-20 Pedro Alves <palves@redhat.com>
7033
7034 * linux-aarch64-low.c (aarch64_insert_point)
7035 (aarch64_remove_point): No longer check whether the type is
7036 supported here. Adjust to new interface.
7037 (the_low_target): Install aarch64_supports_z_point_type as
7038 supports_z_point_type method.
7039 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7040 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7041 instead of a Z packet char. Adjust.
7042 (arm_supports_z_point_type): New function.
7043 (arm_insert_point, arm_remove_point): Adjust to new interface.
7044 (the_low_target): Install arm_supports_z_point_type.
7045 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7046 (cris_insert_point, cris_remove_point): Adjust to new interface.
7047 Don't check whether the type is supported here.
7048 (the_low_target): Install cris_supports_z_point_type.
7049 * linux-low.c (linux_supports_z_point_type): New function.
7050 (linux_insert_point, linux_remove_point): Adjust to new interface.
7051 * linux-low.h (struct linux_target_ops) <insert_point,
7052 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7053 raw_breakpoint pointer parameter.
7054 <supports_z_point_type>: New method.
7055 * linux-mips-low.c (mips_supports_z_point_type): New function.
7056 (mips_insert_point, mips_remove_point): Adjust to new interface.
7057 Use mips_supports_z_point_type.
7058 (the_low_target): Install mips_supports_z_point_type.
7059 * linux-ppc-low.c (the_low_target): Install NULL as
7060 supports_z_point_type method.
7061 * linux-s390-low.c (the_low_target): Install NULL as
7062 supports_z_point_type method.
7063 * linux-sparc-low.c (the_low_target): Install NULL as
7064 supports_z_point_type method.
7065 * linux-x86-low.c (x86_supports_z_point_type): New function.
7066 (x86_insert_point): Adjust to new insert_point interface. Use
7067 insert_memory_breakpoint. Adjust to new
7068 i386_low_insert_watchpoint interface.
7069 (x86_remove_point): Adjust to remove_point interface. Use
7070 remove_memory_breakpoint. Adjust to new
7071 i386_low_remove_watchpoint interface.
7072 (the_low_target): Install x86_supports_z_point_type.
7073 * lynx-low.c (lynx_target_ops): Install NULL as
7074 supports_z_point_type callback.
7075 * nto-low.c (nto_supports_z_point_type): New.
7076 (nto_insert_point, nto_remove_point): Adjust to new interface.
7077 (nto_target_ops): Install nto_supports_z_point_type.
7078 * mem-break.c: Adjust intro comment.
7079 (struct raw_breakpoint) <raw_type, size>: New fields.
7080 <inserted>: Update comment.
7081 <shlib_disabled>: Delete field.
7082 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7083 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7084 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7085 (raw_bkpt_type_to_target_hw_bp_type): New function.
7086 (find_enabled_raw_code_breakpoint_at): New function.
7087 (find_raw_breakpoint_at): New type and size parameters. Use them.
7088 (insert_memory_breakpoint): New function, based off
7089 set_raw_breakpoint_at.
7090 (remove_memory_breakpoint): New function.
7091 (set_raw_breakpoint_at): Reimplement.
7092 (set_breakpoint): New, based on set_breakpoint_at.
7093 (set_breakpoint_at): Reimplement.
7094 (delete_raw_breakpoint): Go through the_target->remove_point
7095 instead of assuming memory breakpoints.
7096 (find_gdb_breakpoint_at): Delete.
7097 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7098 (find_gdb_breakpoint): New function.
7099 (set_gdb_breakpoint_at): Delete.
7100 (z_type_supported): New function.
7101 (set_gdb_breakpoint_1): New function, loosely based off
7102 set_gdb_breakpoint_at.
7103 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7104 (delete_gdb_breakpoint_at): Delete.
7105 (delete_gdb_breakpoint_1): New function, loosely based off
7106 delete_gdb_breakpoint_at.
7107 (delete_gdb_breakpoint): New function.
7108 (clear_gdb_breakpoint_conditions): Rename to ...
7109 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7110 breakpoint.
7111 (add_condition_to_breakpoint): Make static.
7112 (add_breakpoint_condition): Take a struct breakpoint pointer
7113 instead of an address. Adjust.
7114 (gdb_condition_true_at_breakpoint): Rename to ...
7115 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7116 z_type parameter.
7117 (gdb_condition_true_at_breakpoint): Reimplement.
7118 (add_breakpoint_commands): Take a struct breakpoint pointer
7119 instead of an address. Adjust.
7120 (gdb_no_commands_at_breakpoint): Rename to ...
7121 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7122 parameter. Return true if no breakpoint was found. Change debug
7123 output.
7124 (gdb_no_commands_at_breakpoint): Reimplement.
7125 (run_breakpoint_commands): Rename to ...
7126 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7127 and change return type to boolean.
7128 (run_breakpoint_commands): New function.
7129 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7130 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7131 breakpoint. Go through the_target->remove_point instead of
7132 assuming memory breakpoint.
7133 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7134 software and hardware breakpoints.
7135 (reinsert_raw_breakpoint): Go through the_target->insert_point
7136 instead of assuming memory breakpoint.
7137 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7138 software and hardware breakpoints.
7139 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7140 Check both software and hardware breakpoints.
7141 (validate_inserted_breakpoint): Assert the breakpoint is a
7142 software breakpoint. Set the inserted flag to -1 instead of
7143 setting shlib_disabled.
7144 (delete_disabled_breakpoints): Adjust.
7145 (validate_breakpoints): Only validate software breakpoints.
7146 Adjust to inserted flag change.
7147 (check_mem_read, check_mem_write): Skip breakpoint types other
7148 than software breakpoints. Adjust to inserted flag change.
7149 * mem-break.h (enum raw_bkpt_type): New enum.
7150 (raw_breakpoint, struct process_info): Forward declare.
7151 (Z_packet_to_target_hw_bp_type): Delete declaration.
7152 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7153 (set_gdb_breakpoint, delete_gdb_breakpoint)
7154 (clear_breakpoint_conditions): New declarations.
7155 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7156 (breakpoint_inserted_here): Update comment.
7157 (add_breakpoint_condition, add_breakpoint_commands): Replace
7158 address parameter with a breakpoint pointer parameter.
7159 (gdb_breakpoint_here): Update comment.
7160 (delete_gdb_breakpoint_at): Delete.
7161 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7162 * server.c (process_point_options): Take a struct breakpoint
7163 pointer instead of an address. Adjust.
7164 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7165 delete_gdb_breakpoint.
7166 * spu-low.c (spu_target_ops): Install NULL as
7167 supports_z_point_type method.
7168 * target.h: Include mem-break.h.
7169 (struct target_ops) <prepare_to_access_memory>: Update comment.
7170 <supports_z_point_type>: New field.
7171 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7172 instead of a char. Also take a raw breakpoint pointer.
7173 * win32-arm-low.c (the_low_target): Install NULL as
7174 supports_z_point_type.
7175 * win32-i386-low.c (i386_supports_z_point_type): New function.
7176 (i386_insert_point, i386_remove_point): Adjust to new interface.
7177 (the_low_target): Install i386_supports_z_point_type.
7178 * win32-low.c (win32_supports_z_point_type): New function.
7179 (win32_insert_point, win32_remove_point): Adjust to new interface.
7180 (win32_target_ops): Install win32_supports_z_point_type.
7181 * win32-low.h (struct win32_target_ops):
7182 <supports_z_point_type>: New method.
7183 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7184 instead of a char. Also take a raw breakpoint pointer.
7185
7186 2014-05-20 Pedro Alves <palves@redhat.com>
7187
7188 * mem-break.h: Include break-common.h.
7189 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7190 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7191 (Z_packet_to_target_hw_bp_type): New declaration.
7192 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7193 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7194 (Z_PACKET_ACCESS_WP): Delete macros.
7195 (Z_packet_to_hw_type): Delete function.
7196 * i386-low.h: Don't include break-common.h here.
7197 (Z_packet_to_hw_type): Delete declaration.
7198 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7199 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7200 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7201 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7202 * linux-aarch64-low.c: Don't include break-common.h here.
7203 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7204 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7205 (Z_packet_to_target_hw_bp_type): Delete function.
7206 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7207 function.
7208 (mips_insert_point, mips_remove_point): Use
7209 Z_packet_to_target_hw_bp_type.
7210
7211 2014-05-20 Pedro Alves <palves@redhat.com>
7212
7213 * linux-aarch64-low.c: Include break-common.h.
7214 (enum target_point_type): Delete.
7215 (Z_packet_to_point_type): Rename to ...
7216 (Z_packet_to_target_hw_bp_type): ... this, and return a
7217 target_hw_bp_type instead.
7218 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7219 instead of an enum target_point_type.
7220 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7221 breakpoint type.
7222 (aarch64_dr_state_insert_one_point)
7223 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7224 (aarch64_handle_aligned_watchpoint)
7225 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7226 Take an enum target_hw_bp_type instead of an enum
7227 target_point_type.
7228 (aarch64_supports_z_point_type): New function.
7229 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7230 use Z_packet_to_target_hw_bp_type.
7231
7232 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7233
7234 * configure.ac: Only use -Werror by default when DEVELOPMENT
7235 is true.
7236 * configure: Regenerate.
7237
7238 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7239
7240 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7241 * linux-x86-low.c (X86_64_USER_REGS): New.
7242 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7243
7244 2014-04-28 Yao Qi <yao@codesourcery.com>
7245
7246 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7247 name.
7248
7249 2014-04-25 Pedro Alves <palves@redhat.com>
7250
7251 PR server/16255
7252 * linux-low.c (linux_attach_fail_reason_string): New function.
7253 (linux_attach_lwp): Delete.
7254 (linux_attach_lwp_1): Rename to ...
7255 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7256 argument. Remove "initial" parameter. Return int instead of
7257 void. Don't error or warn here.
7258 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7259 failure to attach to the tgid. Call warning when failing to
7260 attach to an lwp.
7261 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7262 argument. Remove "initial" parameter. Return int instead of
7263 void. Don't error or warn here.
7264 (linux_attach_fail_reason_string): New declaration.
7265 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7266 interface change. Use linux_attach_fail_reason_string.
7267
7268 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7269 Walfred Tedeschi <walfred.tedeschi@intel.com>
7270
7271 * Makefile.in: Added rules to handle new files
7272 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7273 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7274 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7275 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7276 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7277 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7278 x32-avx512-linux.o.
7279 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7280 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7281 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7282 i386/x32-avx512.xml.
7283 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7284 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7285 i386/x32-avx512-linux.xml.
7286 * i387-fp.c (num_avx512_k_registers): New constant for number
7287 of K registers.
7288 (num_avx512_zmmh_low_registers): New constant for number of
7289 lower ZMM registers (0-15).
7290 (num_avx512_zmmh_high_registers): New constant for number of
7291 higher ZMM registers (16-31).
7292 (num_avx512_ymmh_registers): New contant for number of higher
7293 YMM registers (ymm16-31 added by avx521 on x86_64).
7294 (num_avx512_xmm_registers): New constant for number of higher
7295 XMM registers (xmm16-31 added by AVX512 on x86_64).
7296 (struct i387_xsave): Add space for AVX512 registers.
7297 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7298 Add code to handle AVX512 registers.
7299 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7300 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7301 prototypei from generated file.
7302 (tdesc_amd64_avx512_linux): Likewise.
7303 (init_registers_x32_avx512_linux): Likewise.
7304 (tdesc_x32_avx512_linux): Likewise.
7305 (init_registers_i386_avx512_linux): Likewise.
7306 (tdesc_i386_avx512_linux): Likewise.
7307 (x86_64_regmap): Add AVX512 registers.
7308 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7309 mask.
7310 (initialize_low_arch): Add code to initialize AVX512 registers.
7311
7312 2014-04-23 Pedro Alves <palves@redhat.com>
7313
7314 * mem-break.c (find_gdb_breakpoint_at): Make static.
7315 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7316
7317 2014-04-23 Pedro Alves <palves@redhat.com>
7318
7319 * i386-low.c: Don't include break-common.h here.
7320 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7321 prototype to take target_hw_bp_type as argument instead of a Z
7322 packet char.
7323 * i386-low.h: Include break-common.h here.
7324 (Z_packet_to_hw_type): Declare.
7325 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7326 prototypes.
7327 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7328 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7329 (x86_remove_point): Convert the packet number to a
7330 target_hw_bp_type before calling i386_low_remove_watchpoint.
7331 * win32-i386-low.c (i386_insert_point): Convert the packet number
7332 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7333 (i386_remove_point): Convert the packet number to a
7334 target_hw_bp_type before calling i386_low_remove_watchpoint.
7335
7336 2014-04-23 Pedro Alves <palves@redhat.com>
7337
7338 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7339
7340 2014-04-10 Pedro Alves <palves@redhat.com>
7341
7342 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7343 Check if the condition or command is NULL before checking if the
7344 breakpoint is known. On success, return true.
7345 * mem-break.h (add_breakpoint_condition): Document return.
7346 (add_breakpoint_commands): Add describing comment.
7347 * server.c (skip_to_semicolon): New function.
7348 (process_point_options): Use it.
7349
7350 2014-04-09 Pedro Alves <palves@redhat.com>
7351
7352 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7353 to lwpid_of.
7354
7355 2014-02-27 Pedro Alves <palves@redhat.com>
7356
7357 PR 12702
7358 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7359 macros.
7360 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7361 output.
7362 (last_thread_of_process_p): Take a PID argument instead of a
7363 thread pointer.
7364 (linux_wait_for_lwp): Delete.
7365 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7366 functions.
7367 (linux_low_filter_event): New function, party factored out from
7368 linux_wait_for_event.
7369 (linux_wait_for_event): Rename to ...
7370 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7371 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7372 sigsuspend. Check for zombie leaders.
7373 (linux_wait_for_event): Reimplement as wrapper around
7374 linux_wait_for_event_filtered.
7375 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7376 a normal or signal exit is seen, it's the whole process exiting.
7377 (wait_for_sigstop): No longer a for_each_inferior callback.
7378 Rewrite on top of linux_wait_for_event_filtered.
7379 (stop_all_lwps): Call wait_for_sigstop directly.
7380 * server.c (resume, handle_target_event): Handle
7381 TARGET_WAITKIND_NO_RESUMED.
7382
7383 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7384
7385 * win32-low.c (psapi_get_dll_name,
7386 * win32_CreateToolhelp32Snapshot): Delete.
7387 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7388 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7389 Delete.
7390 (handle_load_dll): Add function description.
7391 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7392
7393 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7394
7395 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7396 Add comment.
7397 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7398 base address when calling win32_add_one_solib.
7399 (handle_load_dll): Delete local variable load_addr.
7400 Remove 0x1000 offset applied to DLL base address when calling
7401 win32_add_one_solib.
7402 (handle_unload_dll): Add comment.
7403
7404 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7405
7406 * win32-low.c (win32_add_all_dlls): Renames
7407 win32_ensure_ntdll_loaded. Rewrite function documentation.
7408 Adjust implementation to always load all DLLs.
7409 Add 0x1000 offset to DLL base address when calling
7410 win32_add_one_solib.
7411 (child_initialization_done): New static global.
7412 (do_initial_child_stuff): Set child_initialization_done to
7413 zero during child initialization, and 1 after. Replace call
7414 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7415 Add comment.
7416 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7417 (handle_unload_dll): Add function documentation.
7418 (get_child_debug_event): Ignore load and unload DLL events
7419 during child initialization.
7420
7421 2014-02-20 Doug Evans <dje@google.com>
7422
7423 Remove global all_lwps.
7424 * inferiors.h (ptid_of): Move here from linux-low.h.
7425 (pid_of, lwpid_of): Ditto.
7426 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7427 parameter is a struct thread_info * now.
7428 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7429 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7430 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7431 directly.
7432 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7433 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7434 * linux-arm-low.c (update_registers_callback): Update, "entry"
7435 parameter is a struct thread_info * now.
7436 Fetch lwpid from current_inferior directly.
7437 (arm_insert_point): Pass &all_threads to find_inferior instead of
7438 &all_lwps.
7439 (arm_remove_point): Ditto.
7440 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7441 (arm_prepare_to_resume): Fetch pid from thread.
7442 (arm_read_description): Fetch lwpid from current_inferior directly.
7443 * linux-low.c (all_lwps): Delete.
7444 (delete_lwp): Delete call to remove_inferior.
7445 (handle_extended_wait): Fetch lwpid from thread.
7446 (add_lwp): Don't set lwp->entry.id. Remove call to
7447 add_inferior_to_list.
7448 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7449 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7450 (kill_one_lwp_callback): Ditto.
7451 (linux_kill): Don't dereference NULL pointer.
7452 Fetch ptid,lwpid from thread.
7453 (get_detach_signal): Fetch ptid from thread.
7454 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7455 Simplify call to regcache_invalidate_thread.
7456 (delete_lwp_callback): Update, "entry" parameter is a
7457 struct thread_info * now. Fetch pid from thread.
7458 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7459 (status_pending_p_callback): Update, "entry" parameter is a
7460 struct thread_info * now. Fetch ptid from thread.
7461 (find_lwp_pid): Update, "entry" parameter is a
7462 struct thread_info * now.
7463 (linux_wait_for_lwp): Fetch pid from thread.
7464 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7465 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7466 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7467 (dequeue_one_deferred_signal): Ditto.
7468 (cancel_breakpoint): Fetch ptid from current_inferior.
7469 (linux_wait_for_event): Pass &all_threads to find_inferior,
7470 not &all_lwps. Fetch ptid, lwpid from thread.
7471 (count_events_callback): Update, "entry" parameter is a
7472 struct thread_info * now.
7473 (select_singlestep_lwp_callback): Ditto.
7474 (select_event_lwp_callback): Ditto.
7475 (cancel_breakpoints_callback): Ditto.
7476 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7477 not &all_lwps.
7478 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7479 (unsuspend_one_lwp): Update, "entry" parameter is a
7480 struct thread_info * now.
7481 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7482 not &all_lwps.
7483 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7484 Fetch lwpid from thread, not lwp.
7485 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7486 Pass &all_threads to find_inferior, not &all_lwps.
7487 (send_sigstop): Fetch lwpid from thread, not lwp.
7488 (send_sigstop_callback): Update, "entry" parameter is a
7489 struct thread_info * now.
7490 (suspend_and_send_sigstop_callback): Ditto.
7491 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7492 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7493 struct thread_info * now.
7494 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7495 from thread, lwp.
7496 (lwp_running): Update, "entry" parameter is a
7497 struct thread_info * now.
7498 (stop_all_lwps): Fetch ptid from thread.
7499 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7500 (linux_resume_one_lwp): Fetch lwpid from thread.
7501 (linux_set_resume_request): Update, "entry" parameter is a
7502 struct thread_info * now. Fetch pid, lwpid from thread.
7503 (resume_status_pending_p): Update, "entry" parameter is a
7504 struct thread_info * now.
7505 (need_step_over_p): Ditto. Fetch lwpid from thread.
7506 (start_step_over): Fetch lwpid from thread.
7507 (linux_resume_one_thread): Update, "entry" parameter is a
7508 struct thread_info * now. Fetch lwpid from thread.
7509 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7510 (proceed_one_lwp): Update, "entry" parameter is a
7511 struct thread_info * now. Fetch lwpid from thread.
7512 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7513 struct thread_info * now.
7514 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7515 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7516 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7517 directly.
7518 (regsets_store_inferior_registers): Ditto.
7519 (fetch_register, store_register): Ditto.
7520 (linux_read_memory, linux_write_memory): Ditto.
7521 (linux_request_interrupt): Ditto.
7522 (linux_read_auxv): Ditto.
7523 (linux_xfer_siginfo): Ditto.
7524 (linux_qxfer_spu): Ditto.
7525 (linux_qxfer_libraries_svr4): Ditto.
7526 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7527 moved to inferiors.h.
7528 (get_lwp): Delete.
7529 (get_thread_lwp): Update.
7530 (struct lwp_info): Delete member "entry". Simplify comment for
7531 member "thread".
7532 (all_lwps): Delete.
7533 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7534 current_inferior directly.
7535 (update_watch_registers_callback): Update, "entry" parameter is a
7536 struct thread_info * now. Fetch pid from thread.
7537 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7538 (mips_insert_point): Fetch lwpid from current_inferior.
7539 Pass &all_threads to find_inferior, not &all_lwps.
7540 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7541 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7542 directly.
7543 (mips_stopped_data_address): Ditto.
7544 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7545 directly.
7546 * linux-tile-low.c (tile_arch_setup): Ditto.
7547 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7548 (update_debug_registers_callback): Update, "entry" parameter is a
7549 struct thread_info * now. Fetch pid from thread.
7550 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7551 Pass &all_threads to find_inferior, not &all_lwps.
7552 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7553 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7554 Pass &all_threads to find_inferior, not &all_lwps.
7555 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7556 (i386_dr_low_get_status): Ditto.
7557 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7558 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7559 (x86_linux_read_description): Ditto.
7560 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7561
7562 2014-02-20 Doug Evans <dje@google.com>
7563
7564 * inferiors.c (get_first_inferior): Fix buglet.
7565
7566 2014-02-19 Doug Evans <dje@google.com>
7567
7568 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7569 * inferiors.c (add_thread): Change result type to struct thread_info *.
7570 All callers updated.
7571 (add_lwp): Call add_thread here instead of in callers.
7572 All callers updated.
7573 * linux-low.h (get_lwp_thread): Rewrite.
7574 (struct lwp_info): New member "thread".
7575
7576 2014-02-19 Doug Evans <dje@google.com>
7577
7578 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7579 All callers updated.
7580
7581 2014-02-19 Doug Evans <dje@google.com>
7582
7583 * inferiors.c (add_thread): Fix whitespace.
7584
7585 2014-02-19 Doug Evans <dje@google.com>
7586
7587 * dll.c (clear_dlls): Replace accessing list implemention details
7588 with API function.
7589 * gdbthread.h (get_first_thread): Declare.
7590 * inferiors.c (for_each_inferior_with_data): New function.
7591 (get_first_thread): New function.
7592 (find_thread_ptid): Simplify.
7593 (get_first_inferior): New function.
7594 (clear_list): Delete.
7595 (one_inferior_p): New function.
7596 (clear_inferior_list): New function.
7597 (clear_inferiors): Update.
7598 * inferiors.h (for_each_inferior_with_data): Declare.
7599 (clear_inferior_list): Declare.
7600 (one_inferior_p): Declare.
7601 (get_first_inferior): Declare.
7602 * linux-low.c (linux_wait_for_event): Replace accessing list
7603 implemention details with API function.
7604 * server.c (target_running): Ditto.
7605 (accumulate_file_name_length): New function.
7606 (emit_dll_description): New function.
7607 (handle_qxfer_libraries): Replace accessing list implemention
7608 details with API function.
7609 (handle_qxfer_threads_worker): New function.
7610 (handle_qxfer_threads_proper): Replace accessing list implemention
7611 details with API function.
7612 (handle_query): Ditto.
7613 (visit_actioned_threads_callback_ftype): New typedef.
7614 (visit_actioned_threads_data): New struct.
7615 (visit_actioned_threads): Rewrite to be find_inferior callback.
7616 (resume): Call find_inferior.
7617 (handle_status): Replace accessing list implemention
7618 details with API function.
7619 (process_serial_event): Replace accessing list implemention details
7620 with API function.
7621 * target.c (set_desired_inferior): Replace accessing list implemention
7622 details with API function.
7623 * tracepoint.c (same_process_p): New function.
7624 (gdb_agent_about_to_close): Replace accessing list implemention
7625 details with API function.
7626 * win32-low.c (child_delete_thread): Replace accessing list
7627 implemention details with API function.
7628 (match_dll_by_basename): New function.
7629 (dll_is_loaded_by_basename): New function.
7630 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7631 details call to dll_is_loaded_by_basename.
7632
7633 2014-02-19 Doug Evans <dje@google.com>
7634
7635 * dll.h (struct dll_info): Add comment.
7636 * gdbthread.h (struct thread_info): Add comment.
7637 (current_ptid): Simplify.
7638 * inferiors.c (add_process): Update.
7639 (remove_process): Update.
7640 * inferiors.h (struct process_info): Rename member "head" to "entry".
7641 * linux-low.c (delete_lwp): Update.
7642 (add_lwp): Update.
7643 (last_thread_of_process_p): Update.
7644 (kill_one_lwp_callback, linux_kill): Update.
7645 (status_pending_p_callback): Update.
7646 (wait_for_sigstop): Update. Simplify read of ptid.
7647 (start_step_over): Update.
7648 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7649 (get_lwp_thread): Update.
7650 (struct lwp_info): Rename member "head" to "entry".
7651 * regcache.h (inferior_list_entry): Delete.
7652 * server.c (kill_inferior_callback): Update.
7653 (detach_or_kill_inferior_callback): Update.
7654 (print_started_pid): Update.
7655 (print_attached_pid): Update.
7656 (process_serial_event): Simplify read of ptid.
7657 * thread-db.c (thread_db_create_event): Update.
7658 (thread_db_get_tls_address): Update.
7659 * win32-low.c (current_inferior_ptid): Simplify.
7660
7661 2014-02-19 Tom Tromey <tromey@redhat.com>
7662
7663 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7664 argument.
7665 (target_supports_btrace): Update.
7666
7667 2014-02-14 Yao Qi <yao@codesourcery.com>
7668
7669 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7670 (rsp-low-ipa.o): New target.
7671
7672 2014-02-12 Tom Tromey <tromey@redhat.com>
7673
7674 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7675 convert_ascii_to_int.
7676 * regcache.c (registers_to_string): Likewise.
7677 * remote-utils.c (decode_M_packet): Likewise.
7678 * server.c (process_serial_event): Likewise.
7679
7680 2014-02-12 Tom Tromey <tromey@redhat.com>
7681
7682 * server.c (handle_query, handle_v_run): Use hex2bin, not
7683 unhexify.
7684 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7685
7686 2014-02-12 Tom Tromey <tromey@redhat.com>
7687
7688 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7689 convert_int_to_ascii.
7690 * regcache.c (registers_to_string, collect_register_as_string):
7691 Likewise.
7692 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7693 Likewise.
7694 * server.c (process_serial_event): Likewise.
7695 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7696 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7697
7698 2014-02-12 Tom Tromey <tromey@redhat.com>
7699
7700 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7701 bin2hex, not hexify.
7702 * tracepoint.c (cmd_qtstatus): Likewise.
7703
7704 2014-02-12 Tom Tromey <tromey@redhat.com>
7705
7706 * remote-utils.c (monitor_output): Pass explicit length to
7707 hexify.
7708
7709 2014-02-12 Tom Tromey <tromey@redhat.com>
7710
7711 * tracepoint.c: Include rsp-low.h.
7712 * server.c: Include rsp-low.h.
7713 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7714 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7715 declare.
7716 * remote-utils.c: Include rsp-low.h.
7717 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7718 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7719 (convert_int_to_ascii, convert_ascii_to_int): Move to
7720 common/rsp-low.c.
7721 * regcache.c: Include rsp-low.h.
7722 * ax.c: Include rsp-low.h.
7723 * Makefile.in (SFILES): Add common/rsp-low.c.
7724 (OBS): Add rsp-low.o.
7725 (rsp-low.o): New target.
7726
7727 2014-02-12 Tom Tromey <tromey@redhat.com>
7728
7729 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7730 Include print-utils.h.
7731 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7732 (plongest, thirty_two, phex_nz): Remove.
7733 * Makefile.in (SFILES): Add common/print-utils.c.
7734 (OBS): Add print-utils.o.
7735 (print-utils-ipa.o): New target.
7736 (print-utils.o): New target.
7737 (IPA_OBJS): Add print-utils-ipa.o.
7738
7739 2014-02-06 Tom Tromey <tromey@redhat.com>
7740
7741 * Makefile.in (SFILES): Fix indentation.
7742
7743 2014-02-05 Doug Evans <dje@google.com>
7744
7745 * linux-low.c (linux_wait_for_event): Improve comment.
7746 (linux_wait_1): Keep current_inferior in sync with event_child.
7747
7748 2014-01-22 Doug Evans <dje@google.com>
7749
7750 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7751
7752 2014-01-22 Doug Evans <dje@google.com>
7753
7754 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7755 * configure: Regenerate.
7756 * config.in: Regenerate.
7757 * Makefile.in (SFILES): Add debug.c.
7758 (OBS): Add debug.o.
7759 * debug.c: New file.
7760 * debug.h: New file.
7761 * linux-aarch64-low.c (*): Update all debugging printfs to use
7762 debug_printf instead of fprintf.
7763 * linux-arm-low.c (*): Ditto.
7764 * linux-cris-low.c (*): Ditto.
7765 * linux-crisv32-low.c (*): Ditto.
7766 * linux-m32r-low.c (*): Ditto.
7767 * linux-sparc-low.c (*): Ditto.
7768 * linux-x86.c (*): Ditto.
7769 * linux-low.c (*): Ditto.
7770 (linux_wait_1): Add calls to debug_enter, debug_exit.
7771 (linux_wait): Remove redundant debugging printf.
7772 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7773 (linux_resume, unstop_all_lwps): Ditto.
7774 * mem-break.c (*): Update all debugging printfs to use
7775 debug_printf instead of fprintf.
7776 * remote-utils.c (*): Ditto.
7777 * thread-db.c (*): Ditto.
7778 * server.c #include <ctype.h>, "gdb_vecs.h".
7779 (debug_threads): Moved to debug.c.
7780 (*): Update all debugging printfs to use debug_printf instead of
7781 fprintf.
7782 (start_inferior): Replace call to fflush with call to debug_flush.
7783 (monitor_show_help): Mention set debug-format.
7784 (parse_debug_format_options): New function.
7785 (handle_monitor_command): Handle "monitor set debug-format".
7786 (gdbserver_usage): Mention --debug-format.
7787 (main): Parse --debug-format.
7788 * server.h (debug_threads): Declaration moved to debug.h.
7789 #include "debug.h".
7790 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7791 trace_debug_1 that uses debug_printf.
7792 (tracepoint_look_up_symbols): Update all debugging printfs to use
7793 debug_printf instead of fprintf.
7794
7795 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7796
7797 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7798 sys/ptrace.h.
7799
7800 2014-01-17 Pedro Alves <palves@redhat.com>
7801
7802 PR build/16445
7803 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7804 defined after including gdb_proc_service.h.
7805
7806 2014-01-16 Doug Evans <dje@google.com>
7807
7808 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7809 (match_dll): Use it.
7810
7811 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7812
7813 * target.h (target_ops) <read_btrace>: Change parameters and
7814 return type to allow error reporting.
7815 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7816 trace reading errors on.
7817 * linux-low.c (linux_low_read_btrace): Pass trace reading
7818 errors on.
7819 (linux_low_disable_btrace): New.
7820
7821 2014-01-15 Doug Evans <dje@google.com>
7822
7823 * inferiors.c (thread_id_to_gdb_id): Delete.
7824 * inferiors.h (thread_id_to_gdb_id): Delete.
7825
7826 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7827
7828 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7829 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7830 versions.
7831
7832 2014-01-08 Pedro Alves <palves@redhat.com>
7833
7834 * server.c (handle_status): Don't discard previous queued stop
7835 replies or thread's pending status here.
7836 (main) <disconnection>: Do it here instead.
7837
7838 2014-01-08 Pedro Alves <palves@redhat.com>
7839
7840 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7841 * server.c (visit_actioned_threads, handle_pending_status): New
7842 function.
7843 (handle_v_cont): Factor out parts to ...
7844 (resume): ... this new function. If in all-stop, and a thread
7845 being resumed has a pending status, report it without actually
7846 resuming.
7847 (myresume): Adjust to use the new 'resume' function.
7848 (clear_pending_status_callback, set_pending_status_callback)
7849 (find_status_pending_thread_callback): New functions.
7850 (handle_status): Handle the case of multiple threads having
7851 interesting statuses to report. Report threads' real last signal
7852 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7853 with an interesting thread to report the status for, instead of
7854 always reporting the status of the first thread.
7855
7856 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7857
7858 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7859 * gdbreplay.c (gdbreplay_version): Likewise.
7860
7861 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7862
7863 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7864 iov.iov_len with the real length in use.
7865
7866 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7867
7868 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7869 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7870 for all targets that use win32-low.c.
7871 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7872 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7873
7874 2013-12-13 Pedro Alves <palves@redhat.com>
7875
7876 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7877 if equal to TARGET_WAITKIND_LOADED.
7878 * win32-low.c (cached_status): New static global.
7879 (win32_wait): Add declaration.
7880 (do_initial_child_stuff): Flush all initial pending debug events
7881 up to the initial breakpoint.
7882 (win32_wait): If CACHED_STATUS was set, return that instead
7883 of doing a real wait. Remove the code resuming the execution
7884 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7885 during the initial phase. Also remove the code changing
7886 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7887 TARGET_WAITKIND_STOPPED.
7888
7889 2013-12-11 Yao Qi <yao@codesourcery.com>
7890
7891 * notif.c (handle_notif_ack): Return 0 if no notification
7892 matches.
7893
7894 2013-11-20 Doug Evans <dje@google.com>
7895
7896 * linux-low.c (linux_set_resume_request): Fix comment.
7897
7898 2013-11-20 Doug Evans <dje@google.com>
7899
7900 * linux-low.c (resume_status_pending_p): Tweak comment.
7901
7902 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7903
7904 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7905 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7906 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7907 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7908 (srv_amd64_regobj): Add amd64-mpx.o.
7909 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7910 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7911 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7912 * i387-fp.c (num_pl_bnd_register) Added constant.
7913 (num_pl_bnd_cfg_registers) Added constant.
7914 (struct i387_xsave) Added reserved area and MPX fields.
7915 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7916 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7917 function.
7918 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7919 (init_registers_amd64_mpx_linux): Declare new function.
7920 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7921 (x86_64_regmap): Add MPX registers.
7922 (x86_linux_read_description): Add MPX case.
7923 (initialize_low_arch): Initialize MPX targets.
7924
7925 2013-11-18 Tom Tromey <tromey@redhat.com>
7926
7927 * configure: Rebuild.
7928 * configure.ac: Don't check for stdlib.h.
7929 * gdbreplay.c: Unconditionally include stdlib.h.
7930
7931 2013-11-18 Tom Tromey <tromey@redhat.com>
7932
7933 * config.in: Rebuild.
7934 * configure: Rebuild.
7935 * configure.ac: Don't use AC_HEADER_DIRENT.
7936
7937 2013-11-18 Tom Tromey <tromey@redhat.com>
7938
7939 * server.h: Don't check HAVE_STRING_H.
7940 * gdbreplay.c: Don't check HAVE_STRING_H.
7941 * configure: Rebuild.
7942
7943 2013-11-18 Tom Tromey <tromey@redhat.com>
7944
7945 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7946 LIBGNU.
7947
7948 2013-11-08 Tom Tromey <tromey@redhat.com>
7949
7950 * configure, config.in: Rebuild.
7951 * configure.ac: Remove unused configury.
7952
7953 2013-11-08 Tom Tromey <tromey@redhat.com>
7954
7955 * acinclude.m4: Include common.m4, codeset.m4.
7956 * configure, config.in: Rebuild.
7957 * configure.ac: Use GDB_AC_COMMON.
7958
7959 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7960
7961 * linux-s390-low.c (HWCAP_S390_TE): New define.
7962 (s390_arch_setup): Consider the TE field in the HWCAP for
7963 determining 'have_regset_tdb'.
7964
7965 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7966
7967 PR gdb/16014
7968 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7969 call to sizeof.
7970
7971 2013-10-02 Pedro Alves <palves@redhat.com>
7972
7973 * server.c (process_serial_event): Don't output "GDBserver
7974 exiting" if GDB is connected through stdio.
7975 * target.c (mywait): Likewise, be silent if GDB is connected
7976 through stdio.
7977
7978 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7979
7980 * lynx-low.c (lynx_add_threads_after_attach): New function.
7981 (lynx_attach): Remove call to add_thread. Add call to
7982 lynx_add_threads_after_attach instead.
7983
7984 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7985
7986 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7987 * config.in, configure: Regenerated.
7988
7989 2013-09-18 Yao Qi <yao@codesourcery.com>
7990
7991 PR server/15959
7992 * server.c (start_inferior): Clear 'resume_info'.
7993
7994 2013-09-16 Jiong Wang <jiwang@tilera.com>
7995
7996 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7997 for each register.
7998
7999 2013-09-16 Jiong Wang <jiwang@tilera.com>
8000
8001 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8002 linux-tile-low.o to srv_tgtobj.
8003
8004 2013-09-16 Will Newton <will.newton@linaro.org>
8005
8006 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8007 out regs.
8008
8009 2013-09-06 Pedro Alves <palves@redhat.com>
8010
8011 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8012 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8013 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8014 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8015 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8016 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8017
8018 2013-09-06 Pedro Alves <palves@redhat.com>
8019
8020 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8021 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8022
8023 2013-09-06 Pedro Alves <palves@redhat.com>
8024
8025 * linux-amd64-ipa.c: Include tracepoint.h.
8026 * linux-i386-ipa.c: Include tracepoint.h.
8027
8028 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8029
8030 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8031 (ps_get_thread_area): New function.
8032
8033 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8034
8035 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8036 (initialize_low_arch): Call init_registers_crisv32 rather than
8037 init_register_crisv32.
8038
8039 2013-09-05 Pedro Alves <palves@redhat.com>
8040
8041 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8042 to ...
8043 * hostio.h: ... this new file.
8044 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8045 win32-low.c: Include hostio.h.
8046
8047 2013-09-05 Pedro Alves <palves@redhat.com>
8048
8049 * server.h (gdb_client_data, handler_func, callback_handler_func)
8050 (delete_file_handler, add_file_handler, append_callback_event)
8051 (delete_callback_event, start_event_loop, initialize_event_loop):
8052 Move to event-loop.h and include it.
8053 * event-loop.h: New file.
8054
8055 2013-09-05 Pedro Alves <palves@redhat.com>
8056
8057 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8058 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8059 (loaded_dll, unloaded_dll): Move to ...
8060 * dll.h: ... this new file.
8061 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8062
8063 2013-09-05 Pedro Alves <palves@redhat.com>
8064
8065 * server.h (current_process, get_thread_process, all_processes)
8066 (add_inferior_to_list, for_each_inferior, current_inferior)
8067 (remove_inferior, add_process, remove_process, find_process_pid)
8068 (have_started_inferiors_p, have_attached_inferiors_p)
8069 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8070 (clear_inferiors, find_inferior, find_inferior_id)
8071 (inferior_target_data, set_inferior_target_data)
8072 (inferior_regcache_data, set_inferior_regcache_data): Move to
8073 inferiors.h, and include it.
8074 * inferiors.h: New file.
8075
8076 2013-09-05 Pedro Alves <palves@redhat.com>
8077
8078 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8079 Move ...
8080 * ax.h: ... here.
8081
8082 2013-09-05 Pedro Alves <palves@redhat.com>
8083
8084 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8085 tracepoint.h.
8086 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8087 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8088 (handle_tracepoint_general_set, handle_tracepoint_query)
8089 (tracepoint_finished_step, tracepoint_was_hit)
8090 (release_while_stepping_state_list, current_traceframe)
8091 (in_readonly_region, traceframe_read_mem)
8092 (fetch_traceframe_registers, traceframe_read_sdata)
8093 (traceframe_read_info, struct fast_tpoint_collect_status)
8094 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8095 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8096 (supply_fast_tracepoint_registers)
8097 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8098 (ipa_tdesc, claim_trampoline_space)
8099 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8100 (agent_mem_read, agent_get_trace_state_variable_value)
8101 (agent_set_trace_state_variable_value, agent_tsv_read)
8102 (agent_mem_read_string, get_raw_reg_func_addr)
8103 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8104 * tracepoint.h: ... this new file.
8105
8106 2013-09-05 Pedro Alves <palves@redhat.com>
8107
8108 * server.h (perror_with_name, error, fatal, warning, paddress)
8109 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8110 include it.
8111 * utils.h: New file.
8112
8113 2013-09-05 Pedro Alves <palves@redhat.com>
8114
8115 * server.h (remote_debug, noack_mode, transport_is_reliable)
8116 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8117 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8118 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8119 (write_enn, initialize_async_io, enable_async_io)
8120 (disable_async_io, check_remote_input_interrupt_request)
8121 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8122 (dead_thread_notify, prepare_resume_reply)
8123 (decode_address_to_semicolon, decode_address, decode_m_packet)
8124 (decode_M_packet, decode_X_packet, decode_xfer_write)
8125 (decode_search_memory_packet, unhexify, hexify)
8126 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8127 (look_up_one_symbol, relocate_instruction)
8128 (monitor_output): Move to remote-utils.h, and include it.
8129 * remote-utils.h: New file.
8130
8131 2013-09-05 Pedro Alves <palves@redhat.com>
8132
8133 * server.h (_): Delete.
8134
8135 2013-09-02 Pedro Alves <palves@redhat.com>
8136
8137 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8138 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8139 allocated.
8140 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8141
8142 2013-09-02 Pierre Muller <muller@sourceware.org>
8143
8144 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8145 or WriteProcessMemory complete successfully and handle
8146 ERROR_PARTIAL_COPY error.
8147
8148 2013-09-02 Pedro Alves <palves@redhat.com>
8149
8150 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8151 error instead of EIO.
8152
8153 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8154
8155 PR server/15604
8156 * linux-low.c: Include filestuff.h.
8157 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8158 * lynx-low.c: Include filestuff.h.
8159 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8160 * server.c: Include filestuff.h.
8161 (main): Call notice_open_fds.
8162 * spu-low.c: Include filestuff.h.
8163 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8164
8165 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8166
8167 * Makefile.in: Explain why ../target and ../nat are not
8168 listed as include file search paths.
8169 (linux-waitpid.o): New object file rule.
8170 * configure.srv (srv_native_linux_obj): New variable.
8171 Replace all occurrences of linux native object files with
8172 $srv_native_linux_obj.
8173 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8174 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8175 (linux_enable_event_reporting): Remove declaration.
8176 (my_waitpid): Moved to common/linux-waitpid.c.
8177 (linux_wait_for_event): Pass ptid when calling
8178 linux_enable_event_reporting.
8179 (linux_supports_tracefork_flag): Remove.
8180 (linux_enable_event_reporting): Likewise.
8181 (linux_tracefork_grandchild): Remove.
8182 (STACK_SIZE): Moved to common/linux-ptrace.c.
8183 (linux_tracefork_child): Remove.
8184 (linux_test_for_tracefork): Remove.
8185 (linux_look_up_symbols): Call linux_supports_traceclone.
8186 (initialize_low): Remove call to linux_test_for_tracefork.
8187 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8188 common/linux-ptrace.h.
8189 (PTRACE_TYPE_ARG4): Likewise.
8190 Include linux-ptrace.h.
8191
8192 2013-08-21 Pedro Alves <palves@redhat.com>
8193
8194 * config.in: Renegerate.
8195
8196 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8197
8198 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8199 (SFILES): Remove $(srcdir)/common/target-common.c and
8200 add $(srcdir)/target/waitstatus.c.
8201 (OBS): Remove target-common.o and add waitstatus.o.
8202 (server_h): Remove $(srcdir)/../common/target-common.h and
8203 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8204 and $(srcdir)/../target/waitstatus.h.
8205 (target-common.o): Remove.
8206 (waitstatus.o): New target object file.
8207 * target.h: Do not include target-common.h and
8208 include target/resume.h, target/wait.h and
8209 target/waitstatus.h.
8210
8211 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8212
8213 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8214 to PTRACE_TYPE_ARG3.
8215 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8216 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8217 PTRACE_TYPE_ARG4.
8218 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8219 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8220
8221 2013-07-27 Jie Zhang <jie@codesourcery.com>
8222 Daniel Jacobowitz <dan@codesourcery.com>
8223 Yao Qi <yao@codesourcery.com>
8224
8225 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8226 (mips-linux-watch.o): New rule.
8227 (mips_linux_watch_h): New variable.
8228 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8229 srv_tgtobj.
8230 * linux-mips-low.c: Include mips-linux-watch.h.
8231 (struct arch_process_info, struct arch_lwp_info): New.
8232 (update_watch_registers_callback): New function.
8233 (mips_linux_new_process, mips_linux_new_thread) New functions.
8234 (mips_linux_prepare_to_resume, mips_insert_point): New
8235 functions.
8236 (mips_remove_point, mips_stopped_by_watchpoint): New
8237 functions.
8238 (rsp_bp_type_to_target_hw_bp_type): New function.
8239 (mips_stopped_data_address): New function.
8240 (the_low_target): Add watchpoint support functions.
8241
8242 2013-07-27 Yao Qi <yao@codesourcery.com>
8243
8244 * i386-low.c: Include break-common.h.
8245 (enum target_hw_bp_type): Remove.
8246
8247 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8248
8249 * Makefile.in (SFILES): /common/target-common.c.
8250 (OBS): Add target-common.o.
8251 (server_h): Add $(srcdir)/../common/target-common.h.
8252 (target-common.o): New target.
8253 * server.c (queue_stop_reply_callback): Free
8254 status string after use.
8255 * target.c (target_waitstatus_to_string): Remove.
8256 * target.h: Include target-common.h.
8257 (resume_kind): Likewise.
8258 (target_waitkind): Likewise.
8259 (target_waitstatus): Likewise.
8260 (TARGET_WNOHANG): Likewise.
8261
8262 2013-07-04 Yao Qi <yao@codesourcery.com>
8263
8264 * Makefile.in (host_alias): Use @host_noncanonical@.
8265 (target_alias): Use @target_noncanonical@.
8266 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8267 ACX_NONCANONICAL_HOST.
8268 * configure: Regenerated.
8269
8270 Revert:
8271 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8272
8273 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8274 * configure: Rebuild.
8275 * Makefile.in (version_host, version_target): Get from configure.
8276 (version.c): Use $(version_host) and $(version_target).
8277
8278 2013-07-03 Pedro Alves <palves@redhat.com>
8279
8280 * Makefile.in (config.status): Depend on development.sh.
8281 * acinclude.m4: Include libmcheck.m4.
8282 * configure: Regenerate.
8283
8284 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8285
8286 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8287 attribute inside the parentheses.
8288 (winapi_DebugSetProcessKillOnExit): Ditto.
8289 (winapi_DebugBreakProcess): Ditto.
8290 (winapi_GenerateConsoleCtrlEvent): Ditto.
8291
8292 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8293
8294 * notif.h (notif_event): Add a dummy member to avoid compiler
8295 errors.
8296
8297 2013-07-01 Pedro Alves <palves@redhat.com>
8298
8299 * hostio.c (HOSTIO_PATH_MAX): Define.
8300 (require_filename, handle_open, handle_unlink, handle_readlink):
8301 Use it.
8302
8303 2013-07-01 Pedro Alves <palves@redhat.com>
8304
8305 * server.h: Include "pathmax.h".
8306 * linux-low.c: Don't include sys/param.h.
8307 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8308 MAXPATHLEN.
8309 * win32-low.c: Don't include sys/param.h.
8310 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8311
8312 2013-07-01 Pedro Alves <palves@redhat.com>
8313
8314 * event-loop.c: Don't check HAVE_UNISTD_H before including
8315 <unistd.h>.
8316 * gdbreplay.c: Likewise.
8317 * remote-utils.c: Likewise.
8318 * server.c: Likewise.
8319 * configure.ac: Don't check for unistd.h.
8320 * configure: Regenerate.
8321
8322 2013-06-28 Tom Tromey <tromey@redhat.com>
8323
8324 * Makefile.in (version.c): Use version.in, not
8325 common/version.in.
8326
8327 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8328
8329 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8330 * configure: Rebuild.
8331 * Makefile.in (version_host, version_target): Get from configure.
8332 (version.c): Use $(version_host) and $(version_target).
8333
8334 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8335
8336 Fix trace-status to output user name without trailing colon.
8337 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8338
8339 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8340
8341 Fix trace-status to output proper start-time and stop-time.
8342 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8343 output start time and stop time in hex as gdb expects.
8344
8345 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8346
8347 * tracepoint.c (build_traceframe_info_xml): Output trace state
8348 variables present in the trace buffer.
8349
8350 2013-06-24 Tom Tromey <tromey@redhat.com>
8351
8352 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8353 create-version.sh.
8354 (version.o): Remove.
8355 * gdbreplay.c: Include version.h.
8356 (version, host_name): Don't declare.
8357 * server.h: Include version.h.
8358 (version, host_name): Don't declare.
8359
8360 2013-06-12 Pedro Alves <palves@redhat.com>
8361
8362 * linux-x86-low.c (linux_is_elf64): Delete global.
8363 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8364 with local linux_pid_exe_is_elf_64_file use.
8365
8366 2013-06-11 Pedro Alves <palves@redhat.com>
8367
8368 * linux-low.c (regset_disabled, disable_regset): New functions.
8369 (regsets_fetch_inferior_registers)
8370 (regsets_store_inferior_registers): Use them.
8371 (initialize_regsets_info); Don't allocate the disabled_regsets
8372 array here.
8373 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8374 comment.
8375
8376 2013-06-11 Pedro Alves <palves@redhat.com>
8377
8378 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8379 xmalloc.
8380
8381 2013-06-11 Pedro Alves <palves@redhat.com>
8382
8383 * linux-x86-low.c (initialize_low_arch): Call
8384 init_registers_x32_avx_linux.
8385
8386 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8387
8388 Fix compatibility with Android Bionic.
8389 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8390 it is not empty.
8391
8392 2013-06-07 Pedro Alves <palves@redhat.com>
8393
8394 PR server/14823
8395 * Makefile.in (OBS): Add tdesc.o.
8396 (IPA_OBJS): Add tdesc-ipa.o.
8397 (tdesc-ipa.o): New rule.
8398 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8399 interface.
8400 * linux-low.c (new_inferior): Delete.
8401 (disabled_regsets, num_regsets): Delete.
8402 (linux_add_process): Adjust to set the new per-process
8403 new_inferior flag.
8404 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8405 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8406 was a stop. When calling arch_setup, switch the current inferior
8407 to the thread that got an event.
8408 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8409 (regsets_fetch_inferior_registers)
8410 (regsets_store_inferior_registers): New regsets_info parameter.
8411 Adjust to use it.
8412 (linux_register_in_regsets): New regs_info parameter. Adjust to
8413 use it.
8414 (register_addr, fetch_register, store_register): New usrregs_info
8415 parameter. Adjust to use it.
8416 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8417 parameter regs_info. Adjust to use it.
8418 (linux_fetch_registers): Get the current inferior's regs_info, and
8419 adjust to use it.
8420 (linux_store_registers): Ditto.
8421 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8422 (initialize_low): Don't initialize the target_regsets here. Call
8423 initialize_low_arch.
8424 * linux-low.h (target_regsets): Delete declaration.
8425 (struct regsets_info): New.
8426 (struct usrregs_info): New.
8427 (struct regs_info): New.
8428 (struct process_info_private) <new_inferior>: New field.
8429 (struct linux_target_ops): Delete the num_regs, regmap, and
8430 regset_bitmap fields. New field regs_info.
8431 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8432 * i387-fp.c (num_xmm_registers): Delete.
8433 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8434 calls to new interface.
8435 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8436 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8437 Infer the number of xmm registers from the regcache's target
8438 description.
8439 * i387-fp.h (num_xmm_registers): Delete.
8440 * inferiors.c (add_thread): Don't install the thread's regcache
8441 here.
8442 * proc-service.c (gregset_info): Fetch the current inferior's
8443 regs_info. Adjust to use it.
8444 * regcache.c: Include tdesc.h.
8445 (register_bytes, reg_defs, num_registers)
8446 (gdbserver_expedite_regs): Delete.
8447 (get_thread_regcache): If the thread doesn't have a regcache yet,
8448 create one, instead of aborting gdbserver.
8449 (regcache_invalidate_one): Rename to ...
8450 (regcache_invalidate_thread): ... this.
8451 (regcache_invalidate_one): New.
8452 (regcache_invalidate): Only invalidate registers of the current
8453 process.
8454 (init_register_cache): Add target_desc parameter, and use it.
8455 (new_register_cache): Ditto. Assert the target description has a
8456 non zero registers_size.
8457 (regcache_cpy): Add assertions. Adjust.
8458 (realloc_register_cache, set_register_cache): Delete.
8459 (registers_to_string, registers_from_string): Adjust.
8460 (find_register_by_name, find_regno, find_register_by_number)
8461 (register_cache_size): Add target_desc parameter, and use it.
8462 (free_register_cache_thread, free_register_cache_thread_one)
8463 (regcache_release, register_cache_size): New.
8464 (register_size): Add target_desc parameter, and use it.
8465 (register_data, supply_register, supply_register_zeroed)
8466 (supply_regblock, supply_register_by_name, collect_register)
8467 (collect_register_as_string, collect_register_by_name): Adjust.
8468 * regcache.h (struct target_desc): Forward declare.
8469 (struct regcache) <tdesc>: New field.
8470 (init_register_cache, new_register_cache): Add target_desc
8471 parameter.
8472 (regcache_invalidate_thread): Declare.
8473 (regcache_invalidate_one): Delete declaration.
8474 (regcache_release): Declare.
8475 (find_register_by_number, register_cache_size, register_size)
8476 (find_regno): Add target_desc parameter.
8477 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8478 declarations.
8479 * remote-utils.c: Include tdesc.h.
8480 (outreg, prepare_resume_reply): Adjust.
8481 * server.c: Include tdesc.h.
8482 (gdbserver_xmltarget): Delete declaration.
8483 (get_features_xml, process_serial_event): Adjust.
8484 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8485 declare.
8486 (struct process_info) <tdesc>: New field.
8487 (ipa_tdesc): Declare.
8488 * tdesc.c: New file.
8489 * tdesc.h: New file.
8490 * tracepoint.c: Include tdesc.h.
8491 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8492 (get_context_regcache): Adjust to pass ipa_tdesc down.
8493 (do_action_at_tracepoint): Adjust to get the register cache size
8494 from the context regcache's description.
8495 (traceframe_walk_blocks): Adjust to get the register cache size
8496 from the current trace frame's description.
8497 (traceframe_get_pc): Adjust to get current trace frame's
8498 description and pass it down.
8499 (gdb_collect): Adjust to get the register cache size from the
8500 IPA's description.
8501 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8502 (gdbserver_xmltarget): Delete.
8503 (initialize_low_tracepoint): Set the ipa's target description.
8504 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8505 (initialize_low_tracepoint): Set the ipa's target description.
8506 * linux-x86-low.c: Include tdesc.h.
8507 [__x86_64__] (is_64bit_tdesc): New.
8508 (ps_get_thread_area, x86_get_thread_area): Use it.
8509 (i386_cannot_store_register): Rename to ...
8510 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8511 (i386_cannot_fetch_register): Rename to ...
8512 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8513 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8514 to new interface.
8515 (target_regsets): Rename to ...
8516 (x86_regsets): ... this.
8517 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8518 interface.
8519 (x86_siginfo_fixup): Use is_64bit_tdesc.
8520 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8521 (tdesc_x32_avx_linux, tdesc_x32_linux)
8522 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8523 Declare.
8524 (x86_linux_update_xmltarget): Delete.
8525 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8526 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8527 (AMD64_LINUX_USER64_CS): New.
8528 (x86_linux_read_description): New, based on
8529 x86_linux_update_xmltarget.
8530 (same_process_callback): New.
8531 (x86_arch_setup_process_callback): New.
8532 (x86_linux_update_xmltarget): New.
8533 (x86_regsets_info): New.
8534 (amd64_linux_regs_info): New.
8535 (i386_linux_usrregs_info): New.
8536 (i386_linux_regs_info): New.
8537 (x86_linux_regs_info): New.
8538 (x86_arch_setup): Reimplement.
8539 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8540 (x86_emit_ops): Ditto.
8541 (the_low_target): Adjust. Install x86_linux_regs_info,
8542 x86_cannot_fetch_register, and x86_cannot_store_register.
8543 (initialize_low_arch): New.
8544 * linux-ia64-low.c (tdesc_ia64): Declare.
8545 (ia64_fetch_register): Adjust.
8546 (ia64_usrregs_info, regs_info): New globals.
8547 (ia64_regs_info): New function.
8548 (the_low_target): Adjust.
8549 (initialize_low_arch): New function.
8550 * linux-sparc-low.c (tdesc_sparc64): Declare.
8551 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8552 Adjust.
8553 (sparc_arch_setup): New function.
8554 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8555 (the_low_target): Adjust.
8556 (initialize_low_arch): New function.
8557 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8558 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8559 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8560 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8561 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8562 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8563 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8564 (tdesc_powerpc_isa205_vsx64l): Declare.
8565 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8566 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8567 (ppc_set_pc, ppc_get_hwcap): Adjust.
8568 (ppc_usrregs_info): Forward declare.
8569 (!__powerpc64__) ppc_regmap_adjusted: New global.
8570 (ppc_arch_setup): Adjust to the current process'es target
8571 description.
8572 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8573 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8574 (ppc_store_evrregset): Adjust.
8575 (target_regsets): Rename to ...
8576 (ppc_regsets): ... this, and make static.
8577 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8578 (ppc_regs_info): New function.
8579 (the_low_target): Adjust.
8580 (initialize_low_arch): New function.
8581 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8582 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8583 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8584 (tdesc_s390x_linux64v2): Declare.
8585 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8586 (s390_fill_gregset, s390_store_last_break): Adjust.
8587 (target_regsets): Rename to ...
8588 (s390_regsets): ... this, and make static.
8589 (s390_get_pc, s390_set_pc): Adjust.
8590 (s390_get_hwcap): New target_desc parameter, and use it.
8591 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8592 (s390_arch_setup): Adjust to set the current process'es target
8593 description. Don't adjust the regmap.
8594 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8595 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8596 (regs_info_3264): New globals.
8597 (s390_regs_info): New function.
8598 (the_low_target): Adjust.
8599 (initialize_low_arch): New function.
8600 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8601 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8602 [__mips64] (init_registers_mips_linux)
8603 (init_registers_mips_dsp_linux): Delete defines.
8604 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8605 (have_dsp): New global.
8606 (mips_read_description): New, based on mips_arch_setup.
8607 (mips_arch_setup): Reimplement.
8608 (get_usrregs_info): New function.
8609 (mips_cannot_fetch_register, mips_cannot_store_register)
8610 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8611 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8612 (target_regsets): Rename to ...
8613 (mips_regsets): ... this, and make static.
8614 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8615 (dsp_regs_info, regs_info): New globals.
8616 (mips_regs_info): New function.
8617 (the_low_target): Adjust.
8618 (initialize_low_arch): New function.
8619 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8620 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8621 Declare.
8622 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8623 (arm_read_description): New, with bits factored from
8624 arm_arch_setup.
8625 (arm_arch_setup): Reimplement.
8626 (target_regsets): Rename to ...
8627 (arm_regsets): ... this, and make static.
8628 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8629 (arm_regs_info): New function.
8630 (the_low_target): Adjust.
8631 (initialize_low_arch): New function.
8632 * linux-m68k-low.c (tdesc_m68k): Declare.
8633 (target_regsets): Rename to ...
8634 (m68k_regsets): ... this, and make static.
8635 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8636 (m68k_regs_info): New function.
8637 (m68k_arch_setup): New function.
8638 (the_low_target): Adjust.
8639 (initialize_low_arch): New function.
8640 * linux-sh-low.c (tdesc_sharch): Declare.
8641 (target_regsets): Rename to ...
8642 (sh_regsets): ... this, and make static.
8643 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8644 (sh_regs_info, sh_arch_setup): New functions.
8645 (the_low_target): Adjust.
8646 (initialize_low_arch): New function.
8647 * linux-bfin-low.c (tdesc_bfin): Declare.
8648 (bfin_arch_setup): New function.
8649 (bfin_usrregs_info, regs_info): New globals.
8650 (bfin_regs_info): New function.
8651 (the_low_target): Adjust.
8652 (initialize_low_arch): New function.
8653 * linux-cris-low.c (tdesc_cris): Declare.
8654 (cris_arch_setup): New function.
8655 (cris_usrregs_info, regs_info): New globals.
8656 (cris_regs_info): New function.
8657 (the_low_target): Adjust.
8658 (initialize_low_arch): New function.
8659 * linux-cris-low.c (tdesc_crisv32): Declare.
8660 (cris_arch_setup): New function.
8661 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8662 (cris_regs_info): New function.
8663 (the_low_target): Adjust.
8664 (initialize_low_arch): New function.
8665 * linux-m32r-low.c (tdesc_m32r): Declare.
8666 (m32r_arch_setup): New function.
8667 (m32r_usrregs_info, regs_info): New globals.
8668 (m32r_regs_info): Adjust.
8669 (initialize_low_arch): New function.
8670 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8671 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8672 (tic6x_usrregs_info): Forward declare.
8673 (tic6x_read_description): New function, based on ...
8674 (tic6x_arch_setup): ... this. Reimplement.
8675 (target_regsets): Rename to ...
8676 (tic6x_regsets): ... this, and make static.
8677 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8678 (tic6x_regs_info): New function.
8679 (the_low_target): Adjust.
8680 (initialize_low_arch): New function.
8681 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8682 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8683 (target_regsets): Rename to ...
8684 (xtensa_regsets): ... this, and make static.
8685 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8686 globals.
8687 (xtensa_arch_setup, xtensa_regs_info): New functions.
8688 (the_low_target): Adjust.
8689 (initialize_low_arch): New function.
8690 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8691 (nios2_arch_setup): Set the current process'es tdesc.
8692 (target_regsets): Rename to ...
8693 (nios2_regsets): ... this.
8694 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8695 (nios2_regs_info): New function.
8696 (the_low_target): Adjust.
8697 (initialize_low_arch): New function.
8698 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8699 (aarch64_arch_setup): Set the current process'es tdesc.
8700 (target_regsets): Rename to ...
8701 (aarch64_regsets): ... this.
8702 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8703 (aarch64_regs_info): New function.
8704 (the_low_target): Adjust.
8705 (initialize_low_arch): New function.
8706 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8707 globals.
8708 (target_regsets): Rename to ...
8709 (tile_regsets): ... this.
8710 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8711 (tile_regs_info): New function.
8712 (tile_arch_setup): Set the current process'es tdesc.
8713 (the_low_target): Adjust.
8714 (initialize_low_arch): New function.
8715 * spu-low.c (tdesc_spu): Declare.
8716 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8717 * win32-arm-low.c (tdesc_arm): Declare.
8718 (arm_arch_setup): New function.
8719 (the_low_target): Install arm_arch_setup instead of
8720 init_registers_arm.
8721 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8722 (init_windows_x86): Rename to ...
8723 (i386_arch_setup): ... this. Set `win32_tdesc'.
8724 (the_low_target): Adjust.
8725 * win32-low.c (win32_tdesc): New global.
8726 (child_add_thread): Don't create the thread cache here.
8727 (do_initial_child_stuff): Set the new process'es tdesc.
8728 * win32-low.h (struct target_desc): Forward declare.
8729 (win32_tdesc): Declare.
8730 * lynx-i386-low.c (tdesc_i386): Declare global.
8731 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8732 * lynx-low.c (lynx_tdesc): New global.
8733 (lynx_add_process): Set the new process'es tdesc.
8734 * lynx-low.h (struct target_desc): Forward declare.
8735 (lynx_tdesc): Declare global.
8736 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8737 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8738 * nto-low.c (nto_tdesc): New global.
8739 (do_attach): Set the new process'es tdesc.
8740 * nto-low.h (struct target_desc): Forward declare.
8741 (nto_tdesc): Declare.
8742 * nto-x86-low.c (tdesc_i386): Declare.
8743 (nto_x86_arch_setup): Set `nto_tdesc'.
8744
8745 2013-06-04 Gary Benson <gbenson@redhat.com>
8746
8747 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8748 to qSupported response when appropriate.
8749 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8750 with nonzero-length annex.
8751 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8752 arguments supplied in annex.
8753
8754 2013-05-31 Doug Evans <dje@google.com>
8755
8756 PR server/15594
8757 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8758 64 bits in 64-cross-32 environment.
8759
8760 2013-05-28 Pedro Alves <palves@redhat.com>
8761
8762 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8763 (aarch64-without-fpu.c): Delete rule.
8764 * configure.srv (aarch64*-*-linux*): Remove references to
8765 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8766 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8767 declaration.
8768
8769 2013-05-24 Pedro Alves <palves@redhat.com>
8770
8771 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8772 instead of strchr/decode_address. Error if the range isn't split
8773 with a ','. Don't assume there's be a ':' in the action.
8774
8775 2013-05-23 Yao Qi <yao@codesourcery.com>
8776 Pedro Alves <palves@redhat.com>
8777
8778 * linux-low.c (lwp_in_step_range): New function.
8779 (linux_wait_1): If the thread was range stepping and stopped
8780 outside the stepping range, report the stop to GDB. Otherwise,
8781 continue stepping. Add range stepping debug output.
8782 (linux_set_resume_request): Copy the step range from the resume
8783 request to the lwp.
8784 (linux_supports_range_stepping): New.
8785 (linux_target_ops) <supports_range_stepping>: Set to
8786 linux_supports_range_stepping.
8787 * linux-low.h (struct linux_target_ops)
8788 <supports_range_stepping>: New field.
8789 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8790 * linux-x86-low.c (x86_supports_range_stepping): New.
8791 (the_low_target) <supports_range_stepping>: Set to
8792 x86_supports_range_stepping.
8793 * server.c (handle_v_cont): Handle 'r' action.
8794 (handle_v_requests): Append ";r" if the target supports range
8795 stepping.
8796 * target.h (struct thread_resume) <step_range_start,
8797 step_range_end>: New fields.
8798 (struct target_ops) <supports_range_stepping>:
8799 New field.
8800 (target_supports_range_stepping): New macro.
8801
8802 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8803
8804 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8805 confusion in comment.
8806
8807 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8808
8809 * lynx-low.c (struct process_info_private): New type.
8810 (lynx_add_process): New function.
8811 (lynx_create_inferior, lynx_attach): Replace calls to
8812 add_process by calls to lynx_add_process.
8813 (lynx_resume): If PTID is null, then try using
8814 current_process()->private->last_wait_event_ptid.
8815 Add comments.
8816 (lynx_clear_inferiors): Delete. The contents of that function
8817 has been inlined in lynx_mourn;
8818 (lynx_wait_1): Save the ptid in the process's private data.
8819 (lynx_mourn): Free the process' private data. Replace call
8820 to lynx_clear_inferiors by call to clear_inferiors.
8821
8822 2013-05-17 Yao Qi <yao@codesourcery.com>
8823
8824 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8825 the right place.
8826
8827 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8828
8829 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8830 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8831 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8832 PT_TEXT_END_ADDR guards. Update comments.
8833 (linux_target_op) <read_offsets>: Conditionally define to
8834 linux_read_offsets if the target is UCLIBC and if it defines
8835 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8836
8837 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8838 Andrew Jenner <andrew@codesourcery.com>
8839
8840 * Makefile.in (SFILES): Add linux-nios2-low.c.
8841 (clean): Add action to delete nios2-linux.c.
8842 (nios2-linux.c): New rule.
8843 * configure.srv: Add nios2*-*-linux*.
8844 * linux-nios2-low.c: New.
8845
8846 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8847
8848 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8849
8850 2013-04-25 Hui Zhu <hui@codesourcery.com>
8851
8852 PR gdb/15186
8853 * ax.c (ax_printf): Add fflush.
8854
8855 2013-04-22 Tom Tromey <tromey@redhat.com>
8856
8857 * Makefile.in (SFILES): Add filestuff.c.
8858 (OBS): Add filestuff.o.
8859 (filestuff.o): New target.
8860 * config.in, configure: Rebuild.
8861 * configure.ac: Check for fdwalk, pipe2.
8862
8863 2013-04-17 Pedro Alves <palves@redhat.com>
8864
8865 * configure.ac (USE_THREAD_DB): Delete variable.
8866 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8867 Don't AC_SUBST USE_THREAD_DB.
8868 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8869 * config.in, configure: Regenerate.
8870
8871 2013-04-16 Pedro Alves <palves@redhat.com>
8872
8873 * linux-low.h (struct lwp_info) <thread_known>: Move under
8874 the USE_THREAD_DB #ifdef.
8875
8876 2013-04-16 Pedro Alves <palves@redhat.com>
8877
8878 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8879 (linux-low.o): Delete rule.
8880 * linux-low.h: Always include "gdb_thread_db.h" instead of
8881 conditionally including thread_db.h.
8882 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8883 HAVE_THREAD_DB_H.
8884
8885 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8886
8887 * Makefile.in (install-only): Fix make install regression.
8888
8889 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8890
8891 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8892 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8893 installation.
8894 * gdbserver.1: Remove.
8895
8896 2013-03-22 Pedro Alves <palves@redhat.com>
8897
8898 * linux-low.c (handle_extended_wait): Don't call
8899 linux_enable_event_reporting.
8900
8901 2013-03-15 Tony Theodore <tonyt@logyst.com>
8902
8903 PR build/9098:
8904 * Makefile.in (SHELL): Use @SHELL@.
8905
8906 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8907
8908 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8909 compiler warning.
8910
8911 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8912
8913 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8914 Remove extraneous NULL element.
8915
8916 2013-03-13 Yao Qi <yao@codesourcery.com>
8917
8918 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8919 'V' block in trace frame.
8920
8921 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8922
8923 * target.h (struct target_ops): Add btrace ops.
8924 (target_supports_btrace): New macro.
8925 (target_enable_btrace): New macro.
8926 (target_disable_btrace): New macro.
8927 (target_read_btrace): New macro.
8928 * gdbthread.h (struct thread_info): Add btrace field.
8929 * server.c: Include btrace-common.h.
8930 (handle_btrace_general_set): New function.
8931 (handle_btrace_enable): New function.
8932 (handle_btrace_disable): New function.
8933 (handle_general_set): Call handle_btrace_general_set.
8934 (handle_qxfer_btrace): New function.
8935 (struct qxfer qxfer_packets[]): Add btrace entry.
8936 * inferiors.c (remove_thread): Disable btrace.
8937 * linux-low: Include linux-btrace.h.
8938 (linux_low_enable_btrace): New function.
8939 (linux_low_read_btrace): New function.
8940 (linux_target_ops): Add btrace ops.
8941 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8942 Add srv_linux_btrace=yes.
8943 (x86_64-*-linux*): Add linux-btrace.o.
8944 Add srv_linux_btrace=yes.
8945 * configure.ac: Define HAVE_LINUX_BTRACE.
8946 * config.in: Regenerated.
8947 * configure: Regenerated.
8948
8949 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8950
8951 * server.c (handle_qxfer): Preserve error message if -3 is
8952 returned.
8953 (qxfer): Document the -3 return value.
8954
8955 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8956
8957 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8958 (linux_btrace_h): New variable.
8959 (linux-btrace.o): New rule.
8960
8961 2013-03-08 Stan Shebs <stan@codesourcery.com>
8962 Hafiz Abid Qadeer <abidh@codesourcery.com>
8963
8964 * tracepoint.c (trace_buffer_size): New global.
8965 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8966 (init_trace_buffer): Change to one-argument function. Allocate
8967 trace buffer memory.
8968 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8969 handle QTBuffer:size packet.
8970 (cmd_bigqtbuffer_size): New function.
8971 (initialize_tracepoint): Call init_trace_buffer with
8972 DEFAULT_TRACE_BUFFER_SIZE.
8973 * server.c (handle_query): Add QTBuffer:size in the
8974 supported packets.
8975
8976 2013-03-07 Yao Qi <yao@codesourcery.com>
8977
8978 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8979 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8980 of -1.
8981 (cmd_qtsp): Adjust condition. Do post increment.
8982 Set cur_action and cur_step_action back to 0.
8983
8984 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8985
8986 PR server/15236
8987 * linux-low.c (linux_write_memory): Return early success if LEN is
8988 zero.
8989
8990 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8991
8992 * configure.srv: Add x86_64-*-cygwin* as target.
8993
8994 2013-02-28 Tom Tromey <tromey@redhat.com>
8995
8996 * configure.ac: Invoke AC_SYS_LARGEFILE.
8997 * configure, config.in: Rebuild.
8998
8999 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9000
9001 * win32-low.c: Throughout, fix format strings and casts of
9002 printf-like functions to avoid type related warnings on all
9003 platforms.
9004 (get_child_debug_event): Print dwDebugEventCode as hex since
9005 that's how it's usually documented.
9006
9007 2013-02-28 Yao Qi <yao@codesourcery.com>
9008
9009 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9010 pulongest.
9011
9012 2013-02-27 Jiong Wang <jiwang@tilera.com>
9013
9014 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9015 (reg-tilegx32.c): New rule.
9016 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9017 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9018 different register info initializer according to elf class.
9019 (init_registers_tilgx32): New function. The tilegx32 register info
9020 initializer.
9021 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9022 (tile_store_gregset): Likewise.
9023
9024 2013-02-27 Yao Qi <yao@codesourcery.com>
9025
9026 * server.c (process_point_options): Print debug message when
9027 debug_threads is true.
9028
9029 2013-02-26 Yao Qi <yao@codesourcery.com>
9030
9031 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9032
9033 2013-02-19 Pedro Alves <palves@redhat.com>
9034 Kai Tietz <ktietz@redhat.com>
9035
9036 PR gdb/15161
9037
9038 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9039 instead of strtoul to extract address from packet.
9040 (process_serial_event) <'z'>: Likewise.
9041
9042 2013-02-18 Yao Qi <yao@codesourcery.com>
9043
9044 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9045
9046 2013-02-14 Pedro Alves <palves@redhat.com>
9047
9048 Plug memory leak.
9049
9050 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9051 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9052
9053 2013-02-14 Pedro Alves <palves@redhat.com>
9054
9055 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9056
9057 2013-02-14 Pedro Alves <palves@redhat.com>
9058
9059 * tracepoint.c (save_string): Delete.
9060 (add_tracepoint_action): Use savestring instead of save_string.
9061
9062 2013-02-12 Pedro Alves <palves@redhat.com>
9063
9064 * linux-xtensa-low.c: Ditto.
9065 * xtensa-xtregs.c: Ditto.
9066
9067 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9068
9069 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9070 thread_db.
9071
9072 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9073
9074 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9075 aarch64_num_wp_regs and aarch64_num_bp_regs to
9076 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9077
9078 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9079
9080 * linux-aarch64-low.c (ps_get_thread_area): Replace
9081 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9082
9083 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9084 Marcus Shawcroft <marcus.shawcroft@arm.com>
9085 Nigel Stephens <nigel.stephens@arm.com>
9086 Yufeng Zhang <yufeng.zhang@arm.com>
9087
9088 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9089 (aarch64.c, aarch64-without-fpu.c): New targets.
9090 * configure.srv (aarch64*-*-linux*): New.
9091 * linux-aarch64-low.c: New file.
9092
9093 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9094
9095 * linux-low.c (handle_extended_wait, linux_create_inferior)
9096 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9097 (dequeue_one_deferred_signal, linux_resume_one_thread)
9098 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9099 (linux_tracefork_grandchild, linux_test_for_tracefork)
9100 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9101 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9102 where the argument is 0.
9103
9104 2013-01-25 Yao Qi <yao@codesourcery.com>
9105
9106 * event-loop.c: Include "queue.h".
9107 (gdb_event_p): New typedef.
9108 (struct gdb_event) <next_event>: Remove.
9109 (event_queue): Change to QUEUE(gdb_event_p).
9110 (async_queue_event): Remove.
9111 (gdb_event_xfree): New.
9112 (initialize_event_loop): New.
9113 (process_event): Use API from QUEUE.
9114 (wait_for_event): Likewise.
9115 * server.c (main): Call initialize_event_loop.
9116 * server.h (initialize_event_loop): Declare.
9117
9118 2013-01-18 Yao Qi <yao@codesourcery.com>
9119
9120 * ax.h (struct eval_agent_expr_context): New.
9121 (gdb_eval_agent_expr): Update declaration.
9122 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9123 TFRAME. Add new argument CTX.
9124 * server.h (struct eval_agent_expr_context): Declare.
9125 (agent_mem_read, agent_tsv_read): Update declaration.
9126 (agent_mem_read_string): Likewise.
9127 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9128 (add_traceframe_block): Add new argument TPOINT.
9129 Increase TPOINT->traceframe_usage.
9130 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9131 eval_tracepoint_agent_expr.
9132 (condition_true_at_tracepoint): Likewise.
9133 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9134 (agent_mem_read_string, agent_tsv_read): Likewise.
9135
9136 2013-01-16 Yao Qi <yao@codesourcery.com>
9137
9138 * linux-low.c (linux_resume_one_lwp): Don't check
9139 'lwp->bp_reinsert != 0'.
9140
9141 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9142 Pedro Alves <palves@redhat.com>
9143
9144 * lynx-low.c (ptrace_request_to_str): Define a temporary
9145 macro and use it to simplify this function's implementation.
9146
9147 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9148
9149 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9150 sets errno.
9151
9152 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9153
9154 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9155
9156 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9157
9158 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9159
9160 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9161
9162 * lynx-low.c (lynx_resume): Use the resume_info parameter
9163 to determine the ptid for the lynx_ptrace call, unless
9164 it is equal to minus_one_ptid, in which case we use the
9165 ptid of the current_inferior.
9166 (lynx_wait_1): After having received a thread create/exit
9167 event, resume the inferior's execution using the signaling
9168 thread's ptid, rather than the old ptid.
9169
9170 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9171
9172 * lynx-low.c (lynx_resume): Delete variable ret.
9173
9174 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9175
9176 * gdbreplay.c (gdbreplay_version): Update copyright year.
9177 * server.c (gdbserver_version): Likewise.
9178
9179 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9180
9181 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9182 new thread.
9183
9184 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9185
9186 * lynx-low.c (ptrace_request_to_str): Add handling for
9187 PTRACE_GETTRACESIG.
9188
9189 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9190
9191 * lynx-low.c (lynx_attach): Delete variable new_process.
9192
9193 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9194
9195 * lynx-low.c (lynx_create_inferior): Delete variable
9196 new_process.
9197
9198 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9199
9200 * lynx-low.c (ptrace_request_to_str): Do not handle
9201 PTRACE_GETTHREADLIST if this macro does not exist.
9202
9203 2012-12-15 Yao Qi <yao@codesourcery.com>
9204
9205 * Makefile.in (OBS): Add notif.o.
9206 * notif.c, notif.h: New.
9207 * server.c: Include "notif.h".
9208 (struct vstop_notif) <next>: Remove.
9209 <base>: New field.
9210 (queue_stop_reply): Update.
9211 (push_event, send_next_stop_reply): Remove.
9212 (discard_queued_stop_replies): Update.
9213 (notif_stop): New variable.
9214 (handle_v_stopped): Remove.
9215 (handle_v_requests): Don't call handle_v_stopped. Call
9216 handle_ack_notif instead.
9217 (queue_stop_reply_callback): Call notif_event_enque instead
9218 of queue_stop_reply.
9219 (handle_status): Don't call send_next_stop_reply, call
9220 notif_write_event instead.
9221 (kill_inferior_callback): Likewise.
9222 (detach_or_kill_inferior_callback): Likewise.
9223 (main): Call initialize_notif.
9224 (process_serial_event): Call QUEUE_is_empty.
9225 (handle_target_event): Call notif_push instead of push event.
9226 * server.h (push_event): Remove declaration.
9227
9228 2012-12-10 Tom Tromey <tromey@redhat.com>
9229
9230 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9231 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9232 macros.
9233 (.c.o): Rewrite.
9234 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9235 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9236 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9237 (amd64-linux-ipa.o, ax.o): Rewrite.
9238 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9239 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9240 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9241 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9242 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9243 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9244 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9245 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9246 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9247 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9248 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9249 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9250 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9251 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9252 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9253 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9254 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9255 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9256 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9257 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9258 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9259 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9260 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9261 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9262 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9263 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9264 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9265 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9266 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9267 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9268 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9269 (reg-tilegx.o): Remove.
9270 (all_object_files): New macro.
9271 Include .deps files.
9272 * aclocal.m4, configure: Rebuild.
9273 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9274 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9275 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9276
9277 2012-12-05 Tom Tromey <tromey@redhat.com>
9278
9279 PR gdb/14917:
9280 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9281
9282 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9283
9284 * configure.ac: Check for linux/perf_event.h.
9285 * config.in: Regenerated.
9286 * configure: Regenerated.
9287
9288 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9289
9290 * hostio.c (handle_readlink): Decrease buffer size
9291 parameter passed to readlink by one byte.
9292
9293 2012-11-26 Yao Qi <yao@codesourcery.com>
9294
9295 * configure.ac (build_warnings): Append '-Wempty-body'.
9296 * configure: Regenerated.
9297 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9298 body.
9299
9300 2012-11-15 Pierre Muller <muller@sourceware.org>
9301
9302 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9303 * config.in: Regenerate.
9304 * configure: Regenerate.
9305 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9306 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9307 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9308 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9309 header.
9310 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9311 instead of <sys/wait.h> header.
9312 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9313
9314 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9315
9316 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9317 (various make rules): Remove -DGDBSERVER
9318
9319 2012-11-09 Yao Qi <yao@codesourcery.com>
9320
9321 * spu-low.c (current_ptid): Move it to ..
9322 * gdbthread.h: ... here. New.
9323 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9324 * server.c (myresume, process_serial_event): Likewise.
9325 * thread-db.c (thread_db_find_new_threads): Likewise.
9326 * tracepoint.c (run_inferior_command): Likewise.
9327
9328 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9329
9330 * server.c (handle_search_memory_1): Include access length in
9331 warning message.
9332
9333 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9334
9335 * linux-crisv32-low.c: Fix compile errors.
9336
9337 2012-09-04 Yao Qi <yao@codesourcery.com>
9338
9339 * tracepoint.c (cmd_qtsv): Adjust debug message.
9340 Don't check CUR_TPOINT.
9341
9342 2012-08-28 Yao Qi <yao@codesourcery.com>
9343
9344 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9345 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9346 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9347 Remove declarations of xmalloc, xreallloc, xstrdup and
9348 freeargv.
9349 * Makefile.in (libiberty_h): New.
9350 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9351 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9352
9353 2012-08-23 Yao Qi <yao@codesourcery.com>
9354
9355 * server.h: Remove declaration of 'xsnprintf'.
9356
9357 2012-08-22 Keith Seitz <keiths@redhat.com>
9358
9359 * server.h: Include build-gnulib-gbserver/config.h.
9360 * gdbreplay.c: Likewise.
9361
9362 2012-08-08 Doug Evans <dje@google.com>
9363
9364 * Makefile.in (SFILES): Add gdb_vecs.c.
9365 (OBS): Add gdb_vecs.o.
9366 (gdb_vecs_h, host_defs_h): New variables.
9367 (thread-db.o): Add $(gdb_vecs_h) dependency.
9368 (gdb_vecs.o): New rule.
9369 * thread-db.c: #include "gdb_vecs.h".
9370 (thread_db_load_search): Use a vector to iterate over path elements.
9371 Handle text appearing after "$pdir".
9372
9373 * configure.ac: Add check for strstr.
9374 * config.in: Regenerate.
9375 * configure: Regenerate.
9376
9377 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9378
9379 * hostio.c (handle_pread): If pread fails, fall back to attempting
9380 lseek/read.
9381 (handle_pwrite): Likewise for pwrite.
9382
9383 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9384
9385 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9386 between unsupported TYPE and unimplementable ADDR/LEN combination.
9387 (arm_insert_point): Act on new return value.
9388
9389 2012-07-31 Pedro Alves <palves@redhat.com>
9390
9391 * server.c (process_point_options): Only skip tokens if we find
9392 one that is unrecognized. Don't treat 'X' specially while
9393 skipping unrecognized tokens.
9394
9395 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9396
9397 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9398 to 4-byte-align HW breakpoint addresses for Thumb.
9399
9400 2012-07-27 Yao Qi <yao@codesourcery.com>
9401
9402 PR remote/14161.
9403
9404 * server.h: Declare gdb_agent_about_to_close.
9405 * target.c (kill_inferior): Include "agent.h".
9406 New. Send command 'kill'.
9407 * target.h (kill_inferior): Removed macro.
9408 * tracepoint.c (gdb_agent_about_to_close): New.
9409 (gdb_agent_helper_thread): Handle command 'close'.
9410 Wait endlessly until the inferior stops.
9411 Install gdb_agent_remove_socket to atexit hook.
9412 (agent_socket_name): New static variable.
9413 (gdb_agent_socket_init): Replace local variable 'name' with
9414 'agent_socket_name'.
9415 (gdb_agent_remove_socket): New.
9416
9417 2012-07-27 Yao Qi <yao@codesourcery.com>
9418
9419 * server.c (process_point_options): Stop at 'X' when parsing.
9420
9421 2012-07-19 Michael Eager <eager@eagercon.com>
9422
9423 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9424 to hw_execute.
9425 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9426 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9427 hardware breakpoint.
9428
9429 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9430
9431 * gdbserver/linux-low.c (initialize_low): Call
9432 linux_ptrace_init_warnings.
9433
9434 2012-07-02 Doug Evans <dje@google.com>
9435
9436 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9437 pointer to int.
9438
9439 2012-07-02 Stan Shebs <stan@codesourcery.com>
9440
9441 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9442 (ax.o): Add it to build rule.
9443 (ax-ipa.o): Ditto.
9444 (OBS): Add format.o.
9445 (IPA_OBS): Add format.o.
9446 * server.c (handle_query): Claim support for breakpoint commands.
9447 (process_point_options): Add command case.
9448 (process_serial_event): Leave running if there are printfs in
9449 effect.
9450 * mem-break.h (any_persistent_commands): Declare.
9451 (add_breakpoint_commands): Declare.
9452 (gdb_no_commands_at_breakpoint): Declare.
9453 (run_breakpoint_commands): Declare.
9454 * mem-break.c (struct point_command_list): New struct.
9455 (struct breakpoint): New field command_list.
9456 (any_persistent_commands): New function.
9457 (add_commands_to_breakpoint): New function.
9458 (add_breakpoint_commands): New function.
9459 (gdb_no_commands_at_breakpoint): New function.
9460 (run_breakpoint_commands): New function.
9461 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9462 locally.
9463 * ax.c: Include format.h.
9464 (ax_printf): New function.
9465 (gdb_eval_agent_expr): Add printf opcode.
9466
9467 2012-06-13 Yao Qi <yao@codesourcery.com>
9468
9469 * server.c (start_inferior): Remove duplicated writes to fields
9470 'last_resume_kind' and 'last_status' of 'current_inferior'.
9471
9472 2012-06-12 Yao Qi <yao@codesourcery.com>
9473 Pedro Alves <palves@redhat.com>
9474
9475 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9476 comment.
9477 * server.c (handle_v_cont): Extend comment.
9478
9479 2012-06-11 Yao Qi <yao@codesourcery.com>
9480
9481 * linux-low.c (linux_attach): Add 'static'.
9482
9483 2012-06-06 Yao Qi <yao@codesourcery.com>
9484
9485 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9486
9487 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9488
9489 Fix gcc -flto compilation warning.
9490 * server.c (main): Make variable multi_mode and attach volatile.
9491
9492 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9493
9494 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9495 if the platform doesn't know about it.
9496
9497 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9498
9499 * Makefile.in (SFILES): Add linux-tile-low.c.
9500 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9501 * configure.srv: Handle tilegx-*-linux*.
9502 * linux-tile-low.c: New file.
9503
9504 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9505
9506 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9507
9508 2012-05-24 Pedro Alves <palves@redhat.com>
9509
9510 PR gdb/7205
9511
9512 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9513
9514 2012-05-24 Pedro Alves <palves@redhat.com>
9515
9516 PR gdb/7205
9517
9518 Replace target_signal with gdb_signal throughout.
9519
9520 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9521
9522 * linux-low.c (linux_store_registers): Avoid the copying sequence
9523 when no data has been retrieved by ptrace.
9524
9525 2012-05-22 Will Deacon <will.deacon@arm.com>
9526
9527 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9528 Include asm/ptrace.h.
9529 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9530 already defined.
9531
9532 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9533
9534 * linux-low.c (linux_store_registers): Don't re-retrieve data
9535 with ptrace that has already been obtained from /proc. Always
9536 copy any data retrieved with ptrace to the buffer supplied.
9537
9538 2012-05-11 Yao Qi <yao@codesourcery.com>
9539 Pedro Alves <palves@redhat.com>
9540
9541 * linux-low.c (enum stopping_threads_kind): New.
9542 (stopping_threads): Change type to `enum stopping_threads_kind'.
9543 (handle_extended_wait): If stopping and suspending threads, leave
9544 the new_lwp suspended too.
9545 (linux_wait_for_event): Adjust.
9546 (stop_all_lwps): Set `stopping_threads' to
9547 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9548 whether we're suspending threads or just stopping them. Assert no
9549 recursion happens.
9550
9551 2012-04-29 Yao Qi <yao@codesourcery.com>
9552
9553 * server.h: Move some code to ...
9554 * gdbthread.h: ... here. New.
9555 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9556 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9557 (nto-low.o, win32-low.o): Likewise.
9558 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9559 * regcache.c, remote-utils.c, server.c: Likewise.
9560 * target.c, tracepoint.c, win32-low.c: Likewise.
9561
9562 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9563
9564 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9565 (PTRACE_ARG4_TYPE): Likewise.
9566 (PTRACE_XFER_TYPE): Likewise.
9567 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9568 ptrace to PTRACE_ARG3_TYPE.
9569 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9570 (PTRACE_ARG4_TYPE): Likewise.
9571 (PTRACE_XFER_TYPE): Likewise.
9572 (linux_detach_one_lwp): Cast fourth argument of
9573 ptrace to long then PTRACE_ARG4_TYPE.
9574 (regsets_fetch_inferior_registers): Cast third argument of
9575 ptrace to long then PTRACE_ARG3_TYPE.
9576 (regsets_store_inferior_registers): Likewise.
9577
9578 2012-04-20 Pedro Alves <palves@redhat.com>
9579
9580 * configure: Regenerate.
9581
9582 2012-04-19 Pedro Alves <palves@redhat.com>
9583
9584 * Makefile.in (GNULIB_BUILDDIR): New.
9585 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9586 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9587 (all, install-only, uninstall, clean-info, all-lib, clean): No
9588 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9589 (maintainer-clean realclean distclean): Use subdir_do.
9590 (subdir_do): New.
9591 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9592 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9593 * acinclude.m4: Include acx_configure_dir.m4.
9594 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9595 calls. Call AC_PROG_RANLIB. Configure gnulib using
9596 ACX_CONFIGURE_DIR.
9597 (GNULIB): New.
9598 (GNULIB_STDINT_H): Adjust.
9599 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9600 * gdbreplay.c: Include build-gnulib/config.h.
9601 * server.h: Likewise.
9602 * aclocal.m4: Regenerate.
9603 * config.in: Regenerate.
9604 * configure: Regenerate.
9605
9606 2012-04-19 Pedro Alves <palves@redhat.com>
9607
9608 * Makefile.in (LIBGNU, INCGNU): Adjust.
9609 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9610 (all, install-only, uninstall, clean-info, all-lib, clean)
9611 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9612 * configure.ac: Adjust AC_OUTPUT output.
9613 * aclocal.m4: Regenerate.
9614 * configure: Regenerate.
9615
9616 2012-04-19 Pedro Alves <palves@redhat.com>
9617
9618 * Makefile.in (generated_files): New.
9619 (server_h): Remove the explicit dependency on config.h, and depend
9620 on $generated_files.
9621
9622 2012-04-19 Pedro Alves <palves@redhat.com>
9623
9624 * Makefile.in (INCGNU): Add -Ignulib.
9625
9626 2012-04-19 Pedro Alves <palves@redhat.com>
9627
9628 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9629 (INCGNU): ... this, and spell out -I here.
9630 (GNULIB_LIB): Rename to ...
9631 (LIBGNU): ... this.
9632 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9633
9634 2012-04-19 Pedro Alves <palves@redhat.com>
9635
9636 * config.in: Regenerate.
9637
9638 2012-04-19 Pedro Alves <palves@redhat.com>
9639
9640 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9641 * server.h (memmem): Remove declaration.
9642 * config.in: Regenerate.
9643 * configure: Regenerate.
9644
9645 2012-04-19 Yao Qi <yao@codesourcery.com>
9646
9647 * Makefile.in (SFILES): Add common/vec.c.
9648 (OBS): Add vec.o.
9649 (vec.o): New rule.
9650
9651 2012-04-19 Yao Qi <yao@codesourcery.com>
9652
9653 * remote-utils.c (prepare_resume_reply): Replace with macro
9654 target_core_of_thread.
9655 * server.c (handle_qxfer_threads_proper): Likewise.
9656 * target.h (traget_core_of_thread): New macro.
9657
9658 2012-04-18 Pedro Alves <palves@redhat.com>
9659
9660 * aclocal.m4: Regenerate.
9661 * configure: Regenerate.
9662
9663 2012-04-16 Yao Qi <yao@codesourcery.com>
9664
9665 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9666 duplicated on address.
9667
9668 2012-04-16 Yao Qi <yao@codesourcery.com>
9669
9670 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9671 (struct tracepoint_action_ops) <send>: New field.
9672 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9673 (agent_expr_send, x_tracepoint_action_send): New.
9674 (l_tracepoint_action_send): New.
9675 (cmd_qtdp): Download and install tracepoint
9676 according to `use_agent'.
9677 (run_inferior_command): Add one more parameter `len'.
9678 Update callers.
9679 (tracepoint_send_agent): New.
9680 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9681
9682 2012-04-16 Yao Qi <yao@codesourcery.com>
9683
9684 * tracepoint.c (download_tracepoints): Moved to ...
9685 (cmd_qtstart): ... here.
9686
9687 2012-04-14 Yao Qi <yao@codesourcery.com>
9688
9689 * tracepoint.c: Include inttypes.h.
9690 (struct collect_memory_action): Use sized types.
9691 (struct tracepoint): Likewise.
9692 (cmd_qtdp, stop_tracing): Update print specifiers.
9693 (cmd_qtp, response_tracepoint): Likewise.
9694 (collect_data_at_tracepoint): Likewise.
9695 (collect_data_at_step): Likewise.
9696
9697 2012-04-14 Yao Qi <yao@codesourcery.com>
9698
9699 Import gnulib module inttypes.
9700 * aclocal.m4, config.in, configure: Regenerated.
9701
9702 2012-04-14 Yao Qi <yao@codesourcery.com>
9703
9704 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9705 Makefile and config.status at last.
9706
9707 2012-04-13 Yao Qi <yao@codesourcery.com>
9708
9709 * tracepoint.c: Include stdint.h unconditionally.
9710
9711 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9712
9713 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9714 on BFD_HAVE_SYS_PROCFS_TYPE.
9715 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9716 * configure: Regenerate.
9717 * config.in: Likewise.
9718
9719 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9720
9721 * Makefile.in (clean): Also remove x32.c x32-linux.c
9722 x32-avx.c x32-avx-linux.c.
9723 (x32.o): New target.
9724 (x32.c): Likewise.
9725 (x32-linux.o): Likewise.
9726 (x32-linux.c): Likewise.
9727 (x32-avx.o): Likewise.
9728 (x32-avx.c): Likewise.
9729 (x32-avx-linux.o): Likewise.
9730 (x32-avx-linux.c): Likewise.
9731
9732 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9733 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9734 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9735 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9736 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9737 i386/x32-avx-linux.xml.
9738
9739 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9740 (init_registers_x32_avx_linux): Likwise.
9741 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9742 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9743
9744 2012-04-13 Pedro Alves <palves@redhat.com>
9745
9746 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9747 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9748 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9749 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9750 the sub-make.
9751
9752 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9753
9754 * linux-x86-low.c (compat_x32_clock_t): New.
9755 (compat_x32_siginfo_t): Likewise.
9756 (compat_x32_siginfo_from_siginfo): Likewise.
9757 (siginfo_from_compat_x32_siginfo): Likewise.
9758 (linux_is_elf64): Likewise.
9759 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9760 and siginfo_from_compat_x32_siginfo for x32.
9761 (x86_arch_setup): Set linux_is_elf64.
9762
9763 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9764
9765 PR gdb/13969
9766 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9767 e_machine field.
9768 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9769 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9770 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9771 compatible with process.
9772
9773 2012-04-12 Yao Qi <yao@codesourcery.com>
9774
9775 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9776 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9777 (install-only, install-info, clean): Handle sub dir gnulib.
9778 (all-lib, am--refresh): New targets.
9779 (memmem.o): Remove target.
9780 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9781 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9782 (AC_REPLACE_FUNCS): Remove memmem.
9783 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9784 (AC_OUTPUT): Generate Makefile in gnulib/.
9785 * aclocal.m4, config.in, configure: Regenerated.
9786
9787 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9788
9789 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9790
9791 2012-04-05 Pedro Alves <palves@redhat.com>
9792
9793 -Werror=strict-aliasing
9794
9795 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9796 pointer.
9797
9798 2012-04-04 Pedro Alves <palves@redhat.com>
9799
9800 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9801 (sparc_store_gregset_from_stack, sparc_store_gregset)
9802 (sparc_breakpoint_at): Fix formatting.
9803
9804 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9805
9806 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9807 are available.
9808 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9809 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9810 * config.in: Regenerate.
9811 * configure: Likewise.
9812
9813 2012-03-29 Pedro Alves <palves@redhat.com>
9814
9815 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9816 Correct ptrace arguments.
9817
9818 2012-03-28 Pedro Alves <palves@redhat.com>
9819
9820 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9821 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9822 (IA64_FR1_REGNUM): New defines.
9823 (ia64_fetch_register): New.
9824 (the_low_target): Install it.
9825 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9826 field.
9827 * linux-low.c (linux_fetch_registers): Try the
9828 the_low_target.fetch_register hook first.
9829
9830 * linux-arm-low.c (the_low_target): Adjust.
9831 * linux-bfin-low.c (the_low_target): Adjust.
9832 * linux-cris-low.c (the_low_target): Adjust.
9833 * linux-crisv32-low.c (the_low_target): Adjust.
9834 * linux-m32r-low.c (the_low_target): Adjust.
9835 * linux-m68k-low.c (the_low_target): Adjust.
9836 * linux-mips-low.c (the_low_target): Adjust.
9837 * linux-ppc-low.c (the_low_target): Adjust.
9838 * linux-s390-low.c (the_low_target): Adjust.
9839 * linux-sh-low.c (the_low_target): Adjust.
9840 * linux-sparc-low.c (the_low_target): Adjust.
9841 * linux-tic6x-low.c (the_low_target): Adjust.
9842 * linux-x86-low.c (the_low_target): Adjust.
9843 * linux-xtensa-low.c (the_low_target): Adjust.
9844
9845 2012-03-26 Pedro Alves <palves@redhat.com>
9846
9847 * server.c (handle_qxfer_libraries): Don't bail early if
9848 the_target->qxfer_libraries_svr4 is not NULL.
9849
9850 2012-03-26 Pedro Alves <palves@redhat.com>
9851
9852 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9853
9854 2012-03-23 Pedro Alves <palves@redhat.com>
9855
9856 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9857 "library-list-svr4" element's start tag when the the DSO list is
9858 empty.
9859
9860 2012-03-23 Pedro Alves <palves@redhat.com>
9861
9862 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9863 a variable whose type size is the same as the inferior's pointer
9864 size.
9865
9866 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9867
9868 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9869 struct siginfo.
9870 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9871 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9872 * linux-low.h: Include <signal.h>.
9873 (struct siginfo): Remove forward declaration.
9874 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9875 struct siginfo.
9876
9877 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9878
9879 * .gitignore: Ignore more files.
9880
9881 2012-03-19 Pedro Alves <palves@redhat.com>
9882 Jan Kratochvil <jan.kratochvil@redhat.com>
9883
9884 * server.c (cont_thread, general_thread): Add describing comments.
9885 (start_inferior): Clear `cont_thread'.
9886 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9887 of a process.
9888
9889 2012-03-15 Yao Qi <yao@codesourcery.com>
9890
9891 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9892 handling to ...
9893 (cmd_qtdp): ... here.
9894
9895 2012-03-15 Yao Qi <yao@codesourcery.com>
9896
9897 * tracepoint.c (struct tracepoint_action_ops): New.
9898 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9899 (m_tracepoint_action_download): New.
9900 (r_tracepoint_action_download): New.
9901 (x_tracepoint_action_download): New.
9902 (l_tracepoint_action_download): New.
9903 (add_tracepoint_action): Install `action->ops' according type.
9904 (download_tracepoint_1): Move code `download' function pointer
9905 of various tracepoint_action_ops.
9906
9907 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9908
9909 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9910 linux_ptrace_attach_warnings.
9911
9912 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9913
9914 * Makefile.in (linux-ptrace.o): New.
9915 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9916 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9917 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9918 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9919 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9920 of these targets.
9921 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9922
9923 2012-03-08 Yao Qi <yao@codesourcery.com>
9924 Pedro Alves <palves@redhat.com>
9925
9926 Fix PR server/13392.
9927 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9928 offset of JMP insn.
9929 * tracepoint.c (remove_tracepoint): New.
9930 (cmd_qtdp): Call remove_tracepoint when failed to install.
9931
9932 2012-03-07 Pedro Alves <palves@redhat.com>
9933
9934 * linux-low.c (get_detach_signal): New.
9935 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9936 Pass on pending signals to PTRACE_DETACH. Check the result of the
9937 ptrace call.
9938 * server.c (program_signals, program_signals_p): New.
9939 (handle_general_set): Handle QProgramSignals.
9940 * server.h (program_signals, program_signals_p): Declare.
9941
9942 2012-03-05 Pedro Alves <palves@redhat.com>
9943 Jan Kratochvil <jan.kratochvil@redhat.com>
9944
9945 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9946 New comment why.
9947
9948 2012-03-03 Yao Qi <yao@codesourcery.com>
9949
9950 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9951 agent_look_up_symbols.
9952
9953 2012-03-03 Yao Qi <yao@codesourcery.com>
9954
9955 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9956 (linux-x86-low.o): Likewise.
9957 * server.h: Remove in_process_agent_loaded.
9958 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9959 common/agent.c.
9960 Update callers.
9961
9962 2012-03-03 Yao Qi <yao@codesourcery.com>
9963
9964 * tracepoint.c (gdb_agent_capability): New global.
9965 (in_process_agent_loaded_ust): Renamed to
9966 `in_process_agent_supports_ust'.
9967 Update callers.
9968 (in_process_agent_supports_ust): Call agent_capability_check.
9969 (clear_installed_tracepoints): Assert that agent supports
9970 agent.
9971
9972 2012-03-03 Yao Qi <yao@codesourcery.com>
9973
9974 * linux-low.c (linux_supports_agent): New.
9975 (linux_target_ops): Initialize field `supports_agent' with
9976 linux_supports_agent.
9977 * target.h (struct target_ops) <supports_agent>: New.
9978 (target_supports_agent): New macro.
9979 * server.c (handle_general_set): Handle packet 'QAgent'.
9980 (handle_query): Send `QAgent+'.
9981 * Makefile.in (server.o): Depends on agent.h.
9982
9983 2012-03-03 Yao Qi <yao@codesourcery.com>
9984
9985 * Makefile.in (OBS): Add agent.o.
9986 Add new rule for agent.o.
9987 Track dependence of tracepoint.c on agent.h.
9988 * tracepoint.c (run_inferior_command_1):
9989 (run_inferior_command): Call agent_run_command.
9990 (gdb_ust_connect_sync_socket): Deleted. Move it to
9991 common/agent.c.
9992 (resume_thread, stop_thread): Likewise.
9993 (gdb_ust_socket_init): Renamed to ...
9994 (gdb_agent_socket_init): ... New.
9995 (gdb_ust_thread): Renamed to ...
9996 (gdb_agent_helper_thread): ... New.
9997 (gdb_ust_init): Move some code to ...
9998 (gdb_agent_init): ... here. New.
9999 [HAVE_UST]: Call gdb_ust_init.
10000 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10001 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10002 * config.in, configure: Regenerated.
10003
10004 2012-03-02 Pedro Alves <palves@redhat.com>
10005
10006 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10007 * linux-low.c (struct simple_pid_list): New.
10008 (stopped_pids): New a struct simple_pid_list pointer.
10009 (add_to_pid_list, pull_pid_from_list): New.
10010 (handle_extended_wait): Don't assume the first signal new children
10011 report is SIGSTOP. Adjust call to pull_pid_from_list.
10012 (linux_wait_for_lwp): Adjust.
10013
10014 2012-03-02 Yao Qi <yao@codesourcery.com>
10015
10016 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10017 debug log.
10018
10019 2012-03-02 Yao Qi <yao@codesourcery.com>
10020
10021 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10022 `stop_pc' and `tpoint'. Update caller.
10023
10024 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10025
10026 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10027 * linux-low.c (use_linux_regsets): New macro.
10028 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10029 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10030 (linux_register_in_regsets): New function.
10031 (usr_fetch_inferior_registers): Skip registers covered by
10032 regsets.
10033 (usr_store_inferior_registers): Likewise.
10034 (usr_fetch_inferior_registers): New macro.
10035 (usr_store_inferior_registers): Likewise.
10036 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10037 (linux_store_registers): Likewise.
10038 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10039 prototype.
10040 (init_registers_mips64_dsp_linux): Likewise.
10041 (init_registers_mips_linux): New macro.
10042 (init_registers_mips_dsp_linux): Likewise.
10043 (mips_dsp_num_regs): Likewise.
10044 (DSP_BASE, DSP_CONTROL): New fallback macros.
10045 (mips_base_regs): New macro.
10046 (mips_regmap): Use it. Fix the size.
10047 (mips_dsp_regmap): New variable.
10048 (mips_dsp_regset_bitmap): Likewise.
10049 (mips_arch_setup): New function.
10050 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10051 than mips_regmap.
10052 (mips_cannot_store_register): Likewise.
10053 (the_low_target): Update .arch_setup, .num_regs and .regmap
10054 initializers. Add .regset_bitmap initializer.
10055 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10056 initializer.
10057 * linux-bfin-low.c (the_low_target): Likewise.
10058 * linux-cris-low.c (the_low_target): Likewise.
10059 * linux-crisv32-low.c (the_low_target): Likewise.
10060 * linux-ia64-low.c (the_low_target): Likewise.
10061 * linux-m32r-low.c (the_low_target): Likewise.
10062 * linux-m68k-low.c (the_low_target): Likewise.
10063 * linux-ppc-low.c (the_low_target): Likewise.
10064 * linux-s390-low.c (the_low_target): Likewise.
10065 * linux-sh-low.c (the_low_target): Likewise.
10066 * linux-sparc-low.c (the_low_target): Likewise.
10067 * linux-tic6x-low.c (the_low_target): Likewise.
10068 * linux-x86-low.c (the_low_target): Likewise.
10069 * linux-xtensa-low.c (the_low_target): Likewise.
10070 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10071 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10072 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10073 srv_xmlfiles.
10074 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10075 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10076
10077 2012-02-29 Yao Qi <yao@codesourcery.com>
10078 Pedro Alves <palves@redhat.com>
10079
10080 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10081 `step_over_finished' is true.
10082
10083 2012-02-27 Pedro Alves <palves@redhat.com>
10084
10085 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10086 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10087
10088 2012-02-27 Pedro Alves <palves@redhat.com>
10089
10090 PR server/9684
10091 * linux-low.c (pid_is_stopped): New.
10092 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10093
10094 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10095
10096 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10097 of conditions.
10098
10099 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10100
10101 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10102
10103 2012-02-24 Luis Machado <lgustavo@codesourcery>
10104
10105 * server.c (handle_query): Advertise support for target-side
10106 breakpoint condition evaluation.
10107 (process_point_options): New function.
10108 (process_serial_event): When inserting a breakpoint, check for
10109 a target-side condition that should be evaluated.
10110
10111 * mem-break.c: Include regcache.h and ax.h.
10112 (point_cond_list_t): New data structure.
10113 (breakpoint) <cond_list>: New field.
10114 (find_gdb_breakpoint_at): Make non-static.
10115 (delete_gdb_breakpoint_at): Clear any target-side
10116 conditions.
10117 (clear_gdb_breakpoint_conditions): New function.
10118 (add_condition_to_breakpoint): Likewise.
10119 (add_breakpoint_condition): Likewise.
10120 (gdb_condition_true_at_breakpoint): Likewise.
10121 (gdb_breakpoint_here): Return result directly instead
10122 of going through a local variable.
10123
10124 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10125 (clear_gdb_breakpoint_conditions): Likewise.
10126 (add_breakpoint_condition): Likewise.
10127 (gdb_condition_true_at_breakpoint): Likewise.
10128
10129 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10130 (need_step_over_p): Take target-side breakpoint condition into
10131 consideration.
10132
10133 2012-02-24 Luis Machado <lgustavo@codesourcery>
10134
10135 * server.h: Include tracepoint.h.
10136 (agent_mem_read, agent_get_trace_state_variable_value,
10137 agent_set_trace_state_variable_value,
10138 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10139 get_set_tsv_func_addr): New prototypes.
10140
10141 * ax.h: New include file.
10142 * ax.c: New source file.
10143
10144 * tracepoint.c: Include ax.h.
10145 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10146 agent_expr, eval_result_type): Move to ax.h.
10147 (parse_agent_expr): Rename to ...
10148 (gdb_parse_agent_expr): ... this, make it non-static and move
10149 to ax.h.
10150 (unparse_agent_expr) Rename to ...
10151 (gdb_unparse_agent_expr): ... this, make it non-static and move
10152 to ax.h.
10153 (eval_agent_expr): Rename to ...
10154 (eval_tracepoint_agent_expr): ... this.
10155 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10156 forward declarations.
10157 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10158 (agent_get_trace_state_variable_value): New function.
10159 (agent_set_trace_state_variable_value): New function.
10160 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10161 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10162 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10163 (condition_true_at_tracepoint): Likewise.
10164 (parse_agent_expr): Rename to ...
10165 (gdb_parse_agent_expr): ... this and move to ax.c.
10166 (unparse_agent_expr): Rename to ...
10167 (gdb_unparse_agent_expr): ... this and move to ax.c.
10168 (gdb_agent_op_name): Move to ax.c.
10169 (eval_agent_expr): Rename to ...
10170 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10171 and move to ax.c.
10172 (eval_tracepoint_agent_expr): New function.
10173 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10174 non-static.
10175 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10176 ax.c.
10177 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10178 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10179 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10180 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10181 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10182 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10183 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10184 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10185 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10186 (compile_bytecodes): Remove forward declaration.
10187 (is_goto_target): Move to ax.c.
10188 (compile_bytecodes): Move to ax.c and call
10189 agent_get_trace_state_variable_value (...) and
10190 agent_set_trace_state_variable_value (...).
10191
10192 * Makefile.in: Update ax.c and IPA dependencies.
10193
10194 2012-02-24 Pedro Alves <palves@redhat.com>
10195
10196 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10197 (cmd_bigqtbuffer_circular): ... this. Only handle
10198 'QTBuffer:circular:'.
10199 (handle_tracepoint_general_set): Adjust.
10200
10201 2012-02-16 Yao Qi <yao@codesourcery.com>
10202
10203 * inferiors.c: Move code to ...
10204 * dll.c: .... here. New.
10205 * server.h: Declare clear_dlls.
10206 * Makefile.in (SFILES): Add dll.c.
10207 (OBS): Add dll.o
10208 (dll.o): New rule.
10209
10210 2012-02-11 Yao Qi <yao@codesourcery.com>
10211
10212 * server.c: (handle_monitor_command): Add a new parameter
10213 `own_buf'.
10214 (handle_query): Update caller.
10215
10216 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10217
10218 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10219 * configure, config.in: Regenerate.
10220 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10221 is not defined.
10222
10223 2012-02-02 Pedro Alves <palves@redhat.com>
10224
10225 Try SIGKILL first, then PTRACE_KILL.
10226 * linux-low.c (linux_kill_one_lwp): New.
10227 (linux_kill_one_lwp): Rename to ...
10228 (kill_one_lwp_callback): ... this. Use the new
10229 linux_kill_one_lwp.
10230
10231 2012-02-02 Pedro Alves <palves@redhat.com>
10232
10233 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10234 inferior.
10235
10236 2012-01-27 Pedro Alves <palves@redhat.com>
10237
10238 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10239 (elf_64_file_p): Make static.
10240 (linux_pid_exe_is_elf_64_file): New.
10241 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10242 Delete declarations.
10243 (linux_pid_exe_is_elf_64_file): Declare.
10244 * linux-x86-low.c (x86_arch_setup): Use
10245 linux_pid_exe_is_elf_64_file.
10246
10247 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10248
10249 * linux-low.c (linux_wait_for_event_1): Rename to ...
10250 (linux_wait_for_event): ... here and merge it with former
10251 linux_wait_for_event - new variable wait_ptid, use it.
10252 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10253
10254 2012-01-23 Pedro Alves <palves@redhat.com>
10255
10256 * server.c (main): Avoid yet another case of infinite loop while
10257 detaching/killing after a longjmp.
10258
10259 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10260
10261 Code cleanup.
10262 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10263
10264 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10265
10266 * hostio.c (handle_readlink): New function.
10267 (handle_vFile): Call it to handle "vFile:readlink" packets.
10268
10269 2012-01-20 Pedro Alves <palves@redhat.com>
10270 Ulrich Weigand <ulrich.weigand@linaro.org>
10271
10272 * server.c (handle_v_requests): Only support vAttach and vRun to
10273 start multiple processes when in extended protocol mode.
10274
10275 2012-01-17 Pedro Alves <palves@redhat.com>
10276
10277 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10278 memalign plus mprotect to allocate the scratch buffer.
10279
10280 2012-01-13 Pedro Alves <palves@redhat.com>
10281
10282 * server.c (attach_inferior): Clear `cont_thread'.
10283
10284 2012-01-13 Pedro Alves <palves@redhat.com>
10285
10286 * server.c (main): Avoid infinite loop while detaching/killing
10287 after a longjmp.
10288
10289 2012-01-09 Doug Evans <dje@google.com>
10290
10291 * server.c (start_inferior): Set last_ptid in --wrapper case.
10292
10293 2012-01-06 Yao Qi <yao@codesourcery.com>
10294
10295 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10296 defined.
10297 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10298
10299 2012-01-04 Yao Qi <yao@codesourcery.com>
10300
10301 * tracepoint.c (cmd_qtdp): Print debug message
10302 for static tracepoint.
10303
10304 2012-01-04 Yao Qi <yao@codesourcery.com>
10305
10306 * tracepoint.c (trace_vdebug): Differentiate debug message
10307 between gdbserver and IPA.
10308
10309 2012-01-03 Yao Qi <yao@codesourcery.com>
10310
10311 * tracepoint.c (tracepoint_was_hit): Don't collect for
10312 static tracepoint.
10313
10314 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10315
10316 * terminal.h: Reformat copyright header.
10317
10318 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10319
10320 * server.c (gdbserver_version): Update copyright year.
10321 * gdbreplay.c (gdbreplay_version): Likewise.
10322
10323 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10324
10325 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10326
10327 Revert:
10328 2011-12-18 Hui Zhu <teawater@gmail.com>
10329 * linux-low.c (linux_create_inferior): Save return value to ret.
10330
10331 2011-12-18 Hui Zhu <teawater@gmail.com>
10332
10333 * linux-low.c (linux_create_inferior): Save return value to ret.
10334
10335 2011-12-16 Doug Evans <dje@google.com>
10336
10337 * linux-low.c (linux_create_inferior): If stdio connection,
10338 redirect stdin from /dev/null, stdout to stderr.
10339 * remote-utils.c (remote_is_stdio): New static global.
10340 (remote_connection_is_stdio): New function.
10341 (remote_prepare): Handle stdio connection.
10342 (remote_open): Ditto.
10343 (remote_close): Don't close stdin for stdio connections.
10344 (read_prim,write_prim): New functions. Replace all calls to
10345 read/write to these.
10346 * server.c (main): Watch for "-" argument. Move call to
10347 remote_prepare before start_inferior.
10348 * server.h (STDIO_CONNECTION_NAME): New macro.
10349 (remote_connection_is_stdio): Declare.
10350
10351 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10352 in debugging output.
10353
10354 2011-12-15 Yao Qi <yao@codesourcery.com>
10355
10356 * tracepoint.c: Include sys/syscall.h.
10357 (gdb_ust_thread): Remove preprocessor conditional.
10358
10359 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10360
10361 * linux-low.c (linux_detach_one_lwp): Call
10362 the_low_target.prepare_to_resume before detaching.
10363
10364 2011-12-14 Yao Qi <yao@codesourcery.com>
10365
10366 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10367 of write.
10368
10369 2011-12-14 Yao Qi <yao@codesourcery.com>
10370
10371 * i386-low.c (i386_low_stopped_data_address): Initialize local
10372 variable `control'.
10373
10374 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10375
10376 PR remote/13492
10377
10378 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10379 DR_CONTROL unless necessary. Extend comments.
10380 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10381 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10382
10383 2011-12-13 Yao Qi <yao@codesourcery.com>
10384
10385 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10386 macros.
10387 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10388
10389 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10390
10391 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10392 Print new debug message for such case.
10393
10394 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10395
10396 Fix overlapping memcpy.
10397 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10398 the read_inferior_memory transfer.
10399 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10400 write_inferior_memory transfer.
10401 (set_fast_tracepoint_jump): New variable buf. Use it for the
10402 read_inferior_memory and write_inferior_memory transfers.
10403 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10404 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10405 Use it for the write_inferior_memory transfer.
10406 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10407 buffers.
10408
10409 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10410
10411 * linux-low.c (fetch_register, store_register): Make code
10412 consistent, fix formatting.
10413
10414 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10415
10416 * linux-low.c (usr_store_inferior_registers): Factor out code
10417 to handle individual registers into...
10418 (store_register): ... this new function.
10419
10420 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10421
10422 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10423 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10424 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10425 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10426 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10427 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10428 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10429 (srv_xmlfiles): Add new XML files.
10430
10431 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10432 and <sys/uio.h>.
10433 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10434 (init_registers_s390_linux32v1): Add prototype.
10435 (init_registers_s390_linux32v2): Likewise.
10436 (init_registers_s390_linux64v1): Likewise.
10437 (init_registers_s390_linux64v2): Likewise.
10438 (init_registers_s390x_linux64v1): Likewise.
10439 (init_registers_s390x_linux64v2): Likewise.
10440 (s390_num_regs): Increment to 52.
10441 (s390_regmap): Add orig_r2 register.
10442 (s390_num_regs_3264): Increment to 68.
10443 (s390_regmap_3264): Add orig_r2 register.
10444 (s390_collect_ptrace_register): Handle orig_r2 register.
10445 (s390_supply_ptrace_register): Likewise.
10446 (s390_fill_last_break): New function.
10447 (s390_store_last_break): Likewise.
10448 (s390_fill_system_call): New function.
10449 (s390_store_system_call): Likewise.
10450 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10451 register sets.
10452 (s390_check_regset): New function.
10453 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10454 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10455 Update target_regsets for available register sets.
10456
10457 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10458 Jan Kratochvil <jan.kratochvil@redhat.com>
10459
10460 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10461 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10462 New.
10463 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10464 * linux-low.h (struct process_info_private): New member r_debug.
10465 * server.c (handle_qxfer_libraries): Call
10466 the_target->qxfer_libraries_svr4.
10467 (handle_qxfer_libraries_svr4): New function.
10468 (qxfer_packets): New entry "libraries-svr4".
10469 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10470 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10471 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10472 PACKET_qXfer_libraries_svr4.
10473
10474 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10475
10476 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10477 PSW address/mask between 8-byte and 16-byte formats.
10478 (s390_supply_ptrace_register): Likewise.
10479 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10480 basic addressing mode bit.
10481
10482 2011-11-24 Stan Shebs <stan@codesourcery.com>
10483
10484 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10485
10486 2011-11-17 Stan Shebs <stan@codesourcery.com>
10487
10488 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10489 (tracing_start_time): New global.
10490 (tracing_stop_time): New global.
10491 (tracing_user_name): New global.
10492 (tracing_notes): New global.
10493 (tracing_stop_note): New global.
10494 (cmd_qtstart): Set traceframe_usage, start_time.
10495 (stop_tracing): Set stop_time.
10496 (cmd_qtstatus): Report additional status.
10497 (cmd_qtp): New function.
10498 (handle_tracepoint_query): Call it.
10499 (cmd_qtnotes): New function.
10500 (handle_tracepoint_general_set): Call it.
10501 (get_timestamp): Rename from tsv_get_timestamp.
10502
10503 2011-11-14 Stan Shebs <stan@codesourcery.com>
10504 Kwok Cheung Yeung <kcy@codesourcery.com>
10505
10506 * linux-x86-low.c (small_jump_insn): New.
10507 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10508 trampoline and error message, build a trampoline and issue a small
10509 jump instruction to it.
10510 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10511 trampoline and error message.
10512 (x86_get_min_fast_tracepoint_insn_len): New.
10513 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10514 * linux-low.h (struct linux_target_ops): Add arguments to
10515 install_fast_tracepoint_jump_pad operation, add new operation.
10516 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10517 arguments.
10518 (linux_get_min_fast_tracepoint_insn_len): New function.
10519 (linux_target_op): Add new operation.
10520 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10521 (gdb_trampoline_buffer_end): Ditto.
10522 (gdb_trampoline_buffer_error): Ditto.
10523 (struct ipa_sym_addresses): Add fields for new IPA variables.
10524 (symbol_list): Add entries for new IPA variables.
10525 (struct tracepoint): Add fields to hold the address range of the
10526 trampoline used by the tracepoint.
10527 (trampoline_buffer_head): New static variable.
10528 (trampoline_buffer_tail): Ditto.
10529 (claim_trampoline_space): New function.
10530 (have_fast_tracepoint_trampoline_buffer): New function.
10531 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10532 structure.
10533 (install_fast_tracepoint): Ditto, also add error buffer argument.
10534 (cmd_qtminftpilen): New function.
10535 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10536 (fast_tracepoint_from_trampoline_address): New function.
10537 (fast_tracepoint_collecting): Handle trampoline as part of jump
10538 pad space.
10539 (set_trampoline_buffer_space): New function.
10540 (initialize_tracepoint): Initialize new IPA variables.
10541 * target.h (struct target_ops): Add arguments to
10542 install_fast_tracepoint_jump_pad operation, add new
10543 get_min_fast_tracepoint_insn_len operation.
10544 (target_get_min_fast_tracepoint_insn_len): New.
10545 (install_fast_tracepoint_jump_pad): Add arguments.
10546 * server.h (IPA_BUFSIZ): Define.
10547 * linux-i386-ipa.c: Include extra header files.
10548 (initialize_fast_tracepoint_trampoline_buffer): New function.
10549 (initialize_low_tracepoint): Call it.
10550 * server.h (set_trampoline_buffer_space): Declare.
10551 (claim_trampoline_space): Ditto.
10552 (have_fast_tracepoint_trampoline_buffer): Ditto.
10553
10554 2011-11-14 Yao Qi <yao@codesourcery.com>
10555
10556 * server.c (handle_query): Handle InstallInTrace for qSupported.
10557 * tracepoint.c (add_tracepoint): Sort list.
10558 (install_tracepoint, download_tracepoint): New.
10559 (cmd_qtdp): Call them to install and download tracepoints.
10560 (sort_tracepoints): Removed.
10561 (cmd_qtstart): Update.
10562
10563 2011-11-14 Yao Qi <yao@codesourcery.com>
10564
10565 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10566 * mem-break.h: Declare.
10567 * tracepoint.c (cmd_qtstart): Move some code to ...
10568 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10569 New.
10570 (download_tracepoints): Move some code to ...
10571 (download_tracepoint_1): ... here. New.
10572
10573 2011-11-08 Yao Qi <yao@codesourcery.com>
10574
10575 * remote-utils.c (relocate_instruction): A comment fix.
10576
10577 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10578
10579 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10580 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10581 dr_status_mirror and dr_control_mirror from debug_reg_state.
10582 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10583 (i386_initial_stuff): Remove use of deleted globals.
10584 (i386_get_thread_context, i386_set_thread_context,
10585 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10586 from debug_reg_state.
10587
10588 2011-11-05 Yao Qi <yao@codesourcery.com>
10589
10590 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10591 address as TPOINT's.
10592
10593 2011-11-02 Stan Shebs <stan@codesourcery.com>
10594
10595 * tracepoint.c (agent_mem_read_string): New function.
10596 (eval_agent_expr): Call it for tracenz.
10597 * server.c (handle_query): Report support for tracenz.
10598
10599 2011-11-02 Yao Qi <yao@codesourcery.com>
10600
10601 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10602
10603 2011-11-02 Yao Qi <yao@codesourcery.com>
10604
10605 * target.h: Fix a typo in comment.
10606
10607 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10608
10609 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10610 clobber the breakpoints' shadows with fast tracepoint jumps.
10611 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10612 * target.c (write_inferior_memory): Also pass MYADDR down to
10613 check_mem_write.
10614
10615 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10616
10617 * configure.ac: Check support for personality routine.
10618 * configure: Regenerate.
10619 * config.in: Likewise.
10620 * linux-low.c: Include <sys/personality.h>.
10621 Define ADDR_NO_RANDOMIZE if necessary.
10622 (linux_create_inferior): Disable address space randomization when
10623 forking inferior, if requested.
10624 (linux_supports_disable_randomization): New function.
10625 (linux_target_ops): Install it.
10626 * server.h (disable_randomization): Declare.
10627 * server.c (disable_randomization): New global variable.
10628 (handle_general_set): Handle QDisableRandomization.
10629 (handle_query): Likewise for qSupported.
10630 (main): Support --disable-randomization and --no-disable-randomization
10631 command line arguments.
10632 * target.h (struct target_ops): Add supports_disable_randomization.
10633 (target_supports_disable_randomization): New macro.
10634
10635 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10636
10637 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10638 ifdef check.
10639 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10640 [!PT_GETDSBT] (target_loadmap): New definition.
10641 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10642 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10643 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10644 and PT_GETDSBT to LINUX_LOADMAP.
10645 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10646 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10647
10648 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10649
10650 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10651 (arm_linux_hwbp_cap): New static variable.
10652 (arm_linux_get_hwbp_cap): Replace by ...
10653 (arm_linux_init_hwbp_cap): ... this new function.
10654 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10655 (arm_linux_get_hw_watchpoint_count): Likewise.
10656 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10657 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10658 (arm_prepare_to_resume): Use perror_with_name instead of error.
10659
10660 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10661
10662 * linux-arm-low.c: Include <signal.h>.
10663 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10664 (struct arm_linux_hwbp_cap): New data type.
10665 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10666 (struct arm_linux_hw_breakpoint): New data type.
10667 (MAX_BPTS, MAX_WPTS): Define.
10668 (struct arch_process_info, struct arch_lwp_info): New data types.
10669 (arm_linux_get_hwbp_cap): New function.
10670 (arm_linux_get_hw_breakpoint_count): Likewise.
10671 (arm_linux_get_hw_watchpoint_count): Likewise.
10672 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10673 (arm_hwbp_control_initialize): Likewise.
10674 (arm_hwbp_control_is_enabled): Likewise.
10675 (arm_hwbp_control_is_initialized): Likewise.
10676 (arm_hwbp_control_disable): Likewise.
10677 (arm_linux_hw_breakpoint_equal): Likewise.
10678 (arm_linux_hw_point_initialize): Likewise.
10679 (struct update_registers_data): New data structure.
10680 (update_registers_callback: New function.
10681 (arm_insert_point): Likewise.
10682 (arm_remove_point): Likewise.
10683 (arm_stopped_by_watchpoint): Likewise.
10684 (arm_stopped_data_address): Likewise.
10685 (arm_new_process): Likewise.
10686 (arm_new_thread): Likewise.
10687 (arm_prepare_to_resume): Likewise.
10688 (the_low_target): Register arm_insert_point, arm_remove_point,
10689 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10690 arm_new_thread, and arm_prepare_to_resume.
10691
10692 2011-09-15 Stan Shebs <stan@codesourcery.com>
10693
10694 * server.h (struct emit_ops): Add compare-goto fields.
10695 * tracepoint.c (gdb_agent_op_sizes): New table.
10696 (emit_eq_goto): New function.
10697 (emit_ne_goto): New function.
10698 (emit_lt_goto): New function.
10699 (emit_le_goto): New function.
10700 (emit_gt_goto): New function.
10701 (emit_ge_goto): New function.
10702 (is_goto_target): New function.
10703 (compile_bytecodes): Recognize special cases of compare-goto
10704 combinations and call specialized emitters for them.
10705 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10706 (amd64_emit_ne_goto): New function.
10707 (amd64_emit_lt_goto): New function.
10708 (amd64_emit_le_goto): New function.
10709 (amd64_emit_gt_goto): New function.
10710 (amd64_emit_ge_goto): New function.
10711 (amd64_emit_ops): Add the new functions.
10712 (i386_emit_eq_goto): New function.
10713 (i386_emit_ne_goto): New function.
10714 (i386_emit_lt_goto): New function.
10715 (i386_emit_le_goto): New function.
10716 (i386_emit_gt_goto): New function.
10717 (i386_emit_ge_goto): New function.
10718 (i386_emit_ops): Add the new functions.
10719
10720 2011-09-08 Stan Shebs <stan@codesourcery.com>
10721
10722 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10723 (i386_emit_epilogue): Restore %ebx.
10724
10725 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10726
10727 * server.c (step_thread): Remove definition.
10728 (process_serial_event): Don't handle Hs.
10729 * server.h (step_thread): Remove declaration.
10730 * target.c (set_desired_inferior): Remove use of step_thread.
10731
10732 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10733
10734 * linux-low.c: Include linux-procfs.h.
10735 (linux_attach_lwp_1): Update comments.
10736 (linux_attach): Scan for existing threads when attaching to a
10737 process that is the tgid.
10738 * Makefile.in: Update dependencies.
10739
10740 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10741
10742 * configure.srv: Add linux-procfs.o dependencies.
10743
10744 2011-08-14 Yao Qi <yao@codesourcery.com>
10745
10746 * target.h (struct target_ops): Fix indent.
10747 * win32-low.c (win32_target_ops): Fix comment.
10748
10749 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10750 Yao Qi <yao@codesourcery.com>
10751
10752 * Makefile.in (clean): Remove tic6x-*.c files.
10753 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10754 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10755 (tic6x-c64xp-linux.c): Likewise.
10756 * configure.srv: Add support for tic6x-*-uclinux.
10757 * linux-tic6x-low.c: New.
10758 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10759
10760 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10761 Yao Qi <yao@codesourcery.com>
10762
10763 * target.h (struct target_ops): Add read_loadmap.
10764 * linux-low.c (struct target_loadseg): New type.
10765 (struct target_loadmap): New type.
10766 (linux_read_loadmap): New function.
10767 (linux_target_ops): Add linux_read_loadmap.
10768 * server.c (handle_query): Support qXfer:fdpic:read packet.
10769 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10770 to NULL.
10771
10772 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10773
10774 * win32-low.c: Include <stdint.h>.
10775
10776 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10777
10778 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10779 to the inferior here.
10780 (i386_remove_aligned_watchpoint): Ditto.
10781 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10782 fit part of the watchpoint in the debug registers.
10783 (i386_update_inferior_debug_regs): New.
10784 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10785 registers, and only update the inferior on success.
10786 (i386_low_remove_watchpoint): Ditto.
10787
10788 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10789
10790 * linux-low.c (compare_ints, unique, list_threads, show_process,
10791 linux_core_of_thread): Delete.
10792 (linux_target_ops): Change linux_core_of_thread to
10793 linux_common_core_of_thread.
10794 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10795 * utils.c (malloc_failure): Change type of argument.
10796 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10797 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10798 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10799 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10800 (IPA_OBJS): Add common-utils-ipa.o.
10801 (ptid_h, linux_osdata_h): New macros.
10802 (server_h): Add common/common-utils.h, common/xml-utils.h,
10803 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10804 common/ptid.h.
10805 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10806 ptid.o, buffer.o): New rules.
10807 (linux-low.o): Add common/linux-osdata.h as a dependency.
10808 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10809 * configure.ac: Add AC_HEADER_DIRENT check.
10810 * config.in: Regenerate.
10811 * configure: Regenerate.
10812 * remote-utils.c (xml_escape_text): Delete.
10813 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10814 buffer_xml_printf): Move to common/buffer.c.
10815 * server.c (main): Remove call to initialize_inferiors.
10816 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10817 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10818 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10819 internal_error, gdb_assert, gdb_assert_fail): Delete.
10820 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10821 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10822 common/buffer.h.
10823 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10824 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10825 initialize_inferiors): Delete.
10826
10827 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10828
10829 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10830 symbol error.
10831
10832 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10833
10834 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10835 assertion.
10836 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10837
10838 2011-05-26 Yao Qi <yao@codesourcery.com>
10839
10840 * Makefile.in (thread-db.o): Track dependence to
10841 common/gdb_thread_db.h.
10842 * thread-db.c: include gdb_thread_db.h from right place.
10843
10844 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10845
10846 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10847 __FILE__ and __LINE__ to internal_error.
10848
10849 2011-05-13 Doug Evans <dje@google.com>
10850
10851 * thread-db.c (try_thread_db_load_from_sdir): New function.
10852 (try_thread_db_load_from_dir): New function.
10853 (thread_db_load_search): Handle $sdir, ignore $pdir.
10854 Remove trying of system directories if search of
10855 libthread-db-search-path fails, that is now done via $sdir.
10856
10857 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10858
10859 * server.c (handle_query): Add EnableDisableTracepoints to the list
10860 of supported features.
10861 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10862 tracepoints.
10863 (cmd_qtenable_disable): New.
10864 (cmd_qtstart): Install tracepoints even if disabled.
10865 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10866 receiving a QTEnable or QTDisable packet.
10867 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10868 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10869 tracepoints.
10870 (gdb_probe): Skip data collection if static tracepoint is disabled.
10871
10872 2011-05-10 Doug Evans <dje@google.com>
10873
10874 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10875
10876 2011-05-04 Doug Evans <dje@google.com>
10877
10878 * linux-low.c (linux_join): Skip process lookup.
10879 * spu-low.c (spu_join): Ditto.
10880 * server.c (join_inferiors_callback): Delete.
10881 (process_serial_event): For 'D' packet (detach) call join_inferior
10882 directly.
10883
10884 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10885
10886 * README: Don't mention xscale*-*-linux*.
10887 * configure.srv (xscale*-*-linux*): Don't handle target.
10888
10889 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10890
10891 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10892 casting pointers.
10893 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10894 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10895 (i386_emit_void_call_2): Likewise.
10896
10897 2011-04-26 Yao Qi <yao@codesourcery.com>
10898
10899 * linux-low.c: Move common macros to linux-ptrace.h.
10900 Include linux-ptrace.h.
10901 * Makefile.in (linux_ptrace_h): New.
10902 (linux-low.o): Depends on linux-ptrace.h.
10903
10904 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10905
10906 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10907 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10908 (remote_prepare): New function with most of the TCP code from ...
10909 (remote_open): ... here. Detect PORT here unconditionally. Move also
10910 setting transport_is_reliable.
10911 * server.c (run_once): New variable.
10912 (gdbserver_usage): Document it.
10913 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10914 the first run if RUN_ONCE.
10915 * server.h (run_once, remote_prepare): New declarations.
10916
10917 2011-04-19 Tom Tromey <tromey@redhat.com>
10918
10919 * win32-low.c (handle_load_dll): Remove duplicate "the".
10920
10921 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10922
10923 Remove support for old Cygwin 1.5 versions.
10924 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10925 function to avoid warning.
10926 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10927 warning.
10928
10929 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10930
10931 * gdbserver/server.h (Macro _): Define it if not available.
10932
10933 2011-03-14 Michael Snyder <msnyder@vmware.com>
10934
10935 * hostio.c (handle_close): Remove unnecessary null test.
10936
10937 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10938
10939 * Makefile.in (maintainer-clean realclean distclean): Remove
10940 "make ... subdir_do" command.
10941
10942 2011-03-10 Michael Snyder <msnyder@vmware.com>
10943
10944 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10945
10946 * server.c (handle_v_run): Free alloced buffer on early return.
10947
10948 2011-03-09 Yao Qi <yao@codesourcery.com>
10949
10950 Revert:
10951 2011-03-04 Yao Qi <yao@codesourcery.com>
10952
10953 * Makefile.in: Remove GNU make feature --directory.
10954
10955 2011-03-05 Yao Qi <yao@codesourcery.com>
10956
10957 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10958 (subdir_do): New make target. Copied from gdb/Makefile.
10959 (maintainer-clean, realclean, distclean, clean): Call corresponding
10960 make targets in common/Makefile.
10961
10962 2011-02-11 Yao Qi <yao@codesourcery.com>
10963
10964 * configure.ac: Call AC_PROG_RANLIB.
10965 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10966 * configure: Regenerate.
10967
10968 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10969
10970 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10971
10972 2011-03-06 Yao Qi <yao@codesourcery.com>
10973
10974 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10975
10976 2011-03-05 Yao Qi <yao@codesourcery.com>
10977
10978 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10979 (subdir_do): New make target. Copied from gdb/Makefile.
10980 (maintainer-clean, realclean, distclean, clean): Call corresponding
10981 make targets in common/Makefile.
10982
10983 2011-03-04 Yao Qi <yao@codesourcery.com>
10984
10985 * Makefile.in: Remove GNU make feature --directory.
10986
10987 2011-03-04 Michael Snyder <msnyder@vmware.com>
10988
10989 * server.c (queue_stop_reply): Call xmalloc not malloc.
10990
10991 2011-03-02 Michael Snyder <msnyder@vmware.com>
10992
10993 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10994
10995 2011-02-28 Michael Snyder <msnyder@vmware.com>
10996
10997 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10998 (cmd_qtframe): Ditto.
10999 (cmd_qtbuffer): Ditto.
11000 (cmd_bigqtbuffer): Ditto.
11001
11002 * utils.c (decimal2str): Initialize 'width' to nine, then
11003 don't mess with it.
11004
11005 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11006
11007 * hostio.c (require_data): Free *data, not data.
11008
11009 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11010
11011 * hostio.c (require_data): Use free, not xfree.
11012
11013 2011-02-27 Michael Snyder <msnyder@vmware.com>
11014
11015 * server.c (handle_query): Discard unused value.
11016
11017 * hostio.c (require_data): Free malloc memory before returning
11018 error.
11019
11020 2011-02-26 Michael Snyder <msnyder@vmware.com>
11021
11022 * linux-low.c (list_threads): Call closedir for dirent.
11023
11024 2011-02-27 Michael Snyder <msnyder@vmware.com>
11025
11026 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11027 a case statement falls through.
11028
11029 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11030
11031 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11032 in comparison.
11033
11034 2011-02-26 Michael Snyder <msnyder@vmware.com>
11035
11036 * utils.c (decimal2str): Eliminate dead code and dead param.
11037 (pulongest): Drop dead param from call to decimal2str.
11038 (plongest): Ditto.
11039
11040 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11041
11042 Revert the following patch (not approved yet):
11043 2011-02-21 Hui Zhu <teawater@gmail.com>
11044 * tracepoint.c (tp_printf): New function.
11045 (eval_agent_expr): Handle gdb_agent_op_printf.
11046
11047 2011-02-21 Hui Zhu <teawater@gmail.com>
11048
11049 * tracepoint.c (tp_printf): New function.
11050 (eval_agent_expr): Handle gdb_agent_op_printf.
11051
11052 2011-02-18 Tom Tromey <tromey@redhat.com>
11053
11054 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11055 (tracepoint.o): Likewise.
11056 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11057 (gdb_agent_op_names): Likewise.
11058
11059 2011-02-18 Tom Tromey <tromey@redhat.com>
11060
11061 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11062 gdb_agent_op_rot>: New constants.
11063 (gdb_agent_op_names): Add pick and roll.
11064 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11065 cases.
11066
11067 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11068
11069 * aclocal.m4: Regenerated with aclocal-1.11.1.
11070
11071 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11072
11073 * server.c (handle_qxfer_traceframe_info): New.
11074 (qxfer_packets): Register "traceframe-info".
11075 (handle_query): Report support for qXfer:traceframe-info:read+.
11076 * tracepoint.c (match_blocktype): New.
11077 (traceframe_find_block_type): Rename to ...
11078 (traceframe_walk_blocks): ... this. Add callback filter argument,
11079 and use it.
11080 (traceframe_find_block_type): New, reimplemented on top of
11081 traceframe_walk_blocks.
11082 (build_traceframe_info_xml): New.
11083 (traceframe_read_info): New.
11084 * server.h (traceframe_read_info): Declare.
11085
11086 2011-02-11 Yao Qi <yao@codesourcery.com>
11087
11088 * configure.ac: Call AC_PROG_RANLIB.
11089 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11090 * configure: Regenerate.
11091
11092 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11093
11094 * server.c (gdb_read_memory): Change return semantics to allow
11095 partial transfers.
11096 (handle_search_memory_1): Adjust.
11097 (process_serial_event) <'m' packet>: Handle partial transfers.
11098 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11099
11100 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11101
11102 * regcache.c (init_register_cache): Initialize
11103 regcache->register_status.
11104 (free_register_cache): Release regcache->register_status.
11105 (regcache_cpy): Copy register_status.
11106 (registers_to_string): Print 'x's for unavailable registers.
11107 (supply_register): Mark the register's status valid or
11108 unavailable, depending on whether a buffer was passed in or not.
11109 (supply_register_zeroed): New.
11110 (supply_regblock): Mark the registers' status valid or
11111 unavailable, depending on whether a buffer was passed in or not.
11112 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11113 (struct regcache): New `register_status' field.
11114 (supply_register_zeroed): Declare.
11115 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11116 supply_register_zeroed, rather than passing a NULL buffer to
11117 supply_register.
11118 * tracepoint.c (fetch_traceframe_registers): Update comment.
11119
11120 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11121
11122 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11123 buffer explicit.
11124
11125 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11126
11127 * server.h (decode_xfer_write): Change prototype.
11128 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11129 and don't extract the annex here.
11130 * server.c (decode_xfer_read): Remove `annex' parameter,
11131 and don't extract the annex here.
11132 (decode_xfer): New.
11133 (struct qxfer): New.
11134 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11135 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11136 (handle_qxfer_statictrace): New functions, abstracted out from
11137 handle_query, and made to use the struct qxfer interface.
11138 (handle_threads_qxfer_proper): Rename to ...
11139 (handle_qxfer_threads_proper): ... this.
11140 (handle_threads_qxfer): Rename to ...
11141 (handle_qxfer_threads): ... this. Adjust.
11142 (qxfer_packets): New array.
11143 (handle_qxfer): New function.
11144 (handle_query): Use handle_qxfer.
11145
11146 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11147
11148 * gdbreplay.c: Shorten lines of >= 80 columns.
11149 * linux-low.c: Ditto.
11150 * linux-ppc-low.c: Ditto.
11151 * linux-s390-low.c: Ditto.
11152 * linux-sparc-low.c: Ditto.
11153 * linux-x86-low.c: Ditto.
11154 * linux-xtensa-low.c: Ditto.
11155 * mem-break.c: Ditto.
11156 * nto-low.c: Ditto.
11157 * regcache.h: Ditto.
11158 * remote-utils.c: Ditto.
11159 * server.c: Ditto.
11160 * server.h: Ditto.
11161 * thread-db.c: Ditto.
11162 * tracepoint.c: Ditto.
11163 * utils.c: Ditto.
11164 * win32-low.h: Ditto.
11165
11166 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11167
11168 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11169 update.
11170
11171 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11172
11173 * server.c (gdbserver_version): Update copyright year in version
11174 output.
11175 * gdbreplay.c (gdbreplay_version): Ditto.
11176
11177 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11178
11179 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11180 * linux-bfin-low.c: New file.
11181 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11182 PT_DATA_ADDR for BFIN targets.
11183 * Makefile.in (SFILES): Add linux-bfin-low.c.
11184 (clean): Remove reg-bfin.c.
11185 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11186 * README: Mention supported Blackfin targets.
11187
11188 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11189
11190 * .gitignore: New file.
11191
11192 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11193
11194 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11195
11196 2010-10-22 Jie Zhang <jie@codesourcery.com>
11197
11198 * Makefile.in: Add FLAGS_TO_PASS variable.
11199 (install): Remove dependency of install-only and recursively
11200 invoke make for install-only.
11201
11202 2010-10-04 Doug Evans <dje@google.com>
11203
11204 * Makefile.in (uninstall): Use $(DESTDIR).
11205
11206 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11207
11208 PR gdb/11842
11209
11210 * linux-x86-low.c (compat_siginfo_from_siginfo)
11211 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11212 si_code is < 0. Check for si_code == SI_TIMER before checking for
11213 si_code < 0.
11214
11215 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11216
11217 * lynx-i386-low.c: New file.
11218 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11219
11220 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11221
11222 * lynx-low.c (ptrace_request_to_str): Remove handling for
11223 request values that have been removed in LynxOS 5.x.
11224
11225 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11226
11227 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11228 <ptrace.h>
11229
11230 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11231
11232 * configure.ac: Add --enable-inprocess-agent option.
11233 * configure: Rebuilt.
11234
11235 2010-09-06 Yao Qi <yao@codesourcery.com>
11236
11237 * linux-low.c (linux_kill): Remove unused variable.
11238 (linux_stabilize_threads): Likewise.
11239 * server.c (start_inferior): Likewise.
11240 (queue_stop_reply_callback): Likewise.
11241 * tracepoint.c (do_action_at_tracepoint): Likewise.
11242
11243 2010-09-06 Yao Qi <yao@codesourcery.com>
11244
11245 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11246 on return.
11247
11248 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11249
11250 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11251
11252 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11253
11254 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11255 "$(IPA_DEPFILES)".
11256
11257 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11258
11259 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11260 gdbserver/lynx-ppc-low.c: New files.
11261 * Makefile.in (lynx_low_h): New variable.
11262 (lynx-low.o, lynx-ppc-low.o): New rules.
11263 * configure.ac: On LynxOS, link with -lnetinet.
11264 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11265 * configure: regenerate.
11266
11267 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11268
11269 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11270 * configure.ac: Add check for vasprintf and vsnprintf.
11271 * configure, config.in: Regenerate.
11272 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11273
11274 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11275
11276 * gdbreplay.c: Move include of alloca.h up, next to include of
11277 malloc.h.
11278 * server.h: Add include of malloc.h.
11279 * mem-break.c: Remove include of malloc.h.
11280 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11281
11282 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11283
11284 * Makefile.in (memmem.o): Build with -Wno-error.
11285
11286 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11287
11288 * utils.c (xsnprintf): Make non-static.
11289 * server.h: Add xsnprintf declaration.
11290 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11291 replace calls to snprintf by calls to xsnprintf throughout.
11292
11293 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11294
11295 * configure.ac: Add configure check for alloca.
11296 * configure, config.in: Regenerate.
11297 * server.h: Include alloca.h if it exists.
11298 * gdbreplay.c: Include alloca.h if it exists.
11299
11300 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11301
11302 * linux-low.c (__SIGRTMIN): Define if not already defined.
11303 (linux_create_inferior): Check for __ANDROID__ rather than
11304 __SIGRTMIN.
11305 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11306 are already deferred.
11307 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11308 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11309 stopped and already has a pending signal to report.
11310 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11311 a pending signal to report or is moving out of a jump pad.
11312 (linux_init_signals): Check for __ANDROID__ rather than
11313 __SIGRTMIN.
11314
11315 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11316
11317 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11318 debug_threads check. Avoid a linear search when not doing debug
11319 output.
11320
11321 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11322
11323 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11324 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11325 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11326 (process_event): Change local fd's type to gdb_fildes_t.
11327 (create_file_handler): Adjust prototype.
11328 (delete_file_handler): Adjust prototype.
11329 (handle_file_event): Adjust prototype. Use pfildes.
11330 (create_file_event): Adjsut prototype.
11331 * remote-utils.c (remote_desc, listen_desc): Change type to
11332 gdb_fildes_t.
11333 * server.h: New gdb_fildes_t typedef.
11334 [USE_WIN32API]: Include winsock2.h.
11335 (delete_file_handler, add_file_handler): Adjust prototypes.
11336 (pfildes): Declare.
11337 * utils.c (pfildes): New.
11338
11339 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11340
11341 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11342 * configure: Regenerate.
11343
11344 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11345
11346 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11347 (linux_done_accessing_memory): ... this.
11348 (linux_target_ops): Adjust.
11349 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11350 * nto-low.c (nto_target_ops): Adjust comment.
11351 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11352 * spu-low.c (spu_target_ops): Adjust comment.
11353 * target.h (target_ops): Rename unprepare_to_access_memory field
11354 to done_accessing_memory.
11355 (unprepare_to_access_memory): Rename to ...
11356 (done_accessing_memory): ... this.
11357
11358 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11359
11360 * linux-low.c (linux_prepare_to_access_memory): New.
11361 (linux_unprepare_to_access_memory): New.
11362 (linux_target_ops): Install them.
11363 * server.c (read_memory): Rename to ...
11364 (gdb_read_memory): ... this. Use
11365 prepare_to_access_memory/prepare_to_access_memory.
11366 (write_memory): Rename to ...
11367 (gdb_write_memory): ... this. Use
11368 prepare_to_access_memory/prepare_to_access_memory.
11369 (handle_search_memory_1): Adjust.
11370 (process_serial_event): Adjust.
11371 * target.h (struct target_ops): New fields
11372 prepare_to_access_memory and unprepare_to_access_memory.
11373 (prepare_to_access_memory, unprepare_to_access_memory): New.
11374 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11375 prepare_to_access_memory/prepare_to_access_memory.
11376 * nto-low.c (nto_target_ops): Adjust.
11377 * spu-low.c (spu_target_ops): Adjust.
11378 * win32-low.c (win32_target_ops): Adjust.
11379
11380 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11381
11382 * Makefile.in (WARN_CFLAGS): Get it from configure.
11383 (WERROR_CFLAGS): New.
11384 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11385 * configure.ac: Introduce --enable-werror, which adds -Werror to
11386 the compiler command line. Enabled by default. Disable with
11387 --disable-werror. Add -Wdeclaration-after-statement
11388 Wpointer-arith and -Wformat-nonliteral to warning flags.
11389 * configure: Regenerate.
11390
11391 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11392
11393 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11394
11395 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11396
11397 * gdbreplay.c (remote_error): New.
11398 (gdbchar): New.
11399 (expect): Use gdbchar. Check for error reading from GDB.
11400 Clarify sync error output.
11401 (play): Check for errors writing to GDB.
11402 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11403 * remote-utils.c (getpkt): Check for errors writing to the remote
11404 descriptor.
11405
11406 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11407
11408 * linux-low.c (linux_wait_1): Move non-debugging code out of
11409 `debug_threads' control.
11410
11411 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11412
11413 * linux-low.c (linux_wait_1): Don't set last_status here.
11414 * server.c (push_event, queue_stop_reply_callback): Assert we're
11415 not pushing a TARGET_WAITKIND_IGNORE event.
11416 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11417 (myresume, handle_target_event): Set the thread's last_resume_kind
11418 and last_status from the target returned status.
11419
11420 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11421
11422 PR threads/10729
11423
11424 * linux-x86-low.c (update_debug_registers_callback): New.
11425 (i386_dr_low_set_addr): Use it.
11426 (i386_dr_low_get_addr): New.
11427 (i386_dr_low_set_control): Use update_debug_registers_callback.
11428 (i386_dr_low_get_control): New.
11429 (i386_dr_low_get_status): Adjust.
11430 * linux-low.c (linux_stop_lwp): New.
11431 * linux-low.h (linux_stop_lwp): Declare.
11432
11433 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11434 argument instead of a i386_debug_reg_state.
11435 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11436 a i386_debug_reg_state.
11437 (i386_insert_aligned_watchpoint): Adjust.
11438 (i386_remove_aligned_watchpoint): Adjust.
11439 (i386_low_stopped_data_address): Read the debug registers from the
11440 inferior instead of from the mirrors.
11441 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11442 (i386_dr_low_get_addr): Declare.
11443 (i386_dr_low_get_control): Declare.
11444 (i386_dr_low_get_status): Change prototype.
11445
11446 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11447 (i386_dr_low_get_addr): New.
11448 (i386_dr_low_get_control): New.
11449 (i386_dr_low_get_status): Adjust prototype. Return
11450 dr_status_mirror.
11451 (i386_initial_stuff): Clear dr_status_mirror and
11452 dr_control_mirror.
11453 (i386_get_thread_context): Adjust.
11454 (i386_set_thread_context): Adjust.
11455 (i386_thread_added): Adjust.
11456
11457 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11458
11459 * linux-low.h (linux_thread_area): Delete declaration.
11460
11461 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11462
11463 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11464 after its termination.
11465
11466 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11467
11468 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11469 (gdb_wants_all_stopped): Delete.
11470 (linux_wait_1): Don't call them.
11471 * server.c (handle_v_cont): Tag all threads as want-stopped.
11472 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11473 stopped as "client-wants-stopped".
11474
11475 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11476
11477 * Makefile.in (signals_h): New.
11478 (server_h): Depend on it.
11479 (server.o): Don't depend on $(signals_def).
11480 (signals.o): Depend on $(signals_def).
11481
11482 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11483
11484 * Makefile.in (signals_def): New.
11485 (server_h): Append include/gdb/signals.h and signals_def.
11486 (server.o): Append signals_def.
11487
11488 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11489
11490 * server.c (handle_target_event): Use target_signal_to_host for
11491 resume_info.sig initialization.
11492 * target.h (struct thread_resume) <sig>: New comment.
11493
11494 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11495
11496 * server.c (handle_query): strcpy() the returned string from paddress()
11497 instead of sprintf().
11498 * utils.c (paddress): Return phex_nz().
11499
11500 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11501
11502 * server.c (handle_v_cont): Call mourn_inferior if process
11503 just exited.
11504 (myresume): Likewise.
11505
11506 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11507
11508 Static tracepoints, and integration with UST.
11509
11510 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11511 * mem-break.c (uninsert_all_breakpoints)
11512 (reinsert_all_breakpoints): New.
11513 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11514 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11515 (gdb_agent_ust_loaded, helper_thread_id)
11516 (gdb_agent_helper_thread_id): New macros.
11517 (struct ipa_sym_addresses): Add addr_ust_loaded,
11518 addr_helper_thread_id, addr_cmd_buf.
11519 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11520 (in_process_agent_loaded_ust): New.
11521 (write_e_ust_not_loaded): New.
11522 (maybe_write_ipa_ust_not_loaded): New.
11523 (struct collect_static_trace_data_action): New.
11524 (enum tracepoint_type) <static_tracepoint>: New.
11525 (struct tracepoint) <handle>: Mention static tracepoints.
11526 (struct static_tracepoint_ctx): New.
11527 (CMD_BUF_SIZE): New.
11528 (add_tracepoint_action): Handle static tracepoint actions.
11529 (unprobe_marker_at): New.
11530 (clear_installed_tracepoints): Handle static tracepoints.
11531 (cmd_qtdp): Handle static tracepoints.
11532 (probe_marker_at): New.
11533 (cmd_qtstart): Handle static tracepoints.
11534 (response_tracepoint): Handle static tracepoints.
11535 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11536 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11537 (get_context_regcache): Handle static tracepoints.
11538 (do_action_at_tracepoint): Handle static tracepoint actions.
11539 (traceframe_find_block_type): Handle static trace data blocks.
11540 (traceframe_read_sdata): New.
11541 (download_tracepoints): Download static tracepoint actions.
11542 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11543 (GDB_PROBE_NAME): New.
11544 (ust_ops): New.
11545 (GET_UST_SYM): New.
11546 (USTF): New.
11547 (dlsym_ust): New.
11548 (ust_marker_to_static_tracepoint): New.
11549 (gdb_probe): New.
11550 (collect_ust_data_at_tracepoint): New.
11551 (gdb_ust_probe): New.
11552 (UNIX_PATH_MAX, SOCK_DIR): New.
11553 (gdb_ust_connect_sync_socket): New.
11554 (resume_thread, stop_thread): New.
11555 (run_inferior_command): New.
11556 (init_named_socket): New.
11557 (gdb_ust_socket_init): New.
11558 (cstr_to_hexstr): New.
11559 (next_st): New.
11560 (first_marker, next_marker): New.
11561 (response_ust_marker): New.
11562 (cmd_qtfstm, cmd_qtsstm): New.
11563 (unprobe_marker_at, probe_marker_at): New.
11564 (cmd_qtstmat, gdb_ust_thread): New.
11565 (gdb_ust_init): New.
11566 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11567 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11568 (ST_REGENTRY): New.
11569 (x86_64_st_collect_regmap): New.
11570 (X86_64_NUM_ST_COLLECT_GREGS): New.
11571 (AMD64_RIP_REGNUM): New.
11572 (supply_static_tracepoint_registers): New.
11573 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11574 (ST_REGENTRY): New.
11575 (i386_st_collect_regmap): New.
11576 (i386_NUM_ST_COLLECT_GREGS): New.
11577 (supply_static_tracepoint_registers): New.
11578 * server.c (handle_query): Handle qXfer:statictrace:read.
11579 <qSupported>: Report support for StaticTracepoints, and
11580 qXfer:statictrace:read features.
11581 * server.h (traceframe_read_sdata)
11582 (supply_static_tracepoint_registers): Declare.
11583 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11584 (unpack_varlen_hex): Include in IPA build.
11585 * Makefile.in (ustlibs, ustinc): New.
11586 (IPA_OBJS): Add remote-utils-ipa.o.
11587 ($(IPA_LIB)): Link -ldl and -lpthread.
11588 (UST_CFLAGS): New.
11589 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11590 * config.in, configure: Regenerate.
11591
11592 2010-06-20 Ian Lance Taylor <iant@google.com>
11593 Pedro Alves <pedro@codesourcery.com>
11594
11595 * linux-x86-low.c (always_true): Delete.
11596 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11597 trying to fool the compiler with always_true.
11598
11599 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11600
11601 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11602 conditions in gdbserver.
11603
11604 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11605
11606 * spu-low.c (spu_read_memory): Wrap around local store limit.
11607 (spu_write_memory): Likewise.
11608
11609 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11610
11611 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11612 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11613 LONGEST uses.
11614 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11615 uses.
11616 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11617 uses with LONGEST uses.
11618
11619 2010-06-14 Stan Shebs <stan@codesourcery.com>
11620 Pedro Alves <pedro@codesourcery.com>
11621
11622 Bytecode compiler.
11623
11624 * linux-x86-low.c: Include limits.h.
11625 (add_insns): New.
11626 (always_true): New.
11627 (EMIT_ASM): New.
11628 (EMIT_ASM32): New.
11629 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11630 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11631 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11632 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11633 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11634 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11635 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11636 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11637 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11638 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11639 (amd64_emit_void_call_2): New.
11640 (amd64_emit_ops): New.
11641 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11642 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11643 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11644 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11645 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11646 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11647 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11648 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11649 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11650 (i386_emit_stack_adjust, i386_emit_int_call_1)
11651 (i386_emit_void_call_2): New.
11652 (i386_emit_ops): New.
11653 (x86_emit_ops): New.
11654 (the_low_target): Install x86_emit_ops.
11655 * server.h (struct emit_ops): New.
11656 (get_raw_reg_func_addr): Declare.
11657 (current_insn_ptr, emit_error): Declare.
11658 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11659 (set_trace_state_variable_value): New defines.
11660 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11661 addr_get_trace_state_variable_value and
11662 addr_set_trace_state_variable_value.
11663 (symbol_list): New fields for get_raw_reg,
11664 get_trace_state_variable_value and set_trace_state_variable_value.
11665 (condfn): New typedef.
11666 (struct tracepoint): New field `compiled_cond'.
11667 (do_action_at_tracepoint): Clear compiled_cond.
11668 (get_trace_state_variable_value, set_trace_state_variable_value):
11669 Export in the IPA.
11670 (condition_true_at_tracepoint): If there's a compiled condition,
11671 run that.
11672 (current_insn_ptr, emit_error): New globals.
11673 (struct bytecode_address): New.
11674 (get_raw_reg_func_addr): New.
11675 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11676 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11677 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11678 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11679 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11680 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11681 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11682 (compile_tracepoint_condition, compile_bytecodes): New.
11683 * target.h (emit_ops): Forward declare.
11684 (struct target_ops): New field emit_ops.
11685 (target_emit_ops): New.
11686 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11687 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11688 * linux-low.c (linux_emit_ops): New.
11689 (linux_target_ops): Install it.
11690 * linux-low.h (struct linux_target_ops): New field emit_ops.
11691
11692 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11693
11694 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11695 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11696
11697 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11698 Stan Shebs <stan@codesourcery.com>
11699
11700 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11701 (all): Depend on $(extra_libraries).
11702 (install-only): Install the IPA.
11703 (IPA_OBJS, IPA_LIB): New.
11704 (clean): Remove the IPA lib.
11705 (IPAGENT_CFLAGS): New.
11706 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11707 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11708 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11709 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11710 * configure.ac: Check for atomic builtins support in the compiler.
11711 (IPA_DEPFILES, extra_libraries): Define.
11712 * configure.srv (ipa_obj): Add description.
11713 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11714 (i[34567]86-*-linux*): Set ipa_obj.
11715 (x86_64-*-linux*): Set ipa_obj.
11716 * linux-low.c (stabilizing_threads): New.
11717 (supports_fast_tracepoints): New.
11718 (linux_detach): Stabilize threads before detaching.
11719 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11720 the lwp is either not stabilizing, or is moving out of a jump pad.
11721 (linux_fast_tracepoint_collecting): New.
11722 (maybe_move_out_of_jump_pad): New.
11723 (enqueue_one_deferred_signal): New.
11724 (dequeue_one_deferred_signal): New.
11725 (linux_wait_for_event_1): If moving out of a jump pad, defer
11726 pending signals to later.
11727 (linux_stabilize_threads): New.
11728 (linux_wait_1): Check if threads need moving out of jump pads, and
11729 do it if so.
11730 (stuck_in_jump_pad_callback): New.
11731 (move_out_of_jump_pad_callback): New.
11732 (lwp_running): New.
11733 (linux_resume_one_lwp): Handle moving out of jump pads.
11734 (linux_set_resume_request): Dequeue deferred signals.
11735 (need_step_over_p): Also step over fast tracepoint jumps.
11736 (start_step_over): Also uninsert fast tracepoint jumps.
11737 (finish_step_over): Also reinsert fast tracepoint jumps.
11738 (linux_install_fast_tracepoint_jump): New.
11739 (linux_target_ops): Install linux_stabilize_threads and
11740 linux_install_fast_tracepoint_jump_pad.
11741 * linux-low.h (linux_target_ops) <get_thread_area,
11742 install_fast_tracepoint_jump_pad>: New fields.
11743 (struct lwp_info) <collecting_fast_tracepoint,
11744 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11745 (linux_get_thread_area): Declare.
11746 * linux-x86-low.c (jump_insn): New.
11747 (x86_get_thread_area): New.
11748 (append_insns): New.
11749 (push_opcode): New.
11750 (amd64_install_fast_tracepoint_jump_pad): New.
11751 (i386_install_fast_tracepoint_jump_pad): New.
11752 (x86_install_fast_tracepoint_jump_pad): New.
11753 (the_low_target): Install x86_get_thread_area and
11754 x86_install_fast_tracepoint_jump_pad.
11755 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11756 (struct fast_tracepoint_jump): New.
11757 (fast_tracepoint_jump_insn): New.
11758 (fast_tracepoint_jump_shadow): New.
11759 (find_fast_tracepoint_jump_at): New.
11760 (fast_tracepoint_jump_here): New.
11761 (delete_fast_tracepoint_jump): New.
11762 (set_fast_tracepoint_jump): New.
11763 (uninsert_fast_tracepoint_jumps_at): New.
11764 (reinsert_fast_tracepoint_jumps_at): New.
11765 (set_breakpoint_at): Use write_inferior_memory.
11766 (uninsert_raw_breakpoint): Use write_inferior_memory.
11767 (check_mem_read): Mask out fast tracepoint jumps.
11768 (check_mem_write): Mask out fast tracepoint jumps.
11769 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11770 (set_fast_tracepoint_jump): Declare.
11771 (delete_fast_tracepoint_jump)
11772 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11773 (reinsert_fast_tracepoint_jumps_at): Declare.
11774 * regcache.c: Don't compile many functions when building the
11775 in-process agent library.
11776 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11777 the register buffer in the heap.
11778 (free_register_cache): If the register buffer isn't owned by the
11779 regcache, don't free it.
11780 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11781 pre-existing register caches.
11782 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11783 type.
11784 (convert_ascii_to_int): : Constify `from' parameter type.
11785 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11786 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11787 the needed buffer in-place.
11788 (relocate_instruction): New.
11789 * server.c (handle_query) <qSymbols>: If the target supports
11790 tracepoints, give it a chance of looking up symbols. Report
11791 support for fast tracepoints.
11792 (handle_status): Stabilize threads.
11793 (process_serial_event): Adjust.
11794 * server.h (struct fast_tracepoint_jump): Forward declare.
11795 (struct process_info) <fast_tracepoint_jumps>: New field.
11796 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11797 (decode_X_packet, decode_M_packet): Adjust.
11798 (relocate_instruction): Declare.
11799 (in_process_agent_loaded): Declare.
11800 (tracepoint_look_up_symbols): Declare.
11801 (struct fast_tpoint_collect_status): Declare.
11802 (fast_tracepoint_collecting): Declare.
11803 (force_unlock_trace_buffer): Declare.
11804 (handle_tracepoint_bkpts): Declare.
11805 (initialize_low_tracepoint)
11806 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11807 * target.h (struct target_ops) <stabilize_threads,
11808 install_fast_tracepoint_jump_pad>: New fields.
11809 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11810 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11811 [HAVE_STDINT_H]: Include stdint.h.
11812 (trace_debug_1): Rename to ...
11813 (trace_vdebug): ... this.
11814 (trace_debug): Rename to ...
11815 (trace_debug_1): ... this. Add `level' parameter.
11816 (trace_debug): New.
11817 (ATTR_USED, ATTR_NOINLINE): New.
11818 (IP_AGENT_EXPORT): New.
11819 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11820 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11821 (about_to_request_buffer_space, trace_buffer_is_full)
11822 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11823 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11824 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11825 (traceframe_write_count, traceframes_created)
11826 (trace_state_variables)
11827 New renaming defines.
11828 (struct ipa_sym_addresses): New.
11829 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11830 (symbol_list): New.
11831 (ipa_sym_addrs): New.
11832 (all_tracepoint_symbols_looked_up): New.
11833 (in_process_agent_loaded): New.
11834 (write_e_ipa_not_loaded): New.
11835 (maybe_write_ipa_not_loaded): New.
11836 (tracepoint_look_up_symbols): New.
11837 (debug_threads) [IN_PROCESS_AGENT]: New.
11838 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11839 (UNKNOWN_SIDE_EFFECTS): New.
11840 (stop_tracing): New.
11841 (flush_trace_buffer): New.
11842 (stop_tracing_bkpt): New.
11843 (flush_trace_buffer_bkpt): New.
11844 (read_inferior_integer): New.
11845 (read_inferior_uinteger): New.
11846 (read_inferior_data_pointer): New.
11847 (write_inferior_data_pointer): New.
11848 (write_inferior_integer): New.
11849 (write_inferior_uinteger): New.
11850 (struct collect_static_trace_data_action): Delete.
11851 (enum tracepoint_type): New.
11852 (struct tracepoint) <type>: New field `type'.
11853 <actions_str, step_actions, step_actions_str>: Only include in
11854 GDBserver.
11855 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11856 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11857 (tracepoints): Use IP_AGENT_EXPORT.
11858 (last_tracepoint): Don't include in the IPA.
11859 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11860 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11861 (alloced_trace_state_variables): New.
11862 (trace_state_variables): Use IP_AGENT_EXPORT.
11863 (traceframe_t): Delete unused variable.
11864 (circular_trace_buffer): Don't include in the IPA.
11865 (trace_buffer_start): Delete.
11866 (struct trace_buffer_control): New.
11867 (trace_buffer_free): Delete.
11868 (struct ipa_trace_buffer_control): New.
11869 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11870 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11871 New.
11872 (trace_buffer_ctrl): New.
11873 (TRACE_BUFFER_CTRL_CURR): New.
11874 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11875 Reimplement as macros.
11876 (trace_buffer_wrap): Delete.
11877 (traceframe_write_count, traceframe_read_count)
11878 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11879 (struct tracepoint_hit_ctx) <type>: New field.
11880 (struct fast_tracepoint_ctx): New.
11881 (memory_barrier): New.
11882 (cmpxchg): New.
11883 (record_tracepoint_error): Update atomically in the IPA.
11884 (clear_inferior_trace_buffer): New.
11885 (about_to_request_buffer_space): New.
11886 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11887 updating the same buffer.
11888 (add_tracepoint): Default the tracepoint's type to trap
11889 tracepoint, and orig_size to -1.
11890 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11891 internal variables.
11892 (create_trace_state_variable): New parameter `gdb'. Handle it.
11893 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11894 (cmd_qtdp): Handle fast tracepoints.
11895 (cmd_qtdv): Adjust.
11896 (max_jump_pad_size): New.
11897 (gdb_jump_pad_head): New.
11898 (get_jump_space_head): New.
11899 (claim_jump_space): New.
11900 (sort_tracepoints): New.
11901 (MAX_JUMP_SIZE): New.
11902 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11903 IPA.
11904 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11905 support. Upload fast traceframes, and delete internal IPA
11906 breakpoints.
11907 (stop_tracing_handler): New.
11908 (flush_trace_buffer_handler): New.
11909 (cmd_qtstop): Upload fast tracepoints.
11910 (response_tracepoint): Handle fast tracepoints.
11911 (tracepoint_finished_step): Upload fast traceframes. Set the
11912 tracepoint hit context's tracepoint type.
11913 (handle_tracepoint_bkpts): New.
11914 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11915 type. Add comment about fast tracepoints.
11916 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11917 non-existing action_str field.
11918 (get_context_regcache): Handle fast tracepoints.
11919 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11920 to the regcache.
11921 (fast_tracepoint_from_jump_pad_address): New.
11922 (fast_tracepoint_from_ipa_tpoint_address): New.
11923 (collecting_t): New.
11924 (force_unlock_trace_buffer): New.
11925 (fast_tracepoint_collecting): New.
11926 (collecting): New.
11927 (gdb_collect): New.
11928 (write_inferior_data_ptr): New.
11929 (target_tp_heap): New.
11930 (target_malloc): New.
11931 (download_agent_expr): New.
11932 (UALIGN): New.
11933 (download_tracepoints): New.
11934 (download_trace_state_variables): New.
11935 (upload_fast_traceframes): New.
11936 (IPA_FIRST_TRACEFRAME): New.
11937 (IPA_NEXT_TRACEFRAME_1): New.
11938 (IPA_NEXT_TRACEFRAME): New.
11939 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11940 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11941 (gdb_jump_pad_buffer_end): New.
11942 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11943 (initialize_tracepoint): Adjust.
11944 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11945 buffer. Initialize the low module.
11946 * utils.c (PREFIX, TOOLNAME): New.
11947 (malloc_failure): Use PREFIX.
11948 (error): In the IPA, an error causes an exit.
11949 (fatal, warning): Use PREFIX.
11950 (internal_error): Use TOOLNAME.
11951 (NUMCELLS): Increase to 10.
11952 * configure, config.in: Regenerate.
11953
11954 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11955
11956 * server.c (handle_query) <qSupported>: Do two passes over the
11957 qSupported string to avoid nesting strtok.
11958
11959 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11960
11961 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11962 (CDEPS): New.
11963 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11964 -Wl,--dynamic-list.
11965 * configure: Regenerate.
11966 * proc-service.list: New.
11967
11968 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11969
11970 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11971 New comment.
11972
11973 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11974
11975 * gdbreplay.c (remote_open): Check error return from socket() call by
11976 its equality to -1 not by it being negative.
11977 * remote-utils.c (remote_open): Likewise.
11978
11979 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11980
11981 * config.h: Regenerate.
11982
11983 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11984
11985 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11986 doesn't provide PTRACE_GET_THREAD_AREA.
11987
11988 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11989
11990 * linux-m68k-low.c: Include <asm/ptrace.h>
11991 (ps_get_thread_area): Implement.
11992
11993 2010-05-03 Doug Evans <dje@google.com>
11994
11995 * event-loop.c (struct callback_event): New struct.
11996 (callback_list): New global.
11997 (append_callback_event, delete_callback_event): New functions.
11998 (process_callback): New function.
11999 (start_event_loop): Call it.
12000 * remote-utils.c (NOT_SCHEDULED): Define.
12001 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12002 moved out of readchar.
12003 (readchar): Rewrite. Call reschedule before returning.
12004 (reset_readchar): New function.
12005 (remote_close): Call it.
12006 (process_remaining, reschedule): New functions.
12007 * server.h (callback_handler_func): New typedef.
12008 (append_callback_event, delete_callback_event): Declare.
12009
12010 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12011
12012 * proc-service.c (ps_pglobal_lookup): Use
12013 thread_db_look_up_one_symbol.
12014 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12015 parameter. Use it instead of all_symbols_looked_up.
12016 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12017 field.
12018 (all_symbols_looked_up): Don't declare.
12019 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12020 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12021 field.
12022 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12023 Set all_symbols_looked_up here.
12024 (thread_db_look_up_one_symbol): New.
12025 (thread_db_get_tls_address): Adjust.
12026 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12027 thread_db object on the heap, and tentatively set it in the
12028 process structure.
12029 (thread_db_init): Don't set all_symbols_looked_up here.
12030 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12031
12032 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12033
12034 * linux-low.c (linux_kill, linux_detach): Adjust.
12035 (status_pending_p_callback): Remove redundant statement. Check
12036 for !TARGET_WAITIKIND_IGNORE, instead of
12037 TARGET_WAITKIND_STOPPED.
12038 (handle_tracepoints): Make sure LWP is locked. Adjust.
12039 (linux_wait_for_event_1): Adjust.
12040 (linux_cancel_breakpoints): New.
12041 (unsuspend_one_lwp): New.
12042 (unsuspend_all_lwps): New.
12043 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12044 (send_sigstop_callback): Change return type to int, add new
12045 `except' parameter and handle it.
12046 (suspend_and_send_sigstop_callback): New.
12047 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12048 pass them down. If SUSPEND, also increment the lwp's suspend
12049 count.
12050 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12051 (need_step_over_p): Don't consider suspended LWPs.
12052 (start_step_over): Adjust.
12053 (proceed_one_lwp): Change return type to int, add new `except'
12054 parameter and handle it.
12055 (unsuspend_and_proceed_one_lwp): New.
12056 (proceed_all_lwps): Use find_inferior instead of
12057 for_each_inferior.
12058 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12059 also decrement the suspend count of LWPs. Pass `except' down,
12060 instead of hacking its suspend count.
12061 (linux_pause_all): Add `freeze' parameter. Adjust.
12062 (linux_unpause_all): New.
12063 (linux_target_ops): Install linux_unpause_all.
12064 * server.c (handle_status): Adjust.
12065 * target.h (struct target_ops): New fields `unpause_all' and
12066 `cancel_breakpoints'. Add new parameter to `pause_all'.
12067 (pause_all): Add new `freeze' parameter.
12068 (unpause_all): New.
12069 (cancel_breakpoints): New.
12070 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12071 cancel breakpoints.
12072 (cmd_qtstart): Pause threads.
12073 (stop_tracing): Pause threads, and cancel breakpoints.
12074 * win32-low.c (win32_target_ops): Adjust.
12075
12076 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12077
12078 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12079 the inferior right away from here...
12080 (linux_wait_1): ... to here, and adjust to check the thread's
12081 last_resume_kind instead of the lwp's step or stop_expected flags.
12082
12083 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12084
12085 * README: Use consistent `GDB' and `GDBserver' spellings.
12086
12087 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12088
12089 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12090 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12091 (linux_detach_one_lwp): Assume the lwp is stopped.
12092 (any_thread_of): Delete.
12093 (linux_detach): Stop all lwps here. Don't blindly delete all
12094 breakpoints.
12095 (delete_lwp_callback): New.
12096 (linux_mourn): Delete all lwps of the process that is gone.
12097 (linux_wait_1): Don't delete the last lwp of the process here.
12098 * mem-break.h (mark_breakpoints_out): Declare.
12099 * mem-break.c (mark_breakpoints_out): New.
12100 (free_all_breakpoints): Use it.
12101 * server.c (handle_target_event): If the process is gone, mark
12102 breakpoints out.
12103 * thread-db.c (struct thread_db) <create_bp>: New field.
12104 (thread_db_enable_reporting): Fix prototype. Store a thread event
12105 breakpoint reference in the thread_db struct.
12106 (thread_db_load_search): Clear the thread_db object.
12107 (try_thread_db_load_1): Ditto.
12108 (switch_to_process): New.
12109 (disable_thread_event_reporting): Use it.
12110 (remove_thread_event_breakpoints): New.
12111 (thread_db_detach, thread_db_mourn): Use it.
12112
12113 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12114
12115 * linux-low.c (linux_enable_event_reporting): New.
12116 (linux_wait_for_event_1, handle_extended_wait): Use it.
12117
12118 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12119
12120 * linux-low.c (linux_kill_one_lwp, linux_kill)
12121 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12122 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12123 SIGSTOP even if the LWP is stopped.
12124 (send_sigstop_callback): New.
12125 (stop_all_lwps): Use send_sigstop_callback instead.
12126 (linux_resume_one_thread): Adjust.
12127 (proceed_one_lwp): Still proceed an LWP that the client has
12128 requested to stop, if we haven't reported it as stopped yet. Make
12129 sure that LWPs the client want stopped, have a pending SIGSTOP.
12130
12131 2010-04-26 Doug Evans <dje@google.com>
12132
12133 * server.c (handle_general_set): Make static.
12134
12135 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12136 Print received char after testing for error/eof instead of before.
12137 (input_interrupt): Tweak comment.
12138
12139 2010-04-23 Doug Evans <dje@google.com>
12140
12141 * server.c (start_inferior): Print inferior argv if --debug.
12142
12143 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12144
12145 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12146 * nto-x86-low.c: Include server.h
12147
12148 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12149
12150 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12151 be consistent with other sources of this directory.
12152 (init_registers_amd64): Correct name of source file of this function
12153 in the comment.
12154
12155 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12156
12157 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12158 64-bit executables.
12159
12160 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12161
12162 * win32-i386-low.c: Add 64-bit support.
12163 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12164 (init_registers_amd64): Declare.
12165 (mappings): Add 64-bit version of array.
12166 (init_windows_x86): New function.
12167 (the_low_target): Change init_arch field to init_windows_x86.
12168
12169 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12170
12171 * win32-low.c: Adapt to support also 64-bit architecture.
12172 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12173 (get_image_name): Use SIZE_T type for local variable `done'.
12174 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12175 (toolhelp_get_dll_name): Idem.
12176 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12177 Use uintptr_t typecast to avoid warning.
12178 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12179 (handle_exception): Use phex_nz to avoid warning.
12180 (win32_wait): Remove unused local variable `process'.
12181
12182 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12183
12184 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12185 `amd64-avx.o'.
12186
12187 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12188
12189 * configure.ac: Use `ws2_32' library for srv_mingw.
12190 * configure: Regenerate.
12191 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12192 * remote-utils.c: Likewise.
12193
12194 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12195
12196 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12197 if __x86_64__ is defined.
12198
12199 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12200
12201 * configure: Regenerate.
12202
12203 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12204
12205 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12206 * target.h (target_ops): New get_tib_address field.
12207 * win32-low.h (win32_thread_info): Add thread_local_base field.
12208 * win32-low.c (child_add_thread): Add tlb argument.
12209 Set thread_local_base field to TLB.
12210 (get_child_debug_event): Adapt to child_add_thread change.
12211 (win32_get_tib_address): New function.
12212 (win32_target_ops): Set get_tib_address field to
12213 win32_get_tib_address.
12214 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12215
12216 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12217
12218 * linux-low.c (linux_mourn): Also remove the process.
12219 * server.c (handle_target_event): Don't remove the process here.
12220 * nto-low.c (nto_mourn): New.
12221 (nto_target_ops): Install it.
12222 * spu-low.c (spu_mourn): New.
12223 (spu_target_ops): Install it.
12224 * win32-low.c (win32_mourn): New.
12225 (win32_target_ops): Install it.
12226
12227 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12228
12229 * server.h (buffer_xml_printf): Remove redundant `;'.
12230
12231 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12232
12233 * regcache.c (set_register_cache): Invalidate regcaches before
12234 changing the register cache layout.
12235 (regcache_invalidate_one): Allow a NULL regcache.
12236 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12237 regcaches before changing the register cache layout or the target
12238 regsets.
12239
12240 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12241
12242 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12243 variable warning on Linux/x86-64.
12244
12245 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12246
12247 GDBserver disconnected tracing support.
12248
12249 * linux-low.c (linux_remove_process): Delete.
12250 (add_lwp): Don't set last_resume_kind here.
12251 (linux_kill): Use `mourn'.
12252 (linux_detach): Use `thread_db_detach', and `mourn'.
12253 (linux_mourn): New.
12254 (linux_attach_lwp_1): Adjust comment.
12255 (linux_attach): last_resume_kind moved the thread_info; adjust.
12256 (status_pending_p_callback): Adjust.
12257 (linux_wait_for_event_1): Adjust.
12258 (count_events_callback, select_singlestep_lwp_callback)
12259 (select_event_lwp_callback, cancel_breakpoints_callback)
12260 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12261 (proceed_one_lwp): Adjust.
12262 (linux_async): Add debug output.
12263 (linux_thread_stopped): New.
12264 (linux_pause_all): New.
12265 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12266 linux_pause_all.
12267 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12268 (thread_db_free): Delete declaration.
12269 (thread_db_detach, thread_db_mourn): Declare.
12270 * thread-db.c (thread_db_init): Use thread_db_mourn.
12271 (thread_db_free): Delete, split in two.
12272 (disable_thread_event_reporting): New.
12273 (thread_db_detach): New.
12274 (thread_db_mourn): New.
12275
12276 * server.h (struct thread_info) <last_resume_kind>: New field.
12277 <attached>: Add comment.
12278 <gdb_detached>: New field.
12279 (handler_func): Change return type to int.
12280 (handle_serial_event, handle_target_event): Ditto.
12281 (gdb_connected): Declare.
12282 (tracing): Delete.
12283 (disconnected_tracing): Declare.
12284 (stop_tracing): Declare.
12285
12286 * server.c (handle_query) <qSupported>: Report support for
12287 disconnected tracing.
12288 (queue_stop_reply_callback): Account for running threads.
12289 (gdb_wants_thread_stopped): New.
12290 (gdb_wants_all_threads_stopped): New.
12291 (gdb_reattached_process): New.
12292 (handle_status): Clear the `gdb_detached' flag of all processes.
12293 In all-stop, stop all threads.
12294 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12295 (process_serial_event): If the remote connection breaks, or if an
12296 exit was forced with "monitor exit", force an event loop exit.
12297 Handle disconnected tracing on detach.
12298 (handle_serial_event): Adjust.
12299 (handle_target_event): If GDB isn't connected, forward events back
12300 to the inferior, unless the last process exited, in which case,
12301 exit gdbserver. Adjust interface.
12302
12303 * remote-utils.c (remote_open): Don't block in accept. Instead
12304 register an event loop source on the listen socket file
12305 descriptor. Refactor bits into ...
12306 (listen_desc): ... this new global.
12307 (gdb_connected): ... this new function.
12308 (enable_async_notification): ... this new function.
12309 (handle_accept_event): ... this new function.
12310 (remote_close): Clear remote_desc.
12311
12312 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12313
12314 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12315 New fields.
12316 (mourn_inferior): Define.
12317 (target_process_qsupported): Avoid the dangling else problem.
12318 (thread_stopped): Define.
12319 (pause_all): Define.
12320 (target_waitstatus_to_string): Declare.
12321 * target.c (target_waitstatus_to_string): New.
12322
12323 * tracepoint.c (tracing): Make extern.
12324 (disconnected_tracing): New.
12325 (stop_tracing): Make extern. Handle tracing stops due to GDB
12326 disconnecting.
12327 (cmd_qtdisconnected): New.
12328 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12329 (handle_tracepoint_general_set): Handle QTDisconnected.
12330
12331 * event-loop.c (event_handler_func): Change return type to int.
12332 (process_event): Bail out if the event handler wants the event
12333 loop to stop.
12334 (handle_file_event): Ditto.
12335 (start_event_loop): Bail out if the event handler wants the event
12336 loop to stop.
12337
12338 * nto-low.c (nto_target_ops): Adjust.
12339 * spu-low.c (spu_wait): Don't remove the process here.
12340 (spu_target_ops): Adjust.
12341 * win32-low.c (win32_wait): Don't remove the process here.
12342 (win32_target_ops): Adjust.
12343
12344 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12345
12346 * regcache.c (realloc_register_cache): Invalidate inferior's
12347 regcache before recreating it.
12348
12349 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12350
12351 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12352
12353 2010-04-09 Stan Shebs <stan@codesourcery.com>
12354 Pedro Alves <pedro@codesourcery.com>
12355
12356 * server.h (LONGEST): New.
12357 (struct thread_info) <while_stepping>: New field.
12358 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12359 Declare.
12360 (initialize_tracepoint, handle_tracepoint_general_set)
12361 (handle_tracepoint_query, tracepoint_finished_step)
12362 (tracepoint_was_hit, release_while_stepping_state_list):
12363 (current_traceframe): Declare.
12364 * server.c (handle_general_set): Handle tracepoint packets.
12365 (read_memory): New.
12366 (write_memory): New.
12367 (handle_search_memory_1): Use read_memory.
12368 (handle_query): Report support for conditional tracepoints, trace
12369 state variables, and tracepoint sources. Handle tracepoint
12370 queries.
12371 (main): Initialize the tracepoints module.
12372 (process_serial_event): Handle traceframe reads/writes.
12373
12374 * linux-low.c (handle_tracepoints): New.
12375 (linux_wait_1): Call it.
12376 (linux_resume_one_lwp): Handle while-stepping.
12377 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12378 (linux_target_ops): Install them.
12379 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12380 New field.
12381 * linux-x86-low.c (x86_supports_tracepoints): New.
12382 (the_low_target). Install it.
12383
12384 * mem-break.h (delete_breakpoint): Declare.
12385 * mem-break.c (delete_breakpoint): Make external.
12386
12387 * target.h (struct target_ops): Add `supports_tracepoints',
12388 `read_pc', and `write_pc' fields.
12389 (target_supports_tracepoints): Define.
12390 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12391 (phex_nz): New.
12392
12393 * regcache.h (struct regcache) <registers_owned>: New field.
12394 (init_register_cache, regcache_cpy): Declare.
12395 (regcache_read_pc, regcache_write_pc): Declare.
12396 (register_cache_size): Declare.
12397 (supply_regblock): Declare.
12398 * regcache.c (init_register_cache): New.
12399 (new_register_cache): Use it.
12400 (regcache_cpy): New.
12401 (register_cache_size): New.
12402 (supply_regblock): New.
12403 (regcache_read_pc, regcache_write_pc): New.
12404
12405 * tracepoint.c: New.
12406
12407 * Makefile.in (OBS): Add tracepoint.o.
12408 (tracepoint.o): New rule.
12409
12410 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12411
12412 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12413 (i386-mmx.o): New.
12414 (i386-mmx.c): Likewise.
12415 (i386-mmx-linux.o): Likewise.
12416 (i386-mmx-linux.c): Likewise.
12417
12418 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12419 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12420 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12421 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12422
12423 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12424 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12425 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12426
12427 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12428
12429 * Makefile.in (clean): Updated.
12430 (i386-avx.o): New.
12431 (i386-avx.c): Likewise.
12432 (i386-avx-linux.o): Likewise.
12433 (i386-avx-linux.c): Likewise.
12434 (amd64-avx.o): Likewise.
12435 (amd64-avx.c): Likewise.
12436 (amd64-avx-linux.o): Likewise.
12437 (amd64-avx-linux.c): Likewise.
12438
12439 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12440 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12441 (srv_amd64_regobj): Add amd64-avx.o.
12442 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12443 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12444 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12445 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12446 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12447 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12448 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12449
12450 * i387-fp.c: Include "i386-xstate.h".
12451 (i387_xsave): New.
12452 (i387_cache_to_xsave): Likewise.
12453 (i387_xsave_to_cache): Likewise.
12454 (x86_xcr0): Likewise.
12455
12456 * i387-fp.h (i387_cache_to_xsave): Likewise.
12457 (i387_xsave_to_cache): Likewise.
12458 (x86_xcr0): Likewise.
12459
12460 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12461 * linux-crisv32-low.c (target_regsets): Likewise.
12462 * linux-m68k-low.c (target_regsets): Likewise.
12463 * linux-mips-low.c (target_regsets): Likewise.
12464 * linux-ppc-low.c (target_regsets): Likewise.
12465 * linux-s390-low.c (target_regsets): Likewise.
12466 * linux-sh-low.c (target_regsets): Likewise.
12467 * linux-sparc-low.c (target_regsets): Likewise.
12468 * linux-xtensa-low.c (target_regsets): Likewise.
12469
12470 * linux-low.c: Include <sys/uio.h>.
12471 (regsets_fetch_inferior_registers): Support nt_type.
12472 (regsets_store_inferior_registers): Likewise.
12473 (linux_process_qsupported): New.
12474 (linux_target_ops): Add linux_process_qsupported.
12475
12476 * linux-low.h (regset_info): Add nt_type.
12477 (linux_target_ops): Add process_qsupported.
12478
12479 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12480 and <sys/uio.h>.
12481 (init_registers_i386_avx_linux): New.
12482 (init_registers_amd64_avx_linux): Likewise.
12483 (xmltarget_i386_linux_no_xml): Likewise.
12484 (xmltarget_amd64_linux_no_xml): Likewise.
12485 (PTRACE_GETREGSET): Likewise.
12486 (PTRACE_SETREGSET): Likewise.
12487 (x86_fill_xstateregset): Likewise.
12488 (x86_store_xstateregset): Likewise.
12489 (use_xml): Likewise.
12490 (x86_linux_update_xmltarget): Likewise.
12491 (x86_linux_process_qsupported): Likewise.
12492 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12493 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12494 init_registers_i386_linux here. Call
12495 x86_linux_update_xmltarget.
12496 (the_low_target): Add x86_linux_process_qsupported.
12497
12498 * server.c (handle_query): Call target_process_qsupported.
12499
12500 * target.h (target_ops): Add process_qsupported.
12501 (target_process_qsupported): New.
12502
12503 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12504
12505 * inferiors.c (add_thread): Set last_status kind to
12506 TARGET_WAITKIND_IGNORE.
12507 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12508 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12509 (linux_wait_1): Move `thread' local definition to block that uses
12510 it. Don't NULL initialize `event_child'.
12511 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12512 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12513 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12514
12515 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12516
12517 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12518 an extended waitstatus, or by a watchpoint.
12519 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12520 thread was stepping or has been stopped by a watchpoint.
12521
12522 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12523
12524 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12525 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12526 of another, then delete the previous, and validate all
12527 breakpoints.
12528 (validate_inserted_breakpoint): New.
12529 (delete_disabled_breakpoints): New.
12530 (validate_breakpoints): New.
12531 (check_mem_read): Validate breakpoints before trusting their
12532 shadow. Delete disabled breakpoints.
12533 (check_mem_write): Validate breakpoints before trusting they
12534 should be inserted. Delete disabled breakpoints.
12535 * mem-break.h (validate_breakpoints):
12536 * server.c (handle_query): Validate breakpoints when we see a
12537 qSymbol query.
12538
12539 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12540
12541 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12542 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12543 if we could tell there's a GDB breakpoint at stop_pc.
12544 (need_step_over_p): Don't do a step over if we find a GDB
12545 breakpoint at the resume PC.
12546
12547 * mem-break.c (struct raw_breakpoint): New.
12548 (enum bkpt_type): New type `gdb_breakpoint'.
12549 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12550 fields. New field `raw'.
12551 (find_raw_breakpoint_at): New.
12552 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12553 breakpoint instead.
12554 (set_breakpoint_at): Adjust.
12555 (delete_raw_breakpoint): New.
12556 (release_breakpoint): New.
12557 (delete_breakpoint): Rename to...
12558 (delete_breakpoint_1): ... this. Add proc parameter. Use
12559 release_breakpoint. Return ENOENT.
12560 (delete_breakpoint): Reimplement.
12561 (find_breakpoint_at): Delete.
12562 (find_gdb_breakpoint_at): New.
12563 (delete_breakpoint_at): Delete.
12564 (set_gdb_breakpoint_at): New.
12565 (delete_gdb_breakpoint_at): New.
12566 (gdb_breakpoint_here): New.
12567 (set_reinsert_breakpoint): Use release_breakpoint.
12568 (uninsert_breakpoint): Rename to ...
12569 (uninsert_raw_breakpoint): ... this.
12570 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12571 (reinsert_raw_breakpoint): Change parameter type to
12572 raw_breakpoint.
12573 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12574 instead.
12575 (check_breakpoints): Adjust. Use release_breakpoint.
12576 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12577 (breakpoint_inserted_here): Ditto.
12578 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12579 Don't trust the breakpoint's shadow if it is not inserted.
12580 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12581 (delete_all_breakpoints): Adjust.
12582 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12583 use delete_breakpoint_1.
12584
12585 * mem-break.h (breakpoints_supported): Delete declaration.
12586 (set_gdb_breakpoint_at): Declare.
12587 (gdb_breakpoint_here): Declare.
12588 (delete_breakpoint_at): Delete.
12589 (delete_gdb_breakpoint_at): Declare.
12590
12591 * server.h (struct raw_breakpoint): Forward declare.
12592 (struct process_info): New field `raw_breakpoints'.
12593
12594 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12595 breakpoints.
12596
12597 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12598
12599 * linux-low.c (status_pending_p_callback): Fix comment.
12600 (linux_wait_for_event_1): Move most of the internal breakpoint
12601 handling from here...
12602 (linux_wait_1): ... to here.
12603 (count_events_callback): New.
12604 (select_singlestep_lwp_callback): New.
12605 (select_event_lwp_callback): New.
12606 (cancel_breakpoints_callback): New.
12607 (select_event_lwp): New.
12608 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12609 priority to all LWPs that have had events that should be reported
12610 to the client. Cancel breakpoints when about to reporting the
12611 event to the client, not while stopping lwps. No longer cancel
12612 finished single-steps here.
12613 (cancel_finished_single_step): Delete.
12614 (cancel_finished_single_steps): Delete.
12615
12616 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12617
12618 * mem-break.c (enum bkpt_type): New.
12619 (struct breakpoint): New field `type'.
12620 (set_breakpoint_at): Change return type to struct breakpoint
12621 pointer. Set type to `other_breakpoint' by default.
12622 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12623 in the breakpoint list.
12624 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12625 (reinsert_breakpoint): Rename to ...
12626 (reinsert_raw_breakpoint): ... this.
12627 (reinsert_breakpoints_at): Adjust.
12628 * mem-break.h (struct breakpoint): Declare.
12629 (set_breakpoint_at): Change return type to struct breakpoint
12630 pointer.
12631
12632 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12633
12634 * server.c (handle_query): Assign, not compare.
12635
12636 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12637
12638 Teach linux gdbserver to step-over-breakpoints.
12639
12640 * linux-low.c (can_hardware_single_step): New.
12641 (supports_breakpoints): New.
12642 (handle_extended_wait): If stopping threads, read the stop pc of
12643 the new cloned LWP.
12644 (get_pc): New.
12645 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12646 low target doesn't support retrieving the PC.
12647 (add_lwp): Set last_resume_kind to resume_continue.
12648 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12649 (linux_attach): Don't clear stop_expected. Set the lwp's
12650 last_resume_kind to resume_stop.
12651 (linux_detach_one_lwp): Don't check for removed breakpoints.
12652 (check_removed_breakpoint): Delete.
12653 (status_pending_p): Rename to ...
12654 (status_pending_p_callback): ... this. Don't check for removed
12655 breakpoints. Don't consider threads that are stopped from GDB's
12656 perspective.
12657 (linux_wait_for_lwp): Always read the stop_pc here.
12658 (cancel_breakpoint): New.
12659 (step_over_bkpt): New global.
12660 (linux_wait_for_event_1): Implement stepping over breakpoints.
12661 (gdb_wants_lwp_stopped): New.
12662 (gdb_wants_all_stopped): New.
12663 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12664 single-step traps here. Store the thread's last reported target
12665 wait status.
12666 (send_sigstop): Don't clear stop_expected. Always set it,
12667 instead.
12668 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12669 (cancel_finished_single_step): New.
12670 (cancel_finished_single_steps): New.
12671 (wait_for_sigstop): Don't cancel finished single-step traps here.
12672 (linux_resume_one_lwp): Don't check for removed breakpoints.
12673 Don't set `step' on non-hardware step archs.
12674 (linux_set_resume_request): Ignore resume_stop requests if already
12675 stopping or stopped. Set the lwp's last_resume_kind.
12676 (resume_status_pending_p): Don't check for removed breakpoints.
12677 (need_step_over_p): New.
12678 (start_step_over): New.
12679 (finish_step_over): New.
12680 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12681 requests. Clear the thread's last reported target waitstatus.
12682 Don't use the `suspended' flag. Don't consider pending breakpoints.
12683 (linux_resume): Start a step-over if necessary.
12684 (proceed_one_lwp): New.
12685 (proceed_all_lwps): New.
12686 (unstop_all_lwps): New.
12687 * linux-low.h (struct lwp_info): Rewrite comment for the
12688 `suspended' flag. Add the `stop_pc' field. Delete the
12689 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12690 Add `'last_resume_kind' and `need_step_over' fields.
12691 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12692 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12693 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12694 (set_raw_breakpoint_at): New.
12695 (set_breakpoint_at): Rewrite to use it.
12696 (reinsert_breakpoint_handler): Delete.
12697 (set_reinsert_breakpoint): New.
12698 (reinsert_breakpoint_by_bp): Delete.
12699 (delete_reinsert_breakpoints): New.
12700 (uninsert_breakpoint): Rewrite.
12701 (uninsert_breakpoints_at): New.
12702 (reinsert_breakpoint): Rewrite.
12703 (reinsert_breakpoints_at): New.
12704 (check_breakpoints): Rewrite.
12705 (breakpoint_here): New.
12706 (breakpoint_inserted_here): New.
12707 (check_mem_read): Adjust.
12708 * mem-break.h (breakpoints_supported, breakpoint_here)
12709 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12710 (reinsert_breakpoint_by_bp): Delete declaration.
12711 (delete_reinsert_breakpoints): Declare.
12712 (reinsert_breakpoint): Delete declaration.
12713 (reinsert_breakpoints_at): Declare.
12714 (uninsert_breakpoint): Delete declaration.
12715 (uninsert_breakpoints_at): Declare.
12716 (check_breakpoints): Adjust prototype.
12717 * server.h: Adjust include order.
12718 (struct thread_info): Declare here. Add a `last_status' field.
12719
12720 2010-03-23 Michael Snyder <msnyder@vmware.com>
12721
12722 * server.c (crc32): New function.
12723 (handle_query): Add handling for 'qCRC:' request.
12724
12725 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12726
12727 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12728 lwp had been stopped by a watchpoint.
12729
12730 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12731
12732 * server.h (internal_error): Declare.
12733 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12734 * utils.c (internal_error): New function.
12735
12736 2010-03-15 Andreas Schwab <schwab@redhat.com>
12737
12738 * configure.srv: Fix typo setting srv_regobj.
12739
12740 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12741
12742 * linux-low.c (fetch_register): Avoid passing a non string literal
12743 format to `error'.
12744 (usr_store_inferior_registers): Ditto.
12745
12746 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12747
12748 * linux-low.c (linux_write_memory): Bail out early if peeking
12749 memory failed.
12750
12751 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12752
12753 * linux-low.h (struct lwp_info): New fields
12754 `stopped_by_watchpoint' and `stopped_data_address'.
12755 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12756 here, and cache them in the lwp object.
12757 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12758 directly.
12759 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12760 field.
12761 (linux_stopped_by_watchpoint): Rewrite.
12762 (linux_stopped_data_address): Rewrite.
12763
12764 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12765
12766 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12767 switching the current inferior, not before.
12768
12769 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12770
12771 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12772 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12773 i386-linux.c and amd64-linux.c.
12774 (reg-i386.o): Removed.
12775 (reg-i386.c): Likewise.
12776 (reg-i386-linux.o): Likewise.
12777 (reg-i386-linux.c): Likewise.
12778 (reg-x86-64.o): Likewise.
12779 (reg-x86-64.c): Likewise.
12780 (reg-x86-64-linux.o): Likewise.
12781 (reg-x86-64-linux.c): Likewise.
12782 (i386.o): New.
12783 (i386.c): Likewise.
12784 (i386-linux.o): Likewise.
12785 (i386-linux.c): Likewise.
12786 (amd64.o): Likewise.
12787 (amd64.c): Likewise.
12788 (amd64-linux.o): Likewise.
12789 (amd64-linux.c): Likewise.
12790
12791 * configure.srv (srv_i386_regobj): New.
12792 (srv_i386_linux_regobj): Likewise.
12793 (srv_amd64_regobj): Likewise.
12794 (srv_amd64_linux_regobj): Likewise.
12795 (srv_i386_32bit_xmlfiles): Likewise.
12796 (srv_i386_64bit_xmlfiles): Likewise.
12797 (srv_i386_xmlfiles): Likewise.
12798 (srv_amd64_xmlfiles): Likewise.
12799 (srv_i386_linux_xmlfiles): Likewise.
12800 (srv_amd64_linux_xmlfiles): Likewise.
12801 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12802 srv_xmlfiles to $srv_i386_xmlfiles.
12803 (i[34567]86-*-mingw32ce*): Likewise.
12804 (i[34567]86-*-mingw*): Likewise.
12805 (i[34567]86-*-nto*): Likewise.
12806 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12807 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12808 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12809 (x86_64-*-linux*): Likewise.
12810
12811 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12812 (init_registers_amd64_linux): New.
12813 (x86_arch_setup): Replace init_registers_x86_64_linux with
12814 init_registers_amd64_linux.
12815
12816 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12817
12818 * configure.ac: Check for libdl. If it is not available link against
12819 static libthread_db.
12820 * configure: Regenerate.
12821
12822 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12823
12824 PR9605
12825
12826 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12827 handing a read watchpoint.
12828 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12829
12830 2010-02-12 Doug Evans <dje@google.com>
12831
12832 * linux-low.c (linux_supports_tracefork_flag): Document.
12833 (linux_look_up_symbols): Add comment.
12834
12835 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12836
12837 * regcache.c (supply_register): Clear regcache if buf is NULL.
12838
12839 2010-02-02 Nicolas Roche <roche@sourceware.org>
12840 Joel Brobecker <brobecker@adacore.com>
12841
12842 * inferiors.c (find_inferior): Add function documentation.
12843 (unloaded_dll): Handle the case where the unloaded dll has not
12844 been previously registered in the dll list.
12845
12846 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12847
12848 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12849 (thumb2_breakpoint): New.
12850 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12851
12852 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12853
12854 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12855 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12856 breakpoints.
12857
12858 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12859
12860 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12861
12862 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12863
12864 * linux-s390-low.c (s390_collect_ptrace_register)
12865 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12866
12867 2010-01-21 Doug Evans <dje@google.com>
12868
12869 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12870 (PTRACE_ARG4_TYPE): New macro.
12871 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12872 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12873 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12874 (usr_store_inferior_registers): Ditto.
12875 (linux_read_memory, linux_write_memory): Ditto.
12876 (linux_test_for_tracefork): Ditto.
12877
12878 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12879 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12880
12881 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12882
12883 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12884 target.
12885
12886 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12887
12888 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12889 prototype to take a regcache. Adjust.
12890
12891 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12892
12893 * regcache.h (struct thread_info): Forward declare.
12894 (struct regcache): New.
12895 (new_register_cache): Adjust prototype.
12896 (get_thread_regcache): Declare.
12897 (free_register_cache): Adjust prototype.
12898 (registers_to_string, registers_from_string): Ditto.
12899 (supply_register, supply_register_by_name, collect_register)
12900 (collect_register_as_string, collect_register_by_name): Ditto.
12901 * regcache.c (struct inferior_regcache_data): Delete.
12902 (get_regcache): Rename to ...
12903 (get_thread_regcache): ... this. Adjust. Switch inferior before
12904 fetching registers.
12905 (regcache_invalidate_one): Adjust.
12906 (regcache_invalidate): Fix prototype.
12907 (new_register_cache): Return the new register cache.
12908 (free_register_cache): Change prototype.
12909 (realloc_register_cache): Adjust.
12910 (registers_to_string): Change prototype to take a regcache. Adjust.
12911 (registers_from_string): Ditto.
12912 (register_data): Ditto.
12913 (supply_register): Ditto.
12914 (supply_register_by_name): Ditto.
12915 (collect_register): Ditto.
12916 (collect_register_as_string): Ditto.
12917 (collect_register_by_name): Ditto.
12918 * server.c (process_serial_event): Adjust.
12919 * linux-low.h (regset_fill_func, regset_store_func): Change
12920 prototype.
12921 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12922 Change prototype.
12923 * linux-low.c (get_stop_pc): Adjust.
12924 (check_removed_breakpoint): Adjust.
12925 (linux_wait_for_event): Adjust.
12926 (linux_resume_one_lwp): Adjust.
12927 (fetch_register): Add regcache parameter. Adjust.
12928 (usr_store_inferior_registers): Ditto.
12929 (regsets_fetch_inferior_registers): Ditto.
12930 (regsets_store_inferior_registers): Ditto.
12931 (linux_fetch_registers, linux_store_registers): Ditto.
12932 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12933 regcache. Adjust.
12934 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12935 Ditto.
12936 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12937 prototype to take a regcache.
12938 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12939 * remote-utils.c (convert_ascii_to_int, outreg)
12940 (prepare_resume_reply): Change prototype to take a regcache.
12941 Adjust.
12942 * target.h (struct target_ops) <fetch_registers, store_registers>:
12943 Change prototype to take a regcache.
12944 (fetch_inferior_registers, store_inferior_registers): Change
12945 prototype to take a regcache. Adjust.
12946 * proc-service.c (ps_lgetregs): Adjust.
12947 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12948 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12949 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12950 take a regcache. Adjust.
12951 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12952 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12953 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12954 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12955 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12956 (cris_cannot_fetch_register):
12957 (cris_breakpoint_at): Change prototype to take a regcache.
12958 Adjust.
12959 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12960 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12961 to take a regcache. Adjust.
12962 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12963 Adjust.
12964 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12965 take a regcache. Adjust.
12966 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12967 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12968 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12969 * linux-mips-low.c (mips_get_pc):
12970 (mips_set_pc): Change prototype to take a regcache. Adjust.
12971 (mips_reinsert_addr): Adjust.
12972 (mips_collect_register): Change prototype to take a regcache.
12973 Adjust.
12974 (mips_supply_register):
12975 (mips_collect_register_32bit, mips_supply_register_32bit)
12976 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12977 (mips_store_fpregset): Ditto.
12978 * linux-ppc-low.c (ppc_supply_ptrace_register)
12979 (ppc_supply_ptrace_register): Ditto.
12980 (parse_spufs_run): Adjust.
12981 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12982 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12983 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12984 take a regcache. Adjust.
12985 * linux-s390-low.c (s390_collect_ptrace_register)
12986 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12987 (s390_set_pc): Change prototype to take a regcache. Adjust.
12988 (s390_arch_setup): Adjust.
12989 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12990 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12991 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12992 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12993 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12994 regcache. Adjust.
12995 (sparc_breakpoint_at): Adjust.
12996 * linux-xtensa-low.c (xtensa_fill_gregset):
12997 (xtensa_store_gregset):
12998 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12999 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13000 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13001 prototype to take a regcache. Adjust.
13002 * win32-arm-low.c (arm_fetch_inferior_register)
13003 (arm_store_inferior_register): Change prototype to take a
13004 regcache. Adjust.
13005 * win32-i386-low.c (i386_fetch_inferior_register)
13006 (i386_store_inferior_register): Change prototype to take a
13007 regcache. Adjust.
13008 * win32-low.c (child_fetch_inferior_registers)
13009 (child_store_inferior_registers): Change prototype to take a
13010 regcache. Adjust.
13011 (win32_wait): Adjust.
13012 (win32_fetch_inferior_registers): Change prototype to take a
13013 regcache. Adjust.
13014 (win32_store_inferior_registers): Adjust.
13015 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13016 store_inferior_register>: Change prototype to take a regcache.
13017
13018 2010-01-20 Doug Evans <dje@google.com>
13019
13020 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13021 #ifdef.
13022 (linux_wait_for_event1, linux_init_signals): Ditto.
13023 (W_STOPCODE): Provide definition if missing.
13024
13025 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13026
13027 * linux-low.c (linux_core_of_thread): New.
13028 (compare_ints, show_process, list_threads): New.
13029 (linux_qxfer_osdata): Report threads and cores.
13030 (linux_target_op): Register linux_core_of_thread.
13031 * remote-utils.c (prepare_resume_reply): Report the core.
13032 (buffer_xml_printf): Support %d specifier.
13033 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13034 New.
13035 (handle_query): Handle qXfer:threads. Announce availability
13036 thereof.
13037 * target.h (struct target_ops): New field core_of_thread.
13038
13039 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13040
13041 * Makefile.in (clean): Remove new generated files.
13042 (reg-s390.o, reg-s390.c): Remove rules.
13043 (reg-s390x.o, reg-s390x.c): Likewise.
13044 (s390-linux32.o, s390-linux32.c): Add rules.
13045 (s390-linux64.o, s390-linux64.c): Likewise.
13046 (s390x-linux64.o, s390x-linux64.c): Likewise.
13047 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13048 * linux-s390-low.c: Include <elf.h>.
13049 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13050 (init_registers_s390): Remove prototype.
13051 (init_registers_s390x): Likewise.
13052 (init_registers_s390_linux32): Add prototype.
13053 (init_registers_s390_linux64): Likewise.
13054 (init_registers_s390x_linux64): Likewise.
13055 (s390_num_regs_3264): New define.
13056 (s390_regmap_3264): New global variable.
13057 (s390_cannot_fetch_register): Remove obsolete check.
13058 (s390_cannot_store_register): Likewise.
13059 (s390_collect_ptrace_register): Handle upper/lower register halves.
13060 (s390_supply_ptrace_register): Likewise.
13061 (s390_fill_gregset): Update to register number changes.
13062 (s390_get_hwcap): New routine.
13063 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13064 Install appropriate regmap and register set.
13065
13066 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13067
13068 * server.c (gdbserver_version): Update copyright year to 2010.
13069 * gdbreplay.c (gdbreplay_version): Likewise.
13070
13071 2009-12-28 Doug Evans <dje@google.com>
13072
13073 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13074 elf/external.h. Include <elf.h> instead but only if necessary.
13075
13076 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13077
13078 * linux-low.c (linux_remove_process): Remove `detaching'
13079 parameter. Don't release/detach from thread_db here.
13080 (linux_kill): Release/detach from thread_db here, ...
13081 (linux_detach): ... and here, before actually detaching.
13082 (linux_wait_1): ... and here, when a process exits.
13083 * thread-db.c (any_thread_of): New.
13084 (thread_db_free): Switch the current inferior to a thread of the
13085 passed in process.
13086
13087 2009-12-21 Doug Evans <dje@google.com>
13088
13089 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13090
13091 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13092 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13093 warning ifndef __NR_tkill. Move setting of errno there too.
13094 Delete unnecessary resetting of errno after syscall.
13095 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13096
13097 * configure.ac: Check for dladdr.
13098 * config.in: Regenerate.
13099 * configure: Regenerate.
13100 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13101 (try_thread_db_load): Update.
13102
13103 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13104
13105 2009-12-18 Doug Evans <dje@google.com>
13106
13107 * event-loop.c: Include unistd.h if it exists.
13108
13109 * linux-low.c (my_waitpid): Move definition away from being in
13110 between linux_tracefork_child/linux_test_for_tracefork.
13111
13112 * gdb_proc_service.h (psaddr_t): Fix type.
13113 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13114 signature to match glibc.
13115
13116 2009-12-16 Doug Evans <dje@google.com>
13117
13118 * linux-low.c (linux_read_memory): Fix argument to read.
13119
13120 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13121
13122 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13123 events, don't leave current_inferior pointing at null.
13124
13125 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13126
13127 * win32-low.c (LOG): Delete.
13128 (OUTMSG): Output to stderr.
13129 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13130 on compile time LOG macro.
13131 (win32_wait): Fix debug output.
13132
13133 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13134
13135 * win32-low.c (win32_add_one_solib): If the dll name is
13136 "ntdll.dll", prepend the system directory to the dll path.
13137
13138 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13139
13140 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13141
13142 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13143 Vladimir Prus <vladimir@codesourcery.com>
13144
13145 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13146 * configure.ac: Check for __mcoldfire__ and set
13147 gdb_cv_m68k_is_coldfire.
13148 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13149 reg-cf.o and reg-m68k.o.
13150 * configure: Regenerated.
13151
13152 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13153
13154 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13155 Pass it to thread_db_free.
13156 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13157 proper `detaching' argument to linux_remove_process.
13158 * linux-low.h (thread_db_free): Add `detaching' parameter.
13159 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13160 to thread_db_free.
13161 (thread_db_free): Add `detaching' parameter. Only
13162 call td_ta_clear_event if detaching from process.
13163
13164 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13165
13166 * thread-db.c (thread_db_free): Fix typo.
13167
13168 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13169
13170 PR gdb/10838
13171 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13172
13173 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13174
13175 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13176 with an i686 compiler.
13177 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13178 needed.
13179 * configure: Rebuilt.
13180
13181 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13182
13183 PR gdb/10783
13184
13185 * server.c (handle_search_memory_1): Correct read_addr initialization
13186 in loop for searching subsequent chunks.
13187
13188 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13189
13190 * configure.ac: New --with-libthread-db option.
13191 * thread-db.c: Allow direct dependence on libthread_db.
13192 (thread_db_free): Adjust.
13193 * config.in: Regenerate.
13194 * configure: Likewise.
13195
13196 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13197
13198 PR gdb/10757
13199 * thread-db.c (attach_thread): New function.
13200 (maybe_attach_thread): Return success/failure.
13201 (find_new_threads_callback): Adjust.
13202 (thread_db_find_new_threads): Loop until no new threads.
13203
13204 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13205
13206 * proc-service.c (ps_lgetregs): Formatting.
13207
13208 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13209
13210 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13211 * configure.ac: Adjust.
13212 * linux-low.h (struct process_info_private): Move members to struct
13213 thread_db.
13214 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13215 * linux-low.c (linux_remove_process): Adjust.
13216 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13217 * server.c (handle_query): Move code ...
13218 (handle_monitor_command): ... here. New function.
13219 * target.h (struct target_ops): New member.
13220 * thread-db.c (struct thread_db): New.
13221 (libthread_db_search_path): New variable.
13222 (thread_db_create_event, thread_db_enable_reporting)
13223 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13224 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13225 (try_thread_db_load_1, dladdr_to_soname): New functions.
13226 (try_thread_db_load, thread_db_load_search): New functions.
13227 (thread_db_init): Search for libthread_db.
13228 (thread_db_free): New function.
13229 (thread_db_handle_monitor_command): Likewise.
13230 * config.in: Regenerate.
13231 * configure: Regenerate.
13232
13233 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13234
13235 * spu-low.c (spu_kill): Wait for inferior to terminate.
13236 Call clear_inferiors.
13237 (spu_detach): Call clear_inferiors.
13238
13239 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13240
13241 * aclocal.m4: Regenerate.
13242 * config.in: Likewise.
13243 * configure: Likewise.
13244
13245 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13246
13247 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13248 (parse_spufs_run): New function.
13249 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13250 (ppc_breakpoint_at): Handle SPU breakpoints.
13251
13252 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13253
13254 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13255 (SPUFS_MAGIC): Define.
13256 (spu_enumerate_spu_ids): New function.
13257 (linux_qxfer_spu): New function.
13258 (linux_target_ops): Install linux_qxfer_spu.
13259
13260 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13261
13262 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13263 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13264 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13265 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13266 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13267 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13268 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13269 (init_registers_powerpc_cell32l): Add prototype.
13270 (init_registers_powerpc_cell64l): Likewise.
13271 (ppc_arch_setup): Detect Cell/B.E. architecture.
13272
13273 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13274
13275 * Makefile.in (datarootdir): New variable.
13276
13277 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13278
13279 * linux-low.c (linux_write_memory): Update debugging output.
13280 * Makefile.in (clean): Add new descriptions.
13281 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13282 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13283 * configure.srv: Add new files for arm*-*-linux*.
13284 * linux-arm-low.c: Add new declarations.
13285 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13286 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13287 (HWCAP_VFPv3D16): New.
13288 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13289 instead of __IWMMXT__.
13290 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13291 (arm_arch_setup): New.
13292 (target_regsets): Remove #ifdef. Add VFP regset.
13293 (the_low_target): Use arm_arch_setup.
13294
13295 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13296
13297 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13298 the main thread again.
13299
13300 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13301
13302 Adding Neutrino gdbserver.
13303 * configure: Regenerated.
13304 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13305 * configure.srv (i[34567]86-*-nto*): New target.
13306 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13307 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13308 (nto_comctrl) [__QNX__]: New function.
13309 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13310
13311 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13312
13313 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13314 srv_tgtobj.
13315
13316 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13317 Pedro Alves <pedro@codesourcery.com>
13318
13319 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13320 don't support CONTEXT_EXTENDED_REGISTERS.
13321 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13322 (the_low_target): Install them.
13323 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13324 failing with ERROR_PIPE_NOT_CONNECTED.
13325
13326 2009-06-30 Doug Evans <dje@google.com>
13327 Pierre Muller <muller@ics.u-strasbg.fr>
13328
13329 Add h/w watchpoint support to x86-linux, win32-i386.
13330 * Makefile.in (SFILES): Add i386-low.c
13331 (i386_low_h): Define.
13332 (i386-low.o): Add dependencies.
13333 (linux-x86-low.o): Add i386-low.h dependency.
13334 (win32-i386-low.o): Ditto.
13335 * i386-low.c: New file.
13336 * i386-low.h: New file.
13337 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13338 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13339 * linux-low.c (linux_add_process): Initialize arch_private.
13340 (linux_remove_process): Free arch_private.
13341 (add_lwp): Initialize arch_private.
13342 (delete_lwp): Free arch_private.
13343 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13344 provided.
13345 * linux-low.h (process_info_private): New member arch_private.
13346 (lwp_info): New member arch_private.
13347 (linux_target_ops): New members new_process, new_thread,
13348 prepare_to_resume.
13349 (ptid_of): New macro.
13350 * linux-x86-low.c: Include stddef.h, i386-low.h.
13351 (arch_process_info): New struct.
13352 (arch_lwp_info): New struct.
13353 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13354 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13355 (i386_dr_low_get_status): New function.
13356 (x86_insert_point, x86_remove_point): New functions.
13357 (x86_stopped_by_watchpoint): New function.
13358 (x86_stopped_data_address): New function.
13359 (x86_linux_new_process, x86_linux_new_thread): New functions.
13360 (x86_linux_prepare_to_resume): New function.
13361 (the_low_target): Add entries for insert_point, remove_point,
13362 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13363 prepare_to_resume.
13364 * server.c (debug_hw_points): New global.
13365 (monitor_show_help): Document set debug-hw-points.
13366 (handle_query): Process "set debug-hw-points".
13367 * server.h (debug_hw_points): Declare.
13368 (paddress): Declare.
13369 * utils.c (NUMCELLS, CELLSIZE): New macros.
13370 (get_sell, xsnprintf, paddress): New functions.
13371 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13372 remove_point, stopped_by_watchpoint, stopped_data_address.
13373 * win32-i386-low.c: Include i386-low.h.
13374 (debug_reg_state): Replaces dr.
13375 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13376 (i386_dr_low_get_status): New function.
13377 (i386_insert_point, i386_remove_point): New functions.
13378 (i386_stopped_by_watchpoint): New function.
13379 (i386_stopped_data_address): New function.
13380 (i386_initial_stuff): Update.
13381 (get_thread_context,set_thread_context,i386_thread_added): Update.
13382 (the_low_target): Add entries for insert_point,
13383 remove_point, stopped_by_watchpoint, stopped_data_address.
13384 * win32-low.c (win32_insert_watchpoint): New function.
13385 (win32_remove_watchpoint): New function.
13386 (win32_stopped_by_watchpoint): New function.
13387 (win32_stopped_data_address): New function.
13388 (win32_target_ops): Add entries for insert_watchpoint,
13389 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13390 * win32-low.h (win32_target_ops): New members insert_point,
13391 remove_point, stopped_by_watchpoint, stopped_data_address.
13392
13393 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13394
13395 * server.c (process_serial_event): Re-return unsupported, not
13396 error, if the type isn't recognized. Re-allow supporting only
13397 insert or remove packets. Also call require_running for
13398 breakpoints. Add missing break statement to default case. Tidy.
13399 * target.h (struct target_ops): Rename insert_watchpoint to
13400 insert_point, and remove_watchpoint to remove_point.
13401
13402 * linux-low.h (struct linux_target_ops): Likewise.
13403 * linux-low.c (linux_insert_watchpoint): Rename to ...
13404 (linux_insert_point): ... this. Adjust.
13405 (linux_remove_watchpoint): Rename to ...
13406 (linux_remove_point): ... this. Adjust.
13407 (linux_target_ops): Adjust.
13408 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13409 (cris_insert_point): ... this.
13410 (cris_remove_watchpoint): Rename to ...
13411 (cris_remove_point): ... this.
13412 (the_low_target): Adjust.
13413
13414 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13415
13416 * server.c (handle_v_kill): Pass signal_pid to
13417 kill_inferior if multi_process is zero.
13418
13419 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13420
13421 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13422 * target.h (target_ops): Comment for *_watchpoint to make it clear
13423 the functions can get types '0' and '1'.
13424
13425 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13426
13427 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13428 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13429 * regcache.c (get_regcache): Likewise.
13430 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13431 * win32-low.c (child_fetch_inferior_registers): Remove check for
13432 regno 0.
13433
13434 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13435 Pedro Alves <pedro@codesourcery.com>
13436
13437 * target.h (struct target_ops) <supports_multi_process>: New
13438 callback.
13439 (target_supports_multi_process): New.
13440 * server.c (handle_query): Even if GDB reports support, only
13441 enable multi-process if the target also supports it. Report
13442 multi-process support only if the target backend supports it.
13443 * linux-low.c (linux_supports_multi_process): New function.
13444 (linux_target_ops): Install it as target_supports_multi_process
13445 callback.
13446
13447 2009-05-24 Doug Evans <dje@google.com>
13448
13449 Global renaming of find_thread_pid to find_thread_ptid.
13450 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13451 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13452 All callers updated.
13453
13454 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13455 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13456 directly.
13457
13458 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13459 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13460 (linux_resume_one_lwp): Ditto.
13461
13462 2009-05-23 Doug Evans <dje@google.com>
13463
13464 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13465 from struct inferior_list_entry * to struct lwp_info *.
13466 All callers updated.
13467
13468 2009-05-13 Doug Evans <dje@google.com>
13469
13470 * linux-x86-low.c: Don't include assert.h.
13471 (x86_siginfo_fixup): Use fatal, not assert.
13472 (x86_arch_setup): Fix comment.
13473
13474 2009-05-12 Doug Evans <dje@google.com>
13475
13476 Biarch support for i386/amd64 gdbserver.
13477 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13478 Add linux-x86-low.c.
13479 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13480 (linux-x86-low.o): Add.
13481 * linux-x86-64-low.c: Delete.
13482 * linux-i386-low.c: Delete.
13483 * linux-x86-low.c: New file.
13484 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13485 linux-x86-low.o.
13486 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13487 linux-x86-low.o.
13488 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13489 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13490 (linux_child_pid_to_exec_file): New function.
13491 (elf_64_header_p, elf_64_file_p): New functions.
13492 (siginfo_fixup): New function.
13493 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13494 give target a chance to convert layout.
13495 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13496 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13497
13498 2009-05-07 Doug Evans <dje@google.com>
13499
13500 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13501 (regsets_store_inferior_registers): Ditto.
13502
13503 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13504
13505 PR server/10048
13506
13507 * linux-low.c (must_set_ptrace_flags): Delete.
13508 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13509 of the global.
13510 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13511 `lwp->must_set_ptrace_flags' instead.
13512 (linux_wait_for_event_1): Set ptrace options here.
13513 (linux_wait_1): ... not here.
13514
13515 2009-04-30 Doug Evans <dje@google.com>
13516
13517 * inferiors.c (started_inferior_callback): New function.
13518 (attached_inferior_callback): New function.
13519 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13520 * server.c (print_started_pid, print_attached_pid): New functions.
13521 (detach_or_kill_for_exit): New function.
13522 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13523 * server.h (have_started_inferiors_p): Declare.
13524 (have_attached_inferiors_p): Declare.
13525
13526 * inferiors.c (remove_process): Fix memory leak, free process.
13527 * linux-low.c (linux_remove_process): New function.
13528 (linux_kill): Call it instead of remove_process.
13529 (linux_detach, linux_wait_1): Ditto.
13530
13531 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13532
13533 * configure.srv: Add x86 Windows CE target.
13534
13535 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13536
13537 * inferiors.c (get_thread_process): Make global.
13538 * server.h (get_thread_process): Add prototype.
13539 * thread-db.c (find_one_thread): Use get_thread_process
13540 instead of current_process.
13541 (thread_db_get_tls_address): Do not crash if called when
13542 thread layer is not yet initialized.
13543
13544 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13545
13546 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13547 * spu-low.c (current_tid): Rename to ...
13548 (current_ptid): ... this.
13549 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13550 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13551 ptid_get_lwp (current_ptid) instead of current_tid.
13552 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13553 instead of current_tid. Use find_process_pid to verify pid
13554 argument is valid. Pass proper argument to remove_process.
13555 (spu_thread_alive): Compare current_ptid instead of current_tid.
13556 (spu_resume): Likewise.
13557
13558 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13559
13560 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13561 variable.
13562
13563 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13564
13565 Implement the multiprocess extensions, and add linux multiprocess
13566 support.
13567
13568 * server.h (ULONGEST): Declare.
13569 (struct ptid, ptid_t): New.
13570 (minus_one_ptid, null_ptid): Declare.
13571 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13572 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13573 (struct inferior_list_entry): Change `id' type from unsigned from
13574 to ptid_t.
13575 (struct sym_cache, struct breakpoint, struct
13576 process_info_private): Forward declare.
13577 (struct process_info): Declare.
13578 (current_process): Declare.
13579 (all_processes): Declare.
13580 (initialize_inferiors): Declare.
13581 (add_thread): Adjust to use ptid_t.
13582 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13583 (add_process, remove_process, find_thread_pid): Declare.
13584 (find_inferior_id): Adjust to use ptid_t.
13585 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13586 (multi_process): Declare.
13587 (push_event): Adjust to use ptid_t.
13588 (read_ptid, write_ptid): Declare.
13589 (prepare_resume_reply): Adjust to use ptid_t.
13590 (clear_symbol_cache): Declare.
13591 * inferiors.c (all_processes): New.
13592 (null_ptid, minus_one_ptid): New.
13593 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13594 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13595 (add_thread): Change unsigned long to ptid. Remove gdb_id
13596 parameter. Adjust.
13597 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13598 (gdb_id_to_thread): Rename to ...
13599 (find_thread_pid): ... this. Change unsigned long to ptid.
13600 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13601 (loaded_dll, pull_pid_from_list): Adjust.
13602 (add_process, remove_process, find_process_pid)
13603 (get_thread_process, current_process, initialize_inferiors): New.
13604 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13605 (struct target_waitstatus) <related_pid>: Ditto.
13606 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13607 return type to int.
13608 (struct target_ops) <join>: Add `pid' argument.
13609 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13610 (struct target_ops) <wait>: Add `ptid' field. Change return type
13611 to ptid.
13612 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13613 (mywait): Add `ptid' argument. Change return type to ptid_t.
13614 (target_pid_to_str): Declare.
13615 * target.c (set_desired_inferior): Adjust to use ptids.
13616 (mywait): Add new `ptid' argument. Adjust.
13617 (target_pid_to_str): New.
13618 * mem-break.h (free_all_breakpoints): Declare.
13619 * mem-break.c (breakpoints): Delelete.
13620 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13621 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13622 to use per-process breakpoint list.
13623 (free_all_breakpoints): New.
13624 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13625 (symbol_cache, all_symbols_looked_up): Delete.
13626 (hexchars): New.
13627 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13628 read_ptid): New.
13629 (prepare_resume_reply): Change ptid argument's type from unsigned
13630 long to ptid_t. Adjust. Implement W;process and X;process.
13631 (free_sym_cache, clear_symbol_cache): New.
13632 (look_up_one_symbol): Adjust to per-process symbol cache. *
13633 * server.c (cont_thread, general_thread, step_thread): Change type
13634 to ptid_t.
13635 (attached): Delete.
13636 (multi_process): New.
13637 (last_ptid): Change type to ptid_t.
13638 (struct vstop_notif) <ptid>: Change type to ptid_t.
13639 (queue_stop_reply, push_event): Change `ptid' argument's type to
13640 ptid_t.
13641 (discard_queued_stop_replies): Add `pid' argument.
13642 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13643 changes. Don't reference the `attached' global.
13644 (attach_inferior): Adjust to mywait interface changes.
13645 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13646 features. Handle and report "multiprocess+". Handle
13647 "qAttached:PID".
13648 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13649 changes.
13650 (handle_v_kill): New.
13651 (handle_v_stopped): Adjust to use target_pid_to_str.
13652 (handle_v_requests): Allow multiple attaches and runs when
13653 multiprocess extensions are in effect. Handle "vKill".
13654 (myresume): Adjust to use ptids.
13655 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13656 (handle_status): Adjust to discard_queued_stop_replies interface
13657 change.
13658 (first_thread_of, kill_inferior_callback)
13659 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13660 (main): Call initialize_inferiors. Adjust to use ptids, killing
13661 and detaching from all inferiors. Handle multiprocess packet
13662 variants.
13663 * linux-low.h: Include gdb_proc_service.h.
13664 (struct process_info_private): New.
13665 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13666 <lwpid_of>: Use ptid_get_lwp.
13667 (get_lwp_thread): Adjust.
13668 (struct lwp_info): Add `dead' member.
13669 (find_lwp_pid): Declare.
13670 * linux-low.c (thread_db_active): Delete.
13671 (new_inferior): Adjust comment.
13672 (inferior_pid): Delete.
13673 (linux_add_process): New.
13674 (handle_extended_wait): Adjust.
13675 (add_lwp): Change unsigned long to ptid.
13676 (linux_create_inferior): Add process to processes table. Adjust
13677 to use ptids. Don't set new_inferior here.
13678 (linux_attach_lwp): Rename to ...
13679 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13680 it. Adjust to use ptids.
13681 (linux_attach_lwp): New.
13682 (linux_attach): Add process to processes table. Don't set
13683 new_inferior here.
13684 (struct counter): New.
13685 (second_thread_of_pid_p, last_thread_of_process_p): New.
13686 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13687 multiple processes.
13688 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13689 processes. Remove process from process table.
13690 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13691 to multiple processes.
13692 (any_thread_of): New.
13693 (linux_detach): Add `pid' argument, and handle it. Remove process
13694 from processes table.
13695 (linux_join): Add `pid' argument. Handle it.
13696 (linux_thread_alive): Change unsighed long argument to ptid_t.
13697 Consider dead lwps as not being alive.
13698 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13699 threads we're not interested in.
13700 (same_lwp, find_lwp_pid): New.
13701 (linux_wait_for_lwp): Change `pid' argument's type from int to
13702 ptid_t. Adjust.
13703 (linux_wait_for_event): Rename to ...
13704 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13705 from int to ptid_t. Adjust.
13706 (linux_wait_for_event): New.
13707 (linux_wait_1): Add `ptid' argument. Change return type to
13708 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13709 that exit from the process table.
13710 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13711 Adjust.
13712 (mark_lwp_dead): New.
13713 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13714 stopping all threads, mark its main lwp as dead.
13715 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13716 ptids.
13717 (fetch_register, usr_store_inferior_registers)
13718 (regsets_fetch_inferior_registers)
13719 (regsets_store_inferior_registers, linux_read_memory)
13720 (linux_write_memory): Inline `inferior_pid'.
13721 (linux_look_up_symbols): Adjust to use per-process
13722 `thread_db_active'.
13723 (linux_request_interrupt): Adjust to use ptids.
13724 (linux_read_auxv): Inline `inferior_pid'.
13725 (initialize_low): Don't reference thread_db_active.
13726 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13727 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13728 (ps_getpid): Return the pid of the current inferior.
13729 * thread-db.c (proc_handle, thread_agent): Delete.
13730 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13731 per-process data.
13732 (find_one_thread): Change argument type to ptid_t. Adjust to
13733 per-process data.
13734 (maybe_attach_thread): Adjust to per-process data and ptids.
13735 (thread_db_find_new_threads): Ditto.
13736 (thread_db_init): Ditto.
13737 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13738 processes table. Adjust to use ptids.
13739 (spu_kill, spu_detach): Adjust interface. Remove process from
13740 processes table.
13741 (spu_join, spu_thread_alive): Adjust interface.
13742 (spu_wait): Adjust interface. Remove process from processes
13743 table. Adjust to use ptids.
13744 * win32-low.c (current_inferior_tid): Delete.
13745 (current_inferior_ptid): New.
13746 (debug_event_ptid): New.
13747 (thread_rec): Take a ptid. Adjust.
13748 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13749 (child_delete_thread): Ditto.
13750 (do_initial_child_stuff): Add `attached' argument. Add process to
13751 processes table.
13752 (child_fetch_inferior_registers, child_store_inferior_registers):
13753 Adjust.
13754 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13755 (win32_attach): Pass 1 to do_initial_child_stuff.
13756 (win32_kill): Adjust interface. Remove process from processes
13757 table.
13758 (win32_detach): Ditto.
13759 (win32_join): Adjust interface.
13760 (win32_thread_alive): Take a ptid.
13761 (win32_resume): Adjust to use ptids.
13762 (get_child_debug_event): Ditto.
13763 (win32_wait): Adjust interface. Remove exiting process from
13764 processes table.
13765
13766 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13767
13768 Non-stop mode support.
13769
13770 * server.h (non_stop): Declare.
13771 (gdb_client_data, handler_func): Declare.
13772 (delete_file_handler, add_file_handler, start_event_loop):
13773 Declare.
13774 (handle_serial_event, handle_target_event, push_event)
13775 (putpkt_notif): Declare.
13776 * target.h (enum resume_kind): New.
13777 (struct thread_resume): Replace `step' field by `kind' field.
13778 (TARGET_WNOHANG): Define.
13779 (struct target_ops) <wait>: Add `options' argument.
13780 <supports_non_stop, async, start_non_stop>: New fields.
13781 (target_supports_non_stop, target_async): New.
13782 (start_non_stop): Declare.
13783 (mywait): Add `options' argument.
13784 * target.c (mywait): Add `options' argument. Print child exit
13785 notifications here.
13786 (start_non_stop): New.
13787 * server.c (non_stop, own_buf, mem_buf): New globals.
13788 (struct vstop_notif): New.
13789 (notif_queue): New global.
13790 (queue_stop_reply, push_event, discard_queued_stop_replies)
13791 (send_next_stop_reply): New.
13792 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13793 interface changes.
13794 (attach_inferior): In non-stop mode, don't wait for the target
13795 here.
13796 (handle_general_set): Handle QNonStop.
13797 (handle_query): When handling qC, return the current general
13798 thread, instead of the first thread of the list.
13799 (handle_query): If the backend supports non-stop mode, include
13800 QNonStop+ in the qSupported query response.
13801 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13802 and non-stop mode.
13803 (handle_v_attach, handle_v_run): Handle non-stop mode.
13804 (handle_v_stopped): New.
13805 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13806 (myresume): Adjust to use resume_kind. Handle non-stop.
13807 (queue_stop_reply_callback): New.
13808 (handle_status): Handle non-stop mode.
13809 (main): Clear non_stop flag on reconnection. Use the event-loop.
13810 Refactor serial protocol handling from here ...
13811 (process_serial_event): ... to this new function. When GDB
13812 selects any thread, select one here. In non-stop mode, wait until
13813 GDB acks all pending events before exiting.
13814 (handle_serial_event, handle_target_event): New.
13815 * remote-utils.c (remote_open): Install remote_desc in the event
13816 loop.
13817 (remote_close): Remove remote_desc from the event loop.
13818 (putpkt_binary): Rename to...
13819 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13820 (putpkt_binary): New as wrapper around putpkt_binary_1.
13821 (putpkt_notif): New.
13822 (prepare_resume_reply): In non-stop mode, don't change the
13823 general_thread.
13824 * event-loop.c: New.
13825 * Makefile.in (OBJ): Add event-loop.o.
13826 (event-loop.o): New rule.
13827
13828 * linux-low.h (pid_of): Moved here.
13829 (lwpid_of): New.
13830 (get_lwp_thread): Use lwpid_of.
13831 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13832 * linux-low.c (pid_of): Delete.
13833 (inferior_pid): Use lwpid_of.
13834 (linux_event_pipe): New.
13835 (target_is_async_p): New.
13836 (delete_lwp): New.
13837 (handle_extended_wait): Use lwpid_of.
13838 (add_lwp): Don't set lwpid field.
13839 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13840 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13841 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13842 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13843 first. Adjust to linux_wait_for_event interface changes. Use
13844 lwpid_of.
13845 (linux_detach): Don't delete the main lwp here.
13846 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13847 (status_pending_p): Don't consider explicitly suspended lwps.
13848 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13849 pointer. Add OPTIONS argument. Change return type to int. Use
13850 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13851 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13852 pointer. Add status pointer argument. Return a pid instead of a
13853 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13854 changes. In non-stop mode, don't switch to a random thread.
13855 (linux_wait): Rename to...
13856 (linux_wait_1): ... this. Add target_options argument, and handle
13857 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13858 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13859 clean exit and signal exit code. Don't stop all threads in
13860 non-stop mode. In all-stop mode, only stop all threads when
13861 reporting a stop to GDB. Handle explicit thread stop requests.
13862 (async_file_flush, async_file_mark): New.
13863 (linux_wait): New.
13864 (send_sigstop): Use lwpid_of.
13865 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13866 interface changes. In non-stop mode, don't switch to a random
13867 thread.
13868 (linux_resume_one_lwp): Use lwpid_of.
13869 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13870 (linux_resume_one_thread): ... this. Handle resume_stop. In
13871 non-stop mode, don't look for pending flag in all threads.
13872 (resume_status_pending_p): Don't consider explicitly suspended
13873 threads.
13874 (my_waitpid): Reimplement. Emulate __WALL.
13875 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13876 Use lwpid_of.
13877 (sigchld_handler, linux_supports_non_stop, linux_async)
13878 (linux_start_non_stop): New.
13879 (linux_target_ops): Register linux_supports_non_stop, linux_async
13880 and linux_start_non_stop.
13881 (initialize_low): Install SIGCHLD handler.
13882 * thread-db.c (thread_db_create_event, find_one_thread)
13883 (thread_db_get_tls_address): Use lwpid_of.
13884 * win32-low.c (win32_detach): Adjust to use resume_kind.
13885 (win32_wait): Add `options' argument.
13886 * spu-low.c (spu_resume): Adjust to use resume_kind.
13887 (spu_wait): Add `options' argument.
13888
13889 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13890
13891 Decouple target code from remote protocol.
13892
13893 * target.h (enum target_waitkind): New.
13894 (struct target_waitstatus): New.
13895 (struct target_ops) <wait>: Return an unsigned long. Take a
13896 target_waitstatus pointer instead of a char pointer.
13897 (mywait): Likewise.
13898 * target.c (mywait): Change prototype to return an unsigned long.
13899 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13900 * server.h (thread_from_wait, old_thread_from_wait): Delete
13901 declarations.
13902 (prepare_resume_reply): Change prototype to take a
13903 target_waitstatus.
13904 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13905 (last_status, last_ptid): New.
13906 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13907 pid instead of a signal.
13908 (attach_inferior): Remove "status" and "signal" parameters.
13909 Adjust.
13910 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13911 not as an address.
13912 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13913 (handle_v_requests, myresume): Remove "status" and "signal"
13914 parameters. Adjust.
13915 (handle_status): New.
13916 (main): Delete local `status'. Adjust.
13917 * remote-utils.c: Include target.h.
13918 (prepare_resume_reply): Change prototype to take a
13919 target_waitstatus. Adjust.
13920
13921 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13922 interface.
13923 * spu-low.c (spu_wait): Adjust.
13924 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13925 Delete.
13926 (win32_wait): Adjust.
13927
13928 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13929
13930 * target.h (struct thread_resume): Delete leave_stopped member.
13931 (struct target_ops): Add a `n' argument to the `resume' callback.
13932 * server.c (start_inferior): Adjust.
13933 (handle_v_cont, myresume): Adjust.
13934 * linux-low.c (check_removed_breakpoint): Adjust to resume
13935 interface change, and to removed leave_stopped field.
13936 (resume_ptr): Delete.
13937 (struct thread_resume_array): New.
13938 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13939 resume interface change.
13940 (linux_continue_one_thread, linux_queue_one_thread)
13941 (resume_status_pending_p): Check if the resume field is NULL
13942 instead of checking the leave_stopped member.
13943 (linux_resume): Adjust to the target resume interface change.
13944 * spu-low.c (spu_resume): Adjust to the target resume interface
13945 change.
13946 * win32-low.c (win32_detach, win32_resume): Ditto.
13947
13948 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13949
13950 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13951 flag.
13952 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13953 pending.
13954 (linux_continue_one_thread): Only preserve the stepping flag if
13955 there's a pending breakpoint.
13956
13957 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13958
13959 * server.c (main): After the inferior having exited, call
13960 remote_close before exiting gdbserver.
13961
13962 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13963
13964 Fix size of FPSCR in Power 7 processors.
13965 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13966 (PPC_FEATURE_HAS_DFP): New #define.
13967 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13968 size of the FPSCR.
13969
13970 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13971
13972 * server.c (handle_query) Whitespace and formatting.
13973
13974 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13975
13976 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13977 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13978 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13979 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13980 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13981 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13982 Makefile.in, configure.ac: Fix whitespace throughout.
13983 * configure: Regenerate.
13984
13985 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13986
13987 * inferiors.c (find_inferior): Make it safe for the callback
13988 function to delete the currently iterated inferior.
13989
13990 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13991
13992 * Makefile.in (linuw_low_h): Move higher.
13993 (thread-db.o): Depend on $(linux_low_h).
13994
13995 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13996
13997 Rename "process" to "lwp" throughout.
13998
13999 * linux-low.c (all_processes): Rename to...
14000 (all_lwps): ... this.
14001 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14002 (add_process): Rename to ...
14003 (add_lwp): ... this. Adjust.
14004 (linux_create_inferior): Adjust.
14005 (linux_attach_lwp): Adjust.
14006 (linux_attach): Adjust.
14007 (linux_kill_one_process): Rename to ...
14008 (linux_kill_one_lwp): ... this. Adjust.
14009 (linux_kill): Adjust.
14010 (linux_detach_one_process): Rename to ...
14011 (linux_detach_one_lwp): ... this. Adjust.
14012 (linux_detach): Adjust.
14013 (check_removed_breakpoint): Adjust.
14014 (status_pending_p): Adjust.
14015 (linux_wait_for_process): Rename to ...
14016 (linux_wait_for_lwp): ... this. Adjust.
14017 (linux_wait_for_event): Adjust.
14018 (send_sigstop): Adjust.
14019 (wait_for_sigstop): Adjust.
14020 (stop_all_processes): Rename to ...
14021 (stop_all_lwps): ... this.
14022 (linux_resume_one_process): Rename to ...
14023 (linux_resume_one_lwp): ... this. Adjust.
14024 (linux_set_resume_request, linux_continue_one_thread)
14025 (linux_queue_one_thread, resume_status_pending_p)
14026 (usr_store_inferior_registers, regsets_store_inferior_registers)
14027 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14028 Adjust.
14029 * linux-low.h (get_process): Rename to ...
14030 (get_lwp): ... this. Adjust.
14031 (get_thread_process): Rename to ...
14032 (get_thread_lwp): ... this. Adjust.
14033 (get_process_thread): Rename to ...
14034 (get_lwp_thread): ... this. Adjust.
14035 (struct process_info): Rename to ...
14036 (struct lwp_info): ... this.
14037 (all_processes): Rename to ...
14038 (all_lwps): ... this.
14039 * proc-service.c (ps_lgetregs): Adjust.
14040 * thread-db.c (thread_db_create_event, find_one_thread)
14041 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14042
14043 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14044
14045 * server.c (handle_query): Handle "qAttached".
14046
14047 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14048
14049 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14050 GPLv3, update license URL.
14051
14052 2009-03-01 Doug Evans <dje@google.com>
14053
14054 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14055 (server_h): Add gdb_signals.h.
14056 (signals.o): Update.
14057 * server.h (target_signal_from_host,target_signal_to_host_p)
14058 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14059
14060 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14061
14062 * remote-utils.c (getpkt): Also generate remote-debug
14063 information if noack_mode is set.
14064
14065 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14066
14067 * server.c (handle_query): Report qXfer:siginfo:read and
14068 qXfer:siginfo:write as supported and handle them.
14069 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14070 * linux-low.c (linux_xfer_siginfo): New.
14071 (linux_target_ops): Set it.
14072
14073 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14074
14075 * server.c (gdbserver_usage): Mention --remote-debug.
14076 (main): Accept '--remote-debug' switch.
14077
14078 2009-01-18 Doug Evans <dje@google.com>
14079
14080 * regcache.c (new_register_cache): No need to check result of xcalloc.
14081 * server.c (handle_search_memory): Back out calls to xmalloc,
14082 result is checked and error is returned to user upon failure.
14083 (handle_query): Ditto. Add more checks for result of malloc.
14084 (handle_v_cont): Check result of malloc, report error back to
14085 user upon failure.
14086 (handle_v_run): Ditto. Call freeargv.
14087 * server.h (freeargv): Declare.
14088 * utils.c (freeargv): New fn.
14089
14090 2009-01-15 Doug Evans <dje@google.com>
14091
14092 * gdbreplay.c (perror_with_name): Make arg const char *.
14093 * server.h (target_signal_to_name): Make return type const char *.
14094 * thread-db.c (thread_db_err_str): Make return type const char *.
14095 * utils.c (perror_with_name): Make arg const char *.
14096
14097 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14098
14099 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14100 when handling a EXIT_PROCESS_DEBUG_EVENT.
14101
14102 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14103
14104 * gdbreplay.c (gdbreplay_version): Update copyright year.
14105 * server.c (gdbserver_version): Likewise.
14106
14107 2009-01-05 Doug Evans <dje@google.com>
14108
14109 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14110 (handle_extended_wait): Improve comment.
14111
14112 2008-12-13 Doug Evans <dje@google.com>
14113
14114 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14115 * server.h (ATTR_MALLOC): New macro.
14116 (xmalloc,xcalloc,xstrdup): Declare.
14117 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14118 * inferiors.c: Ditto.
14119 * linux-low.c: Ditto.
14120 * mem-break.c: Ditto.
14121 * regcache.c: Ditto.
14122 * remote-utils.c: Ditto.
14123 * server.c: Ditto.
14124 * target.c: Ditto.
14125 * win32-low.c: Ditto.
14126
14127 2008-12-12 Doug Evans <dje@google.com>
14128
14129 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14130 in debugging printf.
14131
14132 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14133
14134 2008-12-09 Doug Evans <dje@google.com>
14135
14136 * linux-low.h (struct process_info): Delete member tid, unused.
14137 * thread-db.c (find_one_thread): Update.
14138 (maybe_attach_thread): Update.
14139
14140 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14141
14142 * target.h (struct target_ops): Add qxfer_osdata member.
14143 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14144 and dirent.h.
14145 (linux_qxfer_osdata): New functions.
14146 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14147 callback.
14148 * server.c (handle_query): Handle "qXfer:osdata:read:".
14149 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14150 (buffer_xml_printf): New functions.
14151 * server.h (struct buffer): New.
14152 (buffer_grow_str, buffer_grow_str0): New macros.
14153 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14154 (buffer_xml_printf): Declare.
14155
14156 2008-11-24 Doug Evans <dje@google.com>
14157
14158 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14159
14160 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14161
14162 * server.c (handle_v_run): Always use the supplied argument list.
14163
14164 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14165
14166 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14167 (xtensa_regmap_table): Add entry for scompare1.
14168
14169 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14170
14171 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14172 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14173 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14174 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14175 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14176 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14177 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14178 XML target descriptions.
14179 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14180 when inferior is running on an ISA 2.05 or later processor. Add
14181 special case to return offset for full 64-bit slot of FPSCR when
14182 in 32-bits.
14183
14184 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14185
14186 * Makefile.in (SFILES, clean): Added sparc64 files.
14187 (reg-sparc64.o, reg-sparc64.c): New.
14188 * configure.srv (sparc*-*-linux*): New configuration.
14189 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14190 syscall arguments for SPARC.
14191 (regsets_store_inferior_registers): Likewise.
14192 * linux-sparc-low.c: New file.
14193
14194 2008-10-21 Doug Evans <dje@google.com>
14195
14196 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14197 (READLINE_DIR,READLINE_DEP): Delete.
14198 (INTERNAL_CFLAGS): Update.
14199 (LINTFLAGS): Update.
14200
14201 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14202
14203 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14204 whole argv from the last run, not just argv[0].
14205
14206 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14207
14208 * regcache.c (new_register_cache): Return NULL if the register
14209 cache size isn't known yet.
14210 (free_register_cache): Avoid dereferencing a NULL regcache.
14211
14212 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14213
14214 * configure.srv: Merge MIPS and MIPS64.
14215
14216 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14217
14218 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14219
14220 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14221
14222 * Makefile.in: Add required vsx dependencies.
14223
14224 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14225 Declare init_registers_powerpc_vsx32l.
14226 Declare init_registers_powerpc_vsx64l.
14227 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14228 (ppc_arch_setup): Check for VSX in hwcap.
14229 (ppc_fill_vsxregset): New function.
14230 (ppc_store_vsxregset): New function.
14231 Add new VSX entry in regset_info target_regsets.
14232
14233 * configure.srv: Add new VSX dependencies.
14234
14235 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14236
14237 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14238 (remote_open): Set or clear transport_is_reliable.
14239 (putpkt_binary): Don't expect acks in noack mode.
14240 (getpkt): Don't send ack/nac in noack mode.
14241 * server.c (handle_general_set): Handle QStartNoAckMode.
14242 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14243 qSupported.
14244 (main): Reset noack_mode on every connection.
14245 * server.h (noack_mode): Declare.
14246
14247 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14248
14249 * Makefile.in (GDBREPLAY_OBS): New variable.
14250 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14251
14252 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14253 Daniel Jacobowitz <dan@codesourcery.com>
14254
14255 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14256 (usr_store_inferior_registers): Likewise.
14257 (regsets_store_inferior_registers): Likewise.
14258
14259 2008-07-31 Rolf Jansen <rj@surtec.com>
14260 Pedro Alves <pedro@codesourcery.com>
14261
14262 * configure.ac: Check for memmem declaration.
14263 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14264 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14265 (disable_packet_qfThreadInfo): Unconditionally compile.
14266 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14267 * configure, config.in: Regenerate.
14268
14269 2008-07-28 Doug Kwan <dougkwan@google.com>
14270
14271 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14272 (linux_write_memory): Remove declaration of errno.
14273
14274 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14275
14276 * linux-low.c (handle_extended_wait): Do not use "status"
14277 variable uninitialized.
14278
14279 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14280
14281 * server.c (handle_v_attach): Inhibit reporting dll changes.
14282
14283 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14284
14285 * remote-utils.c (prepare_resume_reply): If requested, don't
14286 output "thread:TID" in the T stop reply.
14287
14288 * server.c (disable_packet_vCont, disable_packet_Tthread)
14289 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14290 (handle_query): If requested, disable support for qC, qfThreadInfo
14291 and qsThreadInfo.
14292 (handle_v_requests): If requested, disable support for vCont.
14293 (gdbserver_show_disableable): New.
14294 (main): Handle --disable-packet and --disable-packet=LIST.
14295
14296 * server.h (disable_packet_vCont, disable_packet_Tthread)
14297 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14298
14299 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14300
14301 * server.c (gdbserver_usage): Mention --version.
14302
14303 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14304
14305 * Makefile.in (gdbreplay.o): New rule.
14306
14307 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14308
14309 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14310 message, not gdbserver.
14311
14312 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14313 Nathan Sidwell <nathan@codesourcery.com>
14314 Joseph Myers <joseph@codesourcery.com>
14315
14316 * acinclude.m4: Include ../../config/acx.m4.
14317 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14318 * configure, config.in: Regenerate.
14319 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14320 * server.c (gdbserver_version): Print PKGVERSION.
14321 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14322 (main): Adjust gdbserver_usage calls.
14323 * gdbreplay.c (version, host_name): Add declarations.
14324 (gdbreplay_version, gdbreplay_usage): New.
14325 (main): Accept --version and --help options.
14326
14327 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14328
14329 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14330 (arm_breakpoint_at): Handle Thumb.
14331 (the_low_target): Add comment.
14332
14333 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14334
14335 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14336
14337 2008-05-09 Doug Evans <dje@google.com>
14338
14339 * server.h (decode_search_memory_packet): Declare.
14340 * remote-utils.c (decode_search_memory_packet): New fn.
14341 * server.c (handle_search_memory_1): New fn.
14342 (handle_search_memory): New fn.
14343 (handle_query): Process qSearch:memory packets.
14344
14345 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14346
14347 * regcache.c (registers_length): Remove.
14348 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14349 full register packet.
14350 * regcache.h (registers_length): Remove prototype.
14351 * server.h (PBUFSIZ): Define to 16384.
14352
14353 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14354
14355 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14356 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14357 powerpc-64l.o, and powerpc-altivec64l.o.
14358 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14359 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14360 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14361 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14362 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14363 to srv_xmlfiles.
14364
14365 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14366 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14367 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14368 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14369 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14370 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14371 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14372 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14373 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14374 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14375 (clean): Update.
14376
14377 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14378 (init_registers_powerpc_32l): ... this new prototype.
14379 (init_registers_powerpc_32): Remove, replace by ...
14380 (init_registers_powerpc_altivec32l): ... this new prototype.
14381 (init_registers_powerpc_e500): Remove, replace by ...
14382 (init_registers_powerpc_e500l): ... this new prototype.
14383 (init_registers_ppc64): Remove, replace by ...
14384 (init_registers_powerpc_64l): ... this new prototype.
14385 (init_registers_powerpc_64): Remove, replace by ...
14386 (init_registers_powerpc_altivec64l): ... this new prototype.
14387 (ppc_num_regs): Set to 73.
14388 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14389 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14390 (ppc_cannot_store_register): Handle orig_r3 and trap.
14391 (ppc_arch_setup): Update init_registers_... calls.
14392 (ppc_fill_gregset): Handle orig_r3 and trap.
14393
14394 * inferiors.c (clear_inferiors): Reset current_inferior.
14395
14396 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14397
14398 * acinclude.m4: Add override.m4.
14399 * configure: Regenerate.
14400
14401 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14402
14403 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14404 initial call to init_register_ppc64.
14405
14406 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14407
14408 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14409 single powerpc*-*-linux* case.
14410 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14411
14412 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14413
14414 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14415 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14416 from reg_xmlfiles.
14417 * linux-ppc-low.c: Include <elf.h>.
14418 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14419 (ppc_hwcap): New global variable.
14420 (ppc_regmap): Remove __SPE__ #ifdef sections.
14421 (ppc_regmap_e500): New global variable.
14422 (ppc_cannot_store_register): Update __SPE__ special case.
14423 (ppc_get_hwcap): New function.
14424 (ppc_arch_setup): Use it to determine whether inferior supports
14425 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14426 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14427 Do not access registers if target does not support AltiVec.
14428 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14429 Do not access registers if target does not support SPE.
14430 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14431
14432 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14433
14434 * linux-low.c (disabled_regsets, num_regsets): New.
14435 (use_regsets_p): Delete.
14436 (linux_wait_for_process): Clear disabled_regsets.
14437 (regsets_fetch_inferior_registers): Check and set it.
14438 (regsets_store_inferior_registers): Likewise.
14439 (linux_fetch_registers, linux_store_registers): Do not use
14440 use_regsets_p.
14441 (initialize_low): Allocate disabled_regsets.
14442
14443 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14444
14445 * Makefile.in (LIBOBJS): New.
14446 (OBS): Use LIBOBJS.
14447 (memmem.o): New rule.
14448 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14449 * configure: Regenerated.
14450
14451 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14452
14453 * server.c (handle_query): Never return "unsupported" for
14454 qXfer:features:read queries.
14455
14456 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14457
14458 * server.c (get_features_xml): Fix inverted condition.
14459 (handle_query): Always support qXfer:feature:read.
14460
14461 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14462
14463 * server.c (wrapper_argv): New.
14464 (start_inferior): Handle wrapper_argv. If set, expect an extra
14465 trap.
14466 (gdbserver_usage): Document --wrapper.
14467 (main): Parse --wrapper.
14468
14469 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14470
14471 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14472 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14473 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14474 (ppc_set_pc): Likewise.
14475 (ppc_arch_setup): New function.
14476 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14477 of collect_register.
14478 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14479
14480 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14481
14482 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14483 instead of linux-ppc64-low.o.
14484 * linux-ppc64-low.c: Remove file.
14485 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14486 (linux-ppc64-low.o): Remove rule.
14487
14488 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14489 (init_registers_powerpc_64): Likewise.
14490 (ppc_regmap): Conditionally define depending on __powerpc64__.
14491 (ppc_cannot_store_register): Do not special-case "fpscr" when
14492 compiled on __powerpc64__.
14493 (ppc_collect_ptrace_register): New function.
14494 (ppc_supply_ptrace_register): New function.
14495 (ppc_breakpoint): Change type to "unsigned int".
14496 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14497 (the_low_target): Conditionally provide initializers for the
14498 arch_setup member depending on __powerpc64__. Install
14499 collect_ptrace_register and supply_ptrace_register members.
14500
14501 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14502
14503 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14504 * server.c (gdbserver_xmltarget): Define.
14505 (get_features_xml): Use it to replace "target.xml" and arch_string.
14506
14507 * configure.srv: Remove srv_xmltarget. Add XML files that were
14508 mentioned there to srv_xmlfiles instead. Remove conditional tests
14509 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14510 srv_xmlfiles and srv_regobj to include all possible choices.
14511 * configure.ac (srv_xmltarget): Remove.
14512 (srv_xmlfiles): Do not add "target.xml".
14513 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14514 checks for supplementary target information.
14515 * configure: Regenerate.
14516 * Makefile.in (XML_TARGET): Remove.
14517 (target.xml): Remove rule.
14518 (clean): Do not clean up target.xml.
14519 (.PRECIOUS): Do not mention target.xml.
14520
14521 * target.h (struct target_ops): Remove arch_string member.
14522 * linux-low.c (linux_arch_string): Remove.
14523 (linux_target_ops): Remove arch_string initializer.
14524 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14525 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14526 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14527 * spu-low.c (spu_arch_string): Remove.
14528 (spu_target_ops): Remove arch_string initializer.
14529 * win32-low.c (win32_arch_string): Remove.
14530 (win32_target_ops): Remove arch_string initializer.
14531 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14532 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14533 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14534
14535 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14536
14537 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14538 by collect_ptrace_register and supply_ptrace_register hooks.
14539 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14540 instead of checking for the_low_target.left_pad_xfer.
14541 (usr_store_inferior_registers): Use collect_ptrace_register callback
14542 instead of checking for the_low_target.left_pad_xfer.
14543
14544 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14545 (s390_supply_ptrace_register): Likewise.
14546 (s390_fill_gregset): Call s390_collect_ptrace_register.
14547 (the_low_target): Update.
14548
14549 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14550 (ppc_supply_ptrace_register): Likewise.
14551 (the_low_target): Update.
14552
14553 * linux-i386-low.c (the_low_target): Update.
14554 * linux-x86-64-low.c (the_low_target): Update.
14555
14556 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14557
14558 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14559 reg-s390.o and reg-s390x.o.
14560
14561 * linux-low.c (new_inferior): New global variable.
14562 (linux_create_inferior, linux_attach): Set it.
14563 (linux_wait_for_process): Call the_low_target.arch_setup after the
14564 target has stopped for the first time.
14565 (initialize_low): Do not call the_low_target.arch_setup.
14566
14567 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14568 (s390_set_pc): Likewise.
14569 (s390_arch_setup): New function.
14570 (the_low_target): Use s390_arch_setup as arch_setup routine.
14571
14572 * regcache.c (realloc_register_cache): New function.
14573 (set_register_cache): Call it for each existing regcache.
14574
14575 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14576
14577 * server.h (init_registers): Remove prototype.
14578
14579 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14580 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14581 instead of init_registers ().
14582 * linux-arm-low.c (init_registers_arm): Add prototype.
14583 (init_registers_arm_with_iwmmxt): Likewise.
14584 (the_low_target): Add initializer for arch_setup field.
14585 * linux-cris-low.c (init_registers_cris): Add prototype.
14586 (the_low_target): Add initializer for arch_setup field.
14587 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14588 (the_low_target): Add initializer for arch_setup field.
14589 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14590 (the_low_target): Add initializer for arch_setup field.
14591 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14592 (the_low_target): Add initializer for arch_setup field.
14593 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14594 (the_low_target): Add initializer for arch_setup field.
14595 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14596 (the_low_target): Add initializer for arch_setup field.
14597 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14598 (init_registers_mips64_linux): Likewise.
14599 (the_low_target): Add initializer for arch_setup field.
14600 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14601 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14602 (the_low_target): Add initializer for arch_setup field.
14603 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14604 (init_registers_powerpc_64): Likewise.
14605 (the_low_target): Add initializer for arch_setup field.
14606 * linux-s390-low.c (init_registers_s390): Add prototype.
14607 (init_registers_s390x): Likewise.
14608 (the_low_target): Add initializer for arch_setup field.
14609 * linux-sh-low.c (init_registers_sh): Add prototype.
14610 (the_low_target): Add initializer for arch_setup field.
14611 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14612 (the_low_target): Add initializer for arch_setup field.
14613 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14614 (the_low_target): Add initializer for arch_setup field.
14615
14616 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14617 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14618 instead of init_registers ().
14619 * win32-arm-low.c (init_registers_arm): Add prototype.
14620 (the_low_target): Add initializer for arch_setup field.
14621 * win32-i386-low.c (init_registers_i386): Add prototype.
14622 (the_low_target): Add initializer for arch_setup field.
14623
14624 * spu-low.c (init_registers_spu): Add prototype.
14625 (initialize_low): Call initialie_registers_spu () instead of
14626 initialize_registers ().
14627
14628 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14629
14630 * server.c (handle_v_requests): When handling the vRun and vAttach
14631 packets, if already debugging a process, don't kill it. Return an
14632 error instead.
14633
14634 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14635
14636 * server.c (handle_query): Correct length check.
14637
14638 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14639
14640 * win32-low.c (do_initial_child_stuff): Add process handle
14641 parameter. Set current_process_handle and current_process_id from the
14642 parameters. Clear globals.
14643 (win32_create_inferior): Don't set current_process_handle and
14644 current_process_id here. Instead pass them on the call to
14645 do_initial_child_stuff.
14646 (win32_attach): Likewise.
14647 (win32_clear_inferiors): New.
14648 (win32_kill): Don't close the current process handle or the
14649 current thread handle here. Instead call win32_clear_inferiors.
14650 (win32_detach): Don't open a new handle to the process. Call
14651 win32_clear_inferiors.
14652 (win32_join): Don't rely on current_process_handle; open a new
14653 handle using the process id.
14654 (win32_wait): Call win32_clear_inferiors when the inferior process
14655 has exited.
14656
14657 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14658
14659 * server.c (monitor_show_help): Add "exit".
14660
14661 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14662
14663 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14664 (clean): Add reg-xtensa.c.
14665 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14666 * configure.srv (xtensa*-*-linux*) New target.
14667 * linux-xtensa-low.c: New.
14668 * xtensa-xtregs.c: New.
14669
14670 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14671
14672 * hostio.c: Don't include errno.h.
14673 (errno_to_fileio_errno): Move to hostio-errno.
14674 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14675 error number outputting to the target->hostio_last_error callback.
14676 (hostio_packet_error): Use FILEIO_EINVAL directly.
14677 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14678 calls to hostio_error.
14679 * hostio-errno.c: New.
14680 * server.h (hostio_last_error_from_errno): Declare.
14681 * target.h (target_ops): Add hostio_last_error member.
14682 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14683 as hostio_last_error handler.
14684 * spu-low.c (spu_target_ops): Likewise.
14685 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14686 (wince_hostio_last_error): New functions.
14687 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14688 as hostio_last_error handler.
14689 (win32_target_ops) [!_WIN32_WCE]: Register
14690 hostio_last_error_from_errno as hostio_last_error handler.
14691 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14692 (hostio-errno.o): New rule.
14693 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14694 * configure.srv (srv_hostio_err_objs): New variable. Default to
14695 hostio-errno.o.
14696 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14697 * configure: Regenerate.
14698
14699 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14700
14701 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14702 (linux_kill, linux_detach): Clean up the process list.
14703 * remote-utils.c (remote_open): Improve port number parsing.
14704 (putpkt_binary, input_interrupt): Only send interrupts if the target
14705 is running.
14706 * server.c (extended_protocol): Make static.
14707 (attached): Define earlier.
14708 (exit_requested, response_needed, program_argv): New variables.
14709 (target_running): New.
14710 (start_inferior): Clear attached here.
14711 (attach_inferior): Set attached here.
14712 (require_running): Define.
14713 (handle_query): Use require_running and target_running. Implement
14714 "monitor exit".
14715 (handle_v_attach, handle_v_run): New.
14716 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14717 (gdbserver_usage): Update.
14718 (main): Redo argument parsing. Handle --debug and --multi. Handle
14719 --attach along with other options or after the port. Save
14720 program_argv. Support no initial program. Resynchronize
14721 communication with GDB after an error. Handle "monitor exit".
14722 Use require_running and target_running. Always allow the extended
14723 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14724 restart in extended mode.
14725 * README: Refer to the GDB manual. Update --attach usage.
14726
14727 2007-12-20 Andreas Schwab <schwab@suse.de>
14728
14729 * linux-low.c (STACK_SIZE): Define.
14730 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14731 (linux_test_for_tracefork): Likewise.
14732
14733 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14734
14735 * linux-low.c (linux_wait_for_event): Update messages. Do not
14736 reinsert auto-delete breakpoints.
14737 * mem-break.c (struct breakpoint): Change return type of handler to
14738 int.
14739 (set_breakpoint_at): Update handler type.
14740 (reinsert_breakpoint_handler): Return 1 instead of calling
14741 delete_breakpoint.
14742 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14743 setting a new one.
14744 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14745 * mem-break.h (set_breakpoint_at): Update handler type.
14746 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14747 * win32-low.c (auto_delete_breakpoint): New.
14748 (get_child_debug_event): Use it.
14749
14750 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14751
14752 * configure.ac: Check for pread and pwrite.
14753 * hostio.c (handle_pread): Fall back to lseek and read.
14754 (handle_pwrite): Fall back to lseek and write.
14755 * config.in, configure: Regenerated.
14756
14757 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14758
14759 * server.c (myresume): Add own_buf argument.
14760 (main): Update calls.
14761
14762 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14763
14764 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14765 * remote-utils.c (remote_open): Do not call disable_async_io.
14766 (block_async_io): Delete.
14767 (unblock_async_io): Make static.
14768 (initialize_async_io): New.
14769 * server.c (handle_v_cont): Handle async I/O here.
14770 (myresume): Likewise. Move other common resume tasks here...
14771 (main): ... from here. Call initialize_async_io. Disable async
14772 I/O before the main loop.
14773 * server.h (initialize_async_io): Declare.
14774 (block_async_io, unblock_async_io): Delete prototypes.
14775 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14776
14777 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14778
14779 * remote-utils.c (readchar): Allow binary data in received messages.
14780
14781 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14782
14783 * win32-low.c (attaching): New global.
14784 (win32_create_inferior): Clear the `attaching' global.
14785 (win32_attach): Set the `attaching' global.
14786 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14787 attaching. Only set a breakpoint at the entry point if not
14788 attaching.
14789
14790 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14791
14792 * server.c (main): Don't report dll events on the initial
14793 connection on attaches.
14794
14795 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14796
14797 * server.c (main): Relax numerical bases supported for the pid of
14798 the --attach command line argument.
14799
14800 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14801
14802 * win32-low.c (win32_attach): Call OpenProcess before
14803 DebugActiveProcess, not after. Add last error output to error
14804 call.
14805
14806 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14807
14808 * win32-low.c (win32_get_thread_context)
14809 (win32_set_thread_context): New functions.
14810 (thread_rec): Use win32_get_thread_context.
14811 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14812 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14813 field.
14814
14815 2007-12-03 Leo Zayas
14816 Pedro Alves <pedro_alves@portugalmail.pt>
14817
14818 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14819 global variables.
14820 (child_add_thread): Minor cleanup.
14821 (child_continue): Resume artificially suspended threads before
14822 calling ContinueDebugEvent.
14823 (suspend_one_thread): New.
14824 (fake_breakpoint_event): New.
14825 (get_child_debug_event): Change return type to int. Check here if
14826 gdb sent an interrupt request. If a soft interrupt was requested,
14827 fake a breakpoint event. Return 0 if there is no event to handle,
14828 and 1 otherwise.
14829 (win32_wait): Don't check here if gdb sent an interrupt request.
14830 Ensure there is a valid event to handle.
14831 (win32_request_interrupt): Add soft interruption method as last
14832 resort.
14833
14834 2007-12-03 Leo Zayas
14835 Pedro Alves <pedro_alves@portugalmail.pt>
14836
14837 * win32-low.h (win32_thread_info): Add descriptions to the
14838 structure members. Replace `suspend_count' counter by a
14839 `suspended' flag.
14840 * win32-low.c (thread_rec): Update condition of when to get the
14841 context from the inferior. Rely on ContextFlags being set if it
14842 has already been retrieved. Only suspend the inferior thread if
14843 we haven't already. Warn if that fails.
14844 (continue_one_thread): s/suspend_count/suspended/. Only call
14845 ResumeThread once. Warn if that fails.
14846
14847 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14848
14849 * win32-low.c (win32_wait): Don't read from the inferior when it
14850 has already exited.
14851
14852 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14853
14854 * Makefile.in (win32_low_h): New variable.
14855 (win32-low.o): Add dependency on $(win32_low_h).
14856 (win32-arm-low.o, win32-i386-low.o): New rules.
14857
14858 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14859
14860 * hostio.c: Correct copyright year.
14861
14862 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14863
14864 * Makefile.in (OBS): Add hostio.o.
14865 (hostio.o): New rule.
14866 * server.h (handle_vFile): Declare.
14867 * hostio.c: New file.
14868 * server.c (handle_v_requests): Take packet_len and new_packet_len
14869 for binary packets. Call handle_vFile.
14870 (main): Update call to handle_v_requests.
14871
14872 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14873
14874 * linux-low.c: Include <sched.h>.
14875
14876 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14877
14878 * linux-low.c (linux_tracefork_grandchild): New.
14879 (linux_tracefork_child): Use clone.
14880 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14881
14882 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14883
14884 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14885
14886 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14887
14888 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14889
14890 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14891
14892 * inferiors.c (change_inferior_id): Delete.
14893 (add_pid_to_list, pull_pid_from_list): New.
14894 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14895 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14896 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14897 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14898 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14899 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14900 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14901 (using_threads): Always set to 1.
14902 (handle_extended_wait): New.
14903 (add_process): Do not set TID.
14904 (linux_create_inferior): Set must_set_ptrace_flags.
14905 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14906 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14907 (linux_thread_alive): Rename TID argument to LWPID.
14908 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14909 (linux_wait_for_event): Do not use TID or check using_threads. Update
14910 call to dead_thread_notify. Call handle_extended_wait.
14911 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14912 (send_sigstop): Delete sigstop_sent.
14913 (wait_for_sigstop): Avoid TID.
14914 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14915 (linux_test_for_tracefork): New.
14916 (linux_lookup_signals): Use thread_db_active and
14917 linux_supports_tracefork_flag.
14918 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14919 * linux-low.h (get_process_thread): Avoid TID.
14920 (struct process_ifo): Move thread_known and tid to the end. Remove
14921 sigstop_sent.
14922 (linux_attach_lwp, thread_db_init): Update prototypes.
14923 * server.h (change_inferior_id): Delete prototype.
14924 (add_pid_to_list, pull_pid_from_list): New prototypes.
14925 * thread-db.c (thread_db_use_events): New.
14926 (find_first_thread): Rename to...
14927 (find_one_thread): ...this. Update callers and messages. Do not
14928 call fatal. Check thread_db_use_events. Do not call
14929 change_inferior_id or new_thread_notify.
14930 (maybe_attach_thread): Update. Do not call new_thread_notify.
14931 (thread_db_init): Set thread_db_use_events. Check use_events.
14932 * utils.c (fatal, warning): Correct message prefix.
14933
14934 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14935
14936 * Makefile.in (clean): Remove new files.
14937 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14938 (powerpc-64.o, powerpc-64.c): New rules.
14939 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14940 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14941 with SPE.
14942 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14943 SPE targets.
14944 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14945 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14946 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14947 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14948 (target_regsets): Add AltiVec and SPE register sets.
14949 * configure.ac: Check for AltiVec and SPE.
14950 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14951 (ppc_fill_vrregset, ppc_store_vrregset): New.
14952 (target_regsets): Add AltiVec register set.
14953 * configure: Regenerated.
14954
14955 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14956
14957 * linux-low.c (O_LARGEFILE): Define.
14958 (linux_read_memory): Use /proc/PID/mem.
14959 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14960 * configure, config.in: Regenerated.
14961
14962 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14963
14964 * linux-low.c (linux_wait_for_event): Do not pass signals while
14965 single-stepping.
14966
14967 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14968
14969 * win32-low.c (create_process): New.
14970 (win32_create_inferior): Use create_process instead of
14971 CreateProcess. If create_process failed retry appending an ".exe"
14972 suffix. Store the GetLastError result immediatelly after
14973 create_process calls and use it on the call to error.
14974
14975 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14976
14977 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14978
14979 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14980
14981 * configure.ac: Switch license to GPLv3.
14982
14983 2007-08-01 Michael Snyder <msnyder@access-company.com>
14984
14985 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14986
14987 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14988
14989 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14990 typedef.
14991 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14992 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14993 CloseToolhelp32Snapshot.
14994 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14995 CloseToolhelp32Snapshot.
14996
14997 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14998
14999 * server.c (main): Check for inferior exit before main loop.
15000
15001 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15002
15003 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15004 instead of on tmp_desc.
15005
15006 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15007 Daniel Jacobowitz <dan@codesourcery.com>
15008
15009 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15010 (add_thread): Minor cleanups.
15011 (clear_inferiors): Move lower in the file. Clear the DLL
15012 list.
15013 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15014 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15015 (xml_escape_text): New.
15016 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15017 for qSupported.
15018 (handle_v_cont): Report errors.
15019 (gdbserver_version): Update.
15020 (main): Correct size of own_buf. Do not report initial DLL events.
15021 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15022 (unloaded_dll, xml_escape_text): New.
15023 * win32-low.c (enum target_waitkind): Update comments.
15024 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15025 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15026 (win32_EnumProcessModules, win32_GetModuleInformation)
15027 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15028 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15029 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15030 (win32_Module32First, win32_Module32Next, load_toolhelp)
15031 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15032 (get_child_debug_event): Handle DLL events.
15033 (win32_wait): Likewise.
15034
15035 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15036
15037 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15038 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15039
15040 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15041
15042 * win32-low.c (handle_output_debug_string): Ignore event if not
15043 waiting.
15044
15045 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15046
15047 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15048
15049 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15050
15051 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15052
15053 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15054
15055 * inferiors.c (change_inferior_id): Add comment.
15056 * linux-low.c (check_removed_breakpoint): Add an early
15057 prototype. Improve debug output.
15058 (linux_attach): Doc update.
15059 (linux_detach_one_process, linux_detach): Clean up before releasing
15060 each process.
15061 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15062 * linux-low.h (struct process_info): Doc improvement.
15063 * mem-break.c (delete_all_breakpoints): New.
15064 * mem-break.h (delete_all_breakpoints): New prototype.
15065 * thread-db.c (find_first_thread): New.
15066 (thread_db_create_event): Call it instead of
15067 thread_db_find_new_threads. Clean up unused variables.
15068 (maybe_attach_thread): Remove first thread handling.
15069 (thread_db_find_new_threads): Use find_first_thread.
15070 (thread_db_get_tls_address): Likewise.
15071
15072 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15073
15074 * thread-db.c (thread_db_find_new_threads): Add prototype.
15075 (thread_db_create_event): Check for the main thread before adding
15076 a new thread.
15077 (maybe_attach_thread): Only enable event reporting if TID == 0.
15078 (thread_db_get_tls_address): Check for new threads.
15079
15080 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15081
15082 * linux-low.c (linux_create_inferior): Try execv before execvp.
15083 * spu-low.c (spu_create_inferior): Likewise.
15084
15085 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15086
15087 * linux-low.c (linux_create_inferior): Change execv to execvp.
15088 * spu-low.c (spu_create_inferior): Likewies.
15089
15090 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15091
15092 * Makefile.in (clean): Clean new files instead of deleted ones.
15093 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15094 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15095 rules.
15096 * configure.srv: Specify XML files and new regformats for MIPS and
15097 MIPS64 GNU/Linux.
15098 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15099 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15100 an entry for the restart register.
15101 (mips_cannot_fetch_register, mips_cannot_store_register)
15102 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15103 register names to match the XML descriptions.
15104 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15105 restart register instead of $0.
15106
15107 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15108 Markus Deuling <deuling@de.ibm.com>
15109
15110 * remote-utils.c (decode_xfer_write): New function.
15111 * server.h (decode_xfer_write): Add prototype.
15112 * server.c (handle_query): Add PACKET_LEN argument. Support
15113 qXfer:spu:read and qXfer:spu:write packets.
15114 (main): Pass packet_len to handle_query.
15115 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15116 * target.h (target_ops): Add qxfer_spu.
15117
15118 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15119
15120 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15121 accessing non-seekable spufs files.
15122
15123 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15124
15125 * server.c (handle_query): Add reply for qC packet.
15126
15127 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15128 Leo Zayas <lerele@champenstudios@com>
15129
15130 * server.h (check_remote_input_interrupt_request): New function.
15131 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15132 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15133 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15134 (check_remote_input_interrupt_request): New function.
15135 * server.h (check_remote_input_interrupt_request): Declare.
15136 * win32-low.c (winapi_DebugBreakProcess,
15137 winapi_GenerateConsoleCtrlEvent): New typedefs.
15138 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15139 to 250 ms.
15140 (win32_wait): Check for remote interrupt request
15141 with check_remote_input_interrupt_request.
15142 (win32_request_interrupt): New function.
15143 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15144
15145 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15146
15147 * win32-low.c (debug_registers_changed,
15148 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15149 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15150 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15151 (thread_rec): Get context using the low target.
15152 (child_add_thread): Call thread_added on the low target,
15153 which does the same thing.
15154 (regptr): Delete.
15155 (do_initial_child_stuff): Remove debug registers references.
15156 Set context using the low target. Resume threads after
15157 setting the contexts.
15158 (child_continue): Remove dead variable. Remove debug
15159 registers references.
15160 (child_fetch_inferior_registers): Go through the low target.
15161 (do_child_store_inferior_registers): Remove.
15162 (child_store_inferior_registers): Go through the low target.
15163 (win32_resume): Remove debug registers references.
15164 Set context using the low target.
15165 (handle_exception): Change return type to void. Don't record
15166 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15167 first chance exception.
15168 (get_child_debug_event): Change return type to void. Remove
15169 goto loop. Always return after waiting for debug event.
15170 (win32_wait): Convert to switch statement. Handle spurious
15171 events.
15172
15173 * win32-i386-low.c (debug_registers_changed,
15174 debug_registers_used): New.
15175 (initial_stuff): Rename to ...
15176 (i386_initial_stuff): ... this. Clear debug registers
15177 state variables.
15178 (store_debug_registers): Delete.
15179 (i386_get_thread_context): New.
15180 (load_debug_registers): Delete.
15181 (i386_set_thread_context): New.
15182 (i386_thread_added): New.
15183 (single_step): Rename to ...
15184 (i386_single_step): ... this.
15185 (do_fetch_inferior_registers): Rename to ...
15186 (i386_fetch_inferior_register): ... this.
15187 (i386_store_inferior_register): New.
15188 (the_low_target): Adapt to new interface.
15189
15190 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15191 (arm_get_thread_context): New.
15192 (arm_set_thread_context): New.
15193 (regptr): New.
15194 (do_fetch_inferior_registers): Rename to ...
15195 (arm_fetch_inferior_register): ... this.
15196 (arm_store_inferior_register): New.
15197 (arm_wince_breakpoint): Reimplement as unsigned long.
15198 (arm_wince_breakpoint_len): Define.
15199 (the_low_target): Adapt to new interface.
15200
15201 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15202 load_debug_registers. Add get_thread_context, set_thread_context,
15203 thread_added and store_inferior_register. Rename
15204 fetch_inferior_registers to fetch_inferior_register.
15205 (regptr): Remove declaration.
15206
15207 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15208
15209 * linux-low.c (linux_detach): Change return type to int. Return 0.
15210 * spu-low.c (spu_detach): Likewise.
15211
15212 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15213
15214 * target.h (target_ops): Change return type of detach to int.
15215 Add join.
15216 (join_inferior): New.
15217 * server.c (main): Don't skip detach support on mingw32.
15218 If the inferior doesn't support detaching return error.
15219 Call join_inferior instead of using waitpid.
15220 * linux-low.c (linux_join): New.
15221 (linux_target_op): Add linux_join.
15222 * spu-low.c (spu_join): New.
15223 (spu_target_ops): Add spu_join.
15224 * win32-low.c (win32_detach): Adapt to new interface.
15225 Reopen current_process_handle before detaching. Issue a child
15226 resume before detaching.
15227 (win32_join): New.
15228 (win32_target_op): Add win32_join.
15229
15230 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15231
15232 * win32-low.c (win32-attach): Fix return value.
15233 * target.h (target_ops): Describe ATTACH return values.
15234
15235 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15236
15237 * win32-low.c (GETPROCADDRESS): Define.
15238 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15239 (winapi_DebugSetProcessKillOnExit): Likewise.
15240 (win32_create_inferior): Force usage of ansi CreateProcessA.
15241 (win32_attach): Use GETPROCADDRESS.
15242 (win32_detach): Likewise.
15243
15244 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15245
15246 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15247
15248 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15249
15250 * win32-low.c: Commit leftover changes from 2007-03-29.
15251
15252 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15253
15254 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15255 fields short instead of int. Add explicit padding.
15256 (i387_cache_to_fsave): Remove unnecessary casts.
15257 (i387_fsave_to_cache): Doc fix.
15258 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15259
15260 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15261
15262 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15263 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15264
15265 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15266
15267 * configure.srv (arm*-*-mingw32ce*): Move near the other
15268 arm targets.
15269
15270 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15271
15272 * configure.ac: Add errno checking.
15273 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15274 sys/file.h and malloc.h.
15275 (AC_CHECK_DECLS): Add perror.
15276 (srv_mingwce): Handle.
15277 * configure.srv (i[34567]86-*-cygwin*): Add
15278 win32-i386-low.o to srv_tgtobj.
15279 (i[34567]86-*-mingw*): Likewise.
15280 (arm*-*-mingw32ce*): Add case.
15281 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15282 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15283 [__MINGW32CE__] (strerror): New function.
15284 [__MINGW32CE__] (errno): Define to GetLastError.
15285 [__MINGW32CE__] (COUNTOF): New macro.
15286 (remote_open): Remove extra close call.
15287 * mem-break.c (delete_breakpoint_at): New function.
15288 * mem-break.h (delete_breakpoint_at): Declare.
15289 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15290 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15291 [USE_WIN32API] (read, write): Add char* casts.
15292 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15293 * server.h: Include wincecompat.h on Windows CE.
15294 [HAVE_ERRNO_H]: Check.
15295 (perror): Declare if not declared.
15296 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15297 (perror_with_name): Remove errno declaration.
15298 * wincecompat.h: New.
15299 * wincecompat.c: New.
15300 * win32-low.h: New.
15301 * win32-arm-low.c: New.
15302 * win32-i386-low.c: New.
15303 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15304 (OUTMSG2): Make it safe.
15305 (_T): New macro.
15306 (COUNTOF): New macro.
15307 (NUM_REGS): Get it from the low target.
15308 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15309 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15310 (thread_rec): Let low target handle debug registers.
15311 (child_add_thread): Likewise.
15312 (child_init_thread_list): Likewise.
15313 (continue_one_thread): Likewise.
15314 (regptr): New.
15315 (do_child_fetch_inferior_registers): Move to ...
15316 * win32-i386-low.c: ... here, and rename to ...
15317 (do_fetch_inferior_registers): ... this.
15318 * win32-low.c (child_fetch_inferior_registers):
15319 Go through the low target.
15320 (do_child_store_inferior_registers): Use regptr.
15321 (strwinerror): New function.
15322 (win32_create_inferior): Handle Windows CE.
15323 Use strwinerror instead of strerror on Windows error
15324 codes. Add program to the error output.
15325 Don't close the main thread handle on Windows CE.
15326 (win32_attach): Use coredll.dll on Windows CE.
15327 (win32_kill): Close current process and current
15328 thread handles.
15329 (win32_detach): Use coredll.dll on Windows CE.
15330 (win32_resume): Let low target handle debug registers, and
15331 step request.
15332 (handle_exception): Add/Remove initial breakpoint. Avoid
15333 non-existant WSTOPSIG on Windows CE.
15334 (win32_read_inferior_memory): Cast to remove warning.
15335 (win32_arch_string): Go through the low target.
15336 (initialize_low): Call set_breakpoint_data with the low
15337 target's breakpoint.
15338 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15339 FOP_REGNUM, mappings): Move to ...
15340 * win32-i386-low.c: ... here.
15341 * win32-low.c (win32_thread_info): Move to ...
15342 * win32-low.h: ... here.
15343 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15344 win32-arm-low.c and wincecompat.c.
15345 (all:): Add $EXEEXT.
15346 (install-only:): Likewise.
15347 (gdbserver:): Likewise.
15348 (gdbreplay:): Likewise.
15349 * config.in: Regenerate.
15350 * configure: Regenerate.
15351
15352 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15353
15354 * win32-low.c: Rename typedef thread_info to
15355 win32_thread_info throughout.
15356
15357 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15358
15359 * win32-i386-low.c: Rename to ...
15360 * win32-low.c: ... this.
15361 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15362 * Makefile.in: Likewise.
15363
15364 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15365
15366 * remote-utils.c (monitor_output): Constify msg parameter.
15367 * server.h (monitor_output): Likewise.
15368 * win32-i386-low.c (handle_output_debug_string): New.
15369 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15370 handle_output_debug_string.
15371 (get_child_debug_event): Likewise.
15372
15373 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15374
15375 * server.c (main): Correct strtoul check.
15376
15377 2007-03-27 Jon Ringle <jon@ringle.org>
15378
15379 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15380
15381 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15382
15383 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15384
15385 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15386
15387 * terminal.h: Check HAVE_SGTTY_H.
15388
15389 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15390
15391 * remote-utils.c (remote_open): Print out the assigned port number.
15392
15393 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15394
15395 * remote-utils.c (monitor_output): New function.
15396 * server.c (debug_threads): Define here.
15397 (monitor_show_help): New function.
15398 (handle_query): Handle qRcmd.
15399 (main): Do not handle 'd' packet.
15400 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15401 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15402 of debug_threads.
15403
15404 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15405
15406 * Makefile.in (EXEEXT): New.
15407 (clean): Use $(EXEEXT).
15408
15409 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15410
15411 * target.h (target_ops): Rename send_signal to request_interrupt,
15412 and remove enum target_signal parameter.
15413 * linux-low.c (linux_request_interrupt): Rename from
15414 linux_send_signal, and always send SIGINT.
15415 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15416 and always send SIGINT.
15417 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15418 of send_signal.
15419 (input_interrupt): Likewise.
15420
15421 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15422
15423 * server.c (get_features_xml): Check if target implemented
15424 arch_string.
15425 * win32-i386-low.c (win32_arch_string): New.
15426 (win32_target_ops): Add win32_arch_string as arch_string member.
15427
15428 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15429
15430 * spu-low.c (spu_arch_string): New.
15431 (spu_target_ops): Add spu_arch_string.
15432
15433 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15434
15435 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15436 * configure.ac: Do not check for terminal.h.
15437 * configure, config.in: Regenerated.
15438
15439 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15440
15441 * Makefile.in (OBS): Add $(XML_BUILTIN).
15442 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15443 (clean): Update.
15444 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15445 (arm-with-iwmmxt.c): New.
15446 * config.in, configure: Regenerate.
15447 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15448 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15449 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15450 (arm*-*-linux*): Add iWMMXt and regset support.
15451 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15452 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15453 (arm_store_wmmxregset, target_regsets): New.
15454 * server.c (get_features_xml): Take annex argument. Check builtin
15455 XML documents.
15456 (handle_query): Handle multiple annexes.
15457
15458 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15459
15460 * remote-utils.c [USE_WIN32API] (read, write): Define.
15461 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15462 write.
15463
15464 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15465
15466 * linux-i386-low.c (the_low_target): Set arch_string.
15467 * linux-x86-64-low.c (the_low_target): Likewise.
15468 * linux-low.c (linux_arch_string): New.
15469 (linux_target_ops): Add it.
15470 * linux-low.h (struct linux_target_ops): Add arch_string.
15471 * server.c (write_qxfer_response): Use const void * for DATA.
15472 (get_features_xml): New.
15473 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15474 * target.h (struct target_ops): Add arch_string method.
15475
15476 2007-01-03 Denis Pilat <denis.pilat@st.com>
15477 Daniel Jacobowitz <dan@codesourcery.com>
15478
15479 * linux-low.c (linux_kill): Handle being called with no threads.
15480 * win32-i386-low.c (win32_kill): Likewise.
15481 (get_child_debug_event): Clear current_process_handle.
15482
15483 2006-12-30 Denis PILAT <denis.pilat@st.com>
15484 Daniel Jacobowitz <dan@codesourcery.com>
15485
15486 * remote-utils.c (remote_open): Check the type of specified
15487 serial port devices before opening them.
15488 * server.c (main): Kill the inferior if an error occurs during
15489 the first remote_open.
15490
15491 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15492
15493 * README: Update supported targets.
15494
15495 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15496
15497 * Makefile.in (clean): Remove reg-mips64.c.
15498 (reg-mips64.c, reg-mips64.o): New rules.
15499 * configure.srv: Handle mips64. Include regset support for mips.
15500 * linux-mips-low.c (union mips_register): New.
15501 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15502 (mips_breakpoint, mips_breakpoint_at): Use int.
15503 (mips_collect_register, mips_supply_register)
15504 (mips_collect_register_32bit, mips_supply_register_32bit)
15505 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15506 (mips_store_fpregset, target_regsets): New.
15507 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15508
15509 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15510
15511 * configure.srv: Add target "spu*-*-*".
15512 * Makefile.in (clean): Remove reg-spu.c.
15513 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15514 * spu-low.c: New file.
15515
15516 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15517
15518 * configure.ac: Correct td_thr_tls_get_addr test.
15519 * configure: Regenerated.
15520
15521 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15522
15523 * linux-low.c (linux_wait_for_event): Reformat. Use the
15524 pass_signals array.
15525 * remote-utils.c (decode_address_to_semicolon): New.
15526 * server.c (pass_signals, handle_general_set): New.
15527 (handle_query): Mention QPassSignals for qSupported.
15528 (main): Call handle_general_set.
15529 * server.h (pass_signals, decode_address_to_semicolon): New.
15530
15531 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15532
15533 * server.c (handle_query): Correct error handling for read_auxv.
15534
15535 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15536
15537 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15538 and srv_linux_thread_db to yes.
15539 * linux-s390-low.c (s390_fill_gregset): New function.
15540 (target_regsets): Define data structure.
15541
15542 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15543
15544 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15545 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15546 * config.in, configure: Regenerated.
15547 * inferiors.c (gdb_id_to_thread): New function.
15548 (gdb_id_to_thread_id): Use it.
15549 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15550 * linux-low.h (struct process_info): Add th member.
15551 (thread_db_get_tls_address): New prototype.
15552 * remote-utils.c (decode_address): Make non-static.
15553 * server.c (handle_query): Handle qGetTLSAddr.
15554 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15555 * target.h (struct target_ops): Add get_tls_address.
15556 * thread-db.c (maybe_attach_thread): Save the thread handle.
15557 (thread_db_get_tls_address): New.
15558
15559 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15560
15561 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15562 (linux_resume_one_process): Take a siginfo_t *. Update all
15563 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15564 (struct pending_signals): Add a siginfo_t.
15565 (linux_wait_for_process): Always set last_status.
15566 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15567 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15568 * linux-low.h (struct process_info): Add last_status.
15569
15570 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15571
15572 * remote-utils.c (try_rle): New function.
15573 (putpkt_binary): Use it.
15574
15575 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15576
15577 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15578 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15579 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15580 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15581 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15582 point registers.
15583
15584 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15585
15586 * server.c (terminal_fd): New variable.
15587 (old_foreground_pgrp): Likewise.
15588 (restore_old_foreground_pgrp): New function.
15589 (start_inferior): Record the terminal file descriptor in terminal_fd
15590 and its original foreground group in old_foreground_pgrp. Register
15591 restore_old_foreground_pgrp with atexit().
15592
15593 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15594
15595 * server.c (handle_query): Correct qPart to qXfer.
15596
15597 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15598
15599 * configure.ac: Check for more headers which are missing on
15600 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15601 * configure.srv: Add Cygwin and mingw32.
15602 * remote-utils.c: Don't include headers unconditionally which
15603 are missing on mingw32. Include <winsock.h> for mingw32.
15604 (remote_open): Adjust for mingw32 support. Flush
15605 standard error after writing to it.
15606 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15607 (unblock_async_io, enable_async_io, disable_async_io)
15608 (readchar, getpkt): Update for Winsock support.
15609 (prepare_resume_reply): Expect a protocol signal number.
15610 * server.c: Disable <sys/wait.h> on mingw32.
15611 (start_inferior): Adjust for mingw32 support. Flush
15612 standard error after writing to it.
15613 (attach_inferior): Likewise. Use protocol signal
15614 numbers.
15615 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15616 and names.
15617 * win32-i386-low.c: New file.
15618 * Makefile.in (XM_CLIBS): Set.
15619 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15620 (win32-i386-low.o): New dependency rule.
15621 * linux-low.c (linux_wait): Use target signal numbers.
15622 * target.h (struct target_ops): Doc fix.
15623 * server.h (target_signal_to_name): New prototype.
15624 * gdbreplay.c: Don't include headers unconditionally which
15625 are missing on mingw32. Include <winsock.h> for mingw32.
15626 (remote_close, remote_open): Adjust for Winsock support.
15627 * configure, config.in: Regenerated.
15628
15629 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15630
15631 * server.c (decode_xfer_read, write_qxfer_response): New.
15632 (handle_query): Take a packet length argument. Handle
15633 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15634 the qSupported response.
15635 (main): Update call to handle_query.
15636
15637 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15638
15639 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15640 (putpkt_binary): Renamed from putpkt and adjusted for binary
15641 data.
15642 (putpkt): New wrapper for putpkt_binary.
15643 (readchar): Don't mask off the high bit.
15644 (decode_X_packet): New function.
15645 * server.c (main): Call putpkt_binary if a handler sets the packet
15646 length. Save the length of the incoming packet. Handle 'X'.
15647 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15648
15649 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15650
15651 * server.c (handle_query): Handle qSupported.
15652
15653 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15654
15655 * remote-utils.c (all_symbols_looked_up): New variable.
15656 (look_up_one_symbol): Check it.
15657 * server.h (look_up_one_symbol): New declaration.
15658 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15659
15660 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15661
15662 * Makefile.in (linux-arm-low.o): Update dependencies.
15663 * linux-arm-low.c: Include "gdb_proc_service.h".
15664 (PTRACE_GET_THREAD_AREA): Define.
15665 (ps_get_thread_area): New function.
15666
15667 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15668
15669 * configure.srv (m68k*-*-uclinux*): New target.
15670 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15671 (linux_resume_one_process): Remove extraneous cast.
15672 (linux_read_offsets): New.
15673 (linux_target_op): Add linux_read_offsets on mmuless systems.
15674 * server.c (handle_query): Add qOffsets logic.
15675 * target.h (struct target_ops): Add read_offsets.
15676
15677 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15678
15679 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15680 (PTRACE_GET_THREAD_AREA): Define.
15681 (ps_get_thread_area): New function.
15682 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15683 (linux-x86-64-low.o): Update.
15684
15685 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15686
15687 * configure.ac: Remove checks for prfpregset_t.
15688 * gdb_proc_service.h: New file.
15689 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15690 new "gdb_proc_service.h".
15691 * proc-service.c: Likewise.
15692 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15693 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15694 * Makefile.in (gdb_proc_service_h): Updated.
15695 * configure, config.in: Regenerated.
15696
15697 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15698
15699 * remote-utils.c (prepare_resume_reply): Move declaration
15700 of gdb_id_from_wait to the top of the block.
15701
15702 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15703
15704 * linux-low.c (regsets_store_inferior_registers): Read the regset
15705 from the target before filling it.
15706
15707 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15708
15709 * server.c (attach_inferior): Return SIGTRAP for a successful
15710 attach.
15711
15712 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15713
15714 * Makefile.in (OBS): Add version.o.
15715 (STAGESTUFF): Delete.
15716 (version.o): Add dependencies.
15717 (version.c): Replace rule.
15718 (clean): Remove version.c.
15719 * server.c (gdbserver_version): New.
15720 (gdbserver_usage): Use printf.
15721 (main): Handle --version and --help.
15722 * server.h (version, host_name): Add declarations.
15723
15724 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15725
15726 * linux-arm-low.c:
15727 * linux-arm-low.c:
15728 * inferiors.c:
15729 * i387-fp.h:
15730 * i387-fp.c:
15731 * gdbreplay.c:
15732 * regcache.c:
15733 * proc-service.c:
15734 * mem-break.h:
15735 * mem-break.c:
15736 * linux-x86-64-low.c:
15737 * linux-sh-low.c:
15738 * linux-s390-low.c:
15739 * linux-ppc64-low.c:
15740 * linux-ppc-low.c:
15741 * linux-mips-low.c:
15742 * linux-m68k-low.c:
15743 * linux-m32r-low.c:
15744 * linux-low.h:
15745 * linux-low.c:
15746 * linux-ia64-low.c:
15747 * linux-i386-low.c:
15748 * linux-crisv32-low.c:
15749 * thread-db.c:
15750 * terminal.h:
15751 * target.h:
15752 * target.c:
15753 * server.h:
15754 * server.c:
15755 * remote-utils.c:
15756 * regcache.h:
15757 * utils.c:
15758 * Makefile.in:
15759 * configure.ac:
15760 * gdbserver.1: Add (C) after Copyright. Update the FSF
15761 address.
15762
15763 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15764
15765 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15766 (arm_breakpoint_at): Recognize both breakpoints.
15767 (the_low_target): Use the correct breakpoint instruction.
15768
15769 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15770
15771 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15772 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15773 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15774 (the_low_target): Update.
15775
15776 2005-10-25 Andreas Schwab <schwab@suse.de>
15777
15778 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15779
15780 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15781 (ia64_num_regs): Reduce to 462.
15782
15783 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15784
15785 * acinclude.m4: Correct quoting.
15786 * aclocal.m4: Regenerated.
15787
15788 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15789 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15790 (thread_db_init): Call thread_db_err_str.
15791 * configure.ac: Check for TD_VERSION.
15792 * config.in, configure: Regenerated.
15793
15794 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15795
15796 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15797
15798 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15799
15800 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15801 is not available. Define HAVE_PTRACE_GETREGS if it is.
15802 * config.in, configure: Regenerated.
15803 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15804 * linux-i386-low.c, linux-m68k-low.c: Update to use
15805 HAVE_PTRACE_GETREGS.
15806 * linux-low.c (regsets_fetch_inferior_registers)
15807 (regsets_store_inferior_registers): Only return 0 if we processed
15808 GENERAL_REGS.
15809 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15810 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15811
15812 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15813
15814 * inferiors.c (struct thread_info): Add gdb_id.
15815 (add_thread): Add gdb_id argument.
15816 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15817 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15818 calls to add_thread.
15819 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15820 * server.c (handle_query): Use thread_to_gdb_id.
15821 (handle_v_cont, main): Use gdb_id_to_thread_id.
15822 * server.h (add_thread): Update prototype.
15823 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15824 prototypes.
15825
15826 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15827
15828 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15829 left-padded registers.
15830 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15831 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15832
15833 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15834
15835 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15836 * configure: Regenerate.
15837 * config.in: Regenerate.
15838 * server.h (NEED_DECLARATION_STRERROR):
15839 Replace with !HAVE_DECL_STRERROR.
15840
15841 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15842
15843 * linux-low.c (linux_wait, linux_send_signal): Don't test
15844 an unsigned long variable for > 0 if it could be MAX_ULONG.
15845 * server.c (myresume): Likewise.
15846 * target.c (set_desired_inferior): Likewise.
15847
15848 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15849
15850 * configure.ac: Simplify and improve check for socklen_t.
15851 * configure, config.in: Regenerate.
15852
15853 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15854
15855 * acconfig.h: Remove.
15856 * configure.ac: Add a test for socklen_t. Use three-argument
15857 AC_DEFINE throughout.
15858 * config.in: Regenerated using autoheader 2.59.
15859 * configure: Regenerated.
15860
15861 * gdbreplay.c (socklen_t): Provide a default.
15862 (remote_open): Use socklen_t.
15863 * remote-utils.c (socklen_t): Provide a default.
15864 (remote_open): Use socklen_t.
15865 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15866 unsigned char.
15867
15868 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15869 char for buffers.
15870 * linux-low.c (linux_read_memory, linux_write_memory)
15871 (linux_read_auxv): Likewise.
15872 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15873 (check_mem_write): Likewise.
15874 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15875 Likewise.
15876 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15877 (registers_from_string, register_data): Likewise.
15878 * server.c (handle_query, main): Likewise.
15879 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15880 (decode_M_packet): Likewise.
15881 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15882 * target.h (struct target_ops): Update read_memory, write_memory,
15883 and read_auxv.
15884 (read_inferior_memory, write_inferior_memory): Update.
15885 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15886 to unsigned char *.
15887 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15888 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15889 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15890 linux-s390-low.c, linux-sh-low.c: Update for changes in
15891 read_inferior_memory and the_low_target->breakpoint.
15892
15893 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15894
15895 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15896 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15897 * configure.srv: Add powerpc64-*-linux*.
15898 * linux-ppc64-low.c: New file.
15899
15900 2005-05-23 Orjan Friberg <orjanf@axis.com>
15901
15902 * linux-cris-low.c: New file with support for CRIS.
15903 * linux-crisv32-low.c: Ditto for CRISv32.
15904 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15905 (clean): Add reg-cris.c and reg-crisv32.c.
15906 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15907 reg-crisv32.o, and reg-crisv32.c to make rules.
15908 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15909 recognized targets.
15910
15911 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15912
15913 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15914 of sizeof (PTRACE_XFER_TYPE).
15915 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15916
15917 2005-05-12 Orjan Friberg <orjanf@axis.com>
15918
15919 * target.h (struct target_ops): Add insert_watchpoint,
15920 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15921 pointers for hardware watchpoint support.
15922 * linux-low.h (struct linux_target_ops): Ditto.
15923 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15924 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15925 to linux_target_ops.
15926 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15927 reply packet.
15928 * server.c (main): Recognize 'Z' and 'z' packets.
15929
15930 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15931
15932 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15933 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15934 (the_low_target): Add new members.
15935
15936 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15937
15938 * proc-service.c (ps_lgetregs): Search all_processes instead of
15939 all_threads.
15940
15941 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15942
15943 * server.c (start_inferior): Change return type to int.
15944 (attach_inferior): Change sigptr to int *.
15945 (handle_v_cont, handle_v_requests): Change signal to int *.
15946 (main): Change signal to int.
15947
15948 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15949
15950 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15951 * configure.srv: Add m32r*-*-linux*.
15952 * linux-m32r-low.c: New file.
15953
15954 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15955
15956 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15957
15958 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15959
15960 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15961 Take unsigned long arguments for PIDs.
15962 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15963 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15964 (wait_for_sigstop, linux_resume_one_process)
15965 (regsets_fetch_inferior_registers, linux_send_signal)
15966 (linux_read_auxv): Likewise. Update the types of variables holding
15967 PIDs. Update format string specifiers.
15968 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15969 * remote-utils.c (prepare_resume_reply): Likewise.
15970 * server.c (cont_thread, general_thread, step_thread)
15971 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15972 unsigned long.
15973 (handle_query): Update format specifiers.
15974 (handle_v_cont, main): Use strtoul for thread IDs.
15975 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15976 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15977 (general_thread, step_thread, thread_from_wait)
15978 (old_thread_from_wait): Update.
15979 * target.h (struct thread_resume): Use unsigned long for THREAD.
15980 (struct target_ops): Use unsigned long for arguments to attach and
15981 thread_alive.
15982
15983 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15984
15985 * acinclude.m4: Include bfd/bfd.m4 directly.
15986 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15987 <agriffis@toolchain.org>.
15988 * aclocal.m4, configure: Regenerated.
15989
15990 2005-01-07 Andrew Cagney <cagney@gnu.org>
15991
15992 * configure.ac: Rename configure.in, require autoconf 2.59.
15993 * configure: Re-generate.
15994
15995 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15996
15997 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15998 LIBS when finished.
15999 * aclocal.m4: Regenerated.
16000 * configure: Regenerated.
16001
16002 2004-11-21 Andreas Schwab <schwab@suse.de>
16003
16004 * linux-m68k-low.c (m68k_num_gregs): Define.
16005 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16006 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16007 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16008 (m68k_breakpoint_at): New. Add to the_low_target.
16009
16010 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16011 srv_linux_thread_db to yes.
16012
16013 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16014
16015 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16016 (ARCH_SET_FS): Likewise.
16017 (ARCH_GET_FS): Likewise.
16018 (ARCH_GET_GS): Likewise.
16019
16020 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16021
16022 * linux-i386-low.c (ps_get_thread_area): New.
16023 * linux-x86-64-low.c (ps_get_thread_area): New.
16024 * linux-low.c: Include <sys/syscall.h>.
16025 (linux_kill_one_process): Don't kill the first thread here.
16026 (linux_kill): Kill the first thread here.
16027 (kill_lwp): New function.
16028 (send_sigstop, linux_send_signal): Use it.
16029 * proc-service.c: Clean up #ifdefs.
16030 (fpregset_info): Delete.
16031 (ps_lgetregs): Update and enable implementation.
16032 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16033 implementations.
16034 * remote-utils.c (struct sym_cache, symbol_cache): New.
16035 (input_interrupt): Print a clearer message.
16036 (async_io_enabled): New variable.
16037 (enable_async_io, disable_async_io): Use it. Update comments.
16038 (look_up_one_symbol): Use the symbol cache.
16039 * thread-db.c (thread_db_look_up_symbols): New function.
16040 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16041
16042 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16043
16044 * configure.in: Test for -rdynamic.
16045 * configure: Regenerated.
16046 * Makefile (INTERNAL_LDFLAGS): New.
16047 (gdbserver, gdbreplay): Use it.
16048
16049 2004-09-02 Andrew Cagney <cagney@gnu.org>
16050
16051 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16052
16053 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16054
16055 * linux-low.c (linux_wait): Clear all_processes list also.
16056
16057 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16058
16059 * linux-low.c: Include <errno.h>. Remove extern declaration of
16060 errno.
16061
16062 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16063
16064 * gdbreplay.c, server.h, utils.c: Update copyright years.
16065
16066 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16067
16068 * server.c (main): Print child status or termination signal from
16069 variable 'signal', not 'sig'.
16070
16071 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16072
16073 * linux-low.c (linux_read_memory): Change return type to
16074 int. Check for and return error from ptrace().
16075 * target.c (read_inferior_memory): Change return type to int. Pass
16076 back return status from the_target->read_memory().
16077 * target.h (struct target_ops): Adapt *read_memory() prototype.
16078 Update comment.
16079 (read_inferior_memory): Adapt prototype.
16080 * server.c (main): Return an error packet if
16081 read_inferior_memory() returns an error.
16082
16083 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16084
16085 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16086 Unify with other clean targets.
16087
16088 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16089
16090 * server.c (handle_v_cont): Call set_desired_inferior.
16091
16092 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16093
16094 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16095
16096 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16097
16098 * linux-low.c (linux_wait): Unblock async I/O.
16099 (linux_resume): Block and enable async I/O.
16100 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16101 * server.h (block_async_io, unblock_async_io): Add prototypes.
16102
16103 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16104
16105 * remote-utils.c (remote_open): Print a status notice after
16106 opening a TCP port.
16107 * server.c (attach_inferior): Print a status notice after
16108 attaching.
16109
16110 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16111
16112 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16113
16114 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16115
16116 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16117 error packet.
16118 * server.c, target.h: Update copyright years.
16119
16120 2004-02-25 Roland McGrath <roland@redhat.com>
16121
16122 * target.h (struct target_ops): New member `read_auxv'.
16123 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16124 * linux-low.c (linux_read_auxv): New function.
16125 (linux_target_ops): Initialize `read_auxv' member to that.
16126
16127 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16128
16129 Committed by Jim Blandy <jimb@redhat.com>.
16130
16131 * linux-s390-low.c (s390_num_regs): Update.
16132 (s390_regmap): Remove control registers. Use __s390x__ predefine
16133 instead of GPR_SIZE to distiguish s390 and s390x targets.
16134
16135 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16136
16137 * linux-low.c: Update copyright year.
16138 (check_removed_breakpoint): Clear pending_is_breakpoint.
16139 (linux_set_resume_request, linux_queue_one_thread)
16140 (resume_status_pending_p): New functions.
16141 (linux_continue_one_thread): Use process->resume.
16142 (linux_resume): Only resume threads if there are no pending events.
16143 * linux-low.h (struct process_info): Add resume request
16144 pointer.
16145
16146 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16147
16148 * regcache.c (new_register_cache): Clear the allocated register
16149 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16150
16151 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16152
16153 * linux-low.c (linux_resume): Take a struct thread_resume *
16154 argument.
16155 (linux_wait): Update call.
16156 (resume_ptr): New static variable.
16157 (linux_continue_one_thread): Renamed from
16158 linux_continue_one_process. Use resume_ptr.
16159 (linux_resume): Use linux_continue_one_thread.
16160 * server.c (handle_v_cont, handle_v_requests): New functions.
16161 (myresume): New function.
16162 (main): Handle 'v' case.
16163 * target.h (struct thread_resume): New type.
16164 (struct target_ops): Change argument of "resume" to struct
16165 thread_resume *.
16166 (myresume): Delete macro.
16167
16168 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16169
16170 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16171 (uninstall): Support DESTDIR.
16172
16173 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16174
16175 * configure.srv: Add xscale*linux copy of arm*linux entry.
16176
16177 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16178
16179 * linux-arm-low.c (arm_reinsert_addr): New function.
16180 (the_low_target): Add arm_reinsert_addr.
16181
16182 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16183
16184 * mem-break.c: Remove whitespace at end of file.
16185
16186 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16187
16188 * configure.in: Check whether we need to prototype strerror.
16189 * server.h: Optionally prototype strerror.
16190 * gdbreplay.c (perror_with_name): Use strerror.
16191 * linux-low.c (linux_attach_lwp): Use strerror.
16192 * utils.c (perror_with_name): Use strerror.
16193 * config.in, configure: Regenerated.
16194
16195 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16196
16197 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16198 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16199
16200 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16201
16202 * Makefile.in (SFILES): Update.
16203 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16204 low-sun3.c: Remove files.
16205
16206 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16207
16208 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16209 (linux_detach_one_process, linux_detach): New functions.
16210 (linux_target_ops): Add linux_detach.
16211 * server.c (main): Handle 'D' packet.
16212 * target.h (struct target_ops): Add "detach" member.
16213 (detach_inferior): Define.
16214
16215 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16216
16217 From Kelley Cook <kelleycook@wideopenwest.com>:
16218 * configure.srv: Accept i[34567]86 variants.
16219
16220 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16221
16222 * linux-low.c (linux_wait_for_event): Correct comment typos.
16223 (linux_resume_one_process): Call check_removed_breakpoint.
16224 (linux_send_signal): New function.
16225 (linux_target_ops): Add linux_send_signal.
16226 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16227 of kill.
16228 * target.h (struct target_ops): Add send_signal.
16229
16230 2003-05-29 Jim Blandy <jimb@redhat.com>
16231
16232 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16233 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16234 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16235 away part of the register's value.
16236
16237 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16238
16239 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16240 (linux_wait_for_event, linux_init_signals): Likewise.
16241
16242 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16243
16244 * configure.in: Check for stdlib.h.
16245 * configure: Regenerated.
16246 * config.in: Regenerated.
16247
16248 2003-01-04 Andreas Schwab <schwab@suse.de>
16249
16250 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16251
16252 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16253
16254 * Makefile.in: Remove obsolete code.
16255
16256 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16257
16258 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16259 defined(PT_FPR0_HI).
16260
16261 2002-11-17 Stuart Hughes <seh@zee2.com>
16262
16263 * linux-arm-low.c (arm_num_regs): Increase.
16264 (arm_regmap): Include status register.
16265
16266 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16267
16268 * linux-low.c (register_addr): Remove incorrect -1 check.
16269
16270 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16271
16272 * linux-low.c (linux_create_inferior): Call setpgid. Return
16273 the new PID.
16274 (unstopped_p, linux_signal_pid): Remove.
16275 (linux_target_ops): Remove linux_signal_pid.
16276 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16277 global instead of target method.
16278 * target.h (struct target_ops): Remove signal_pid. Update comment
16279 for create_inferior.
16280 * server.c (signal_pid): New variable.
16281 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16282 gdbserver. Set the child to be the foreground process group.
16283 (attach_inferior): Set signal_pid.
16284
16285 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16286
16287 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16288
16289 2002-08-20 Jim Blandy <jimb@redhat.com>
16290
16291 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16292 default for this.
16293
16294 2002-08-01 Andrew Cagney <cagney@redhat.com>
16295
16296 * Makefile.in: Make chill references obsolete.
16297
16298 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16299
16300 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16301 * configure: Regenerate.
16302 * config.in: Regenerate.
16303
16304 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16305
16306 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16307 (perror_with_name, remote_close, remote_open, expect, play): Static.
16308
16309 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16310
16311 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16312 byte offsets instead of an array of indexes.
16313 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16314
16315 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16316
16317 * regcache.c: Add comment.
16318
16319 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16320
16321 * thread-db.c: New file.
16322 * proc-service.c: New file.
16323 * acinclude.m4: New file.
16324 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16325 proc-service.o, and thread-db.o.
16326 (linux-low.o): Add USE_THREAD_DB.
16327 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16328 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16329 * aclocal.m4: Regenerated.
16330 * config.in: Regenerated.
16331 * configure: Regenerated.
16332 * configure.in: Check for proc_service.h, sys/procfs.h,
16333 thread_db.h, and linux/elf.h headrs.
16334 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16335 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16336 Check for -lthread_db and thread support.
16337 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16338 PowerPC, and SuperH.
16339 * i387-fp.c: Constify arguments.
16340 * i387-fp.h: Likewise.
16341 * inferiors.c: (struct thread_info): Renamed from
16342 `struct inferior_info'. Remove PID member. Use generic inferior
16343 list header. All uses updated.
16344 (inferiors, signal_pid): Removed.
16345 (all_threads): New variable.
16346 (get_thread): Define.
16347 (add_inferior_to_list): New function.
16348 (for_each_inferior): New function.
16349 (change_inferior_id): New function.
16350 (add_inferior): Removed.
16351 (remove_inferior): New function.
16352 (add_thread): New function.
16353 (free_one_thread): New function.
16354 (remove_thread): New function.
16355 (clear_inferiors): Use for_each_inferior and free_one_thread.
16356 (find_inferior): New function.
16357 (find_inferior_id): New function.
16358 (inferior_target_data): Update argument type.
16359 (set_inferior_target_data): Likewise.
16360 (inferior_regcache_data): Likewise.
16361 (set_inferior_regcache_data): Likewise.
16362 * linux-low.c (linux_bp_reinsert): Remove.
16363 (all_processes, stopping_threads, using_thrads)
16364 (struct pending_signals, debug_threads, pid_of): New.
16365 (inferior_pid): Replace with macro.
16366 (struct inferior_linux_data): Remove.
16367 (get_stop_pc, add_process): New functions.
16368 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16369 Use add_process and add_thread.
16370 (linux_attach_lwp): New function, based on old linux_attach. Use
16371 add_process and add_thread. Set stop_expected for new threads.
16372 (linux_attach): New function.
16373 (linux_kill_one_process): New function.
16374 (linux_kill): Kill all LWPs.
16375 (linux_thread_alive): Use find_inferior_id.
16376 (check_removed_breakpoints, status_pending_p): New functions.
16377 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16378 Update. Use WNOHANG. Wait for cloned processes also. Update process
16379 struct for the found process.
16380 (linux_wait_for_event): New function.
16381 (linux_wait): Use it. Support LWPs.
16382 (send_sigstop, wait_for_sigstop, stop_all_processes)
16383 (linux_resume_one_process, linux_continue_one_process): New functions.
16384 (linux_resume): Support LWPs.
16385 (REGISTER_RAW_SIZE): Remove.
16386 (fetch_register): Use register_size instead. Call supply_register.
16387 (usr_store_inferior_registers): Likewise. Call collect_register.
16388 Fix recursive case.
16389 (regsets_fetch_inferior_registers): Improve error message.
16390 (regsets_store_inferior_registers): Add debugging.
16391 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16392 (unstopped_p, linux_signal_pid): New functions.
16393 (linux_target_ops): Add linux_signal_pid.
16394 (linux_init_signals): New function.
16395 (initialize_low): Call it. Initialize using_threads.
16396 * regcache.c (inferior_regcache_data): Add valid
16397 flag.
16398 (get_regcache): Fetch registers lazily. Add fetch argument
16399 and update all callers.
16400 (regcache_invalidate_one, regcache_invalidate): New
16401 functions.
16402 (new_register_cache): Renamed from create_register_cache.
16403 Return the new regcache.
16404 (free_register_cache): Change argument to a void *.
16405 (registers_to_string, registers_from_string): Call get_regcache
16406 with fetch flag set.
16407 (register_data): Make static. Pass fetch flag to get_regcache.
16408 (supply_register): Call get_regcache with fetch flag clear.
16409 (collect_register): Call get_regcache with fetch flag set.
16410 (collect_register_as_string): New function.
16411 * regcache.h: Update.
16412 * remote-utils.c (putpkt): Flush after debug output and use
16413 stderr.
16414 Handle input interrupts while waiting for an ACK.
16415 (input_interrupt): Use signal_pid method.
16416 (getpkt): Flush after debug output and use stderr.
16417 (outreg): Use collect_register_as_string.
16418 (new_thread_notify, dead_thread_notify): New functions.
16419 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16420 and general_thread.
16421 (look_up_one_symbol): Flush after debug output.
16422 * server.c (step_thread, server_waiting): New variables.
16423 (start_inferior): Don't use signal_pid. Update call to mywait.
16424 (attach_inferior): Update call to mywait.
16425 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16426 (main): Don't fetch/store registers explicitly. Use
16427 set_desired_inferior. Support proposed ``Hs'' packet. Update
16428 calls to mywait.
16429 * server.h: Update.
16430 (struct inferior_list, struct_inferior_list_entry): New.
16431 * target.c (set_desired_inferior): New.
16432 (write_inferior_memory): Constify.
16433 (mywait): New function.
16434 * target.h: Update.
16435 (struct target_ops): New signal_pid method.
16436 (mywait): Removed macro, added prototype.
16437
16438 * linux-low.h (regset_func): Removed.
16439 (regset_fill_func, regset_store_func): New.
16440 (enum regset_type): New.
16441 (struct regset_info): Add type field. Use new operation types.
16442 (struct linux_target_ops): stop_pc renamed to get_pc.
16443 Add decr_pc_after_break and breakpoint_at.
16444 (get_process, get_thread_proess, get_process_thread)
16445 (strut process_info, all_processes, linux_attach_lwp)
16446 (thread_db_init): New.
16447
16448 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16449 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16450 (the_low_target): Add new members.
16451 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16452 (i386_store_fpxregset): Constify.
16453 (target_regsets): Add new kind identifier.
16454 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16455 (i386_set_pc): Add debugging.
16456 (i386_breakpoint_at): New function.
16457 (the_low_target): Add new members.
16458 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16459 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16460 (mips_breakpoint_at): New.
16461 (the_low_target): Add new members.
16462 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16463 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16464 (the_low_target): Add new members.
16465 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16466 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16467 (the_low_target): Add new members.
16468 * linux-x86-64-low.c (target_regsets): Add new kind
16469 identifier.
16470
16471 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16472
16473 From Martin Pool <mbp@samba.org>:
16474 * server.c (gdbserver_usage): New function.
16475 (main): Call it.
16476
16477 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16478
16479 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16480 stop_at -> stop_pc.
16481
16482 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16483
16484 * Makefile.in: Remove obsolete code.
16485
16486 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16487
16488 * linux-low.c (regsets_fetch_inferior_registers),
16489 (regsets_store_inferior_registers): Removed cast to int from
16490 ptrace() calls.
16491 * regcache.h: Added declaration of struct inferior_info.
16492
16493 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16494
16495 * inferiors.c (struct inferior_info): Add regcache_data.
16496 (add_inferior): Call create_register_cache.
16497 (clear_inferiors): Call free_register_cache.
16498 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16499 * regcache.c (struct inferior_regcache_data): New.
16500 (registers): Remove.
16501 (get_regcache): New function.
16502 (create_register_cache, free_register_cache): New functions.
16503 (set_register_cache): Don't initialize the register cache here.
16504 (registers_to_string, registers_from_string, register_data): Call
16505 get_regcache.
16506 * regcache.h: Add prototypes.
16507 * server.h: Likewise.
16508
16509 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16510
16511 * mem-break.c: New file.
16512 * mem-break.h: New file.
16513 * Makefile.in: Add mem-break.o rule; update server.h
16514 dependencies.
16515 * inferiors.c (struct inferior_info): Add target_data
16516 member.
16517 (clear_inferiors): Free target_data member if set.
16518 (inferior_target_data, set_inferior_target_data): New functions.
16519 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16520 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16521 * linux-low.c (linux_bp_reinsert): New variable.
16522 (struct inferior_linux_data): New.
16523 (linux_create_inferior): Use set_inferior_target_data.
16524 (linux_attach): Likewise. Call add_inferior.
16525 (linux_wait_for_one_inferior): New function.
16526 (linux_wait): Call it.
16527 (linux_write_memory): Add const.
16528 (initialize_low): Call set_breakpoint_data.
16529 * linux-low.h (struct linux_target_ops): Add breakpoint
16530 handling members.
16531 * server.c (attach_inferior): Remove extra add_inferior
16532 call.
16533 * server.h: Include mem-break.h. Update inferior.c
16534 prototypes.
16535 * target.c (read_inferior_memory)
16536 (write_inferior_memory): New functions.
16537 * target.h (read_inferior_memory)
16538 (write_inferior_memory): Change macros to prototypes.
16539 (struct target_ops): Update comments. Add const to write_memory
16540 definition.
16541
16542 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16543
16544 * linux-low.c (usr_store_inferior_registers): Support
16545 registers which are allowed to fail to store.
16546 * linux-low.h (linux_target_ops): Likewise.
16547 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16548 (ppc_cannot_store_register): FPSCR may not be storable.
16549
16550 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16551
16552 * server.h: Include <string.h> if HAVE_STRING_H.
16553 * ChangeLog: Correct paths in last ChangeLog entry.
16554
16555 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16556
16557 * linux-low.h: Remove obsolete prototypes.
16558 (struct linux_target_ops): New.
16559 (extern the_low_target): New.
16560 * linux-low.c (num_regs, regmap): Remove declarations.
16561 (register_addr): Use the_low_target explicitly.
16562 (fetch_register): Likewise.
16563 (usr_fetch_inferior_registers): Likewise.
16564 (usr_store_inferior_registers): Likewise.
16565 * linux-arm-low.c (num_regs): Remove.
16566 (arm_num_regs): Define.
16567 (arm_regmap): Renamed from regmap, made static.
16568 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16569 made static.
16570 (arm_cannot_store_register): Renamed from cannot_store_register,
16571 made static.
16572 (the_low_target): New.
16573 * linux-i386-low.c (num_regs): Remove.
16574 (i386_num_regs): Define.
16575 (i386_regmap): Renamed from regmap, made static.
16576 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16577 made static.
16578 (i386_cannot_store_register): Renamed from cannot_store_register,
16579 made static.
16580 (the_low_target): New.
16581 * linux-ia64-low.c (num_regs): Remove.
16582 (ia64_num_regs): Define.
16583 (ia64_regmap): Renamed from regmap, made static.
16584 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16585 made static.
16586 (ia64_cannot_store_register): Renamed from cannot_store_register,
16587 made static.
16588 (the_low_target): New.
16589 * linux-m68k-low.c (num_regs): Remove.
16590 (m68k_num_regs): Define.
16591 (m68k_regmap): Renamed from regmap, made static.
16592 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16593 made static.
16594 (m68k_cannot_store_register): Renamed from cannot_store_register,
16595 made static.
16596 (the_low_target): New.
16597 * linux-mips-low.c (num_regs): Remove.
16598 (mips_num_regs): Define.
16599 (mips_regmap): Renamed from regmap, made static.
16600 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16601 made static.
16602 (mips_cannot_store_register): Renamed from cannot_store_register,
16603 made static.
16604 (the_low_target): New.
16605 * linux-ppc-low.c (num_regs): Remove.
16606 (ppc_num_regs): Define.
16607 (ppc_regmap): Renamed from regmap, made static.
16608 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16609 made static.
16610 (ppc_cannot_store_register): Renamed from cannot_store_register,
16611 made static.
16612 (the_low_target): New.
16613 * linux-s390-low.c (num_regs): Remove.
16614 (s390_num_regs): Define.
16615 (s390_regmap): Renamed from regmap, made static.
16616 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16617 made static.
16618 (s390_cannot_store_register): Renamed from cannot_store_register,
16619 made static.
16620 (the_low_target): New.
16621 * linux-sh-low.c (num_regs): Remove.
16622 (sh_num_regs): Define.
16623 (sh_regmap): Renamed from regmap, made static.
16624 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16625 made static.
16626 (sh_cannot_store_register): Renamed from cannot_store_register,
16627 made static.
16628 (the_low_target): New.
16629 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16630 (the_low_target): New.
16631
16632 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16633
16634 * Makefile.in: Add stamp-h target.
16635 * configure.in: Create stamp-h.
16636 * configure: Regenerated.
16637
16638 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16639
16640 * inferiors.c: New file.
16641 * target.c: New file.
16642 * target.h: New file.
16643 * Makefile.in: Add target.o and inferiors.o. Update
16644 dependencies.
16645 * linux-low.c (inferior_pid): New static variable,
16646 moved from server.c.
16647 (linux_create_inferior): Renamed from create_inferior.
16648 Call add_inferior. Return 0 on success instead of a PID.
16649 (linux_attach): Renamed from myattach.
16650 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16651 (linux_thread_alive): Renamed from mythread_alive.
16652 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16653 child dies.
16654 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16655 (regsets_store_inferior_registers): Correct error message.
16656 Add missing ``return 0''.
16657 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16658 (linux_store_registers): Renamed from store_inferior_registers.
16659 (linux_read_memory): Renamed from read_inferior_memory.
16660 (linux_write_memory): Renamed from write_inferior_memory.
16661 (linux_target_ops): New structure.
16662 (initialize_low): Call set_target_ops ().
16663 * remote-utils.c (unhexify): New function.
16664 (hexify): New function.
16665 (input_interrupt): Send signals to ``signal_pid''.
16666 * server.c (inferior_pid): Remove.
16667 (start_inferior): Update create_inferior call.
16668 (attach_inferior): Call add_inferior.
16669 (handle_query): New function.
16670 (main): Call handle_query for `q' packets.
16671 * server.h: Include "target.h". Remove obsolete prototypes.
16672 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16673
16674 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16675
16676 * Makefile.in: Add WARN_CFLAGS. Update configury
16677 dependencies.
16678 * configure.in: Check for <string.h>
16679 * configure: Regenerate.
16680 * config.in: Regenerate.
16681 * gdbreplay.c: Include needed system headers.
16682 (remote_open): Remove strchr prototype.
16683 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16684 * regcache.c (supply_register): Change buf argument to const void *.
16685 (supply_register_by_name): Likewise.
16686 (collect_register): Change buf argument to void *.
16687 (collect_register_by_name): Likewise.
16688 * regcache.h: Add missing prototypes.
16689 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16690 * server.c (handle_query): New function.
16691 (attached): New static variable, moved out of main.
16692 (main): Quiet longjmp clobber warnings.
16693 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16694 * utils.c (error): Remove NORETURN.
16695 (fatal): Likewise.