Ptrace support for AArch64 SVE gdbserver
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2
3 * linux-aarch64-low.c (is_sve_tdesc): New function.
4 (aarch64_sve_regs_copy_to_regcache): Likewise.
5 (aarch64_sve_regs_copy_from_regcache): Likewise.
6 (aarch64_regs_info): Add SVE checks.
7 (initialize_low_arch): Initialize SVE.
8
9 2018-06-18 Alan Hayward <alan.hayward@arm.com>
10
11 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
12
13 2018-06-11 Alan Hayward <alan.hayward@arm.com>
14
15 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
16 (initialize_low_tracepoint): Likewise
17 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
18 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
19 param.
20 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
21 checks.
22 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
23
24 2018-06-11 Alan Hayward <alan.hayward@arm.com>
25
26 * server.h (PBUFSIZ): Increase size
27
28 2018-06-11 Alan Hayward <alan.hayward@arm.com>
29
30 * regcache.c (regcache::raw_compare): New function.
31 * regcache.h (regcache::raw_compare): New declaration.
32
33 2018-06-11 Alan Hayward <alan.hayward@arm.com>
34
35 * regcache.c (new_register_cache): Use new.
36 (free_register_cache): Use delete.
37 (register_data): Use const.
38 (supply_register): Move body inside regcache.
39 (regcache::raw_supply): New override function.
40 (collect_register): Move body inside regcache.
41 (regcache::raw_collect): New override function.
42 (regcache::get_register_status): New override function.
43 * regcache.h (struct regcache): Inherit from reg_buffer_common.
44
45 2018-06-09 Tom Tromey <tom@tromey.com>
46
47 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
48 declare queue.
49 (event_queue): Use std::queue.
50 (gdb_event_xfree): Remove.
51 (initialize_event_loop, process_event, wait_for_event): Update.
52
53 2018-06-08 Stan Cox <scox@redhat.com>
54
55 * win32-low.c (win32_create_inferior): last_ptid and last_status
56 moved to client_state.
57
58 2018-06-08 Pedro Alves <palves@redhat.com>
59
60 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
61 common/common-exceptions.o, common/common-utils.o,
62 common/errors.o, common/print-utils.o and utils.o.
63 * gdbreplay.c: Include "common-defs.h" instead of the two
64 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
65 string.h or alloca.h.
66 (perror_with_name): Delete.
67 (remote_open): Use xstrdup instead of strdup.
68 (main): Rename to ...
69 (captured_main): ... this.
70 (main): New.
71
72 2018-06-08 Tom Tromey <tom@tromey.com>
73
74 * linux-low.c (linux_low_read_btrace): Update.
75
76 2018-06-04 Stan Cox <scox@redhat.com>
77
78 * server.h (struct client_state): New.
79 * server.c (cont_thread, general_thread, multi_process)
80 (report_fork_events, report_vfork_events, report_exec_events)
81 (report_thread_events, swbreak_feature, hwbreak_feature)
82 (vCont_supported, disable_randomization, pass_signals)
83 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
84 Moved to client_state.
85 * remote-utils.c (remote_debug, noack_mode)
86 (transport_is_reliable): Moved to client_state.
87 * tracepoint.c (current_traceframe): Moved to client_state.
88
89 Update all callers.
90 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
91 linux-low.c, remote-utils.h, target.c: Use client_state.
92
93 2018-05-31 Alan Hayward <alan.hayward@arm.com>
94
95 * configure.srv: Add new c/h file.
96
97 2018-05-31 Alan Hayward <alan.hayward@arm.com>
98
99 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
100 null VQ.
101
102 2018-05-25 Maciej W. Rozycki <macro@mips.com>
103
104 * gdb.arch/mips-fpregset-core.exp: New test.
105 * gdb.arch/mips-fpregset-core.c: New test source.
106
107 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
108
109 PR server/23198
110 * hostio.c (require_int): Do not report overflow for integers
111 between 0xfffffff and 0x7fffffff.
112
113 2018-05-22 Maciej W. Rozycki <macro@mips.com>
114
115 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
116 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
117 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
118 functions.
119 (the_low_target): Wire them.
120
121 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
122
123 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
124 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
125 mode. Call collect_register_by_name with vscr using
126 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
127 (ppc_store_vrregset): Add and set vscr_offset variable as in
128 ppc_fill_vrregset. Call supply_register_by_name with vscr using
129 vscr_offset.
130
131 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
132
133 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
134 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
135 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
136
137 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
138
139 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
140 (ppc_store_vsxregset): Likewise.
141 (ppc_fill_vrregset): Likewise.
142 (ppc_store_vrregset): Likewise.
143 (ppc_fill_evrregset): Likewise.
144 (ppc_store_evrregset): Likewise.
145 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
146 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
147 needed.
148
149 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
150
151 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
152 wordsize of the inferior. Call ppc_linux_target_wordsize.
153
154 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
155
156 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
157 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
158 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
159 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
160 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
161 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
162 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
163 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
164 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
165 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
166 (tdesc_powerpc_e500l): Remove.
167 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
168 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
169 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
170 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
171 linux-ppc-tdesc.h.
172 (ppc_arch_setup): Remove target description matching code. Fill a
173 ppc_linux_features struct and call ppc_linux_match_description
174 with it.
175
176 2018-05-22 Maciej W. Rozycki <macro@mips.com>
177
178 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
179 width of the requested register exceeds the width of the
180 `ptrace' data type.
181 (mips_cannot_store_register): Likewise.
182
183 2018-05-21 Maciej W. Rozycki <macro@mips.com>
184
185 * linux-mips-low.c (mips_fetch_register): New function. Update
186 preceding comment.
187 (mips_store_gregset): Supply 0 rather than $restart for $zero.
188 (the_low_target): Wire `mips_fetch_register'.
189
190 2018-05-10 Joel Brobecker <brobecker@adacore.com>
191
192 * lynx-i386-low.c (LYNXOS_178): New macro.
193 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
194 the layout on LynxOS-178.
195 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
196 handle floating point registers that are not supported by
197 LynxOS-178.
198
199 2018-05-10 Tom Tromey <tom@tromey.com>
200
201 * configure: Rebuild.
202
203 2018-05-10 Joel Brobecker <brobecker@adacore.com>
204
205 PR server/23158:
206 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
207 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
208 Use it to set the expedite_regs field in the given tdesc.
209 * x86-tdesc.h: New file.
210 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
211 Adjust following the addition of the new expedite_regs parameter
212 to init_target_desc.
213 * linux-tic6x-low.c (tic6x_read_description): Likewise.
214 * linux-x86-tdesc.c: #include "x86-tdesc.h".
215 (i386_linux_read_description, amd64_linux_read_description):
216 Adjust following the addition of the new expedite_regs parameter
217 to init_target_desc.
218 * lynx-i386-low.c: #include "x86-tdesc.h".
219 (lynx_i386_arch_setup): Adjust following the addition of the new
220 expedite_regs parameter to init_target_desc.
221 * nto-x86-low.c: #include "x86-tdesc.h".
222 (nto_x86_arch_setup): Adjust following the addition of the new
223 expedite_regs parameter to init_target_desc.
224 * win32-i386-low.c: #include "x86-tdesc.h".
225 (i386_arch_setup): Adjust following the addition of the new
226 expedite_regs parameter to init_target_desc.
227
228 2018-05-10 Joel Brobecker <brobecker@adacore.com>
229
230 PR server/23158:
231 * win32-low.c (win32_create_inferior): Add call to my_wait
232 setting last_status global.
233
234 2018-05-10 Joel Brobecker <brobecker@adacore.com>
235
236 PR server/23158:
237 * win32-low.c (create_process): Only call gdb_tilde_expand if
238 inferior_cwd is not NULL.
239
240 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
241
242 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
243 registers to the cache if their values have changed.
244 (i387_xsave_to_cache): Provide default values for x87 control
245 registers when these features are available, but disabled.
246 * regcache.c (supply_register_by_name_zeroed): New function.
247 * regcache.h (supply_register_by_name_zeroed): Declare new
248 function.
249
250 2018-05-07 Tom Tromey <tom@tromey.com>
251
252 * configure: Rebuild.
253
254 2018-05-04 Tom Tromey <tom@tromey.com>
255
256 * configure: Rebuild.
257
258 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
259 Pedro Alves <palves@redhat.com>
260
261 * linux-aarch64-low.c (aarch64_stopped_data_address):
262 Likewise.
263
264 2018-04-27 Tom Tromey <tom@tromey.com>
265
266 * configure: Rebuild.
267
268 2018-04-23 Tom Tromey <tom@tromey.com>
269
270 * configure: Rebuild.
271
272 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
273
274 * Makefile.in (depcomp): Add "..".
275 (all_deps_files): New and use it.
276
277 2018-04-18 Alan Hayward <alan.hayward@arm.com>
278
279 * configure.srv (aarch64*-*-linux*): Don't include xml.
280 (i[34567]86-*-cygwin*): Likewise.
281 (i[34567]86-*-linux*): Likewise.
282 (i[34567]86-*-lynxos*): Likewise.
283 (i[34567]86-*-mingw32ce*): Likewise.
284 (i[34567]86-*-mingw*): Likewise.
285 (i[34567]86-*-nto*): Likewise.
286 (tic6x-*-uclinux): Likewise.
287 (x86_64-*-linux*): Likewise.
288 (x86_64-*-mingw*): Likewise.
289 (x86_64-*-cygwin*): Likewise.
290
291 2018-04-18 Alan Hayward <alan.hayward@arm.com>
292
293 * tdesc.c: Remove xml parameter.
294
295 2018-04-18 Alan Hayward <alan.hayward@arm.com>
296
297 * server.c (get_features_xml): Remove cast.
298 * tdesc.c (void target_desc::accept): Fill in function.
299 (tdesc_get_features_xml): Remove old xml creation.
300 (print_xml_feature::visit_pre): Add xml vistor.
301 * tdesc.h (struct target_desc): Make xmltarget mutable.
302 (tdesc_get_features_xml): Remove declaration.
303
304 2018-04-18 Alan Hayward <alan.hayward@arm.com>
305
306 * tdesc.c (tdesc_architecture_name): Add new function.
307 (tdesc_osabi_name): Likewise.
308 (tdesc_get_features_xml): Use new functions.
309
310 2018-04-18 Alan Hayward <alan.hayward@arm.com>
311
312 * tdesc.c (tdesc_create_flags): Remove.
313 (tdesc_add_flag): Likewise.
314 (tdesc_named_type): Likewise.
315 (tdesc_create_union): Likewise.
316 (tdesc_create_struct): Likewise.
317 (tdesc_create_vector): Likewise.
318 (tdesc_add_bitfield): Likewise.
319 (tdesc_add_field): Likewise.
320 (tdesc_set_struct_size): Likewise.
321
322 2018-04-18 Alan Hayward <alan.hayward@arm.com>
323
324 * tdesc.c (~target_desc): Remove implictly deleted items.
325 (init_target_desc): Iterate all features.
326 (tdesc_get_features_xml): Use vector.
327 (tdesc_create_feature): Create feature.
328 * tdesc.h (tdesc_feature) Remove
329 (target_desc): Add features.
330
331 2018-04-18 Alan Hayward <alan.hayward@arm.com>
332
333 * Makefile.in: Add common/tdesc.c
334 * tdesc.c (init_target_desc): init all reg_defs from register
335 vector.
336 (tdesc_create_reg): Create tdesc_reg.
337 * tdesc.h (tdesc_feature): Add register vector.
338
339 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
340
341 * tdesc.h (struct target_desc) <features>: Change type to
342 std::vector<std::string>.
343 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
344 changes.
345 (tdesc_get_features_xml): Likewise.
346 (tdesc_create_feature): Likewise.
347
348 2018-03-26 Alan Hayward <alan.hayward@arm.com>
349
350 * regcache.c (find_register_by_number): Return a ref.
351 (find_regno): Use references.
352 (register_size): Likewise.
353 (register_data): Likewise.
354 * tdesc.c (target_desc::~target_desc): Remove free calls.
355 (target_desc::operator==): Use std::vector compare.
356 (init_target_desc): Use reference.
357 (tdesc_create_reg): Use reg constructors.
358 * tdesc.h (struct target_desc): Replace pointer with object.
359
360 2018-03-23 Alan Hayward <alan.hayward@arm.com>
361
362 * regcache.c (find_register_by_number): Make static.
363 (find_regno): Use find_register_by_number
364 * regcache.h (struct reg): Remove declaration.
365
366 2018-03-23 Alan Hayward <alan.hayward@arm.com>
367
368 * tdesc.c (target_desc::~target_desc): Move to here.
369 (target_desc::operator==): Likewise.
370 * tdesc.h (target_desc::~target_desc): Move from here.
371 (target_desc::operator==): Likewise.
372
373 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
374
375 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
376
377 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
378
379 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
380 S390_TDESC_GS.
381 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
382 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
383 and init_registers_s390_gs_linux64.
384
385 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
386
387 * linux-s390-low.c (s390_fill_gs): Remove function.
388 (s390_fill_gsbc): Remove function.
389 (s390_regsets): Set fill functions for the guarded storage regsets
390 to NULL.
391
392 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
393
394 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
395 the word size. Add comment.
396 (s390_get_wordsize): New function.
397 (s390_arch_setup): No longer select a temporary tdesc to fetch the
398 pswm with it. Instead, use s390_get_wordsize to determine the
399 word size first and derive the correct tdesc from that directly.
400
401 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
402
403 * Makefile.in: Include silent-rules.mk.
404 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
405 (COMPILE): Add ECHO_CXX.
406 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
407 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
408 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
409 (version-generated.c): Add ECHO_GEN.
410 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
411 (IPAGENT_COMPILE): Add ECHO_CXX.
412 (%-generated.c): Add ECHO_REGDAT.
413
414 2018-03-14 Tom Tromey <tom@tromey.com>
415
416 PR cli/14977:
417 * ax.c (ax_printf): Special case for NULL.
418
419 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
420
421 * linux-low.c (linux_qxfer_libraries_svr4): Use
422 xml_escape_text_append.
423
424 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
425
426 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
427
428 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
429
430 * server.c (handle_general_set): Remove unnecessary xstrdup.
431
432 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
433
434 * server.c (parse_debug_format_options): Adjust to
435 delim_string_to_char_ptr_vec changes.
436 * thread-db.c (thread_db_load_search): Adjust to
437 dirnames_to_char_ptr_vec changes.
438
439 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
440
441 * target.h (target_enable_btrace, target_disable_btrace)
442 (target_read_btrace, target_read_btrace_conf): Turn macro into
443 inline function. Throw error if target method is not defined.
444 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
445 check for btrace target method. Be prepared to handle exceptions
446 from btrace target methods.
447
448 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
449
450 * server.c (captured_main): Change order of error message printed
451 when the current working directory cannot be found.
452
453 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
454
455 * server.c: Include "filenames.h" and "pathstuff.h".
456 (program_name): Delete variable.
457 (program_path): New anonymous class.
458 (get_exec_wrapper): Use "program_path" instead of
459 "program_name".
460 (handle_v_run): Likewise.
461 (captured_main): Likewise.
462 (process_serial_event): Likewise.
463
464 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
465
466 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
467 (OBJS): Add "pathstuff.o".
468 * server.c (current_directory): New global variable.
469 (captured_main): Initialize "current_directory".
470
471 2018-02-26 Alan Hayward <alan.hayward@arm.com>
472
473 * tdesc.c: Use common/tdesc.h.
474 * tdesc.h: Likewise.
475
476 2018-02-20 Alan Hayward <alan.hayward@arm.com>
477 Simon Marchi <simon.marchi@ericsson.com>
478
479 * Makefile.in: Switch order of make rules.
480
481 2018-02-19 Alan Hayward <alan.hayward@arm.com>
482
483 * Makefile.in: Add common directory in build.
484 * configure.ac: Add common reference.
485 * configure: Regenerate.
486
487 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
488
489 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
490 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
491 * spu-low.c (spu_target_ops): Likewise.
492 * win32-low.c (win32_target_ops): Likewise.
493 * server.c (supported_btrace_packets): Report packets unconditionally.
494 * target.h (target_ops) <supports_btrace>: Remove.
495 (target_supports_btrace): Remove.
496
497 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
498
499 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
500 (handle_btrace_disable): Change return type to void. Use exceptions
501 to report errors.
502 (handle_btrace_general_set): Catch exception and copy message to
503 return message.
504
505 2018-02-08 Tom Tromey <tom@tromey.com>
506
507 * linux-low.c (install_software_single_step_breakpoints): Use
508 make_scoped_restore.
509 * inferiors.c (make_cleanup_restore_current_thread): Remove.
510 (do_restore_current_thread_cleanup): Remove.
511 * gdbthread.h (make_cleanup_restore_current_thread): Don't
512 declare.
513
514 2018-02-08 Tom Tromey <tom@tromey.com>
515
516 * mem-break.c (set_raw_breakpoint_at): Use
517 gdb::unique_xmalloc_ptr.
518
519 2018-01-30 Pedro Alves <palves@redhat.com>
520
521 PR gdb/13211
522 * target.c (target_terminal::terminal_state): Rename to ...
523 (target_terminal::m_terminal_state): ... this.
524
525 2018-01-19 James Clarke <jrtc27@jrtc27.com>
526
527 * linux-low.c (handle_extended_wait): Surround call to
528 thread_db_notice_clone with #ifdef USE_THREAD_DB.
529
530 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
531
532 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
533 linux_ptrace_attach_fail_reason_string now returning an
534 std::string.
535 (linux_attach): Likewise.
536 * thread-db.c (attach_thread): Likewise.
537
538 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
539
540 PR gdb/21559
541 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
542 checking for fs_base/gs_base fields in struct user_regs_struct.
543 * configure: Regenerate.
544
545 2018-01-16 Yao Qi <yao.qi@linaro.org>
546
547 PR gdb/18749
548 * linux-low.c (fetch_register): Call supply_register instead of
549 error.
550
551 2018-01-08 Yao Qi <yao.qi@linaro.org>
552 Simon Marchi <simon.marchi@ericsson.com>
553
554 * Makefile.in (OBS): Remove selftest.o.
555 * configure.ac: Set srv_selftest_objs if $development is true.
556 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
557 * configure: Re-generated.
558 * server.c (captured_main): Wrap variable selftest_filter with
559 GDB_SELF_TEST.
560
561 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
562
563 * server.c (parse_debug_format_options): Return std::string.
564 (handle_monitor_command, captured_main): Adjust.
565
566 2018-01-05 Pedro Alves <palves@redhat.com>
567
568 PR gdb/18653
569 * server.c (captured_main): Pass quiet=false to
570 save_original_signals_state.
571
572 2018-01-01 Joel Brobecker <brobecker@adacore.com>
573
574 * gdbreplay.c (gdbreplay_version): Update copyright year in
575 version message.
576 * server.c (gdbserver_version): Likewise.
577
578 2017-12-08 Tom Tromey <tom@tromey.com>
579
580 * ax.c (ax_printf): Update.
581
582 2017-12-07 Yao Qi <yao.qi@linaro.org>
583
584 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
585 aarch64_linux_read_description.
586 * linux-amd64-ipa.c (idx2mask): New array.
587 (get_ipa_tdesc): Move idx2mask out.
588 (initialize_low_tracepoint): Initialize target descriptions.
589 * linux-i386-ipa.c (idx2mask): New array.
590 (get_ipa_tdesc): Move idx2mask out.
591 (initialize_low_tracepoint): Initialize target descriptions.
592
593 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
594
595 * tdesc.c (struct tdesc_type): Change return type.
596 (tdesc_add_flag): Change parameter type.
597 (tdesc_add_bitfield): Likewise.
598 (tdesc_add_field): Likewise.
599 (tdesc_set_struct_size): Likewise.
600
601 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
602
603 * regcache.c (registers_to_string): Remove unused variable.
604
605 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
606
607 * inferiors.c (for_each_inferior_with_data): Remove.
608 * inferiors.h (for_each_inferior_with_data): Remove.
609 * server.c (handle_qxfer_threads_worker): Change parameter type.
610 (handle_qxfer_threads_proper): Use for_each_thread.
611
612 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
613
614 * inferiors.c (for_each_inferior): Remove.
615 (clear_inferiors): Use for_each_thread.
616 * inferiors.h (for_each_inferior): Remove.
617 * linux-low.c (linux_wait_for_event_filtered): Use
618 for_each_thread.
619 (linux_stabilize_threads): Likewise.
620 * regcache.c (regcache_release): Likewise.
621 * server.c (gdb_wants_all_threads_stopped): Likewise.
622 (clear_pending_status_callback): Remove.
623 (handle_status): Use for_each_thread.
624 (captured_main): Likewise.
625 * win32-low.c (child_init_thread_list): Likewise.
626 (win32_clear_inferiors): Likewise.
627 (fake_breakpoint_event): Likewise.
628
629 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
630
631 * inferiors.h (find_inferior): Remove.
632 * inferiors.c (find_inferior): Remove.
633
634 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
635
636 * linux-low.c (resume_status_pending_p): Update comment.
637 (need_step_over_p): Update comment.
638
639 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
640
641 * linux-low.c (proceed_one_lwp): Return void, change parameter
642 type.
643 (unsuspend_and_proceed_one_lwp): Likewise.
644 (proceed_all_lwps): Use for_each_thread.
645 (unstop_all_lwps): Likewise.
646
647 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
648
649 * linux-low.c (linux_resume_one_thread): Return void, take
650 parameter directly.
651 (linux_resume): Use for_each_thread.
652
653 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
654
655 * linux-low.c (send_sigstop_callback): Return void, change
656 parameter type. Rename to...
657 (send_sigstop): ... this.
658 (suspend_and_send_sigstop_callback): Return void, change parameter
659 type. Rename to...
660 (suspend_and_send_sigstop): ... this.
661 (stop_all_lwps): Use for_each_thread.
662
663 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
664
665 * linux-low.c (lwp_running): Return bool, remove unused
666 argument.
667 (linux_stabilize_threads): Use find_thread.
668
669 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
670
671 * linux-low.c (select_singlestep_lwp_callback): Remove.
672 (count_events_callback): Remove.
673 (select_event_lwp_callback): Remove.
674 (select_event_lwp): Use find_thread/for_each_thread.
675
676 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
677
678 * linux-low.c (not_stopped_callback): Return bool, take filter
679 argument directly.
680 (linux_wait_for_event_filtered): Use find_thread.
681 (linux_wait_1): Likewise.
682
683 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
684
685 * linux-low.c (same_lwp): Remove.
686 (find_lwp_pid): Use find_thread.
687
688 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
689
690 * linux-low.c (delete_lwp_callback): Remove.
691 (linux_mourn): Use for_each_thread.
692
693 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
694
695 * linux-low.c (linux_detach_lwp_callback): Return void, remove
696 args parameter, don't check for pid.
697 (linux_detach): Use for_each_thread.
698
699 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
700
701 * linux-low.c (struct counter): Remove.
702 (second_thread_of_pid_p): Remove.
703 (last_thread_of_process_p): Use find_thread.
704
705 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
706
707 * inferiors.c (find_inferior_in_random): Remove.
708 * inferiors.h (find_inferior_in_random): Remove.
709 * linux-low.c (status_pending_p_callback): Return bool, accept
710 parameter ptid directly.
711 (linux_wait_for_event_filtered): Use find_thread_in_random.
712 (linux_wait_1): Likewise.
713
714 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
715
716 * inferiors.c (find_inferior_id): Remove.
717 (find_thread_ptid): Move implemention from find_inferior_id to
718 here.
719 * inferiors.h (find_inferior_id): Remove.
720 * server.c (handle_status): Use find_thread_ptid.
721 (process_serial_event): Likewise.
722 * thread-db.c (find_one_thread): Likewise.
723 (thread_db_thread_handle): Likewise.
724 * win32-low.c (thread_rec): Likewise.
725 (child_delete_thread): Likewise.
726 (win32_thread_alive): Likewise.
727 (get_child_debug_event): Likewise.
728
729 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
730
731 * linux-mips-low.c (update_watch_registers_callback): Return
732 void, remove pid_p parameter, don't check for pid.
733 (mips_insert_point, mips_remove_point): Use for_each_thread.
734
735 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
736
737 * lynx.low (lynx_delete_thread_callback): Remove.
738 (lynx_mourn): Use for_each_thread.
739
740 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
741
742 * regcache.c (regcache_invalidate_one): Remove.
743 (regcache_invalidate_pid): use for_each_thread.
744
745 2017-11-26 Tom Tromey <tom@tromey.com>
746
747 * linux-low.c (linux_create_inferior): Update.
748
749 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
750
751 * spu-low.c (spu_create_inferior): Fix typo in argument name.
752
753 2017-11-24 Alan Hayward <alan.hayward@arm.com>
754
755 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
756 * linux-aarch64-low.c (initialize_low_arch): Call init func.
757 * linux-aarch64-tdesc-selftest.c: New file.
758 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
759
760 2017-11-24 Alan Hayward <alan.hayward@arm.com>
761
762 * configure.srv: Add new file.
763 * linux-aarch64-low.c (initialize_low_arch): Call init func.
764 * linux-aarch64-tdesc-selftest.c: New file.
765 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
766
767 2017-11-24 Alan Hayward <alan.hayward@arm.com>
768
769 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
770 * linux-aarch64-low.c (initialize_low_arch): Remove init.
771 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
772
773 2017-11-24 Alan Hayward <alan.hayward@arm.com>
774
775 * configure.srv: Add new files.
776 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
777 aarch64_linux_read_description.
778 * linux-aarch64-low.c (aarch64_linux_read_description):
779 Merge with aarch64_arch_setup.
780 (aarch64_arch_setup): Call aarch64_linux_read_description.
781 * linux-aarch64-tdesc.c: New file.
782 * linux-aarch64-tdesc.h: New file.
783
784 2017-11-24 Yao Qi <yao.qi@linaro.org>
785
786 * configure.srv: Set $srv_regobj for tic6x-linux.
787 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
788 (tic6x_read_description): Move some code to tic6x_arch_setup.
789 (tic6x_tdesc_test): New function.
790 (initialize_low_arch): Call selftests::register_test.
791
792 2017-11-22 Yao Qi <yao.qi@linaro.org>
793
794 * remote-utils.c (prepare_resume_reply): Use memcpy.
795
796 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
797
798 * linux-low.c (kill_one_lwp_callback): Return void, take
799 argument directly, don't filter on pid.
800 (linux_kill): Use for_each_thread.
801
802 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
803
804 * linux-low.c (need_step_over_p): Return bool, remove dummy
805 argument.
806 (linux_resume, proceed_all_lwps): Use find_thread.
807
808 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
809
810 * linux-low.c (resume_status_pending_p): Return bool, remove
811 flag_p argument.
812 (linux_resume): Use find_thread.
813
814 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
815
816 * linux-low.c (struct thread_resume_array): Remove.
817 (linux_set_resume_request): Return void, take arguments
818 directly.
819 (linux_resume): Use for_each_thread.
820
821 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
822
823 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
824 return bool, remove data argument.
825 (linux_stabilize_threads): Use find_thread.
826
827 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
828
829 * linux-low.c (unsuspend_one_lwp): Remove.
830 (unsuspend_all_lwps): Use for_each_thread, inline code from
831 unsuspend_one_lwp.
832
833 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
834
835 * gdbthread.h (find_thread): Add overload with ptid_t filter.
836 * linux-low.c (struct iterate_over_lwps_args): Remove.
837 (iterate_over_lwps_filter): Remove.
838 (iterate_over_lwps): Use find_thread.
839
840 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
841
842 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
843 (linux_handle_new_gdb_connection): Use for_each_thread, inline
844 code from reset_lwp_ptrace_options_callback.
845
846 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
847
848 * linux-arm-low.c (struct update_registers_data): Remove.
849 (update_registers_callback): Return void, take arguments
850 directly, don't check thread's pid.
851 (arm_insert_point, arm_remove_point): Use for_each_thread.
852
853 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
854
855 * win32-low.c (continue_one_thread): Return void, take argument
856 directly.
857 (child_continue): Use for_each_thread.
858
859 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
860
861 * win32-i386-low.c (update_debug_registers_callback): Rename
862 to ...
863 (update_debug_registers): ... this, return void, remove pid_p arg.
864 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
865
866 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
867
868 * inferiors.h (struct process_info): Add constructor, initialize
869 fields..
870 <syscalls_to_catch>: Change type to std::vector<int>.
871 * inferiors.c (add_process): Allocate process_info with new.
872 (remove_process): Free process_info with delete.
873 * linux-low.c (handle_extended_wait): Adjust.
874 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
875 * server.c (handle_general_set): Adjust.
876
877 2017-11-16 Pedro Alves <palves@redhat.com>
878
879 * remote-utils.c (remote_close): Block SIGIO signals instead of
880 uninstalling the SIGIO handler.
881
882 2017-11-16 Alan Hayward <alan.hayward@arm.com>
883
884 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
885
886 2017-11-16 Yao Qi <yao.qi@linaro.org>
887
888 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
889 (tic6x_store_gregset): Likewise.
890 (tic6x_usrregs_info): Move it up.
891
892 2017-11-15 Alan Hayward <alan.hayward@arm.com>
893
894 * Makefile.in: Update arch rules.
895 * configure.srv: Explicitly mark arch/ files.
896
897 2017-11-13 Andreas Schwab <schwab@suse.de>
898
899 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
900 function.
901 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
902
903 2017-11-06 Pedro Alves <palves@redhat.com>
904
905 * config.in, configure: Regenerate.
906
907 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
908
909 * target.c (struct thread_search): Remove.
910 (thread_search_callback): Remove.
911 (prepare_to_access_memory): Use for_each_thread instead of
912 find_inferior. Inline code from thread_search_callback.
913
914 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
915
916 * server.c (struct visit_actioned_threads_data): Remove.
917 (visit_actioned_threads): Change prototype to take arguments
918 directly.
919 (resume): Use find_thread instead of find_inferior.
920
921 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
922
923 * server.c (queue_stop_reply_callback): Change prototype, return
924 void.
925 (find_status_pending_thread_callback): Remove.
926 (handle_status): Replace find_inferior with find_thread and
927 for_each_thread.
928
929 2017-10-25 Alan Hayward <alan.hayward@arm.com>
930
931 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
932 with REGNO.
933 (aarch64_store_gregset): Likewise.
934 (aarch64_fill_fpregset): Likewise.
935 (aarch64_store_fpregset): Likewise.
936
937 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
938
939 * gdbthread.h (find_thread, for_each_thread): New functions.
940 * inferiors.c (thread_of_pid): Remove.
941 (find_any_thread_of_pid): Use find_thread.
942 * linux-low.c (num_lwps): Use for_each_thread.
943
944 2017-10-17 Yao Qi <yao.qi@linaro.org>
945
946 * Makefile.in: Remove one rule.
947 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
948
949 2017-10-17 Yao Qi <yao.qi@linaro.org>
950
951 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
952 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
953
954 2017-10-17 Yao Qi <yao.qi@linaro.org>
955
956 * configure.srv: Rename arm.o with arch/arm.o.
957
958 2017-10-17 Yao Qi <yao.qi@linaro.org>
959
960 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
961 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
962 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
963 (arch-i386.o, arch-amd64.o): Remove rules.
964 (arch/%.o): New rule.
965 Update POSTCOMPILE and COMPILE.pre.
966 * configure.ac: Invoke AC_CONFIG_COMMANDS.
967 * configure: Re-generated.
968 * configure.srv: Replace arch-i386.o with arch/i386.o.
969 Replace arch-amd64.o with arch/amd64.o.
970
971 2017-10-16 Yao Qi <yao.qi@linaro.org>
972
973 * configure: Regenerated.
974
975 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
976
977 * inferiors.h: (struct inferior_list): Remove.
978 (struct inferior_list_entry); Remove.
979 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
980 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
981 get_first_inferior): Remove.
982 (for_each_inferior, for_each_inferior_with_data, find_inferior,
983 find_inferior_id, find_inferior_in_random): Change signature.
984 * inferiors.c (all_threads): Change type to
985 std::list<thread_info *>.
986 (get_thread): Remove macro.
987 (find_inferior, find_inferior_id): Change signature, implement
988 using find_thread.
989 (find_inferior_in_random): Change signature, implement using
990 find_thread_in_random.
991 (for_each_inferior, for_each_inferior_with_data): Change
992 signature, implement using for_each_thread.
993 (add_inferior_to_list, remove_inferior): Remove.
994 (add_thread, get_first_thread, thread_of_pid,
995 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
996 (get_first_inferior, one_inferior_p, clear_inferior_list):
997 Remove.
998 (clear_inferiors, get_thread_process): Update.
999 * gdbthread.h: Include <list>.
1000 (struct thread_info) <entry>: Remove field.
1001 <id>: New field.
1002 (all_threads): Change type to std::list<thread_info *>.
1003 (get_first_inferior): Add doc.
1004 (find_thread, for_each_thread, find_thread_in_random): New
1005 functions.
1006 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1007 * linux-arm-low.c (update_registers_callback): Update.
1008 * linux-low.c (second_thread_of_pid_p): Update.
1009 (kill_one_lwp_callback, linux_detach_lwp_callback,
1010 delete_lwp_callback, status_pending_p_callback, same_lwp,
1011 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1012 iterate_over_lwps, not_stopped_callback,
1013 resume_stopped_resumed_lwps, count_events_callback,
1014 select_singlestep_lwp_callback, select_event_lwp_callback,
1015 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1016 suspend_and_send_sigstop_callback, wait_for_sigstop,
1017 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1018 lwp_running, linux_set_resume_request, resume_status_pending_p,
1019 need_step_over_p, start_step_over, linux_resume_one_thread,
1020 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1021 reset_lwp_ptrace_options_callback): Update.
1022 * linux-mips-low.c (update_watch_registers_callback): Update.
1023 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1024 Update.
1025 (free_register_cache_thread_one): Remove.
1026 (regcache_release): Update.
1027 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1028 handle_qxfer_threads_worker): Update.
1029 (handle_query): Update, use list iterator.
1030 (visit_actioned_threads, handle_pending_status,
1031 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1032 clear_pending_status_callback, set_pending_status_callback,
1033 find_status_pending_thread_callback, handle_status,
1034 process_serial_event): Update.
1035 * target.c (thread_search_callback): Update.
1036 * thread-db.c (thread_db_get_tls_address): Update.
1037 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1038 Update.
1039 * win32-i386-low.c (update_debug_registers_callback): Update.
1040 * win32-low.c (delete_thread_info, child_delete_thread,
1041 continue_one_thread, suspend_one_thread,
1042 get_child_debug_event): Adjust.
1043
1044 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1045
1046 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1047 * inferiors.h: Include <list>.
1048 (struct process_info) <entry>: Remove field.
1049 <pid>: New field.
1050 (pid_of): Change macro to function.
1051 (ptid_of, lwpid_of): Remove macro.
1052 (all_processes): Change type to std::list<process_info *>.
1053 (ALL_PROCESSES): Remove macro.
1054 (for_each_process, find_process): New function.
1055 * inferiors.c (all_processes): Change type to
1056 std::list<process_info *>.
1057 (find_thread_process): Adjust.
1058 (add_process): Likewise.
1059 (remove_process): Likewise.
1060 (find_process_pid): Likewise.
1061 (get_first_process): Likewise.
1062 (started_inferior_callback): Remove.
1063 (have_started_inferiors_p): Adjust.
1064 (attached_inferior_callback): Remove.
1065 (have_attached_inferiors_p): Adjust.
1066 * linux-low.c (check_zombie_leaders): Likewise.
1067 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1068 (x86_linux_update_xmltarget): Adjust.
1069 * server.c (handle_query): Likewise.
1070 (gdb_reattached_process): Remove.
1071 (handle_status): Adjust.
1072 (kill_inferior_callback): Likewise.
1073 (detach_or_kill_inferior): Remove.
1074 (print_started_pid): Likewise.
1075 (print_attached_pid): Likewise.
1076 (detach_or_kill_for_exit): Update.
1077 (process_serial_event): Likewise.
1078 * linux-arm-low.c (arm_new_fork): Likewise.
1079
1080 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1081
1082 * dll.h: Include <list>.
1083 (struct dll_info): Add constructor.
1084 <entry>: Remove field.
1085 (all_dlls): Change type to std::list<dll_info>.
1086 * dll.c: Include <algorithm>.
1087 (get_dll): Remove macro.
1088 (all_dlls): Change type to std::list<dll_info *>.
1089 (free_one_dll): Remove.
1090 (match_dll): Likewise.
1091 (loaded_dll): Adjust.
1092 (unloaded_dll): Adjust to all_dlls type change, use
1093 std::find_if. Inline code from match_dll.
1094 (clear_dlls): Adjust to all_dlls type change.
1095 * server.c (emit_dll_description): Remove.
1096 (handle_qxfer_libraries): Adjust to all_dlls type change,
1097 integrate emit_dll_description's functionality.
1098
1099 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1100
1101 * linux-low.h (struct linux_target_ops) <delete_process>: New
1102 field.
1103 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1104 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1105 (struct linux_target_ops): Add delete_process callback.
1106 * linux-arm-low.c (arm_delete_process): New.
1107 (struct linux_target_ops): Add delete_process callback.
1108 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1109 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1110 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1111 * linux-mips-low.c (mips_linux_delete_process): New.
1112 (struct linux_target_ops): Add delete_process callback.
1113 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1114 * linux-s390-low.c (struct linux_target_ops): Likewise.
1115 * linux-sh-low.c (struct linux_target_ops): Likewise.
1116 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1117 * linux-tile-low.c (struct linux_target_ops): Likewise.
1118 * linux-x86-low.c (x86_linux_delete_process): New.
1119 (struct linux_target_ops): Add delete_process callback.
1120 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1121
1122 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1123
1124 * linux-aarch64-low.c (the_low_target): Add thread delete
1125 callback.
1126 * linux-arm-low.c (arm_delete_thread): New function.
1127 (the_low_target): Add thread delete callback.
1128 * linux-bfin-low.c (the_low_target): Likewise.
1129 * linux-crisv32-low.c (the_low_target): Likewise.
1130 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1131 set.
1132 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1133 field.
1134 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1135 * linux-mips-low.c (mips_linux_delete_thread): New function.
1136 (the_low_target): Add thread delete callback.
1137 * linux-ppc-low.c (the_low_target): Likewise.
1138 * linux-s390-low.c (the_low_target): Likewise.
1139 * linux-sh-low.c (the_low_target): Likewise.
1140 * linux-tic6x-low.c (the_low_target): Likewise.
1141 * linux-tile-low.c (the_low_target): Likewise.
1142 * linux-x86-low.c (the_low_target): Likewise.
1143 * linux-xtensa-low.c (the_low_target): Likewise.
1144
1145 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1146
1147 * win32-low.c: Include "common-inferior.h".
1148
1149 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1150
1151 * inferiors.c (set_inferior_cwd): New function.
1152 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1153 (handle_query): Inform that QSetWorkingDir is supported.
1154 * win32-low.c (create_process): Pass the inferior's cwd to
1155 CreateProcess.
1156
1157 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1158
1159 * inferiors.c (current_inferior_cwd): New global variable.
1160 (get_inferior_cwd): New function.
1161 * inferiors.h (struct process_info) <cwd>: New field.
1162
1163 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1164
1165 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1166 (OBS): Add gdb_tilde_expand.o.
1167
1168 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1169
1170 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1171 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1172
1173 2017-09-29 Pedro Alves <palves@redhat.com>
1174
1175 * ax.c (gdb_parse_agent_expr): Constify.
1176 * ax.h (gdb_parse_agent_expr): Constify.
1177 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1178 Constify.
1179 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1180 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1181 * remote-utils.h (read_ptid): Constify.
1182 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1183 (process_point_options, process_serial_event): Constify.
1184 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1185 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1186 (cmd_qtbuffer): Constify.
1187
1188 2017-09-29 Pedro Alves <palves@redhat.com>
1189
1190 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1191 fails.
1192
1193 2017-09-29 Pedro Alves <palves@redhat.com>
1194
1195 * linux-low.c (handle_extended_wait): Pass parent thread instead
1196 of process to thread_db_notice_clone.
1197 * linux-low.h (thread_db_notice_clone): Replace parent process
1198 parameter with parent thread parameter.
1199 * thread-db.c (find_one_thread): Add comment.
1200 (thread_db_notice_clone): Replace parent process parameter with
1201 parent thread parameter. Temporarily switch to the parent thread.
1202
1203 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1204
1205 * gdbthread.h: Include "common-gdbthread.h".
1206 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1207 "if" when validating the ptid.
1208 * remote-utils.c: Include "gdbthread.h".
1209 (prepare_resume_reply): Use "switch_to_thread".
1210 * target.c (done_accessing_memory): Likewise.
1211
1212 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1213
1214 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1215 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1216 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1217 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1218 s390x-gs-linux64-ipa.o to ipa_obj.
1219 * linux-s390-low.c (HWCAP_S390_GS): New define.
1220 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1221 New functions.
1222 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1223 (s390_arch_setup): Check for guarded-storage support and choose
1224 appropriate tdesc.
1225 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1226 init_registers_s390x_gs_linux64.
1227 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1228 enum value.
1229 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1230 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1231
1232 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1233
1234 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1235
1236 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1237
1238 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1239 (thread_db_thread_handle): Declare.
1240 * linux-low.c (linux_target_ops): Initialize thread_handle.
1241 * server.c (handle_qxfer_threads_worker): Add support for
1242 "handle" attribute.
1243 * target.h (struct target_ops): Add new function pointer,
1244 thread_handle.
1245 (target_thread_handle): Define.
1246 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1247 field in lwp.
1248 (thread_db_thread_handle): New function.
1249
1250 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1251
1252 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1253 * linux-low.h (thread_db_notice_clone): Declare.
1254 * thread-db.c (thread_db_notice_clone): New function.
1255
1256 2017-09-21 Pedro Alves <palves@redhat.com>
1257
1258 * server.c (gdb_read_memory, handle_status, process_serial_event)
1259 (handle_serial_event, handle_target_event): Adjust to
1260 set_desired_thread prototype change.
1261 * target.c (set_desired_thread): Remove 'use_general' parameter
1262 and adjust.
1263 * target.h (set_desired_thread): Remove 'use_general' parameter.
1264
1265 2017-09-20 Tom Tromey <tom@tromey.com>
1266
1267 * target.c (target_terminal::terminal_state): Define.
1268 (target_terminal::init): Rename from target_terminal_init.
1269 (target_terminal::inferior): Rename from
1270 target_terminal_inferior.
1271 (target_terminal::ours): Rename from target_terminal_ours.
1272 (target_terminal::ours_for_output, target_terminal::info): New.
1273
1274 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1275
1276 * server.c (accumulate_file_name_length): Remove.
1277 (emit_dll_description): Adjust to std::string change.
1278 (handle_qxfer_libraries): Use std::string to hold document.
1279
1280 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1281
1282 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1283 return type of xml_escape_text.
1284 * server.c (emit_dll_description): Likewise.
1285
1286 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1287
1288 * server.c (captured_main): Accept argument for --selftest.
1289 Update run_tests call.
1290 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1291 when registering selftests.
1292
1293 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1294
1295 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1296 instead of "VEC" for "target_desc.reg_defs".
1297 (regcache_cpy): Likewise.
1298 (registers_to_string): Likewise.
1299 (registers_from_string): Likewise.
1300 (find_regno): Likewise.
1301 (supply_regblock): Likewise.
1302 (regcache_raw_read_unsigned): Likewise.
1303 * tdesc.c (init_target_desc): Likewise.
1304 (tdesc_create_reg): Likewise.
1305 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1306 (struct target_desc) <reg_defs>: Convert to "std::vector".
1307 (target_desc): Do not initialize "reg_defs".
1308 (~target_desc): Update code to use "std::vector" instead of "VEC"
1309 for "target_desc.reg_defs".
1310 (operator==): Likewise.
1311
1312 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1313
1314 * inferiors.h (thread_to_gdb_id): Remove.
1315 * inferiors.c (thread_to_gdb_id): Remove.
1316 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1317 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1318 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1319 Likewise.
1320 * nto-low.c (nto_fetch_registers, nto_store_registers,
1321 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1322
1323 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1324
1325 * inferiors.h (gdb_id_to_thread_id): Remove.
1326 * inferiors.c (gdb_id_to_thread_id): Remove.
1327 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1328 removal. Move pid declaration closer to where it's used.
1329
1330 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1331
1332 * server.c (handle_detach): New function.
1333 (process_serial_event): Move code out, call handle_detach.
1334
1335 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1336
1337 * server.c (require_running): Rename to ...
1338 (require_running_or_return): ... this ...
1339 (require_running_or_break): ... and this.
1340 (handle_query, process_serial_event): Adjust.
1341
1342 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1343
1344 * linux-low.c (linux_set_resume_request): Remove unused
1345 variables.
1346
1347 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1348
1349 * server.c (first_thread_of): Remove.
1350 (process_serial_event): Replace usage of first_thread_of with
1351 find_any_thread_of_pid.
1352 * tracepoint.c (same_process_p): Remove.
1353 (gdb_agent_about_to_close): Replace usage of same_process_p with
1354 find_any_thread_of_pid.
1355 * linux-x86-low.c (same_process_callback): Remove.
1356 (x86_arch_setup_process_callback): Replace usage of
1357 same_process_callback with find_any_thread_of_pid.
1358 * thread-db.c (any_thread_of): Remove.
1359 (switch_to_process): Replace usage of any_thread_of with
1360 find_any_thread_of_pid.
1361 * inferiors.c (thread_pid_matches_callback): Remove.
1362 (find_thread_process): Adjust to use find_any_thread_of_pid.
1363
1364 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1365
1366 * regcache.c (get_thread_regcache): Guard calls to "memset"
1367 with "!VEC_empty".
1368
1369 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1370
1371 * linux-low.c (handle_extended_wait): Use
1372 "allocate_target_description" instead of "XNEW".
1373 * linux-x86-low.c (initialize_low_arch): Likewise.
1374
1375 2017-09-05 Yao Qi <yao.qi@linaro.org>
1376
1377 * configure.srv (srv_i386_regobj): Remove.
1378 (srv_amd64_regobj): Remove.
1379 (srv_regobj): Set it to "" for x86 non-linux targets.
1380 * linux-x86-tdesc.c (i386_linux_read_description):
1381 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1382 (init_registers_i386): Remove the declaration.
1383 (tdesc_i386): Remove the declaration.
1384 (lynx_i386_arch_setup): Call i386_create_target_description.
1385 * nto-x86-low.c: Likewise.
1386 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1387 [!__x86_64__]: include arch/i386.h.
1388 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1389
1390 2017-09-05 Yao Qi <yao.qi@linaro.org>
1391
1392 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1393 i386/amd64-XXX-linux from it.
1394
1395 2017-09-05 Yao Qi <yao.qi@linaro.org>
1396
1397 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1398 false.
1399 (ipa_amd64_linux_regobj): Remove.
1400 (ipa_x32_linux_regobj): Remove.
1401
1402 2017-09-05 Yao Qi <yao.qi@linaro.org>
1403
1404 * Makefile.in (arch-amd64.o): New rule.
1405 * configure.srv: Append arch-amd64.o.
1406 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1407 (get_ipa_tdesc): Call amd64_linux_read_description.
1408 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1409 and init_registers_amd64_XXX.
1410 * linux-x86-low.c (x86_linux_read_description): Call
1411 amd64_linux_read_description.
1412 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1413 (initialize_low_arch): Don't call init_registers_x32_XXX and
1414 init_registers_amd64_XXX.
1415 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1416 and tdesc_amd64_XXX.
1417 [__x86_64__] (amd64_tdesc_test): New function.
1418 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1419 and init_registers_amd64_XXX.
1420 * linux-x86-tdesc.c: Include arch/amd64.h.
1421 (xcr0_to_tdesc_idx): New function.
1422 (i386_linux_read_description): New function.
1423 (amd64_get_ipa_tdesc_idx): New function.
1424 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1425 (amd64_get_ipa_tdesc): Declare.
1426
1427 2017-09-05 Yao Qi <yao.qi@linaro.org>
1428
1429 * configure.srv (srv_i386_linux_xmlfiles): Remove
1430 i386/i386-XXX-linux.xml from it.
1431
1432 2017-09-05 Yao Qi <yao.qi@linaro.org>
1433
1434 * configure.srv: Set srv_i386_linux_regobj empty if $development
1435 is false.
1436 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1437 initialize_low_tdesc.
1438 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1439 with #if initialize_low_tdesc.
1440 * linux-x86-tdesc-selftest.c: New file.
1441 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1442
1443 2017-09-05 Yao Qi <yao.qi@linaro.org>
1444
1445 * Makefile.in (arch-i386.o): New rule.
1446 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1447 (x86_64-*-linux*): Likewise.
1448 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1449 include arch/i386.h.
1450 (i386_linux_read_description): Remove code and call
1451 i386_create_target_description.
1452 * tdesc.c (allocate_target_description): New function.
1453 * tdesc.h (set_tdesc_architecture): Remove declaration.
1454 (set_tdesc_osabi): Likewise.
1455
1456 2017-09-05 Yao Qi <yao.qi@linaro.org>
1457
1458 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1459 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1460 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1461 .xmltarget.
1462 * server.c (get_features_xml): Call tdesc_get_features_xml.
1463 * tdesc.c (set_tdesc_architecture): New function.
1464 (set_tdesc_osabi): New function.
1465 (tdesc_get_features_xml): New function.
1466 (tdesc_create_feature): Add an argument.
1467 * tdesc.h (struct target_desc) <features>: New field.
1468 <arch, osabi>: New field.
1469 (~target_desc): xfree features, arch, and osabi.
1470 (target_desc::oerator==): Don't compare .xmltarget.
1471 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1472 (set_tdesc_osabi): Likewise.
1473 (tdesc_get_features_xml): Likewise.
1474
1475 2017-09-05 Yao Qi <yao.qi@linaro.org>
1476
1477 * linux-x86-tdesc.c: Include selftest.h.
1478 (i386_tdesc_test): New function.
1479 (initialize_low_tdesc): Call selftests::register_test.
1480 * tdesc.h: Include regdef.h.
1481 (target_desc): Override operator == and !=.
1482
1483 2017-09-05 Yao Qi <yao.qi@linaro.org>
1484
1485 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1486 (ipa_obj): Likewise.
1487 * linux-i386-ipa.c: Include common/x86-xstate.h
1488 (get_ipa_tdesc): Call i386_linux_read_description.
1489 (initialize_low_tracepoint): Don't call init_registers_XXX
1490 functions, call initialize_low_tdesc instead.
1491 * linux-x86-low.c (x86_linux_read_description): Call
1492 i386_linux_read_description.
1493 (initialize_low_arch): Don't call init_registers_i386_XXX
1494 functions, call initialize_low_tdesc.
1495 * linux-x86-tdesc.c: New file.
1496 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1497 (i386_get_ipa_tdesc_idx): Declare.
1498 (i386_get_ipa_tdesc): Declare.
1499 (initialize_low_tdesc): Declare.
1500
1501 2017-09-05 Yao Qi <yao.qi@linaro.org>
1502
1503 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1504 instead of 0.
1505
1506 2017-09-05 Yao Qi <yao.qi@linaro.org>
1507
1508 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1509 * regcache.c (get_thread_regcache): Use VEC_length.
1510 (init_register_cache): Likewise.
1511 (regcache_cpy): Likewise.
1512 (registers_to_string): Iterate reg_defs via VEC_iterate.
1513 (find_regno): Likewise.
1514 (find_register_by_number): Use VEC_index.
1515 (register_size): Call find_register_by_number.
1516 (register_data): Call find_register_by_number.
1517 (supply_regblock): Use VEC_length.
1518 (regcache_raw_read_unsigned): Likewise.
1519 * tdesc.c (init_target_desc): Iterate reg_defs via
1520 VEC_iterate.
1521 (default_description): Update initializer.
1522 (copy_target_description): Don't update field num_registers.
1523 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1524 <num_registers>: Remove.
1525
1526 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1527
1528 * Makefile.in (.SECONDARY): Define target.
1529
1530 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1531
1532 * linux-low.c (linux_wait_1): Adjust.
1533 * server.c (queue_stop_reply_callback): Adjust.
1534
1535 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1536
1537 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1538 QEnvironmentUnset and QEnvironmentReset packets.
1539 (handle_query): Inform remote that QEnvironmentHexEncoded,
1540 QEnvironmentUnset and QEnvironmentReset are supported.
1541
1542 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1543
1544 * inferiors.h (inferior_target_data): Rename to ...
1545 (thread_target_data): ... this.
1546 (inferior_regcache_data): Rename to ...
1547 (thread_regcache_data): ... this.
1548 (set_inferior_regcache_data): Rename to ...
1549 (set_thread_regcache_data): ... this.
1550 * inferiors.c (inferior_target_data): Rename to ...
1551 (thread_target_data): ... this.
1552 (inferior_regcache_data): Rename to ...
1553 (thread_regcache_data): ... this.
1554 (set_inferior_regcache_data): Rename to ...
1555 (set_thread_regcache_data): ... this.
1556 (free_one_thread): Update.
1557 * linux-low.h (get_thread_lwp): Update.
1558 * regcache.c (get_thread_regcache): Update.
1559 (regcache_invalidate_thread): Update.
1560 (free_register_cache_thread): Update.
1561 * win32-i386-low.c (update_debug_registers_callback): Update.
1562 (win32_get_current_dr): Update.
1563 * win32-low.c (thread_rec): Update.
1564 (delete_thread_info): Update.
1565 (continue_one_thread): Update.
1566 (suspend_one_thread): Update.
1567
1568 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1569
1570 * inferiors.c (set_inferior_target_data): Remove.
1571 * inferiors.h (set_inferior_target_data): Remove.
1572
1573 2017-08-18 Yao Qi <yao.qi@linaro.org>
1574
1575 * Makefile.in (OBS): Add selftest.o.
1576 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1577 * configure, config.in: Re-generated.
1578 * server.c: Include common/sefltest.h.
1579 (captured_main): Handle option --selftest.
1580
1581 2017-08-09 Yao Qi <yao.qi@linaro.org>
1582
1583 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1584 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1585 i386-avx-mpx.o and i386-mmx.o.
1586 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1587 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1588 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1589 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1590 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1591 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1592 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1593 i386/amd64-avx-mpx.xml.
1594
1595 2017-08-09 Yao Qi <yao.qi@linaro.org>
1596
1597 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1598 and x32-avx-avx512.o.
1599 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1600 i386/x32-avx-avx512.xml.
1601
1602 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1603
1604 * tracepoint.h (enum class fast_tpoint_collect_result): New
1605 enumeration.
1606 (fast_tracepoint_collecting): Change return type to
1607 fast_tpoint_collect_result.
1608 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1609 * linux-low.h: Include tracepoint.h.
1610 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1611 fast_tpoint_collect_result.
1612 * linux-low.c (handle_tracepoints): Adjust.
1613 (linux_fast_tracepoint_collecting): Change return type to
1614 fast_tpoint_collect_result.
1615 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1616 linux_wait_1, stuck_in_jump_pad_callback,
1617 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1618 proceed_one_lwp): Adjust to type change.
1619
1620 2017-07-10 Yao Qi <yao.qi@linaro.org>
1621
1622 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1623
1624 2017-06-29 Yao Qi <yao.qi@linaro.org>
1625
1626 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1627 Remove.
1628 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1629
1630 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1631
1632 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1633
1634 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1635
1636 * linux-low.c (linux_create_inferior): Adjust code to access the
1637 environment information via 'gdb_environ' class.
1638 * lynx-low.c (lynx_create_inferior): Likewise.
1639 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1640 (get_environ): Return a pointer to 'our_environ'.
1641 (captured_main): Initialize 'our_environ'.
1642 * server.h (get_environ): Adjust prototype.
1643 * spu-low.c (spu_create_inferior): Adjust code to access the
1644 environment information via 'gdb_environ' class.
1645
1646 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1647
1648 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1649 usage of "register" keyword.
1650
1651 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1652
1653 * configure: Re-generate.
1654
1655 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1656
1657 * configure: Re-generate.
1658
1659 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1660
1661 * Makefile.in (COMPILE.pre): Add "-x c++".
1662
1663 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1664
1665 * fork-child.c: Conditionally include <signal.h>.
1666
1667 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1668
1669 * server.c (handle_general_set): Handle new packet
1670 "QStartupWithShell".
1671 (handle_query): Add "QStartupWithShell" to the list of supported
1672 packets.
1673 (gdbserver_usage): Add help text explaining the
1674 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1675 options.
1676 (captured_main): Recognize and act upon the presence of the new
1677 CLI options.
1678
1679 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1680 Pedro Alves <palves@redhat.com>
1681
1682 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1683 * configure: Regenerate.
1684 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1685 "fork-inferior.o".
1686 (i[34567]86-*-lynxos*): Likewise.
1687 (spu*-*-*): Likewise.
1688 * fork-child.c: New file.
1689 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1690 and "environ.h".
1691 (linux_ptrace_fun): New function.
1692 (linux_create_inferior): Adjust function prototype to reflect
1693 change on "target.h". Adjust function code to use
1694 "fork_inferior".
1695 (linux_request_interrupt): Delete "signal_pid".
1696 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1697 (lynx_ptrace_fun): New function.
1698 (lynx_create_inferior): Adjust function prototype to reflect
1699 change on "target.h". Adjust function code to use
1700 "fork_inferior".
1701 * nto-low.c (nto_create_inferior): Adjust function prototype and
1702 code to reflect change on "target.h". Update comments.
1703 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1704 "common-terminal.h" and "environ.h".
1705 (terminal_fd): Moved to fork-child.c.
1706 (old_foreground_pgrp): Likewise.
1707 (restore_old_foreground_pgrp): Likewise.
1708 (last_status): Make it global.
1709 (last_ptid): Likewise.
1710 (our_environ): New variable.
1711 (startup_with_shell): Likewise.
1712 (program_name): Likewise.
1713 (program_argv): Rename to...
1714 (program_args): ...this.
1715 (wrapper_argv): New variable.
1716 (start_inferior): Delete function.
1717 (get_exec_wrapper): New function.
1718 (get_exec_file): Likewise.
1719 (get_environ): Likewise.
1720 (prefork_hook): Likewise.
1721 (post_fork_inferior): Likewise.
1722 (postfork_hook): Likewise.
1723 (postfork_child_hook): Likewise.
1724 (handle_v_run): Update code to deal with arguments coming from the
1725 remote host. Update calls from "start_inferior" to
1726 "create_inferior".
1727 (captured_main): Likewise. Initialize environment variable. Call
1728 "have_job_control".
1729 * server.h (post_fork_inferior): New prototype.
1730 (get_environ): Likewise.
1731 (last_status): Declare.
1732 (last_ptid): Likewise.
1733 (signal_pid): Likewise.
1734 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1735 (spu_ptrace_fun): New function.
1736 (spu_create_inferior): Adjust function prototype to reflect change
1737 on "target.h". Adjust function code to use "fork_inferior".
1738 * target.c (target_terminal_init): New function.
1739 (target_terminal_inferior): Likewise.
1740 (target_terminal_ours): Likewise.
1741 * target.h: Include <vector>.
1742 (struct target_ops) <create_inferior>: Update prototype.
1743 (create_inferior): Update macro.
1744 * utils.c (gdb_flush_out_err): New function.
1745 * win32-low.c (win32_create_inferior): Adjust function prototype
1746 and code to reflect change on "target.h".
1747
1748 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1749
1750 * inferiors.c (switch_to_thread): New function.
1751
1752 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1753
1754 * Makefile.in (SFILE): Add "common/job-control.c".
1755 (OBS): Add "job-control.o".
1756
1757 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1758
1759 * Makefile: Remove "@host_makefile_frag@".
1760
1761 2017-05-05 Pedro Alves <palves@redhat.com>
1762
1763 * configure: Regenerate.
1764
1765 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1766
1767 * configure: Regenerate.
1768
1769 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1770
1771 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1772 software_single_step change of return type to
1773 std::vector<CORE_ADDR>.
1774 * linux-low.c (install_software_single_step_breakpoints):
1775 Likewise.
1776 * linux-low.h (install_software_single_step_breakpoints):
1777 Likewise.
1778
1779 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1780
1781 * remote-utils.c: Include "gdb_termios.h" instead of
1782 "terminal.h".
1783 * terminal.h: Delete file.
1784
1785 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1786
1787 * server.c: Include <vector>.
1788 <program_argv, wrapper_argv>: Convert to std::vector.
1789 (start_inferior): Rewrite function to use C++.
1790 (handle_v_run): Likewise. Update code that calculates the argv
1791 based on the vRun packet; use C++.
1792 (captured_main): Likewise.
1793
1794 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1795
1796 * server.c (handle_v_cont): Initialize thread_resume::thread
1797 with null_ptid.
1798
1799 2017-04-05 Pedro Alves <palves@redhat.com>
1800
1801 * configure: Regenerate.
1802
1803 2017-04-05 Pedro Alves <palves@redhat.com>
1804
1805 * gdbreplay.c (sync_error): Constify.
1806 * linux-x86-low.c (push_opcode): Constify.
1807
1808 2017-04-05 Pedro Alves <palves@redhat.com>
1809
1810 * win32-low.c (get_child_debug_event)
1811 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1812 Report TARGET_WAITKIND_SPURIOUS instead.
1813
1814 2017-04-05 Pedro Alves <palves@redhat.com>
1815
1816 * remote-utils.c (remote_prepare, remote_open): Constify.
1817 * remote-utils.h (remote_prepare, remote_open): Constify.
1818 * server.c (captured_main): Constify 'port' handling.
1819
1820 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1821
1822 * Makefile.in (clean): Clear .deps.
1823
1824 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1825
1826 * .gitignore: Remove generated files, replace with wildcard.
1827 * (clean): Replace removal of generated files with wildcard.
1828 (version.c): Replace with...
1829 (version-generated.c): ...this.
1830 (xml-builtin.c): Replace with...
1831 (xml-builtin-generated.c): ...this.
1832 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1833 (%.c: *regformats*): Replace with...
1834 (%-generated.c: *regformats*): ...this.
1835
1836 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1837
1838 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1839 (xtensa_fill_gregset): Call collect_register_by_name for
1840 threadptr register.
1841 (xtensa_store_gregset): Call supply_register_by_name for
1842 threadptr register.
1843
1844 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1845
1846 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1847 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1848 (xtensa_store_gregset): Call supply_register for all registers in
1849 a0_regnum..a0_regnum + C0_NREGS range.
1850
1851 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1852
1853 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1854 (ax-ipa.o: ax.c): Remove.
1855 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1856 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1857 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1858 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1859 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1860
1861 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1862
1863 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1864 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1865 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1866 (errors-ipa.o: ../common/errors.c): Remove.
1867 (format-ipa.o: ../common/format.c): Remove.
1868 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1869
1870 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1871
1872 * Makefile.in (%-ipa.o: %.c): New rule.
1873 (tracepoint-ipa.o: tracepoint.c): Remove.
1874 (utils-ipa.o: utils.c): Remove.
1875 (remote-utils-ipa.o: remote-utils.c): Remove.
1876 (regcache-ipa.o: regcache.c): Remove.
1877 (i386-linux-ipa.o: i386-linux.c): Remove.
1878 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1879 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1880 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1881 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1882 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1883 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1884 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1885 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1886 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1887 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1888 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1889 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1890 (aarch64-ipa.o: aarch64.c): Remove.
1891 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1892 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1893 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1894 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1895 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1896 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1897 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1898 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1899 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1900 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1901 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1902 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1903 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1904 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1905 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1906 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1907 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1908 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1909 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1910 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1911 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1912 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1913 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1914 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1915 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1916 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1917 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1918 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1919 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1920 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1921 (tdesc-ipa.o: tdesc.c): Remove.
1922 (x32-linux-ipa.o: x32-linux.c): Remove.
1923 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1924 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1925
1926 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1927
1928 * Makefile.in (%.o: ../arch/%.c): New rule.
1929 (arm.o: ../arch/arm.c): Remove.
1930 (arm-linux.o: ../arch/arm-linux.c): Remove.
1931 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1932 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1933
1934 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1935
1936 * Makefile.in (%.o: ../nat/%.c): New rule.
1937 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1938 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1939 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1940 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1941 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1942 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1943 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1944 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1945 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1946 (linux-personality.o: ../nat/linux-personality.c): Remove.
1947 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1948 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1949 (x86-linux.o: ../nat/x86-linux.c): Remove.
1950 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1951 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1952
1953 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1954
1955 * Makefile.in (%.o: ../common/%.c): New rule.
1956 (signals.o: ../common/signals.c): Remove.
1957 (print-utils.o: ../common/print-utils.c): Remove.
1958 (rsp-low.o: ../common/rsp-low.c): Remove.
1959 (common-utils.o: ../common/common-utils.c): Remove.
1960 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1961 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1962 (vec.o: ../common/vec.c): Remove.
1963 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1964 (xml-utils.o: ../common/xml-utils.c): Remove.
1965 (ptid.o: ../common/ptid.c): Remove.
1966 (buffer.o: ../common/buffer.c): Remove.
1967 (format.o: ../common/format.c): Remove.
1968 (filestuff.o: ../common/filestuff.c): Remove.
1969 (agent.o: ../common/agent.c): Remove.
1970 (errors.o: ../common/errors.c): Remove.
1971 (environ.o: ../common/environ.c): Remove.
1972 (common-debug.o: ../common/common-debug.c): Remove.
1973 (cleanups.o: ../common/cleanups.c): Remove.
1974 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1975 (fileio.o: ../common/fileio.c): Remove.
1976 (common-regcache.o: ../common/common-regcache.c): Remove.
1977 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1978 (new-op.o: ../common/new-op.c): Remove.
1979 (btrace-common.o: ../common/btrace-common.c): Remove.
1980
1981 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1982
1983 * Makefile.in (%.o: ../target/%.c): New rule.
1984 (waitstatus.o: ../target/waitstatus.c): Remove.
1985
1986 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1987
1988 * Makefile.in
1989 (%.c: ../regformats/%.dat,
1990 (%.c: ../regformats/arm/%.dat,
1991 (%.c: ../regformats/i386/%.dat,
1992 (%.c: ../regformats/rs6000/%.dat): New rules.
1993 (aarch64.c): Remove.
1994 (reg-arm.c): Remove.
1995 (arm-with-iwmmxt.c): Remove.
1996 (arm-with-vfpv2.c): Remove.
1997 (arm-with-vfpv3.c): Remove.
1998 (arm-with-neon.c): Remove.
1999 (reg-bfin.c): Remove.
2000 (reg-cris.c): Remove.
2001 (reg-crisv32.c): Remove.
2002 (i386.c): Remove.
2003 (i386-linux.c): Remove.
2004 (i386-avx.c): Remove.
2005 (i386-avx-linux.c): Remove.
2006 (i386-avx-avx512.c): Remove.
2007 (i386-avx-avx512-linux.c): Remove.
2008 (i386-mpx.c): Remove.
2009 (i386-mpx-linux.c): Remove.
2010 (i386-avx-mpx-avx512-pku.c): Remove.
2011 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2012 (i386-avx-mpx.c): Remove.
2013 (i386-avx-mpx-linux.c): Remove.
2014 (i386-mmx.c): Remove.
2015 (i386-mmx-linux.c): Remove.
2016 (reg-ia64.c): Remove.
2017 (reg-m32r.c): Remove.
2018 (reg-m68k.c): Remove.
2019 (reg-cf.c): Remove.
2020 (mips-linux.c): Remove.
2021 (mips-dsp-linux.c): Remove.
2022 (mips64-linux.c): Remove.
2023 (mips64-dsp-linux.c): Remove.
2024 (nios2-linux.c): Remove.
2025 (powerpc-32.c): Remove.
2026 (powerpc-32l.c): Remove.
2027 (powerpc-altivec32l.c): Remove.
2028 (powerpc-cell32l.c): Remove.
2029 (powerpc-vsx32l.c): Remove.
2030 (powerpc-isa205-32l.c): Remove.
2031 (powerpc-isa205-altivec32l.c): Remove.
2032 (powerpc-isa205-vsx32l.c): Remove.
2033 (powerpc-e500l.c): Remove.
2034 (powerpc-64l.c): Remove.
2035 (powerpc-altivec64l.c): Remove.
2036 (powerpc-cell64l.c): Remove.
2037 (powerpc-vsx64l.c): Remove.
2038 (powerpc-isa205-64l.c): Remove.
2039 (powerpc-isa205-altivec64l.c): Remove.
2040 (powerpc-isa205-vsx64l.c): Remove.
2041 (s390-linux32.c): Remove.
2042 (s390-linux32v1.c): Remove.
2043 (s390-linux32v2.c): Remove.
2044 (s390-linux64.c): Remove.
2045 (s390-linux64v1.c): Remove.
2046 (s390-linux64v2.c): Remove.
2047 (s390-te-linux64.c): Remove.
2048 (s390-vx-linux64.c): Remove.
2049 (s390-tevx-linux64.c): Remove.
2050 (s390x-linux64.c): Remove.
2051 (s390x-linux64v1.c): Remove.
2052 (s390x-linux64v2.c): Remove.
2053 (s390x-te-linux64.c): Remove.
2054 (s390x-vx-linux64.c): Remove.
2055 (s390x-tevx-linux64.c): Remove.
2056 (tic6x-c64xp-linux.c): Remove.
2057 (tic6x-c64x-linux.c): Remove.
2058 (tic6x-c62x-linux.c): Remove.
2059 (reg-sh.c): Remove.
2060 (reg-sparc64.c): Remove.
2061 (reg-spu.c): Remove.
2062 (amd64.c): Remove.
2063 (amd64-linux.c): Remove.
2064 (amd64-avx.c): Remove.
2065 (amd64-avx-linux.c): Remove.
2066 (amd64-avx-avx512.c): Remove.
2067 (amd64-avx-avx512-linux.c): Remove.
2068 (amd64-mpx.c): Remove.
2069 (amd64-mpx-linux.c): Remove.
2070 (amd64-avx-mpx-avx512-pku.c): Remove.
2071 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2072 (amd64-avx-mpx.c): Remove.
2073 (amd64-avx-mpx-linux.c): Remove.
2074 (x32.c): Remove.
2075 (x32-linux.c): Remove.
2076 (x32-avx.c): Remove.
2077 (x32-avx-linux.c): Remove.
2078 (x32-avx-avx512.c): Remove.
2079 (x32-avx-avx512-linux.c): Remove.
2080 (reg-xtensa.c): Remove.
2081 (reg-tilegx.c): Remove.
2082 (reg-tilegx32.c): Remove.
2083
2084 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2085
2086 * Makefile.in (SFILES): Add "common/environ.c".
2087 (OBJS): Add "common/environ.h".
2088
2089 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2090
2091 * configure.ac: Check if the fs_base and gs_base members of
2092 `struct user_regs_struct' exist.
2093 * config.in: Regenerated.
2094 * configure: Likewise.
2095
2096 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2097
2098 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2099 target_read_memory.
2100 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2101 (get_next_pcs_syscall_next_pc): Likewise.
2102
2103 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2104
2105 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2106 * nto-x86-low.c: Likewise.
2107
2108 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2109
2110 * Makefile.in: Include disable-implicit-rules.mk.
2111
2112 2016-11-23 Pedro Alves <palves@redhat.com>
2113
2114 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2115 (debug_vprintf): Use std::chrono::steady_clock instead of
2116 gettimeofday. Use '.' instead of ':'.
2117 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2118 (get_timestamp): Use std::chrono::steady_clock instead of
2119 gettimeofday.
2120
2121 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2122
2123 * Makefile.in: Fix whitespace formatting.
2124
2125 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2126
2127 * Makefile.in (SFILES, OBS): Flatten list and order
2128 alphabetically.
2129
2130 2016-11-23 Pedro Alves <palves@redhat.com>
2131
2132 * event-loop.c (handle_file_event): Use warning.
2133 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2134 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2135 Use warning.
2136
2137 2016-11-23 Pedro Alves <palves@redhat.com>
2138
2139 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2140 output.
2141 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2142 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2143 debug_printf and debug_flush for debug output.
2144 * server.c (handle_general_set): Likewise.
2145 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2146 output.
2147
2148 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2149
2150 * Makefile.in (.c.o): Replace rule with ...
2151 (%.o: %.c): ... this one.
2152
2153 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2154
2155 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2156 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2157 make.
2158 * configure.ac: Remove checks for the make program.
2159 * configure: Re-generate.
2160
2161 2016-10-28 Pedro Alves <palves@redhat.com>
2162
2163 * Makefile.in (CXX_DIALECT): Get from configure.
2164 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2165 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2166 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2167 * config.in: Regenerate.
2168 * configure: Regenerate.
2169
2170 2016-10-27 Yao Qi <yao.qi@linaro.org>
2171
2172 * linux-low.c (linux_supports_range_stepping): Return true if
2173 can_software_single_step return true.
2174
2175 2016-10-27 Yao Qi <yao.qi@linaro.org>
2176
2177 * inferiors.c (find_inferior_in_random): New function.
2178 * inferiors.h (find_inferior_in_random): Declare.
2179 * linux-low.c (linux_wait_for_event_filtered): Call
2180 find_inferior_in_random instead of find_inferior.
2181
2182 2016-10-27 Yao Qi <yao.qi@linaro.org>
2183
2184 * linux-low.c (linux_wait_1): If single-step breakpoints are
2185 inserted, remove them.
2186
2187 2016-10-26 Pedro Alves <palves@redhat.com>
2188
2189 * linux-low.c (handle_extended_wait): Link parent/child fork
2190 threads.
2191 (linux_wait_1): Unlink them.
2192 (linux_set_resume_request): Ignore resume requests for
2193 already-resumed and unhandled fork child threads.
2194 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2195 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2196 New functions.
2197 (handle_v_requests) <vCont>: Don't call require_running.
2198 * server.h (in_queued_stop_replies): New declaration.
2199
2200 2016-10-24 Yao Qi <yao.qi@linaro.org>
2201
2202 PR server/20733
2203 * linux-aarch64-low.c (append_insns): Cast the return value to
2204 'uint32_t *'.
2205
2206 2016-10-10 Yao Qi <yao.qi@linaro.org>
2207
2208 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2209
2210 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2211
2212 * target.c (target_supports_multi_process): New function, moved
2213 from...
2214 * target.h (target_supports_multi_process): ... here. Remove
2215 macro.
2216
2217 2016-10-05 Tom Tromey <tom@tromey.com>
2218
2219 PR remote/20655:
2220 * tracepoint.c (handle_tracepoint_bkpts): Check
2221 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2222
2223 2016-10-05 Yao Qi <yao.qi@linaro.org>
2224
2225 * configure.srv: Update the path of arm-*.xml files.
2226
2227 2016-10-05 Terry Guo <terry.guo@arm.com>
2228 Yao Qi <yao.qi@linaro.org>
2229
2230 * Makefile.in: Adjust the path of rules.
2231 * configure.srv: Update the path of xml files.
2232 * regformats/arm-with-iwmmxt.dat: Regenerated.
2233 * regformats/arm-with-neon.dat: Likewise.
2234 * regformats/arm-with-vfpv2.dat: Likewise.
2235 * regformats/arm-with-vfpv3.dat Likewise.
2236
2237 2016-09-30 Yao Qi <yao.qi@linaro.org>
2238
2239 PR gdbserver/20627
2240 * target.c (target_stop_and_wait): Don't call
2241 target_continue_no_signal, use resume_stop instead.
2242
2243 2016-09-26 Yao Qi <yao.qi@linaro.org>
2244
2245 * linux-low.c (linux_wait_1): Call debug_exit.
2246
2247 2016-09-23 Pedro Alves <palves@redhat.com>
2248
2249 * Makefile.in (SFILES): Add common/new-op.c.
2250 (OBS): Add common/new-op.o.
2251 (new-op.o): New rule.
2252
2253 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2254
2255 * .gitinore: Ignore more files.
2256
2257 2016-09-21 Yao Qi <yao.qi@linaro.org>
2258
2259 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2260 23.
2261
2262 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2263
2264 * server.c (start_inferior): Call target_mourn_inferior instead of
2265 mourn_inferior; pass ptid_t argument to it.
2266 (resume): Likewise.
2267 (handle_target_event): Likewise.
2268 * target.c (target_mourn_inferior): New function.
2269 * target.h (mourn_inferior): Delete macro.
2270
2271 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2272
2273 * linux-low.c (lwp_is_stepping): New function.
2274
2275 2016-09-06 Carl Love <cel@us.ibm.com>
2276
2277 * server.c (start_inferior): Fixed comment, requested comment change
2278 didn't get updated correctly. Removed reference to ptrace () call as
2279 it is only true on Linux systems.
2280
2281 2016-09-06 Carl Love <cel@us.ibm.com>
2282
2283 * server.c (start_inferior): Do not call
2284 function target_post_create_inferior () if the
2285 inferior process has already exited.
2286
2287 2016-09-05 Pedro Alves <palves@redhat.com>
2288
2289 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2290 (COMPILE.pre, CC_LD): Use CXX directly.
2291 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2292 * acinclude.m4: Don't include build-with-cxx.m4.
2293 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2294 * configure: Regenerate.
2295
2296 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2297
2298 PR gdb/19495
2299 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2300 call writing data to own_buf.
2301
2302 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2303
2304 * target.c (mywait): Call target_wait instead of
2305 the_target->wait.
2306 (target_wait): New function.
2307
2308 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2309
2310 * server.c (start_inferior): New variable 'ptid'. Replace calls
2311 to the_target->resume by target_continue{,_no_signal}, depending
2312 on the case.
2313 * target.c (target_stop_and_wait): Call target_continue_no_signal
2314 instead of the_target->resume.
2315 (target_continue): New function.
2316
2317 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2318
2319 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2320
2321 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2322
2323 PR server/20491
2324 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2325 ps_prochandle.
2326 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2327 * linux-arm-low.c (ps_get_thread_area): Likewise.
2328 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2329 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2330 * linux-mips-low.c (ps_get_thread_area): Likewise.
2331 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2332 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2333 * linux-x86-low.c (ps_get_thread_area): Likewise.
2334 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2335
2336 2016-08-19 Pedro Alves <palves@redhat.com>
2337
2338 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2339
2340 2016-08-19 Pedro Alves <palves@redhat.com>
2341
2342 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2343 comment. Use memcpy instead of casting through unsigned long.
2344
2345 2016-08-19 Pedro Alves <palves@redhat.com>
2346
2347 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2348 allocating around 0x80000000.
2349
2350 2016-08-19 Pedro Alves <palves@redhat.com>
2351
2352 PR gdb/20415
2353 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2354 (x32-avx512-linux-ipa.o): New rules.
2355 * configure.ac (x86_64-*-linux*): New x32 check.
2356 * configure.srv (ipa_x32_linux_regobj): New.
2357 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2358 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2359 descriptions.
2360 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2361 descriptions.
2362 * configure: Regenerate.
2363
2364 2016-08-09 Pedro Alves <palves@redhat.com>
2365
2366 PR gdb/18653
2367 * Makefile.in (OBS): Add signals-state-save-restore.o.
2368 (signals-state-save-restore.o): New rule.
2369 * config.in: Regenerate.
2370 * configure: Regenerate.
2371 * linux-low.c: Include "signals-state-save-restore.h".
2372 (linux_create_inferior): Call
2373 restore_original_signals_state.
2374 * server.c: Include "dispositions-save-restore.h".
2375 (captured_main): Call save_original_signals_state.
2376
2377 2016-08-05 Pedro Alves <palves@redhat.com>
2378
2379 * configure: Regenerate.
2380
2381 2016-08-04 Yao Qi <yao.qi@linaro.org>
2382
2383 * linux-low.c (regsets_fetch_inferior_registers): Check
2384 errno is ESRCH or not.
2385
2386 2016-08-02 Yao Qi <yao.qi@linaro.org>
2387
2388 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2389 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2390 (thread_db_load_search): Update.
2391 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2392 td_ta_set_event and td_ta_event_getmsg.
2393
2394 2016-07-26 Pedro Alves <palves@redhat.com>
2395
2396 PR server/20414
2397 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2398 of unsigned long for 64-bit registers and use uint32_t instead of
2399 unsigned int for 32-bit registers.
2400
2401 2016-07-26 Pedro Alves <palves@redhat.com>
2402
2403 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2404 to 'ptrace'.
2405
2406 2016-07-21 Tom Tromey <tom@tromey.com>
2407
2408 * configure: Rebuild.
2409
2410 2016-07-21 Yao Qi <yao.qi@linaro.org>
2411
2412 * mem-break.c (find_gdb_breakpoint): Cast bp to
2413 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2414
2415 2016-07-21 Yao Qi <yao.qi@linaro.org>
2416
2417 * server.c (handle_v_requests): Support s and S actions
2418 if target_supports_software_single_step return true.
2419
2420 2016-07-21 Yao Qi <yao.qi@linaro.org>
2421
2422 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2423 is resume_step, call maybe_hw_step.
2424 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2425 and unstop them.
2426 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2427 breakpoints or not.
2428 (proceed_one_lwp): If resume request is resume_step, install
2429 reinsert breakpoints and call maybe_hw_step.
2430
2431 2016-07-21 Yao Qi <yao.qi@linaro.org>
2432
2433 * linux-low.c (proceed_one_lwp): Declare.
2434 (linux_resume_one_thread): Remove local variable 'step'.
2435 Lift code enqueue signal. Call proceed_one_lwp instead of
2436 linux_resume_one_lwp.
2437
2438 2016-07-21 Yao Qi <yao.qi@linaro.org>
2439
2440 * linux-low.c (linux_resume_one_thread): Call
2441 enqueue_pending_signal.
2442
2443 2016-07-21 Yao Qi <yao.qi@linaro.org>
2444
2445 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2446 * inferiors.c (do_restore_current_thread_cleanup): New function.
2447 (make_cleanup_restore_current_thread): Likewise.
2448 * linux-low.c (install_software_single_step_breakpoints): Call
2449 make_cleanup_restore_current_thread. Switch current_thread to
2450 thread.
2451
2452 2016-07-21 Yao Qi <yao.qi@linaro.org>
2453
2454 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2455 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2456 (clone_one_breakpoint): Likewise.
2457 (delete_reinsert_breakpoints): Change parameter to thread.
2458 Callers updated.
2459 (has_reinsert_breakpoints): Likewise.
2460 (uninsert_reinsert_breakpoints): Likewise.
2461 (reinsert_reinsert_breakpoints): Likewise.
2462 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2463 (delete_reinsert_breakpoints): Likewise.
2464 (reinsert_reinsert_breakpoints): Likewise.
2465 (uninsert_reinsert_breakpoints): Likewise.
2466 (has_reinsert_breakpoints): Likewise.
2467
2468 2016-07-21 Yao Qi <yao.qi@linaro.org>
2469
2470 * inferiors.c (get_thread_process): Make parameter const.
2471 * inferiors.h (get_thread_process): Update declaration.
2472 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2473 Add new parameters child_thread and parent_thread. Callers
2474 updated.
2475 * mem-break.h (clone_all_breakpoints): Update declaration.
2476
2477 2016-07-21 Yao Qi <yao.qi@linaro.org>
2478
2479 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2480 <command_list, handler>: Remove.
2481 (struct gdb_breakpoint): New.
2482 (struct other_breakpoint): New.
2483 (struct reinsert_breakpoint): New.
2484 (is_gdb_breakpoint): New function.
2485 (any_persistent_commands): Update command_list if
2486 is_gdb_breakpoint returns true.
2487 (set_breakpoint): Create breakpoints according to their types.
2488 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2489 (set_gdb_breakpoint_1): Likewise.
2490 (set_gdb_breakpoint): Likewise.
2491 (clear_breakpoint_conditions): Change parameter type to
2492 'struct gdb_breakpoint *'.
2493 (clear_breakpoint_commands): Likewise.
2494 (clear_breakpoint_conditions_and_commands): Likewise.
2495 (add_condition_to_breakpoint): Likewise.
2496 (add_breakpoint_condition): Likewise.
2497 (add_commands_to_breakpoint): Likewise.
2498 (check_breakpoints): Check other_breakpoint.
2499 (clone_one_breakpoint): Clone breakpopint according to its type.
2500 * mem-break.h (struct gdb_breakpoint): Declare.
2501 (set_gdb_breakpoint): Update declaration.
2502 (clear_breakpoint_conditions_and_commands): Likewise.
2503 (add_breakpoint_condition): Likewise.
2504 (add_breakpoint_commands): Likewise.
2505 * server.c (process_point_options): Change parameter type to
2506 'struct gdb_breakpoint *'.
2507
2508 2016-07-21 Yao Qi <yao.qi@linaro.org>
2509
2510 * mem-break.c (set_breakpoint_at): Rename it to ...
2511 (set_breakpoint_type_at): ... it.
2512 (set_breakpoint_at): Call set_breakpoint_type_at.
2513 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2514 * mem-break.h (set_breakpoint_at): Update comments.
2515
2516 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2517
2518 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2519 to buf parameter.
2520 (nios2_store_gregset): Likewise.
2521
2522 2016-07-01 Pedro Alves <palves@redhat.com>
2523 Antoine Tremblay <antoine.tremblay@ericsson.com>
2524
2525 * linux-low.c: Change interface to take the target lwp_info
2526 pointer directly and return void. Handle detaching from a zombie
2527 thread.
2528 (linux_detach_lwp_callback): New function.
2529 (linux_detach): Detach from the leader thread after detaching from
2530 the clone threads.
2531
2532 2016-06-28 Yao Qi <yao.qi@linaro.org>
2533
2534 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2535 for variable new_offset.
2536 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2537 (aarch64_ftrace_insn_reloc_cb): Likewise.
2538 (aarch64_ftrace_insn_reloc_tb): Likewise.
2539 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2540 PRIx64 instead of PRIx32.
2541
2542 2016-06-28 Yao Qi <yao.qi@linaro.org>
2543
2544 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2545 (the_low_target): Install arm_get_syscall_trapinfo.
2546
2547 2016-06-28 Yao Qi <yao.qi@linaro.org>
2548
2549 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2550 function.
2551 (the_low_target): Install aarch64_get_syscall_trapinfo.
2552
2553 2016-06-28 Yao Qi <yao.qi@linaro.org>
2554
2555 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2556 Callers updated.
2557 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2558 Remove parameter sysno.
2559 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2560 sysret.
2561
2562 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2563
2564 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2565 (s390_emit_ne_goto): Likewise.
2566 (s390_emit_lt_goto): Likewise.
2567 (s390_emit_le_goto): Likewise.
2568 (s390_emit_gt_goto): Likewise.
2569 (s390_emit_ge_goto): Likewise.
2570 (s390x_emit_eq_goto): Likewise.
2571 (s390x_emit_ne_goto): Likewise.
2572 (s390x_emit_lt_goto): Likewise.
2573 (s390x_emit_le_goto): Likewise.
2574 (s390x_emit_gt_goto): Likewise.
2575 (s390x_emit_ge_goto): Likewise.
2576 (s390_emit_ops_impl): Mark variable static.
2577 (s390x_emit_ops): Likewise.
2578
2579 2016-06-17 Yao Qi <yao.qi@linaro.org>
2580
2581 * linux-low.c (handle_extended_wait): Call
2582 uninsert_reinsert_breakpoints for the parent process. Remove
2583 reinsert breakpoints from the child process. Reinsert them to
2584 the parent process when vfork is done.
2585 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2586 (reinsert_reinsert_breakpoints): New function.
2587 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2588 (reinsert_reinsert_breakpoints): Declare.
2589
2590 2016-06-17 Yao Qi <yao.qi@linaro.org>
2591
2592 * linux-low.c (handle_extended_wait): If the parent is doing
2593 step-over, remove the reinsert breakpoints from the forked child.
2594
2595 2016-06-17 Yao Qi <yao.qi@linaro.org>
2596
2597 * linux-low.c (unsuspend_all_lwps): Declare.
2598 (linux_low_filter_event): If thread exited, call finish_step_over.
2599 If step-over is finished, unsuspend other threads.
2600
2601 2016-06-17 Yao Qi <yao.qi@linaro.org>
2602
2603 * linux-low.c (linux_resume_one_lwp_throw): Assert
2604 has_reinsert_breakpoints returns false.
2605 * mem-break.c (delete_disabled_breakpoints): Assert
2606 bp type isn't reinsert_breakpoint.
2607
2608 2016-06-17 Yao Qi <yao.qi@linaro.org>
2609
2610 * linux-low.c (maybe_hw_step): New function.
2611 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2612 (finish_step_over): Switch current_thread to lwp temporarily,
2613 and assert has_reinsert_breakpoints returns true.
2614 (proceed_one_lwp): Call maybe_hw_step.
2615 * mem-break.c (has_reinsert_breakpoints): New function.
2616 * mem-break.h (has_reinsert_breakpoints): Declare.
2617
2618 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2619
2620 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2621
2622 2016-05-17 Yao Qi <yao.qi@linaro.org>
2623
2624 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2625 instead of find_inferior.
2626
2627 2016-05-05 Yao Qi <yao.qi@linaro.org>
2628
2629 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2630 Initialize res to zero.
2631
2632 2016-05-05 Yao Qi <yao.qi@linaro.org>
2633
2634 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2635 to uint32_t.
2636
2637 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2638
2639 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2640 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2641 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2642
2643 2016-04-28 Par Olsson <par.olsson@windriver.com>
2644 Simon Marchi <simon.marchi@ericsson.com>
2645
2646 * tracepoint.c (write_inferior_int8): New function.
2647 (cmd_qtenable_disable): Write enable flag using
2648 write_inferior_int8.
2649
2650 2016-04-25 Yao Qi <yao.qi@linaro.org>
2651
2652 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2653 (need_step_over_p): Return zero if the LWP has pending signals
2654 can be delivered on software single step target.
2655
2656 2016-04-25 Yao Qi <yao.qi@linaro.org>
2657
2658 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2659 return instead of error.
2660
2661 2016-04-22 Yao Qi <yao.qi@linaro.org>
2662
2663 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2664 to 23.
2665
2666 2016-04-22 Yao Qi <yao.qi@linaro.org>
2667
2668 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2669 signal when stepping over breakpoint with software single
2670 step.
2671
2672 2016-04-21 Pedro Alves <palves@redhat.com>
2673
2674 * linux-s390-low.c (s390_collect_ptrace_register)
2675 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2676 add casts.
2677 (s390_check_regset): Use void * instead of gdb_byte *.
2678
2679 2016-04-20 Pedro Alves <palves@redhat.com>
2680
2681 * configure: Renegerate.
2682
2683 2016-04-20 Yao Qi <yao.qi@linaro.org>
2684
2685 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2686 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2687 number 16.
2688 (arm_store_gregset): Likewise.
2689
2690 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2691
2692 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2693 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2694 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2695 (amd64-avx-mpx-linux.c): New rules.
2696 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2697 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2698 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2699 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2700 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2701 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2702 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2703 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2704 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2705 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2706 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2707 * linux-x86-low.c (x86_linux_read_description): Add case for
2708 X86_XSTATE_AVX_MPX_MASK.
2709 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2710 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2711 init_registers_i386_avx_mpx_linux.
2712 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2713 (initialize_low_tracepoint): Call
2714 init_registers_i386_avx_mpx_linux.
2715 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2716 (initialize_low_tracepoint): Call
2717 init_registers_amd64_avx_mpx_linux.
2718 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2719 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2720 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2721 declarations.
2722
2723 2016-04-18 Pedro Alves <palves@redhat.com>
2724
2725 * configure: Regenerate.
2726
2727 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2728
2729 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2730 (aarch64_emit_sub): Likewise.
2731
2732 2016-04-12 Pedro Alves <palves@redhat.com>
2733
2734 * utils.c (prepare_to_throw_exception): Delete.
2735
2736 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2737
2738 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2739
2740 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2741
2742 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2743
2744 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2745
2746 * linux-aarch64-ipa.c: Add <elf.h> include.
2747 * linux-ppc-ipa.c: Add <elf.h> include.
2748 * linux-s390-ipa.c: Add <elf.h> include.
2749
2750 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2751
2752 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2753 (get_raw_reg_ptr): Likewise.
2754 (get_trace_state_variable_value_ptr): Likewise.
2755 (set_trace_state_variable_value_ptr): Likewise.
2756 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2757 char *.
2758
2759 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2760 Marcin Kościelnicki <koriakin@0x04.net>
2761
2762 PR/17221
2763 * linux-ppc-low.c (emit_insns): New function.
2764 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2765 (ppc_emit_prologue): New function.
2766 (ppc_emit_epilogue): New function.
2767 (ppc_emit_add): New function.
2768 (ppc_emit_sub): New function.
2769 (ppc_emit_mul): New function.
2770 (ppc_emit_lsh): New function.
2771 (ppc_emit_rsh_signed): New function.
2772 (ppc_emit_rsh_unsigned): New function.
2773 (ppc_emit_ext): New function.
2774 (ppc_emit_zero_ext): New function.
2775 (ppc_emit_log_not): New function.
2776 (ppc_emit_bit_and): New function.
2777 (ppc_emit_bit_or): New function.
2778 (ppc_emit_bit_xor): New function.
2779 (ppc_emit_bit_not): New function.
2780 (ppc_emit_equal): New function.
2781 (ppc_emit_less_signed): New function.
2782 (ppc_emit_less_unsigned): New function.
2783 (ppc_emit_ref): New function.
2784 (ppc_emit_const): New function.
2785 (ppc_emit_reg): New function.
2786 (ppc_emit_pop): New function.
2787 (ppc_emit_stack_flush): New function.
2788 (ppc_emit_swap): New function.
2789 (ppc_emit_stack_adjust): New function.
2790 (ppc_emit_call): New function.
2791 (ppc_emit_int_call_1): New function.
2792 (ppc_emit_void_call_2): New function.
2793 (ppc_emit_if_goto): New function.
2794 (ppc_emit_goto): New function.
2795 (ppc_emit_eq_goto): New function.
2796 (ppc_emit_ne_goto): New function.
2797 (ppc_emit_lt_goto): New function.
2798 (ppc_emit_le_goto): New function.
2799 (ppc_emit_gt_goto): New function.
2800 (ppc_emit_ge_goto): New function.
2801 (ppc_write_goto_address): New function.
2802 (ppc_emit_ops_impl): New static variable.
2803 (ppc64v1_emit_prologue): New function.
2804 (ppc64v2_emit_prologue): New function.
2805 (ppc64_emit_epilogue): New function.
2806 (ppc64_emit_add): New function.
2807 (ppc64_emit_sub): New function.
2808 (ppc64_emit_mul): New function.
2809 (ppc64_emit_lsh): New function.
2810 (ppc64_emit_rsh_signed): New function.
2811 (ppc64_emit_rsh_unsigned): New function.
2812 (ppc64_emit_ext): New function.
2813 (ppc64_emit_zero_ext): New function.
2814 (ppc64_emit_log_not): New function.
2815 (ppc64_emit_bit_and): New function.
2816 (ppc64_emit_bit_or): New function.
2817 (ppc64_emit_bit_xor): New function.
2818 (ppc64_emit_bit_not): New function.
2819 (ppc64_emit_equal): New function.
2820 (ppc64_emit_less_signed): New function.
2821 (ppc64_emit_less_unsigned): New function.
2822 (ppc64_emit_ref): New function.
2823 (ppc64_emit_const): New function.
2824 (ppc64v1_emit_reg): New function.
2825 (ppc64v2_emit_reg): New function.
2826 (ppc64_emit_pop): New function.
2827 (ppc64_emit_stack_flush): New function.
2828 (ppc64_emit_swap): New function.
2829 (ppc64v1_emit_call): New function.
2830 (ppc64v2_emit_call): New function.
2831 (ppc64v1_emit_int_call_1): New function.
2832 (ppc64v2_emit_int_call_1): New function.
2833 (ppc64v1_emit_void_call_2): New function.
2834 (ppc64v2_emit_void_call_2): New function.
2835 (ppc64_emit_if_goto): New function.
2836 (ppc64_emit_eq_goto): New function.
2837 (ppc64_emit_ne_goto): New function.
2838 (ppc64_emit_lt_goto): New function.
2839 (ppc64_emit_le_goto): New function.
2840 (ppc64_emit_gt_goto): New function.
2841 (ppc64_emit_ge_goto): New function.
2842 (ppc64v1_emit_ops_impl): New static variable.
2843 (ppc64v2_emit_ops_impl): New static variable.
2844 (ppc_emit_ops): New function.
2845 (linux_low_target): Wire in ppc_emit_ops.
2846
2847 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2848 Marcin Kościelnicki <koriakin@0x04.net>
2849
2850 PR/17221
2851 * Makefile.in: Add powerpc-*-ipa.o
2852 * configure.srv: Add ipa_obj for powerpc*-linux.
2853 * linux-ppc-ipa.c: New file.
2854 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2855 includes.
2856 (PPC_FIELD): New macro.
2857 (PPC_SEXT): New macro.
2858 (PPC_OP6): New macro.
2859 (PPC_BO): New macro.
2860 (PPC_LI): New macro.
2861 (PPC_BD): New macro.
2862 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2863 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2864 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2865 (ppc_get_thread_area): New function.
2866 (is_elfv2_inferior): New function.
2867 (gen_ds_form): New function.
2868 (GEN_STD): New macro.
2869 (GEN_STDU): New macro.
2870 (GEN_LD): New macro.
2871 (GEN_LDU): New macro.
2872 (gen_d_form): New function.
2873 (GEN_ADDI): New macro.
2874 (GEN_ADDIS): New macro.
2875 (GEN_LI): New macro.
2876 (GEN_LIS): New macro.
2877 (GEN_ORI): New macro.
2878 (GEN_ORIS): New macro.
2879 (GEN_LWZ): New macro.
2880 (GEN_STW): New macro.
2881 (GEN_STWU): New macro.
2882 (gen_xfx_form): New function.
2883 (GEN_MFSPR): New macro.
2884 (GEN_MTSPR): New macro.
2885 (GEN_MFCR): New macro.
2886 (GEN_MTCR): New macro.
2887 (GEN_SYNC): New macro.
2888 (GEN_LWSYNC): New macro.
2889 (gen_x_form): New function.
2890 (GEN_OR): New macro.
2891 (GEN_MR): New macro.
2892 (GEN_LWARX): New macro.
2893 (GEN_STWCX): New macro.
2894 (GEN_CMPW): New macro.
2895 (gen_md_form): New function.
2896 (GEN_RLDICL): New macro.
2897 (GEN_RLDICR): New macro.
2898 (gen_i_form): New function.
2899 (GEN_B): New macro.
2900 (GEN_BL): New macro.
2901 (gen_b_form): New function.
2902 (GEN_BNE): New macro.
2903 (GEN_LOAD): New macro.
2904 (GEN_STORE): New macro.
2905 (gen_limm): New function.
2906 (gen_atomic_xchg): New function.
2907 (gen_call): New function.
2908 (ppc_relocate_instruction): New function.
2909 (ppc_install_fast_tracepoint_jump_pad): New function.
2910 (ppc_get_min_fast_tracepoint_insn_len): New function.
2911 (ppc_get_ipa_tdesc_idx): New function.
2912 (the_low_target): Wire in the new functions.
2913 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2914 tdescs.
2915 * linux-ppc-tdesc.h: New file.
2916
2917 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2918
2919 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2920 (alloc_jump_pad_buffer): New function.
2921 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2922 (alloc_jump_pad_buffer): New function.
2923 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2924 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2925 (alloc_jump_pad_buffer): New function.
2926 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2927 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2928 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2929 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2930
2931 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2932
2933 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2934 * linux-amd64-ipa.c: Likewise.
2935 * linux-i386-ipa.c: Likewise.
2936 * linux-s390-ipa.c: Likewise.
2937 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2938 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2939 set_trace_state_variable_value_ptr.
2940 (struct ipa_sym_addresses): Likewise.
2941 (symbol_list): Likewise.
2942 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2943 accessing gdb_collect directly.
2944 (gdb_collect_ptr_type): New typedef.
2945 (get_raw_reg_ptr_type): New typedef.
2946 (get_trace_state_variable_value_ptr_type): New typedef.
2947 (set_trace_state_variable_value_ptr_type): New typedef.
2948 (gdb_collect_ptr): New global.
2949 (get_raw_reg_ptr): New global.
2950 (get_trace_state_variable_value_ptr): New global.
2951 (set_trace_state_variable_value_ptr): New global.
2952 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2953 accessing get_raw_reg directly.
2954 (get_get_tsv_func_addr): Likewise for
2955 get_trace_state_variable_value_ptr.
2956 (get_set_tsv_func_addr): Likewise for
2957 set_trace_state_variable_value_ptr.
2958 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2959
2960 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2961
2962 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2963
2964 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2965
2966 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2967 packets.
2968 (relocate_instruction): Remove own_buf.
2969 * server.c (own_buf): Make global.
2970 (handle_v_requests): Make global.
2971 * server.h (own_buf): New declaration.
2972 (handle_v_requests): New prototype.
2973
2974 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2975
2976 PR 18377
2977 * linux-s390-low.c (add_insns): New function.
2978 (s390_emit_prologue): New function.
2979 (s390_emit_epilogue): New function.
2980 (s390_emit_add): New function.
2981 (s390_emit_sub): New function.
2982 (s390_emit_mul): New function.
2983 (s390_emit_lsh): New function.
2984 (s390_emit_rsh_signed): New function.
2985 (s390_emit_rsh_unsigned): New function.
2986 (s390_emit_ext): New function.
2987 (s390_emit_log_not): New function.
2988 (s390_emit_bit_and): New function.
2989 (s390_emit_bit_or): New function.
2990 (s390_emit_bit_xor): New function.
2991 (s390_emit_bit_not): New function.
2992 (s390_emit_equal): New function.
2993 (s390_emit_less_signed): New function.
2994 (s390_emit_less_unsigned): New function.
2995 (s390_emit_ref): New function.
2996 (s390_emit_if_goto): New function.
2997 (s390_emit_goto): New function.
2998 (s390_write_goto_address): New function.
2999 (s390_emit_litpool): New function.
3000 (s390_emit_const): New function.
3001 (s390_emit_call): New function.
3002 (s390_emit_reg): New function.
3003 (s390_emit_pop): New function.
3004 (s390_emit_stack_flush): New function.
3005 (s390_emit_zero_ext): New function.
3006 (s390_emit_swap): New function.
3007 (s390_emit_stack_adjust): New function.
3008 (s390_emit_set_r2): New function.
3009 (s390_emit_int_call_1): New function.
3010 (s390_emit_void_call_2): New function.
3011 (s390_emit_eq_goto): New function.
3012 (s390_emit_ne_goto): New function.
3013 (s390_emit_lt_goto): New function.
3014 (s390_emit_le_goto): New function.
3015 (s390_emit_gt_goto): New function.
3016 (s390_emit_ge_goto): New function.
3017 (s390x_emit_prologue): New function.
3018 (s390x_emit_epilogue): New function.
3019 (s390x_emit_add): New function.
3020 (s390x_emit_sub): New function.
3021 (s390x_emit_mul): New function.
3022 (s390x_emit_lsh): New function.
3023 (s390x_emit_rsh_signed): New function.
3024 (s390x_emit_rsh_unsigned): New function.
3025 (s390x_emit_ext): New function.
3026 (s390x_emit_log_not): New function.
3027 (s390x_emit_bit_and): New function.
3028 (s390x_emit_bit_or): New function.
3029 (s390x_emit_bit_xor): New function.
3030 (s390x_emit_bit_not): New function.
3031 (s390x_emit_equal): New function.
3032 (s390x_emit_less_signed): New function.
3033 (s390x_emit_less_unsigned): New function.
3034 (s390x_emit_ref): New function.
3035 (s390x_emit_if_goto): New function.
3036 (s390x_emit_const): New function.
3037 (s390x_emit_call): New function.
3038 (s390x_emit_reg): New function.
3039 (s390x_emit_pop): New function.
3040 (s390x_emit_stack_flush): New function.
3041 (s390x_emit_zero_ext): New function.
3042 (s390x_emit_swap): New function.
3043 (s390x_emit_stack_adjust): New function.
3044 (s390x_emit_int_call_1): New function.
3045 (s390x_emit_void_call_2): New function.
3046 (s390x_emit_eq_goto): New function.
3047 (s390x_emit_ne_goto): New function.
3048 (s390x_emit_lt_goto): New function.
3049 (s390x_emit_le_goto): New function.
3050 (s390x_emit_gt_goto): New function.
3051 (s390x_emit_ge_goto): New function.
3052 (s390_emit_ops): New function.
3053 (struct linux_target_ops): Fill in emit_ops hook.
3054
3055 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3056
3057 PR 18377
3058 * Makefile.in: Add s390 IPA files.
3059 * configure.srv: Build IPA for s390.
3060 * linux-s390-ipa.c: New file.
3061 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3062 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3063 (tdesc_s390_linux32): Likewise.
3064 (init_registers_s390_linux32v1): Likewise.
3065 (tdesc_s390_linux32v1): Likewise.
3066 (init_registers_s390_linux32v2): Likewise.
3067 (tdesc_s390_linux32v2): Likewise.
3068 (init_registers_s390_linux64): Likewise.
3069 (tdesc_s390_linux64): Likewise.
3070 (init_registers_s390_linux64v1): Likewise.
3071 (tdesc_s390_linux64v1): Likewise.
3072 (init_registers_s390_linux64v2): Likewise.
3073 (tdesc_s390_linux64v2): Likewise.
3074 (init_registers_s390_te_linux64): Likewise.
3075 (tdesc_s390_te_linux64): Likewise.
3076 (init_registers_s390_vx_linux64): Likewise.
3077 (tdesc_s390_vx_linux64): Likewise.
3078 (init_registers_s390_tevx_linux64): Likewise.
3079 (tdesc_s390_tevx_linux64): Likewise.
3080 (init_registers_s390x_linux64): Likewise.
3081 (tdesc_s390x_linux64): Likewise.
3082 (init_registers_s390x_linux64v1): Likewise.
3083 (tdesc_s390x_linux64v1): Likewise.
3084 (init_registers_s390x_linux64v2): Likewise.
3085 (tdesc_s390x_linux64v2): Likewise.
3086 (init_registers_s390x_te_linux64): Likewise.
3087 (tdesc_s390x_te_linux64): Likewise.
3088 (init_registers_s390x_vx_linux64): Likewise.
3089 (tdesc_s390x_vx_linux64): Likewise.
3090 (init_registers_s390x_tevx_linux64): Likewise.
3091 (tdesc_s390x_tevx_linux64): Likewise.
3092 (have_hwcap_s390_vx): New static variable.
3093 (s390_arch_setup): Fill have_hwcap_s390_vx.
3094 (s390_get_thread_area): New function.
3095 (s390_ft_entry_gpr_esa): New const.
3096 (s390_ft_entry_gpr_zarch): New const.
3097 (s390_ft_entry_misc): New const.
3098 (s390_ft_entry_fr): New const.
3099 (s390_ft_entry_vr): New const.
3100 (s390_ft_main_31): New const.
3101 (s390_ft_main_64): New const.
3102 (s390_ft_exit_fr): New const.
3103 (s390_ft_exit_vr): New const.
3104 (s390_ft_exit_misc): New const.
3105 (s390_ft_exit_gpr_esa): New const.
3106 (s390_ft_exit_gpr_zarch): New const.
3107 (append_insns): New function.
3108 (s390_relocate_instruction): New function.
3109 (s390_install_fast_tracepoint_jump_pad): New function.
3110 (s390_get_min_fast_tracepoint_insn_len): New function.
3111 (s390_get_ipa_tdesc_idx): New function.
3112 (struct linux_target_ops): Wire in the above functions.
3113 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3114 * linux-s390-tdesc.h: New file.
3115
3116 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3117
3118 * linux-s390-low.c (s390_supports_tracepoints): New function.
3119 (struct linux_target_ops): Fill supports_tracepoints hook.
3120
3121 2016-03-18 Yao Qi <yao.qi@linaro.org>
3122
3123 * linux-low.c (lwp_signal_can_be_delivered): New function.
3124 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3125
3126 2016-03-18 Yao Qi <yao.qi@linaro.org>
3127
3128 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3129 0 if signal is enqueued. Remove 'signal' from one debugging
3130 message. Move one debugging message to some lines below.
3131 Remove code setting 'signal' to 0.
3132
3133 2016-03-18 Yao Qi <yao.qi@linaro.org>
3134
3135 * linux-low.c (linux_low_filter_event): Remove redundant
3136 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3137
3138 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3139
3140 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3141 (struct linux_target_ops): Wire in the above.
3142
3143 2016-03-03 Yao Qi <yao.qi@linaro.org>
3144
3145 * linux-low.c: Update comments to start_step_over.
3146
3147 2016-03-03 Yao Qi <yao.qi@linaro.org>
3148
3149 PR server/19736
3150 * linux-low.c (handle_extended_wait): Set child suspended
3151 if event_lwp->bp_reinsert isn't zero.
3152
3153 2016-03-02 Yao Qi <yao.qi@linaro.org>
3154
3155 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3156 enqueue_pending_signal.
3157
3158 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3159
3160 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3161 is actually loaded.
3162
3163 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3164
3165 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3166 (s390_regmap_3264) [!__s390x__]: New global.
3167 (s390_collect_ptrace_register): Skip map entries containing -1.
3168 (s390_supply_ptrace_register): Ditto.
3169 (s390_fill_gprs_high): New function.
3170 (s390_store_gprs_high): New function.
3171 (s390_regsets): Add NT_S390_HIGH_GPRS.
3172 (s390_get_hwcap): Enable on 31-bit.
3173 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3174 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3175 Detect NT_S390_HIGH_GPRS.
3176 (s390_usrregs_info_3264): Enable on 31-bit.
3177 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3178 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3179
3180 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3181
3182 PR gdb/13808
3183 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3184 * configure.srv: Ditto.
3185 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3186 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3187 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3188 (init_registers_amd64_linux): Remove prototype.
3189 (tdesc_amd64_linux): Remove declaration.
3190 (get_ipa_tdesc): New function.
3191 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3192 initialize remaining tdescs.
3193 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3194 (init_registers_i386_linux): Remove prototype.
3195 (tdesc_i386_linux): Remove declaration.
3196 (get_ipa_tdesc): New function.
3197 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3198 initialize remaining tdescs.
3199 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3200 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3201 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3202 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3203 (x86_get_ipa_tdesc_idx): New function.
3204 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3205 * linux-x86-tdesc.h: New file.
3206 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3207 (target_get_ipa_tdesc_idx): New macro.
3208 * tracepoint.c (ipa_tdesc_idx): New macro.
3209 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3210 (symbol_list): Add ipa_tdesc_idx.
3211 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3212 (ipa_tdesc): Remove.
3213 (ipa_tdesc_idx): New variable.
3214 (get_context_regcache): Use get_ipa_tdesc.
3215 (gdb_collect): Ditto.
3216 (gdb_probe): Ditto.
3217 * tracepoint.h (get_ipa_tdesc): New prototype.
3218 (ipa_tdesc): Remove.
3219
3220 2016-02-24 Pedro Alves <palves@redhat.com>
3221
3222 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3223 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3224 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3225 Factor out common code between the USE_SIGTRAP_SIGINFO and
3226 !USE_SIGTRAP_SIGINFO blocks.
3227 (linux_low_filter_event): Call save_stop_reason instead of
3228 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3229 Update comments.
3230 (linux_wait_1): Update comments.
3231
3232 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3233
3234 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3235 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3236 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3237 ppc_insert_point, ppc_remove_point.
3238
3239 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3240
3241 * linux-s390-low.c (s390_supports_z_point_type): New function.
3242 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3243
3244 2016-02-16 Yao Qi <yao.qi@linaro.org>
3245
3246 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3247 PC. Get pc from regcache_read_pc.
3248
3249 2016-02-12 Yao Qi <yao.qi@linaro.org>
3250
3251 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3252 or linux_get_pc_32bit.
3253 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3254
3255 2016-02-12 Yao Qi <yao.qi@linaro.org>
3256
3257 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3258 arm_linux_get_next_pcs_fixup.
3259
3260 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3261
3262 * tracepoint.c (x_tracepoint_action_download): Change
3263 write_inferior_data_ptr to write_inferior_data_pointer.
3264 (cmd_qtstart): Likewise.
3265 (write_inferior_data_ptr): Remove.
3266 (download_agent_expr): Change write_inferior_data_ptr to
3267 write_inferior_data_pointer.
3268 (download_tracepoint_1): Likewise.
3269 (download_tracepoint): Likewise.
3270 (download_trace_state_variables): Likewise.
3271
3272 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3273 Marcin Kościelnicki <koriakin@0x04.net>
3274
3275 * tracepoint.c (struct tracepoint_action_ops): Remove.
3276 (struct tracepoint_action): Remove ops.
3277 (m_tracepoint_action_download, r_tracepoint_action_download)
3278 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3279 size and offset accordingly.
3280 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3281 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3282 (tracepoint_action_send, tracepoint_action_download): New functions.
3283 Helpers for trace action handlers.
3284 (add_tracepoint_action): Remove setup actions ops.
3285 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3286
3287 2016-02-10 Yao Qi <yao.qi@linaro.org>
3288
3289 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3290
3291 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3292
3293 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3294 to AC_OUTPUT.
3295 * configure: Regenerate.
3296
3297 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3298
3299 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3300 void * to gdb_byte *.
3301 * linux-low.c (siginfo_fixup): Likewise.
3302 (linux_xfer_siginfo): Likewise.
3303 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3304 Likewise.
3305 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3306
3307 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3308
3309 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3310 to srv_tgtobj.
3311 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3312 to srv_tgtobj.
3313 * linux-x86-low.c [__x86_64__]: Include
3314 "nat/amd64-linux-siginfo.h".
3315 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3316 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3317 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3318 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3319 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3320 (cpt_si_fd, si_timerid, si_overrun): Move from
3321 nat/amd64-linux-siginfo.c.
3322 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3323
3324 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3325
3326 * server.c (skip_to_semicolon): Remove.
3327 (process_point_options): Use strchrnul instead of
3328 skip_to_semicolon.
3329
3330 2016-01-26 Yao Qi <yao.qi@linaro.org>
3331
3332 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3333 * linux-low.c (install_software_single_step_breakpoints): Don't
3334 call regcache_read_pc.
3335 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3336 argument pc.
3337
3338 2016-01-26 Yao Qi <yao.qi@linaro.org>
3339
3340 * linux-low.c (install_software_single_step_breakpoints): Call
3341 regcache_read_pc instead of get_pc.
3342
3343 2016-01-26 Yao Qi <yao.qi@linaro.org>
3344
3345 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3346 (unblock_async_io): Rename to ...
3347 (block_unblock_async_io): ... it. New function.
3348 (enable_async_io): Don't install SIGIO handler. Unblock it
3349 instead.
3350 (disable_async_io): Don't ignore SIGIO. Block it instead.
3351 (initialize_async_io): Install SIGIO handler. Don't call
3352 unblock_async_io.
3353
3354 2016-01-26 Yao Qi <yao.qi@linaro.org>
3355
3356 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3357 first character is '\003', call *the_target->request_interrupt.
3358
3359 2016-01-25 Yao Qi <yao.qi@linaro.org>
3360
3361 * remote-utils.c (new_thread_notify): Remove.
3362 (dead_thread_notify): Likewise.
3363 * remote-utils.h (new_thread_notify): Remove declaration.
3364 (dead_thread_notify): Likewise.
3365
3366 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3367
3368 * gdb.trace/pending.exp: Fix expected message on continue.
3369
3370 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3371
3372 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3373 it works properly on big-endian machines where sizeof (CORE_ADDR)
3374 != sizeof (void *).
3375
3376 2016-01-21 Pedro Alves <palves@redhat.com>
3377
3378 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3379 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3380 * configure: Regenerate.
3381
3382 2016-01-21 Yao Qi <yao.qi@linaro.org>
3383
3384 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3385 is_thumb and set it according to CPSR saved on the stack.
3386 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3387 arm_sigreturn_next_pc.
3388
3389 2016-01-18 Yao Qi <yao.qi@linaro.org>
3390
3391 * linux-low.c (linux_set_pc_64bit): New function.
3392 (linux_get_pc_64bit): New function.
3393 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3394 Declare.
3395 * linux-sparc-low.c (debug_threads): Remove declaration.
3396 (sparc_get_pc): Remove.
3397 (the_low_target): Use linux_get_pc_64bit instead of
3398 sparc_get_pc.
3399 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3400 (the_low_target): Use linux_get_pc_64bit and
3401 linux_set_pc_64bit.
3402
3403 2016-01-18 Yao Qi <yao.qi@linaro.org>
3404
3405 * linux-arm-low.c (debug_threads): Remove declaration.
3406 (arm_get_pc, arm_set_pc): Remove.
3407 (the_low_target): Use linux_get_pc_32bit and
3408 linux_set_pc_32bit.
3409 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3410 (the_low_target): Use linux_get_pc_32bit and
3411 linux_set_pc_32bit.
3412 * linux-cris-low.c (debug_threads): Remove declaration.
3413 (cris_get_pc, cris_set_pc,): Remove.
3414 (the_low_target): Use linux_get_pc_32bit and
3415 linux_set_pc_32bit.
3416 * linux-crisv32-low.c (debug_threads): Remove declaration.
3417 (cris_get_pc, cris_set_pc): Remove.
3418 (the_low_target): Use linux_get_pc_32bit and
3419 linux_set_pc_32bit.
3420 * linux-low.c: Include inttypes.h.
3421 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3422 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3423 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3424 (the_low_target): Use linux_get_pc_32bit and
3425 linux_set_pc_32bit.
3426 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3427 (the_low_target): Use linux_get_pc_32bit and
3428 linux_set_pc_32bit.
3429 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3430 (the_low_target): Use linux_get_pc_32bit and
3431 linux_set_pc_32bit.
3432 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3433 (the_low_target): Use linux_get_pc_32bit and
3434 linux_set_pc_32bit.
3435 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3436 (the_low_target): Use linux_get_pc_32bit and
3437 linux_set_pc_32bit.
3438
3439 2016-01-18 Gary Benson <gbenson@redhat.com>
3440
3441 * configure.ac (AC_FUNC_FORK): New check.
3442 * config.in: Regenerate.
3443 * configure: Likewise.
3444
3445 2016-01-14 Yao Qi <yao.qi@linaro.org>
3446
3447 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3448 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3449 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3450 arm_get_next_pcs_ctor.
3451
3452 2016-01-12 Josh Stone <jistone@redhat.com>
3453 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3454
3455 * inferiors.h: Include "gdb_vecs.h".
3456 (struct process_info): Add syscalls_to_catch.
3457 * inferiors.c (remove_process): Free syscalls_to_catch.
3458 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3459 syscall_return stops.
3460 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3461 * server.c (handle_general_set): Handle QCatchSyscalls.
3462 (handle_query): Report support for QCatchSyscalls.
3463 * target.h (struct target_ops): Add supports_catch_syscall.
3464 (target_supports_catch_syscall): New macro.
3465 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3466 (struct lwp_info): Add syscall_state.
3467 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3468 Maintain syscall_state and syscalls_to_catch across exec.
3469 (get_syscall_trapinfo): New function, proxy to the_low_target.
3470 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3471 (linux_low_filter_event): Toggle syscall_state entry/return for
3472 syscall traps, and set it ignored for all others.
3473 (gdb_catching_syscalls_p): New function.
3474 (gdb_catch_this_syscall_p): New function.
3475 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3476 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3477 (linux_supports_catch_syscall): New function.
3478 (linux_target_ops): Install it.
3479 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3480 (the_low_target): Install it.
3481
3482 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3483
3484 * acinclude.m4: Include new ../warning.m4 file.
3485 * configure: Regenerated.
3486 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3487
3488 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3489
3490 * ax.c (is_goto_target): Mark static.
3491 * linux-low.c (register_addr): Likewise.
3492 (linux_fetch_registers, linux_store_registers): Likewise.
3493 * mem-break.c (any_persistent_commands): Fix old prototype.
3494 (add_commands_to_breakpoint): Mark static.
3495 * regcache.c (find_register_by_name): Delete unused func.
3496 * remote-utils.c (hex_or_minus_one): Mark static.
3497 * server.c (monitor_show_help): Mark static.
3498 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3499 handle_v_requests): Likewise.
3500
3501 2016-01-12 Pedro Alves <palves@redhat.com>
3502
3503 Remove use of the registered trademark symbol throughout.
3504
3505 2016-01-08 Yao Qi <yao.qi@linaro.org>
3506
3507 * remote-utils.c (getpkt): If c is '\003', call target hook
3508 request_interrupt.
3509
3510 2016-01-06 Yao Qi <yao.qi@linaro.org>
3511
3512 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3513 linux-aarch32-low.c.
3514 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3515 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3516 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3517 (thumb2_breakpoint): Declare.
3518 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3519 linux-aarch32-low.h.
3520 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3521 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3522 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3523
3524 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3525
3526 * gdbreplay.c (gdbreplay_version): Change copyright year in
3527 version message.
3528 * server.c (gdbserver_version): Likewise.
3529
3530 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3531
3532 * server.c (crc32_table): Delete.
3533 (crc32): Use libiberty's xcrc32 function.
3534
3535 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3536
3537 * lynx-low.c (lynx_delete_thread_callback): New function.
3538 (lynx_mourn): Properly delete our process and all of its
3539 threads. Remove call to clear_inferiors.
3540
3541 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3542
3543 * target.c (thread_search_callback): Add check that
3544 the thread_stopped target callback is not NULL before
3545 calling it.
3546
3547 2015-12-21 Yao Qi <yao.qi@linaro.org>
3548
3549 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3550 arm breakpoint.
3551
3552 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3553
3554 * server.c (handle_query): Call target_supports_software_single_step.
3555
3556 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3557
3558 * linux-low.c (single_step): New function.
3559 (linux_resume_one_lwp_throw): Call single_step.
3560 (start_step_over): Likewise.
3561
3562 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3563
3564 * Makefile.in (SFILES): Append arch/arm-linux.c,
3565 arch/arm-get-next-pcs.c.
3566 (arm-linux.o): New rule.
3567 (arm-get-next-pcs.o): New rule.
3568 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3569 arm-linux.o.
3570 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3571 to linux-aarch32-low.c.
3572 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3573 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3574 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3575 (thumb2_breakpoint_len): Likewise.
3576 (arm_is_thumb_mode): Make non-static.
3577 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3578 from linux-aarch32-low.c.
3579 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3580 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3581 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3582 (thumb2_breakpoint_len): Likewise.
3583 (arm_is_thumb_mode): New declaration.
3584 * linux-arm-low.c: Include arch/arm-linux.h
3585 aarch/arm-get-next-pcs.h, sys/syscall.h.
3586 (get_next_pcs_ops): New struct.
3587 (get_next_pcs_addr_bits_remove): New function.
3588 (get_next_pcs_is_thumb): New function.
3589 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3590 (arm_sigreturn_next_pc): Likewise.
3591 (get_next_pcs_syscall_next_pc): Likewise.
3592 (arm_gdbserver_get_next_pcs): Likewise.
3593 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3594 Initialize.
3595 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3596 * server.h: Include gdb_vecs.h.
3597
3598 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3599
3600 * Makefile.in (SFILES): Append common/common-regcache.c.
3601 (OBS): Append common-regcache.o.
3602 (common-regcache.o): New rule.
3603 * regcache.c (init_register_cache): Initialize cache to
3604 REG_UNAVAILABLE.
3605 (regcache_raw_read_unsigned): New function.
3606 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3607 register_status enum.
3608
3609 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3610
3611 * linux-aarch64-low.c (the_low_targets): Rename
3612 breakpoint_reinsert_addr to get_next_pcs.
3613 * linux-arm-low.c (the_low_targets): Likewise.
3614 * linux-bfin-low.c (the_low_targets): Likewise.
3615 * linux-cris-low.c (the_low_targets): Likewise.
3616 * linux-crisv32-low.c (the_low_targets): Likewise.
3617 * linux-low.c (can_software_single_step): Likewise.
3618 (install_software_single_step_breakpoints): New function.
3619 (start_step_over): Use install_software_single_step_breakpoints.
3620 * linux-low.h: New CORE_ADDR vector.
3621 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3622 get_next_pcs.
3623 * linux-mips-low.c (the_low_targets): Likewise.
3624 * linux-nios2-low.c (the_low_targets): Likewise.
3625 * linux-sparc-low.c (the_low_targets): Likewise.
3626
3627 2015-12-17 Pedro Alves <palves@redhat.com>
3628
3629 * linux-low.c (linux_kill_one_lwp): Remove references to
3630 LinuxThreads.
3631 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3632 to 'kill'.
3633 (linux_init_signals): Delete.
3634 (initialize_low): Adjust.
3635 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3636
3637 2015-12-16 Pedro Alves <palves@redhat.com>
3638
3639 * configure.ac (compiler warning flags): When testing a
3640 -Wno-foo option, check whether -Wfoo works instead.
3641 * configure: Regenerate.
3642
3643 2015-12-11 Don Breazeal <donb@codesourcery.com>
3644
3645 * server.c (process_serial_event): Don't exit from gdbserver
3646 in remote mode if there are still active inferiors.
3647
3648 2015-12-11 Yao Qi <yao.qi@linaro.org>
3649
3650 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3651 arm_breakpoint_at if the process is 32-bit.
3652
3653 2015-12-11 Yao Qi <yao.qi@linaro.org>
3654
3655 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3656 arm breakpoint.
3657
3658 2015-12-07 Yao Qi <yao.qi@linaro.org>
3659
3660 * configure.srv: Append arm.o to srv_tgtobj for
3661 aarch64*-*-linux* target.
3662 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3663 from linux-arm-low.c.
3664 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3665 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3666 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3667 (thumb2_breakpoint_len): Likewise.
3668 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3669 (arm_breakpoint_kinds): Likewise.
3670 (arm_breakpoint_kind_from_pc): Likewise.
3671 (arm_sw_breakpoint_from_kind): Likewise.
3672 (arm_breakpoint_kind_from_current_state): Likewise.
3673 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3674 (arm_sw_breakpoint_from_kind): Declare.
3675 (arm_breakpoint_kind_from_current_state): Declare.
3676 (arm_breakpoint_at): Declare.
3677 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3678 arm_sw_breakpoint_from_kind if process is 32-bit.
3679 (aarch64_breakpoint_kind_from_pc): New function.
3680 (aarch64_breakpoint_kind_from_current_state): New function.
3681 (the_low_target): Initialize fields breakpoint_kind_from_pc
3682 and breakpoint_kind_from_current_state.
3683 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3684 linux-aarch32-low.c.
3685 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3686 (arm_breakpoint, arm_breakpoint_len): Likewise.
3687 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3688 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3689 (arm_is_thumb_mode): Likewise.
3690 (arm_breakpoint_at): Likewise.
3691 (arm_breakpoint_kind_from_pc): Likewise.
3692 (arm_sw_breakpoint_from_kind): Likewise.
3693 (arm_breakpoint_kind_from_current_state): Likewise.
3694
3695 Revert:
3696 2015-08-04 Yao Qi <yao.qi@linaro.org>
3697
3698 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3699 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3700 * server.c (extended_protocol): Remove "static".
3701 * server.h (extended_protocol): Declare it.
3702
3703 2015-12-04 Josh Stone <jistone@redhat.com>
3704
3705 * target.h (struct target_ops) <arch_setup>: Rename to ...
3706 (struct target_ops) <post_create_inferior>: ... this.
3707 (target_arch_setup): Rename to ...
3708 (target_post_create_inferior): ... this, calling post_create_inferior.
3709 * server.c (start_inferior): Update target_arch_setup calls to
3710 target_post_create_inferior.
3711 * linux-low.c (linux_low_ptrace_options): Forward declare.
3712 (linux_arch_setup): Update its comment for general use.
3713 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3714 (struct linux_target_ops): Use linux_post_create_inferior.
3715 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3716 to post_create_inferior.
3717 * nto-low.c (struct nto_target_ops): Likewise.
3718 * spu-low.c (struct spu_target_ops): Likewise.
3719 * win32-low.c (struct win32_target_ops): Likewise.
3720
3721 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3722
3723 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3724
3725 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3726
3727 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3728 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3729 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3730 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3731 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3732 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3733 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3734 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3735 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3736 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3737 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3738 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3739
3740 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3741
3742 * linux-low.c (linux_look_up_symbols): Don't call
3743 linux_supports_traceclone.
3744 * linux-low.h (thread_db_init): Remove use_events argument.
3745 * thread-db.c (thread_db_use_event): Remove global variable.
3746 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3747 (struct thread_db) <td_create_bp>: Remove field.
3748 (thread_db_create_event): Remove function.
3749 (thread_db_enable_reporting): Likewise.
3750 (find_one_thread): Don't check for thread_db_use_events.
3751 (attach_thread): Likewise.
3752 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3753 (try_thread_db_load_1): Don't check for thread_db_use_events.
3754 (thread_db_init): Remove use_events argument and thread events
3755 handling.
3756 (remove_thread_event_breakpoints): Remove function.
3757 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3758
3759 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3760
3761 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3762 New function.
3763 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3764 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3765 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3766 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3767 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3768 Initialize.
3769 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3770 New function.
3771 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3772 * linux-low.c (can_hardware_single_step): Use
3773 supports_hardware_single_step.
3774 (can_software_single_step): New function.
3775 (start_step_over): Call can_software_single_step.
3776 (linux_supports_hardware_single_step): New function.
3777 (struct target_ops) <supports_software_single_step>: Initialize.
3778 * linux-low.h (struct linux_target_ops)
3779 <supports_hardware_single_step>: Initialize.
3780 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3781 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3782 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3783 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3784 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3785 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3786 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3787 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3788 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3789 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3790 Initialize.
3791 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3792 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3793 Initialize.
3794 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3795 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3796 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3797 New function.
3798 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3799 * target.h (struct target_ops): <supports_software_single_step>:
3800 New field.
3801 (target_supports_software_single_step): New macro.
3802
3803 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3804
3805 * linux-low.c (linux_wait_1): Fix pc advance condition.
3806 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3807 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3808
3809 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3810
3811 * linux-arm-low.c (arm_is_thumb_mode): New function.
3812 (arm_breakpoint_at): Use arm_is_thumb_mode.
3813 (arm_breakpoint_kind_from_current_state): New function.
3814 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3815 Initialize.
3816 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3817 (linux_breakpoint_kind_from_current_state): New function.
3818 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3819 * linux-low.h (struct linux_target_ops)
3820 <breakpoint_kind_from_current_state>: New field.
3821 * target.h (struct target_ops): Likewise.
3822 (target_breakpoint_kind_from_current_state): New macro.
3823
3824 2015-11-30 Pedro Alves <palves@redhat.com>
3825
3826 * linux-low.c (linux_resume): Wake up the event loop before
3827 returning.
3828
3829 2015-11-30 Pedro Alves <palves@redhat.com>
3830
3831 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3832 check.
3833 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3834 to -1.
3835 * target.c (struct thread_search): New structure.
3836 (thread_search_callback): New function.
3837 (prev_general_thread): New global.
3838 (prepare_to_access_memory, done_accessing_memory): New functions.
3839 * target.h (prepare_to_access_memory, done_accessing_memory):
3840 Replace macros with function declarations.
3841
3842 2015-11-30 Pedro Alves <palves@redhat.com>
3843
3844 PR 14618
3845 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3846 report TARGET_WAITKIND_NO_RESUMED.
3847 * remote-utils.c (prepare_resume_reply): Handle
3848 TARGET_WAITKIND_NO_RESUMED.
3849 * server.c (report_no_resumed): New global.
3850 (handle_query) <qSupported>: Handle "no-resumed+". Report
3851 "no-resumed+" support.
3852 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3853 return error if the client doesn't support no-resumed events.
3854 (push_stop_notification): New function.
3855 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3856 events if the client supports them.
3857
3858 2015-11-30 Pedro Alves <palves@redhat.com>
3859
3860 * linux-low.c (thread_still_has_status_pending_p): Don't check
3861 vCont;t here.
3862 (lwp_resumed): New function.
3863 (status_pending_p_callback): Return early if the LWP is not
3864 supposed to be resumed.
3865
3866 2015-11-30 Pedro Alves <palves@redhat.com>
3867
3868 * linux-low.c (handle_extended_wait): Assert that the LWP's
3869 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3870 thread create events, leave the new child's status pending.
3871 (linux_low_filter_event): If GDB wants to hear about thread exit
3872 events, leave the LWP marked dead and don't delete it.
3873 (linux_wait_for_event_filtered): Don't check for thread exit.
3874 (filter_exit_event): New function.
3875 (linux_wait_1): Use it, when returning an exit event.
3876 (linux_resume_one_lwp_throw): Assert that the LWP's
3877 waitstatus is TARGET_WAITKIND_IGNORE.
3878 * remote-utils.c (prepare_resume_reply): Handle
3879 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3880 * server.c (report_thread_events): New global.
3881 (handle_general_set): Handle QThreadEvents.
3882 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3883 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3884 TARGET_WAITKIND_THREAD_EXITED.
3885 * server.h (report_thread_events): Declare.
3886
3887 2015-11-30 Pedro Alves <palves@redhat.com>
3888
3889 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3890 the thread's last_resume_kind was resume_stop.
3891
3892 2015-11-30 Pedro Alves <palves@redhat.com>
3893
3894 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3895 before returning.
3896
3897 2015-11-30 Pedro Alves <palves@redhat.com>
3898
3899 * server.c (handle_v_requests): Handle vCtrlC.
3900
3901 2015-11-30 Pedro Alves <palves@redhat.com>
3902
3903 * gdbthread.h (find_any_thread_of_pid): Declare.
3904 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3905 functions.
3906 * server.c (handle_query): If current_thread is NULL, look for
3907 another thread of the selected process.
3908
3909 2015-11-26 Daniel Colascione <dancol@dancol.org>
3910 Simon Marchi <simon.marchi@ericsson.com>
3911
3912 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3913 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3914 name in reply.
3915 * target.h (struct target_ops) <thread_name>: New field.
3916 (target_thread_name): New macro.
3917
3918 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3919
3920 * regcache.h (regcache_invalidate_pid): Add declaration.
3921 * regcache.c (regcache_invalidate_pid): New function, extracted
3922 from regcache_invalidate.
3923 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3924 Add trivial documentation comment.
3925 * lynx-low.c: Use regcache_invalidate_pid instead of
3926 regcache_invalidate.
3927
3928 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3929
3930 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3931 and Elf64_auxv_t if the target is Android.
3932
3933 2015-11-22 Doug Evans <xdje42@gmail.com>
3934
3935 * target.h: #include <sys/types.h>.
3936
3937 2015-11-19 Pedro Alves <palves@redhat.com>
3938
3939 * linux-low.c (linux_process_qsupported): Change prototype.
3940 Adjust.
3941 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3942 Change prototype.
3943 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3944 and adjust to loop over all features.
3945 * server.c (handle_query) <qSupported>: Adjust to call
3946 target_process_qsupported once, passing it a vector of unprocessed
3947 features.
3948 * target.h (struct target_ops) <process_qsupported>: Change
3949 prototype.
3950 (target_process_qsupported): Adjust.
3951
3952 2015-11-19 Pedro Alves <palves@redhat.com>
3953
3954 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3955 mode.
3956 * configure: Regenerate.
3957
3958 2015-11-19 Pedro Alves <palves@redhat.com>
3959
3960 * configure: Regenerate.
3961
3962 2015-11-19 Yao Qi <yao.qi@linaro.org>
3963
3964 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3965 type to uint32_t.
3966
3967 2015-11-19 Yao Qi <yao.qi@linaro.org>
3968
3969 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3970 (struct aarch64_operand): Move enum out.
3971
3972 2015-11-19 Yao Qi <yao.qi@linaro.org>
3973
3974 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3975 struct user_fpsimd_state *.
3976 (aarch64_store_fpregset): Likewise.
3977
3978 2015-11-19 Yao Qi <yao.qi@linaro.org>
3979
3980 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3981 struct user_pt_regs *.
3982 (aarch64_store_gregset): Likewise.
3983
3984 2015-11-18 Pedro Alves <palves@redhat.com>
3985
3986 * Makefile.in (all_object_files): Add $IPA_OBJS.
3987
3988 2015-11-17 Pedro Alves <palves@redhat.com>
3989
3990 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3991 GDB_SIGNAL_0 and gdb_signal_to_string.
3992
3993 2015-11-17 Pedro Alves <palves@redhat.com>
3994
3995 * win32-low.c (handle_output_debug_string): Remove parameter.
3996 (win32_kill): Remove our_status local and adjust call to
3997 handle_output_debug_string.
3998 (get_child_debug_event): Adjust call to
3999 handle_output_debug_string.
4000
4001 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4002
4003 * linux-mips-low.c (mips_fill_gregset): Add cast.
4004 (mips_store_gregset): Likewise.
4005 (mips_fill_fpregset): Likewise.
4006 (mips_store_fpregset): Likewise.
4007
4008 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4009
4010 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4011 priv.
4012
4013 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4014
4015 * linux-mips-low.c (mips_linux_new_thread): Change type of
4016 watch_type to enum target_hw_bp_type.
4017
4018 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4019
4020 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4021 Change return type to arm_hwbp_type.
4022
4023 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4024
4025 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4026 (arm_store_gregset): Likewise.
4027 * linux-arm-low.c (arm_get_hwcap): Likewise.
4028 (arm_read_description): Likewise.
4029
4030 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4031
4032 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4033
4034 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4035
4036 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4037 (ppc_fill_vsxregset): Likewise.
4038 (ppc_store_vsxregset): Likewise.
4039 (ppc_fill_vrregset): Likewise.
4040 (ppc_store_vrregset): Likewise.
4041 (ppc_fill_evrregset): Likewise.
4042 (ppc_store_evrregset): Likewise.
4043
4044 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4045
4046 * linux-ppc-low.c (ppc_usrregs_info): Remove
4047 forward-declaration.
4048 (ppc_arch_setup): Move lower in file.
4049
4050 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4051
4052 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4053 (ps_pdwrite): Likewise.
4054
4055 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4056
4057 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4058 to after assert checks.
4059
4060 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4061
4062 * proc-service.c (ps_pdread): Add/adjust casts.
4063 (ps_pdwrite): Add/adjust casts.
4064
4065 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4066
4067 * server.c (handle_search_memory_1): Cast return value of
4068 memmem.
4069
4070 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4071
4072 * server.c (write_qxfer_response): Change type of data to
4073 gdb_byte *.
4074
4075 2015-10-29 Pedro Alves <palves@redhat.com>
4076
4077 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4078
4079 2015-10-29 Pedro Alves <palves@redhat.com>
4080
4081 * tracepoint.c (clear_installed_tracepoints): Add casts.
4082
4083 2015-10-29 Pedro Alves <palves@redhat.com>
4084
4085 * server.c (handle_v_cont, process_serial_event): Add enum
4086 gdb_signal casts to signal parsing code.
4087
4088 2015-10-29 Pedro Alves <palves@redhat.com>
4089
4090 * linux-low.h (NULL_REGSET): Define.
4091 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4092 * linux-arm-low.c (arm_regsets): Likewise.
4093 * linux-crisv32-low.c (cris_regsets): Likewise.
4094 * linux-m68k-low.c (m68k_regsets): Likewise.
4095 * linux-mips-low.c (mips_regsets): Likewise.
4096 * linux-nios2-low.c (nios2_regsets): Likewise.
4097 * linux-ppc-low.c (ppc_regsets): Likewise.
4098 * linux-s390-low.c (s390_regsets): Likewise.
4099 * linux-sh-low.c (sh_regsets): Likewise.
4100 * linux-sparc-low.c (sparc_regsets): Likewise.
4101 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4102 * linux-tile-low.c (tile_regsets): Likewise.
4103 * linux-x86-low.c (x86_regsets): Likewise.
4104 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4105
4106 2015-10-29 Pedro Alves <palves@redhat.com>
4107
4108 * linux-low.h (NULL_REGSET): Define.
4109 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4110 * linux-arm-low.c (arm_regsets): Likewise.
4111 * linux-crisv32-low.c (cris_regsets): Likewise.
4112 * linux-m68k-low.c (m68k_regsets): Likewise.
4113 * linux-mips-low.c (mips_regsets): Likewise.
4114 * linux-nios2-low.c (nios2_regsets): Likewise.
4115 * linux-ppc-low.c (ppc_regsets): Likewise.
4116 * linux-s390-low.c (s390_regsets): Likewise.
4117 * linux-sh-low.c (sh_regsets): Likewise.
4118 * linux-sparc-low.c (sparc_regsets): Likewise.
4119 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4120 * linux-tile-low.c (tile_regsets): Likewise.
4121 * linux-x86-low.c (x86_regsets): Likewise.
4122 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4123
4124 2015-10-26 Doug Evans <dje@google.com>
4125
4126 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4127
4128 2015-10-26 Doug Evans <dje@google.com>
4129
4130 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4131
4132 2015-10-26 Doug Evans <dje@google.com>
4133
4134 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4135 for debug_printf.
4136 (attach_thread, find_new_threads_callback): Ditto.
4137
4138 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4139
4140 * mem-break.h (set_breakpoint_data): Remove.
4141
4142 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4143
4144 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4145 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4146 (initialize_low): Remove set_breakpoint_data call.
4147 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4148 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4149 (initialize_low): Remove set_breakpoint_data call.
4150 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4151 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4152 (initialize_low): Remove set_breakpoint_data call.
4153
4154 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4155
4156 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4157 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4158 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4159 * target.h (target_breakpoint_kind_from_pc): New macro.
4160
4161 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4162
4163 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4164 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4165 the default breakpoint kind.
4166
4167 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4168
4169 * linux-arm-low.c (arm_supports_z_point_type): Add software
4170 breakpoint support.
4171
4172 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4173
4174 * linux-arm-low.c: Refactor breakpoint definitions.
4175 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4176 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4177
4178 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4179
4180 * Makefile.in: Add arm.c/o.
4181 * configure.srv: Likewise.
4182 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4183 (arm_breakpoint_kind_from_pc): New function.
4184 (arm_sw_breakpoint_from_kind): Return proper kind.
4185 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4186
4187 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4188
4189 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4190 removal.
4191 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4192 (struct raw_breakpoint) <size>: Remove.
4193 (struct raw_breakpoint) <kind>: Add.
4194 (bp_size): New function.
4195 (bp_opcode): Likewise.
4196 (find_raw_breakpoint_at): Adjust for kind.
4197 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4198 (remove_memory_breakpoint): Adjust for kind call bp_size.
4199 (set_raw_breakpoint_at): Adjust for kind.
4200 (set_breakpoint): Likewise.
4201 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4202 (delete_raw_breakpoint): Adjust for kind.
4203 (delete_breakpoint): Likewise.
4204 (find_gdb_breakpoint): Likewise.
4205 (set_gdb_breakpoint_1): Likewise.
4206 (set_gdb_breakpoint): Likewise.
4207 (delete_gdb_breakpoint_1): Likewise.
4208 (delete_gdb_breakpoint): Likewise.
4209 (uninsert_raw_breakpoint): Likewise.
4210 (reinsert_raw_breakpoint): Likewise.
4211 (set_breakpoint_data): Remove.
4212 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4213 (check_mem_read): Adjust for kind call bp_size.
4214 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4215 (clone_one_breakpoint): Adjust for kind.
4216 * mem-break.h (set_gdb_breakpoint): Likewise.
4217 (delete_gdb_breakpoint): Likewise.
4218 * server.c (process_serial_event): Likewise.
4219
4220 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4221
4222 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4223 (struct linux_target_ops) <breakpoint>: Remove.
4224 (struct linux_target_ops) <breakpoint_len>: Remove.
4225 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4226 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4227 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4228 (arm_sw_breakpoint_from_kind): New function.
4229 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4230 (struct linux_target_ops) <breakpoint>: Remove.
4231 (struct linux_target_ops) <breakpoint_len>: Remove.
4232 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4233 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4234 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4235 (struct linux_target_ops) <breakpoint>: Remove.
4236 (struct linux_target_ops) <breakpoint_len>: Remove.
4237 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4238 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4239 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4240 (struct linux_target_ops) <breakpoint>: Remove.
4241 (struct linux_target_ops) <breakpoint_len>: Remove.
4242 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4243 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4244 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4245 and sw_breakpoint_from_kind to increment the pc.
4246 (linux_breakpoint_kind_from_pc): New function.
4247 (linux_sw_breakpoint_from_kind): New function.
4248 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4249 (initialize_low): Call breakpoint_kind_from_pc and
4250 sw_breakpoint_from_kind to replace breakpoint_data/len.
4251 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4252 New field.
4253 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4254 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4255 (struct linux_target_ops) <breakpoint>: Remove.
4256 (struct linux_target_ops) <breakpoint_len>: Remove.
4257 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4258 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4259 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4260 (struct linux_target_ops) <breakpoint>: Remove.
4261 (struct linux_target_ops) <breakpoint_len>: Remove.
4262 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4263 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4264 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4265 (struct linux_target_ops) <breakpoint>: Remove.
4266 (struct linux_target_ops) <breakpoint_len>: Remove.
4267 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4268 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4269 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4270 (struct linux_target_ops) <breakpoint>: Remove.
4271 (struct linux_target_ops) <breakpoint_len>: Remove.
4272 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4273 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4274 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4275 (struct linux_target_ops) <breakpoint>: Remove.
4276 (struct linux_target_ops) <breakpoint_len>: Remove.
4277 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4278 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4279 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4280 (struct linux_target_ops) <breakpoint>: Remove.
4281 (struct linux_target_ops) <breakpoint_len>: Remove.
4282 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4283 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4284 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4285 (struct linux_target_ops) <breakpoint>: Remove.
4286 (struct linux_target_ops) <breakpoint_len>: Remove.
4287 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4288 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4289 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4290 (struct linux_target_ops) <breakpoint>: Remove.
4291 (struct linux_target_ops) <breakpoint_len>: Remove.
4292 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4293 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4294 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4295 (struct linux_target_ops) <breakpoint>: Remove.
4296 (struct linux_target_ops) <breakpoint_len>: Remove.
4297 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4298 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4299 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4300 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4301 (struct linux_target_ops) <breakpoint>: Remove.
4302 (struct linux_target_ops) <breakpoint_len>: Remove.
4303 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4304 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4305 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4306 (struct linux_target_ops) <breakpoint>: Remove.
4307 (struct linux_target_ops) <breakpoint_len>: Remove.
4308 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4309 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4310
4311 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4312
4313 * linux-cris-low.c (cris_get_pc): Remove void arg.
4314
4315 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4316
4317 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4318 variable name.
4319
4320 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4321
4322 * inferiors.c (thread_pid_matches_callback): New function.
4323 (find_thread_process): New function.
4324 (remove_thread): Reset current_thread.
4325 (remove_process): Assert threads have been removed first.
4326
4327 2015-10-15 Yao Qi <yao.qi@linaro.org>
4328
4329 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4330 if it is 3.
4331 (aarch64_remove_point): Likewise.
4332 * regcache.c (regcache_register_size): New function.
4333
4334 2015-10-12 Yao Qi <yao.qi@linaro.org>
4335
4336 * linux-aarch64-low.c: Update all callers as emit_load_store
4337 is renamed to aarch64_emit_load_store.
4338
4339 2015-10-12 Yao Qi <yao.qi@linaro.org>
4340
4341 * linux-aarch64-low.c: Update all callers of function renaming
4342 from emit_insn to aarch64_emit_insn.
4343
4344 2015-10-12 Yao Qi <yao.qi@linaro.org>
4345
4346 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4347 arch/aarch64-insn.h.
4348 (struct aarch64_memory_operand): Likewise.
4349 (ENCODE): Likewise.
4350 (emit_insn): Move to arch/aarch64-insn.c.
4351 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4352 (emit_load_store): Move to arch/aarch64-insn.c.
4353 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4354 (can_encode_int32): Remove.
4355
4356 2015-10-12 Yao Qi <yao.qi@linaro.org>
4357
4358 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4359 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4360 (aarch64_relocate_instruction): Likewise.
4361 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4362 (struct aarch64_insn_visitor): Likewise.
4363
4364 2015-10-12 Yao Qi <yao.qi@linaro.org>
4365
4366 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4367 (struct aarch64_insn_visitor): New.
4368 (struct aarch64_insn_relocation_data): New.
4369 (aarch64_ftrace_insn_reloc_b): New function.
4370 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4371 (aarch64_ftrace_insn_reloc_cb): Likewise.
4372 (aarch64_ftrace_insn_reloc_tb): Likewise.
4373 (aarch64_ftrace_insn_reloc_adr): Likewise.
4374 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4375 (aarch64_ftrace_insn_reloc_others): Likewise.
4376 (visitor): New.
4377 (aarch64_relocate_instruction): Use visitor.
4378
4379 2015-10-12 Yao Qi <yao.qi@linaro.org>
4380
4381 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4382 int. Add argument buf.
4383 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4384 aarch64_relocate_instruction.
4385
4386 2015-10-12 Yao Qi <yao.qi@linaro.org>
4387
4388 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4389 argument insn. Remove local variable insn. Don't call
4390 target_read_uint32.
4391 (aarch64_install_fast_tracepoint_jump_pad): Call
4392 target_read_uint32.
4393
4394 2015-09-30 Yao Qi <yao.qi@linaro.org>
4395
4396 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4397 (emit_load_store_pair): Likewise.
4398
4399 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4400
4401 * dll.c (match_dll): Add cast(s).
4402 (unloaded_dll): Likewise.
4403 * linux-low.c (second_thread_of_pid_p): Likewise.
4404 (delete_lwp_callback): Likewise.
4405 (count_events_callback): Likewise.
4406 (select_event_lwp_callback): Likewise.
4407 (linux_set_resume_request): Likewise.
4408 * server.c (accumulate_file_name_length): Likewise.
4409 (emit_dll_description): Likewise.
4410 (handle_qxfer_threads_worker): Likewise.
4411 (visit_actioned_threads): Likewise.
4412 * thread-db.c (any_thread_of): Likewise.
4413 * tracepoint.c (same_process_p): Likewise.
4414 (match_blocktype): Likewise.
4415 (build_traceframe_info_xml): Likewise.
4416
4417 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4418
4419 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4420 assignment.
4421 (gdb_unparse_agent_expr): Likewise.
4422 * hostio.c (require_data): Likewise.
4423 (handle_pread): Likewise.
4424 * linux-low.c (disable_regset): Likewise.
4425 (fetch_register): Likewise.
4426 (store_register): Likewise.
4427 (get_dynamic): Likewise.
4428 (linux_qxfer_libraries_svr4): Likewise.
4429 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4430 (set_fast_tracepoint_jump): Likewise.
4431 (uninsert_fast_tracepoint_jumps_at): Likewise.
4432 (reinsert_fast_tracepoint_jumps_at): Likewise.
4433 (validate_inserted_breakpoint): Likewise.
4434 (clone_agent_expr): Likewise.
4435 * regcache.c (init_register_cache): Likewise.
4436 * remote-utils.c (putpkt_binary_1): Likewise.
4437 (decode_M_packet): Likewise.
4438 (decode_X_packet): Likewise.
4439 (look_up_one_symbol): Likewise.
4440 (relocate_instruction): Likewise.
4441 (monitor_output): Likewise.
4442 * server.c (handle_search_memory): Likewise.
4443 (handle_qxfer_exec_file): Likewise.
4444 (handle_qxfer_libraries): Likewise.
4445 (handle_qxfer): Likewise.
4446 (handle_query): Likewise.
4447 (handle_v_cont): Likewise.
4448 (handle_v_run): Likewise.
4449 (captured_main): Likewise.
4450 * target.c (write_inferior_memory): Likewise.
4451 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4452 * tracepoint.c (init_trace_buffer): Likewise.
4453 (add_tracepoint_action): Likewise.
4454 (add_traceframe): Likewise.
4455 (add_traceframe_block): Likewise.
4456 (cmd_qtdpsrc): Likewise.
4457 (cmd_qtdv): Likewise.
4458 (cmd_qtstatus): Likewise.
4459 (response_source): Likewise.
4460 (response_tsv): Likewise.
4461 (cmd_qtnotes): Likewise.
4462 (gdb_collect): Likewise.
4463 (initialize_tracepoint): Likewise.
4464
4465 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4466
4467 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4468 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4469 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4470 <NOP>: New.
4471 (enum aarch64_condition_codes): New enum.
4472 (w0): New static global.
4473 (fp): Likewise.
4474 (lr): Likewise.
4475 (struct aarch64_memory_operand) <type>: New
4476 MEMORY_OPERAND_POSTINDEX type.
4477 (postindex_memory_operand): New helper function.
4478 (emit_ret): New function.
4479 (emit_load_store_pair): New function, factored out of emit_stp
4480 with support for MEMORY_OPERAND_POSTINDEX.
4481 (emit_stp): Rewrite using emit_load_store_pair.
4482 (emit_ldp): New function.
4483 (emit_load_store): Likewise.
4484 (emit_ldr): Mention post-index instruction in comment.
4485 (emit_ldrh): New function.
4486 (emit_ldrb): New function.
4487 (emit_ldrsw): Mention post-index instruction in comment.
4488 (emit_str): Likewise.
4489 (emit_subs): New function.
4490 (emit_cmp): Likewise.
4491 (emit_and): Likewise.
4492 (emit_orr): Likewise.
4493 (emit_orn): Likewise.
4494 (emit_eor): Likewise.
4495 (emit_mvn): Likewise.
4496 (emit_lslv): Likewise.
4497 (emit_lsrv): Likewise.
4498 (emit_asrv): Likewise.
4499 (emit_mul): Likewise.
4500 (emit_sbfm): Likewise.
4501 (emit_sbfx): Likewise.
4502 (emit_ubfm): Likewise.
4503 (emit_ubfx): Likewise.
4504 (emit_csinc): Likewise.
4505 (emit_cset): Likewise.
4506 (emit_nop): Likewise.
4507 (emit_ops_insns): New helper function.
4508 (emit_pop): Likewise.
4509 (emit_push): Likewise.
4510 (aarch64_emit_prologue): New function.
4511 (aarch64_emit_epilogue): Likewise.
4512 (aarch64_emit_add): Likewise.
4513 (aarch64_emit_sub): Likewise.
4514 (aarch64_emit_mul): Likewise.
4515 (aarch64_emit_lsh): Likewise.
4516 (aarch64_emit_rsh_signed): Likewise.
4517 (aarch64_emit_rsh_unsigned): Likewise.
4518 (aarch64_emit_ext): Likewise.
4519 (aarch64_emit_log_not): Likewise.
4520 (aarch64_emit_bit_and): Likewise.
4521 (aarch64_emit_bit_or): Likewise.
4522 (aarch64_emit_bit_xor): Likewise.
4523 (aarch64_emit_bit_not): Likewise.
4524 (aarch64_emit_equal): Likewise.
4525 (aarch64_emit_less_signed): Likewise.
4526 (aarch64_emit_less_unsigned): Likewise.
4527 (aarch64_emit_ref): Likewise.
4528 (aarch64_emit_if_goto): Likewise.
4529 (aarch64_emit_goto): Likewise.
4530 (aarch64_write_goto_address): Likewise.
4531 (aarch64_emit_const): Likewise.
4532 (aarch64_emit_call): Likewise.
4533 (aarch64_emit_reg): Likewise.
4534 (aarch64_emit_pop): Likewise.
4535 (aarch64_emit_stack_flush): Likewise.
4536 (aarch64_emit_zero_ext): Likewise.
4537 (aarch64_emit_swap): Likewise.
4538 (aarch64_emit_stack_adjust): Likewise.
4539 (aarch64_emit_int_call_1): Likewise.
4540 (aarch64_emit_void_call_2): Likewise.
4541 (aarch64_emit_eq_goto): Likewise.
4542 (aarch64_emit_ne_goto): Likewise.
4543 (aarch64_emit_lt_goto): Likewise.
4544 (aarch64_emit_le_goto): Likewise.
4545 (aarch64_emit_gt_goto): Likewise.
4546 (aarch64_emit_ge_got): Likewise.
4547 (aarch64_emit_ops_impl): New static global variable.
4548 (aarch64_emit_ops): New target function, return
4549 &aarch64_emit_ops_impl.
4550 (struct linux_target_ops): Install it.
4551
4552 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4553
4554 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4555 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4556 aarch64-ipa.o.
4557 * linux-aarch64-ipa.c: New file.
4558 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4559 and endian.h.
4560 (aarch64_get_thread_area): New target method.
4561 (extract_signed_bitfield): New helper function.
4562 (aarch64_decode_ldr_literal): New function.
4563 (enum aarch64_opcodes): New enum.
4564 (struct aarch64_register): New struct.
4565 (struct aarch64_operand): New struct.
4566 (x0): New static global.
4567 (x1): Likewise.
4568 (x2): Likewise.
4569 (x3): Likewise.
4570 (x4): Likewise.
4571 (w2): Likewise.
4572 (ip0): Likewise.
4573 (sp): Likewise.
4574 (xzr): Likewise.
4575 (aarch64_register): New helper function.
4576 (register_operand): Likewise.
4577 (immediate_operand): Likewise.
4578 (struct aarch64_memory_operand): New struct.
4579 (offset_memory_operand): New helper function.
4580 (preindex_memory_operand): Likewise.
4581 (enum aarch64_system_control_registers): New enum.
4582 (ENCODE): New macro.
4583 (emit_insn): New helper function.
4584 (emit_b): New function.
4585 (emit_bcond): Likewise.
4586 (emit_cb): Likewise.
4587 (emit_tb): Likewise.
4588 (emit_blr): Likewise.
4589 (emit_stp): Likewise.
4590 (emit_ldp_q_offset): Likewise.
4591 (emit_stp_q_offset): Likewise.
4592 (emit_load_store): Likewise.
4593 (emit_ldr): Likewise.
4594 (emit_ldrsw): Likewise.
4595 (emit_str): Likewise.
4596 (emit_ldaxr): Likewise.
4597 (emit_stxr): Likewise.
4598 (emit_stlr): Likewise.
4599 (emit_data_processing_reg): Likewise.
4600 (emit_data_processing): Likewise.
4601 (emit_add): Likewise.
4602 (emit_sub): Likewise.
4603 (emit_mov): Likewise.
4604 (emit_movk): Likewise.
4605 (emit_mov_addr): Likewise.
4606 (emit_mrs): Likewise.
4607 (emit_msr): Likewise.
4608 (emit_sevl): Likewise.
4609 (emit_wfe): Likewise.
4610 (append_insns): Likewise.
4611 (can_encode_int32_in): New helper function.
4612 (aarch64_relocate_instruction): New function.
4613 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4614 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4615 (struct linux_target_ops): Install aarch64_get_thread_area,
4616 aarch64_install_fast_tracepoint_jump_pad and
4617 aarch64_get_min_fast_tracepoint_insn_len.
4618
4619 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4620
4621 * Makefile.in (aarch64-insn.o): New rule.
4622 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4623
4624 2015-09-21 Yao Qi <yao.qi@linaro.org>
4625
4626 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4627
4628 2015-09-21 Yao Qi <yao.qi@linaro.org>
4629
4630 * tracepoint.c (max_jump_pad_size): Remove.
4631
4632 2015-09-18 Yao Qi <yao.qi@linaro.org>
4633
4634 * linux-aarch64-low.c: Don't include sys/uio.h.
4635 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4636
4637 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4638
4639 * tracepoint.c (eval_result_type): Change prototype.
4640 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4641
4642 2015-09-15 Pedro Alves <palves@redhat.com>
4643
4644 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4645 Check whether to report exec events instead of checking whether
4646 multiprocess is enabled.
4647
4648 2015-09-15 Pedro Alves <palves@redhat.com>
4649
4650 PR remote/18965
4651 * remote-utils.c (prepare_resume_reply): Merge
4652 TARGET_WAITKIND_VFORK_DONE switch case with the
4653 TARGET_WAITKIND_FORKED case.
4654
4655 2015-09-15 Yao Qi <yao.qi@linaro.org>
4656
4657 * server.c (handle_query): Check string comparison using
4658 "else if" instead of "if".
4659
4660 2015-09-15 Yao Qi <yao.qi@linaro.org>
4661
4662 * server.c (vCont_supported): New global variable.
4663 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4664 matches. Append ";vContSupported+" to own_buf.
4665 (handle_v_requests): Append ";s;S" to own_buf if target supports
4666 hardware single step or vCont_supported is false.
4667 (capture_main): Set vCont_supported to zero.
4668
4669 2015-09-15 Yao Qi <yao.qi@linaro.org>
4670
4671 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4672 it to ...
4673 (linux_supports_hardware_single_step): ... New function.
4674 (linux_target_ops): Update.
4675 * lynx-low.c (lynx_target_ops): Set field
4676 supports_hardware_single_step to target_can_do_hardware_single_step.
4677 * nto-low.c (nto_target_ops): Likewise.
4678 * spu-low.c (spu_target_ops): Likewise.
4679 * win32-low.c (win32_target_ops): Likewise.
4680 * target.c (target_can_do_hardware_single_step): New function.
4681 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4682 Remove. <supports_hardware_single_step>: New field.
4683 (target_supports_conditional_breakpoints): Remove.
4684 (target_supports_hardware_single_step): New macro.
4685 (target_can_do_hardware_single_step): Declare.
4686 * server.c (handle_query): Use target_supports_hardware_single_step
4687 instead of target_supports_conditional_breakpoints.
4688
4689 2015-09-15 Yao Qi <yao.qi@linaro.org>
4690
4691 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4692 function.
4693 (struct linux_target_ops the_low_target): Install
4694 aarch64_linux_siginfo_fixup.
4695
4696 2015-09-11 Don Breazeal <donb@codesourcery.com>
4697 Luis Machado <lgustavo@codesourcery.com>
4698
4699 * linux-low.c (linux_mourn): Static declaration.
4700 (linux_arch_setup): Move in front of
4701 handle_extended_wait.
4702 (linux_arch_setup_thread): New function.
4703 (handle_extended_wait): Handle exec events. Call
4704 linux_arch_setup_thread. Make event_lwp argument a
4705 pointer-to-a-pointer.
4706 (check_zombie_leaders): Do not check stopped threads.
4707 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4708 (linux_low_filter_event): Add lwp and thread for exec'ing
4709 non-leader thread if leader thread has been deleted.
4710 Refactor code into linux_arch_setup_thread and call it.
4711 Pass child lwp pointer by reference to handle_extended_wait.
4712 (linux_wait_for_event_filtered): Update comment.
4713 (linux_wait_1): Prevent clobbering exec event status.
4714 (linux_supports_exec_events): New function.
4715 (linux_target_ops) <supports_exec_events>: Initialize new member.
4716 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4717 new member.
4718 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4719 * server.c (report_exec_events): New global variable.
4720 (handle_query): Handle qSupported query for exec-events feature.
4721 (captured_main): Initialize report_exec_events.
4722 * server.h (report_exec_events): Declare new global variable.
4723 * target.h (struct target_ops) <supports_exec_events>: New
4724 member.
4725 (target_supports_exec_events): New macro.
4726 * win32-low.c (win32_target_ops) <supports_exec_events>:
4727 Initialize new member.
4728
4729 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4730
4731 * linux-low.c (linux_low_enable_btrace): Remove.
4732 (linux_target_ops): Replace linux_low_enable_btrace with
4733 linux_enable_btrace.
4734
4735 2015-09-03 Yao Qi <yao.qi@linaro.org>
4736
4737 * linux-aarch64-low.c (aarch64_insert_point): Call
4738 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4739 returns true.
4740
4741 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4742
4743 * linux-low.c (check_stopped_by_breakpoint): Use
4744 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4745
4746 2015-08-27 Pedro Alves <palves@redhat.com>
4747
4748 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4749
4750 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4751
4752 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4753 the XNEW-family equivalent.
4754 (compile_bytecodes): Likewise.
4755 * dll.c (loaded_dll): Likewise.
4756 * event-loop.c (append_callback_event): Likewise.
4757 (create_file_handler): Likewise.
4758 (create_file_event): Likewise.
4759 * hostio.c (handle_open): Likewise.
4760 * inferiors.c (add_thread): Likewise.
4761 (add_process): Likewise.
4762 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4763 * linux-arm-low.c (arm_new_process): Likewise.
4764 (arm_new_thread): Likewise.
4765 * linux-low.c (add_to_pid_list): Likewise.
4766 (linux_add_process): Likewise.
4767 (handle_extended_wait): Likewise.
4768 (add_lwp): Likewise.
4769 (enqueue_one_deferred_signal): Likewise.
4770 (enqueue_pending_signal): Likewise.
4771 (linux_resume_one_lwp_throw): Likewise.
4772 (linux_resume_one_thread): Likewise.
4773 (linux_read_memory): Likewise.
4774 (linux_write_memory): Likewise.
4775 * linux-mips-low.c (mips_linux_new_process): Likewise.
4776 (mips_linux_new_thread): Likewise.
4777 (mips_add_watchpoint): Likewise.
4778 * linux-x86-low.c (initialize_low_arch): Likewise.
4779 * lynx-low.c (lynx_add_process): Likewise.
4780 * mem-break.c (set_raw_breakpoint_at): Likewise.
4781 (set_breakpoint): Likewise.
4782 (add_condition_to_breakpoint): Likewise.
4783 (add_commands_to_breakpoint): Likewise.
4784 (clone_agent_expr): Likewise.
4785 (clone_one_breakpoint): Likewise.
4786 * regcache.c (new_register_cache): Likewise.
4787 * remote-utils.c (look_up_one_symbol): Likewise.
4788 * server.c (queue_stop_reply): Likewise.
4789 (start_inferior): Likewise.
4790 (queue_stop_reply_callback): Likewise.
4791 (handle_target_event): Likewise.
4792 * spu-low.c (fetch_ppc_memory): Likewise.
4793 (store_ppc_memory): Likewise.
4794 * target.c (set_target_ops): Likewise.
4795 * thread-db.c (thread_db_load_search): Likewise.
4796 (try_thread_db_load_1): Likewise.
4797 * tracepoint.c (add_tracepoint): Likewise.
4798 (add_tracepoint_action): Likewise.
4799 (create_trace_state_variable): Likewise.
4800 (cmd_qtdpsrc): Likewise.
4801 (cmd_qtro): Likewise.
4802 (add_while_stepping_state): Likewise.
4803 * win32-low.c (child_add_thread): Likewise.
4804 (get_image_name): Likewise.
4805
4806 2015-08-25 Yao Qi <yao.qi@linaro.org>
4807
4808 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4809
4810 2015-08-25 Yao Qi <yao.qi@linaro.org>
4811
4812 * Makefile.in (aarch64-linux.o): New rule.
4813 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4814 srv_tgtobj.
4815 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4816 (aarch64_init_debug_reg_state): Make it extern.
4817 (aarch64_linux_prepare_to_resume): Remove.
4818
4819 2015-08-25 Yao Qi <yao.qi@linaro.org>
4820
4821 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4822 lwp_arch_private_info and ptid_of_lwp.
4823
4824 2015-08-25 Yao Qi <yao.qi@linaro.org>
4825
4826 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4827 Find proc_info by find_process_pid. All callers updated.
4828
4829 2015-08-25 Yao Qi <yao.qi@linaro.org>
4830
4831 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4832 Remove.
4833 (debug_reg_change_callback): Remove.
4834 (aarch64_notify_debug_reg_change): Remove.
4835
4836 2015-08-25 Yao Qi <yao.qi@linaro.org>
4837
4838 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4839 Call current_lwp_ptid.
4840
4841 2015-08-25 Yao Qi <yao.qi@linaro.org>
4842
4843 * linux-aarch64-low.c (debug_reg_change_callback): Use
4844 debug_printf.
4845
4846 2015-08-25 Yao Qi <yao.qi@linaro.org>
4847
4848 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4849
4850 2015-08-25 Yao Qi <yao.qi@linaro.org>
4851
4852 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4853
4854 2015-08-25 Yao Qi <yao.qi@linaro.org>
4855
4856 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4857 the code.
4858
4859 2015-08-25 Yao Qi <yao.qi@linaro.org>
4860
4861 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4862 Remove.
4863 (debug_reg_change_callback): Remove argument entry and add argument
4864 lwp. Remove local variable thread. Don't print thread id in the
4865 debugging output. Don't check whether pid of thread equals to pid.
4866 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4867 iterate_over_lwps instead find_inferior.
4868
4869 2015-08-24 Pedro Alves <palves@redhat.com>
4870
4871 * inferiors.c (get_first_process): New function.
4872 * inferiors.h (get_first_process): New declaration.
4873 * remote-utils.c (read_ptid): Default to the first process in the
4874 list, instead of to the current thread's process.
4875
4876 2015-08-24 Pedro Alves <palves@redhat.com>
4877
4878 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4879 * event-loop.c: Likewise.
4880 * remote-utils.c: Likewise.
4881 * tracepoint.c: Likewise.
4882
4883 2015-08-24 Pedro Alves <palves@redhat.com>
4884
4885 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4886 ptid_get_lwp.
4887
4888 2015-08-21 Pedro Alves <palves@redhat.com>
4889
4890 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4891 instead of literal 1.
4892
4893 2015-08-21 Pedro Alves <palves@redhat.com>
4894
4895 * tdesc.c (default_description): Explicitly zero-initialize.
4896
4897 2015-08-21 Pedro Alves <palves@redhat.com>
4898
4899 PR gdb/18749
4900 * inferiors.c (remove_thread): Discard any pending stop reply for
4901 this thread.
4902 * server.c (remove_all_on_match_pid): Rename to ...
4903 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4904 instead of a pid.
4905 (discard_queued_stop_replies): Change parameter to a ptid. Now
4906 extern.
4907 (handle_v_kill, kill_inferior_callback, captured_main)
4908 (process_serial_event): Adjust.
4909 * server.h (discard_queued_stop_replies): Declare.
4910
4911 2015-08-21 Pedro Alves <palves@redhat.com>
4912
4913 * linux-low.c (wait_for_sigstop): Always switch to no thread
4914 selected if the previously current thread dies.
4915 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4916 process instead of the current thread's.
4917 * remote-utils.c (input_interrupt): Don't check if there's no
4918 current thread.
4919 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4920 current thread to the general thread fails, error out.
4921 (handle_qxfer_auxv, handle_qxfer_libraries)
4922 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4923 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4924 (handle_query): Check if there's a thread selected instead of
4925 checking whether there's any thread in the thread list.
4926 (handle_qxfer_threads, handle_qxfer_btrace)
4927 (handle_qxfer_btrace_conf): Don't error out early if there's no
4928 thread in the thread list.
4929 (handle_v_cont, myresume): Don't set the current thread to the
4930 continue thread.
4931 (process_serial_event) <Hg handling>: Also set thread_id if the
4932 previous general thread is still alive.
4933 (process_serial_event) <g/G handling>: If setting the current
4934 thread to the general thread fails, error out.
4935 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4936 thread's lwp instead of the current thread's.
4937 * target.c (set_desired_thread): If the desired thread was not
4938 found, leave the current thread pointing to NULL. Return an int
4939 (boolean) indicating success.
4940 * target.h (set_desired_thread): Change return type to int.
4941
4942 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4943
4944 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4945 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4946 #includes.
4947 (ps_get_thread_area): New function.
4948
4949 2015-08-19 Gary Benson <gbenson@redhat.com>
4950
4951 * hostio.c (handle_pread): Do not attempt to read more data
4952 than hostio_reply_with_data can fit in a packet.
4953
4954 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4955
4956 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4957
4958 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4959
4960 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4961
4962 2015-08-06 Pedro Alves <palves@redhat.com>
4963
4964 * tracepoint.c (expr_eval_result): Now an int.
4965
4966 2015-08-06 Pedro Alves <palves@redhat.com>
4967
4968 * gdbthread.h (struct regcache): Forward declare.
4969 (struct thread_info) <regcache_data>: Now a struct regcache
4970 pointer.
4971 * inferiors.c (inferior_regcache_data)
4972 (set_inferior_regcache_data): Now work with struct regcache
4973 pointers.
4974 * inferiors.h (struct regcache): Forward declare.
4975 (inferior_regcache_data, set_inferior_regcache_data): Now work
4976 with struct regcache pointers.
4977 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4978 (free_register_cache_thread): Remove struct regcache pointer
4979 casts.
4980
4981 2015-08-06 Pedro Alves <palves@redhat.com>
4982
4983 * server.c (captured_main): On error, print the exception message
4984 to stderr, and if run_once is set, throw a quit.
4985
4986 2015-08-06 Pedro Alves <palves@redhat.com>
4987
4988 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4989 the current thread.
4990
4991 2015-08-06 Pedro Alves <palves@redhat.com>
4992
4993 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4994 reading beyond the passed in buffer length.
4995
4996 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4997
4998 * tracepoint.c (symbol_list) <required>: Remove.
4999
5000 2015-08-06 Pedro Alves <palves@redhat.com>
5001
5002 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5003 count if stopping and suspending threads.
5004 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5005 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5006 (linux_detach): Complete an ongoing step-over.
5007 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5008 throughout.
5009 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5010 (linux_wait_1): If passing a signal to the inferior after
5011 finishing a step-over, unsuspend and re-resume all lwps. If we
5012 see a single-step event but the thread should be continuing, don't
5013 pass the trap to gdb.
5014 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5015 internal_error instead of gdb_assert.
5016 (enqueue_pending_signal): New function.
5017 (check_ptrace_stopped_lwp_gone): Add debug output.
5018 (start_step_over): Use internal_error instead of gdb_assert.
5019 (complete_ongoing_step_over): New function.
5020 (linux_resume_one_thread): Don't resume a suspended thread.
5021 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5022 it stepping.
5023
5024 2015-08-06 Pedro Alves <palves@redhat.com>
5025
5026 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5027 (linux_thread_alive): Use lwp_is_marked_dead.
5028 (extended_event_reported): Delete.
5029 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5030 instead of extended_event_reported.
5031 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5032 as well.
5033 (lwp_is_marked_dead): New function.
5034 (lwp_running): Use lwp_is_marked_dead.
5035 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5036 comment.
5037
5038 2015-08-06 Pedro Alves <palves@redhat.com>
5039
5040 * linux-low.c (linux_wait_1): Move fork event output out of the
5041 !report_to_gdb check. Pass event_child->waitstatus to
5042 target_waitstatus_to_string instead of ourstatus.
5043
5044 2015-08-04 Yao Qi <yao.qi@linaro.org>
5045
5046 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5047 if current_thread is 32 bit.
5048
5049 2015-08-04 Yao Qi <yao.qi@linaro.org>
5050
5051 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5052 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5053 * server.c (extended_protocol): Remove "static".
5054 * server.h (extended_protocol): Declare it.
5055
5056 2015-08-04 Yao Qi <yao.qi@linaro.org>
5057
5058 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5059 both aarch64 and aarch32.
5060 (aarch64_set_pc): Likewise.
5061
5062 2015-08-04 Yao Qi <yao.qi@linaro.org>
5063
5064 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5065 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5066 arm-with-neon.xml to srv_xmlfiles.
5067 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5068 (is_64bit_tdesc): New function.
5069 (aarch64_linux_read_description): New function.
5070 (aarch64_arch_setup): Call aarch64_linux_read_description.
5071 (regs_info): Rename to regs_info_aarch64.
5072 (aarch64_regs_info): Return right regs_info.
5073 (initialize_low_arch): Call initialize_low_arch_aarch32.
5074
5075 2015-08-04 Yao Qi <yao.qi@linaro.org>
5076
5077 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5078 * linux-aarch32-low.c: New file.
5079 * linux-aarch32-low.h: New file.
5080 * linux-arm-low.c (arm_fill_gregset): Move it to
5081 linux-aarch32-low.c.
5082 (arm_store_gregset): Likewise.
5083 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5084 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5085 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5086 (regs_info): Rename to regs_info_arm.
5087 (arm_regs_info): Return regs_info_aarch32 if
5088 have_ptrace_getregset is 1 and target description is
5089 arm_with_neon or arm_with_vfpv3.
5090 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5091 Call initialize_low_arch_aarch32 instead.
5092
5093 2015-08-04 Yao Qi <yao.qi@linaro.org>
5094
5095 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5096 * linux-low.c: ... here.
5097 * linux-low.h (have_ptrace_getregset): Declare it.
5098
5099 2015-08-04 Pedro Alves <palves@redhat.com>
5100
5101 * thread-db.c (struct thread_db): Use new typedefs.
5102 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5103 CHK calls.
5104 (disable_thread_event_reporting): Cast result of dlsym to
5105 destination function pointer type.
5106 (thread_db_mourn): Use td_ta_delete_ftype.
5107
5108 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5109
5110 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5111 arch variant.
5112 (CDX_BREAKPOINT): Define for R2.
5113 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5114 (the_low_target): Add comments.
5115
5116 2015-07-30 Yao Qi <yao.qi@linaro.org>
5117
5118 * linux-arm-low.c (arm_hwcap): Remove it.
5119 (arm_read_description): New local variable arm_hwcap. Don't
5120 set arm_hwcap to zero.
5121
5122 2015-07-30 Yao Qi <yao.qi@linaro.org>
5123
5124 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5125 Use regcache->tdesc instead.
5126 (arm_store_wmmxregset): Likewise.
5127 (arm_fill_vfpregset): Likewise.
5128 (arm_store_vfpregset): Likewise.
5129
5130 2015-07-30 Yao Qi <yao.qi@linaro.org>
5131
5132 * linux-arm-low.c: Include arch/arm.h.
5133 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5134 (arm_store_gregset): Likewise.
5135
5136 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5137
5138 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5139 ptrace's 4th parameter.
5140
5141 2015-07-27 Yao Qi <yao.qi@linaro.org>
5142
5143 * configure.srv (case aarch64*-*-linux*): Don't set
5144 srv_linux_usrregs.
5145
5146 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5147
5148 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5149 sys/ptrace.h.
5150 * linux-arm-low.c: Likewise.
5151 * linux-cris-low.c: Likewise.
5152 * linux-crisv32-low.c: Likewise.
5153 * linux-low.c: Likewise.
5154 * linux-m68k-low.c: Likewise.
5155 * linux-mips-low.c: Likewise.
5156 * linux-nios2-low.c: Likewise.
5157 * linux-s390-low.c: Likewise.
5158 * linux-sparc-low.c: Likewise.
5159 * linux-tic6x-low.c: Likewise.
5160 * linux-tile-low.c: Likewise.
5161 * linux-x86-low.c: Likewise.
5162
5163 2015-07-24 Pedro Alves <palves@redhat.com>
5164
5165 * config.in: Regenerate.
5166 * configure: Regenerate.
5167
5168 2015-07-24 Pedro Alves <palves@redhat.com>
5169
5170 * acinclude.m4: Include ../ptrace.m4.
5171 * configure.ac: Call GDB_AC_PTRACE.
5172 * config.in, configure: Regenerate.
5173
5174 2015-07-24 Yao Qi <yao.qi@linaro.org>
5175
5176 * linux-low.c (linux_create_inferior): Remove setting to
5177 proc->priv->new_inferior.
5178 (linux_attach): Likewise.
5179 (linux_low_filter_event): Likewise.
5180 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5181
5182 2015-07-24 Yao Qi <yao.qi@linaro.org>
5183
5184 * linux-low.c (linux_arch_setup): New function.
5185 (linux_low_filter_event): If proc->tdesc is NULL and
5186 proc->attached is true, call the_low_target.arch_setup.
5187 Otherwise, keep status pending, and return.
5188 (linux_resume_one_lwp_throw): Don't call get_pc if
5189 thread->while_stepping isn't NULL. Don't call
5190 get_thread_regcache if proc->tdesc is NULL.
5191 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5192 (linux_target_ops): Install arch_setup.
5193 * server.c (start_inferior): Call the_target->arch_setup.
5194 * target.h (struct target_ops) <arch_setup>: New field.
5195 (target_arch_setup): New marco.
5196 * lynx-low.c (lynx_target_ops): Update.
5197 * nto-low.c (nto_target_ops): Update.
5198 * spu-low.c (spu_target_ops): Update.
5199 * win32-low.c (win32_target_ops): Update.
5200
5201 2015-07-24 Yao Qi <yao.qi@linaro.org>
5202
5203 * linux-low.c (linux_add_process): Don't set
5204 proc->priv->new_inferior.
5205 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5206 (linux_attach): Likewise.
5207
5208 2015-07-24 Yao Qi <yao.qi@linaro.org>
5209
5210 * server.c (start_inferior): Code refactor.
5211
5212 2015-07-24 Yao Qi <yao.qi@linaro.org>
5213
5214 * server.c (process_serial_event): Set general_thread.
5215
5216 2015-07-21 Yao Qi <yao.qi@linaro.org>
5217
5218 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5219 aarch64_linux_get_debug_reg_capacity.
5220
5221 2015-07-17 Yao Qi <yao.qi@linaro.org>
5222
5223 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5224 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5225 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5226 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5227 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5228 (AARCH64_HWP_ALIGNMENT): Likewise.
5229 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5230 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5231 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5232 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5233 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5234 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5235 (struct aarch64_debug_reg_state): Likewise.
5236 (struct arch_lwp_info): Likewise.
5237 (aarch64_align_watchpoint): Likewise.
5238 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5239 (aarch64_watchpoint_length): Likewise.
5240 (aarch64_point_encode_ctrl_reg): Likewise
5241 (aarch64_point_is_aligned): Likewise.
5242 (aarch64_align_watchpoint): Likewise.
5243 (aarch64_linux_set_debug_regs):
5244 (aarch64_dr_state_insert_one_point): Likewise.
5245 (aarch64_dr_state_remove_one_point): Likewise.
5246 (aarch64_handle_breakpoint): Likewise.
5247 (aarch64_handle_aligned_watchpoint): Likewise.
5248 (aarch64_handle_unaligned_watchpoint): Likewise.
5249 (aarch64_handle_watchpoint): Likewise.
5250
5251 2015-07-17 Yao Qi <yao.qi@linaro.org>
5252
5253 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5254 and don't aarch64_get_debug_reg_state. All callers update.
5255 (aarch64_handle_aligned_watchpoint): Likewise.
5256 (aarch64_handle_unaligned_watchpoint): Likewise.
5257 (aarch64_handle_watchpoint): Likewise.
5258 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5259 (aarch64_remove_point): Likewise.
5260
5261 2015-07-17 Yao Qi <yao.qi@linaro.org>
5262
5263 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5264 debug_printf.
5265 (aarch64_handle_unaligned_watchpoint): Likewise.
5266
5267 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5268
5269 Revert the previous 3 commits:
5270 Move gdb_regex* to common/
5271 Move linux_find_memory_regions_full & co.
5272 gdbserver build-id attribute generator
5273
5274 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5275 Jan Kratochvil <jan.kratochvil@redhat.com>
5276
5277 gdbserver build-id attribute generator.
5278 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5279 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5280 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5281 (find_phdr): New.
5282 (get_dynamic): Use find_pdhr to traverse program headers.
5283 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5284 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5285 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5286 (get_hex_build_id): New.
5287 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5288 to reply XML document.
5289
5290 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5291 Jan Kratochvil <jan.kratochvil@redhat.com>
5292
5293 * target.c: Include target/target-utils.h and fcntl.h.
5294 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5295 (target_fileio_read_stralloc): New functions.
5296
5297 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5298
5299 * Makefile.in (OBS): Add gdb_regex.o.
5300 (gdb_regex.o): New.
5301 * config.in: Rebuilt.
5302 * configure: Rebuilt.
5303
5304 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5305 Jan Kratochvil <jan.kratochvil@redhat.com>
5306
5307 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5308 * Makefile.in (OBS): Add target-utils.o.
5309 (linux-maps.o, target-utils.o): New.
5310 * configure.srv (srv_linux_obj): Add linux-maps.o.
5311
5312 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5313
5314 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5315 function, return 1.
5316 (the_low_target): Install it.
5317
5318 2015-07-14 Pedro Alves <palves@redhat.com>
5319
5320 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5321 Instead, ignore ECHILD, and throw an error for other errnos.
5322
5323 2015-07-10 Pedro Alves <palves@redhat.com>
5324
5325 * event-loop.c (struct callback_event) <data>: Change type to
5326 gdb_client_data instance instead of gdb_client_data pointer.
5327 (append_callback_event): Adjust.
5328
5329 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5330
5331 * linux-aarch64-low.c: Add comments for each linux_target_ops
5332 method. Remove comments already covered in target_ops and
5333 linux_target_ops definitions.
5334 (the_low_target): Add comments for each unimplemented method.
5335
5336 2015-07-09 Yao Qi <yao.qi@linaro.org>
5337
5338 * linux-aarch64-low.c (aarch64_regmap): Remove.
5339 (aarch64_usrregs_info): Remove.
5340 (regs_info): Set field usrregs to NULL.
5341
5342 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5343
5344 * linux-low.c: Include "rsp-low.h"
5345 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5346 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5347 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5348 (handle_btrace_enable_pt): New.
5349 (handle_btrace_general_set): Support "pt".
5350 (handle_btrace_conf_general_set): Support "pt:size".
5351
5352 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5353
5354 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5355 Z_PACKET_SW_BP.
5356
5357 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5358
5359 * linux-aarch64-low.c: Remove comment about endianness.
5360 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5361 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5362 memcmp.
5363
5364 2015-06-24 Gary Benson <gbenson@redhat.com>
5365
5366 * linux-i386-ipa.c (stdint.h): Do not include.
5367 * lynx-i386-low.c (stdint.h): Likewise.
5368 * lynx-ppc-low.c (stdint.h): Likewise.
5369 * mem-break.c (stdint.h): Likewise.
5370 * thread-db.c (stdint.h): Likewise.
5371 * tracepoint.c (stdint.h): Likewise.
5372 * win32-low.c (stdint.h): Likewise.
5373
5374 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5375
5376 * server.c (write_qxfer_response): Update call to
5377 remote_escape_output.
5378
5379 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5380 Jan Kratochvil <jan.kratochvil@redhat.com>
5381
5382 Merge multiple hex conversions.
5383 * gdbreplay.c (tohex): Rename to 'fromhex'.
5384 (logchar): Use fromhex.
5385
5386 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5387
5388 * server.c (handle_qxfer_libraries): Set `version' attribute for
5389 <library-list>.
5390
5391 2015-06-10 Gary Benson <gbenson@redhat.com>
5392
5393 * target.h (struct target_ops) <multifs_open>: New field.
5394 <multifs_unlink>: Likewise.
5395 <multifs_readlink>: Likewise.
5396 * linux-low.c (nat/linux-namespaces.h): New include.
5397 (linux_target_ops): Initialize the_target->multifs_open,
5398 the_target->multifs_unlink and the_target->multifs_readlink.
5399 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5400 * hostio.c (hostio_fs_pid): New static variable.
5401 (hostio_handle_new_gdb_connection): New function.
5402 (handle_setfs): Likewise.
5403 (handle_open): Use the_target->multifs_open as appropriate.
5404 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5405 (handle_readlink): Use the_target->multifs_readlink as
5406 appropriate.
5407 (handle_vFile): Handle vFile:setfs packets.
5408 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5409 after target_handle_new_gdb_connection.
5410
5411 2015-06-10 Gary Benson <gbenson@redhat.com>
5412
5413 * configure.ac (AC_CHECK_FUNCS): Add setns.
5414 * config.in: Regenerate.
5415 * configure: Likewise.
5416 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5417 (linux-namespaces.o): New rule.
5418 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5419
5420 2015-06-09 Gary Benson <gbenson@redhat.com>
5421
5422 * hostio.c (handle_open): Process mode argument with
5423 fileio_to_host_mode.
5424
5425 2015-06-01 Yao Qi <yao.qi@linaro.org>
5426
5427 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5428 * linux-x86-low.c: Likewise.
5429
5430 2015-05-28 Don Breazeal <donb@codesourcery.com>
5431
5432 * linux-low.c (handle_extended_wait): Initialize
5433 thread_info.last_resume_kind for new fork children.
5434
5435 2015-05-15 Pedro Alves <palves@redhat.com>
5436
5437 * target.h (target_handle_new_gdb_connection): Rewrite using if
5438 wrapped in do/while.
5439
5440 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5441
5442 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5443 * configure, config.in: Regenerate.
5444 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5445 Declare typedef.
5446
5447 2015-05-12 Don Breazeal <donb@codesourcery.com>
5448
5449 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5450 PTRACE_EVENT_VFORK_DONE.
5451 (linux_low_ptrace_options, extended_event_reported): Add vfork
5452 events.
5453 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5454 and "vforkdone" for RSP 'T' Stop Reply Packet.
5455 * server.h (report_vfork_events): Declare
5456 global variable.
5457
5458 2015-05-12 Don Breazeal <donb@codesourcery.com>
5459
5460 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5461 (the_low_target) <new_fork>: Initialize new member.
5462 * linux-arm-low.c (arm_new_fork): New function.
5463 (the_low_target) <new_fork>: Initialize new member.
5464 * linux-low.c (handle_extended_wait): Call new target function
5465 new_fork.
5466 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5467 * linux-mips-low.c (mips_add_watchpoint): New function
5468 extracted from mips_insert_point.
5469 (the_low_target) <new_fork>: Initialize new member.
5470 (mips_linux_new_fork): New function.
5471 (mips_insert_point): Call mips_add_watchpoint.
5472 * linux-x86-low.c (x86_linux_new_fork): New function.
5473 (the_low_target) <new_fork>: Initialize new member.
5474
5475 2015-05-12 Don Breazeal <donb@codesourcery.com>
5476
5477 * linux-low.c (handle_extended_wait): Implement return value,
5478 rename argument 'event_child' to 'event_lwp', handle
5479 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5480 (linux_low_ptrace_options): New function.
5481 (linux_low_filter_event): Call linux_low_ptrace_options,
5482 use different argument fo linux_enable_event_reporting,
5483 use return value from handle_extended_wait.
5484 (extended_event_reported): New function.
5485 (linux_wait_1): Call extended_event_reported and set
5486 status to report fork events.
5487 (linux_write_memory): Add pid to debug message.
5488 (reset_lwp_ptrace_options_callback): New function.
5489 (linux_handle_new_gdb_connection): New function.
5490 (linux_target_ops): Initialize new structure member.
5491 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5492 * lynx-low.c: Initialize new structure member.
5493 * remote-utils.c (prepare_resume_reply): Implement stop reason
5494 "fork" for "T" stop message.
5495 * server.c (handle_query): Call handle_new_gdb_connection.
5496 * server.h (report_fork_events): Declare global flag.
5497 * target.h (struct target_ops) <handle_new_gdb_connection>:
5498 New member.
5499 (target_handle_new_gdb_connection): New macro.
5500 * win32-low.c: Initialize new structure member.
5501
5502 2015-05-12 Don Breazeal <donb@codesourcery.com>
5503
5504 * mem-break.c (APPEND_TO_LIST): Define macro.
5505 (clone_agent_expr): New function.
5506 (clone_one_breakpoint): New function.
5507 (clone_all_breakpoints): New function.
5508 * mem-break.h: Declare new functions.
5509
5510 2015-05-12 Don Breazeal <donb@codesourcery.com>
5511
5512 * linux-low.c (linux_supports_fork_events): New function.
5513 (linux_supports_vfork_events): New function.
5514 (linux_target_ops): Initialize new structure members.
5515 (initialize_low): Call linux_check_ptrace_features.
5516 * lynx-low.c (lynx_target_ops): Initialize new structure
5517 members.
5518 * server.c (report_fork_events, report_vfork_events):
5519 New global flags.
5520 (handle_query): Add new features to qSupported packet and
5521 response.
5522 (captured_main): Initialize new global variables.
5523 * target.h (struct target_ops) <supports_fork_events>:
5524 New member.
5525 <supports_vfork_events>: New member.
5526 (target_supports_fork_events): New macro.
5527 (target_supports_vfork_events): New macro.
5528 * win32-low.c (win32_target_ops): Initialize new structure
5529 members.
5530
5531 2015-05-12 Gary Benson <gbenson@redhat.com>
5532
5533 * server.c (handle_qxfer_exec_file): Use current process
5534 if annex is empty.
5535
5536 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5537
5538 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5539 Remove HAVE_PTRACE_GETREGS conditionals.
5540 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5541 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5542
5543 2015-05-08 Yao Qi <yao.qi@linaro.org>
5544
5545 * linux-low.c (linux_supports_conditional_breakpoints): New
5546 function.
5547 (linux_target_ops): Install new target method.
5548 * lynx-low.c (lynx_target_ops): Install NULL hook for
5549 supports_conditional_breakpoints.
5550 * nto-low.c (nto_target_ops): Likewise.
5551 * spu-low.c (spu_target_ops): Likewise.
5552 * win32-low.c (win32_target_ops): Likewise.
5553 * server.c (handle_query): Check
5554 target_supports_conditional_breakpoints.
5555 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5556 New field.
5557 (target_supports_conditional_breakpoints): New macro.
5558
5559 2015-05-06 Pedro Alves <palves@redhat.com>
5560
5561 PR server/18081
5562 * server.c (start_inferior): If the process exits, mourn it.
5563
5564 2015-04-21 Gary Benson <gbenson@redhat.com>
5565
5566 * hostio.c (fileio_open_flags_to_host): Factored out to
5567 fileio_to_host_openflags in common/fileio.c. Single use
5568 updated.
5569
5570 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5571
5572 * linux-xtensa-low.c (xtensa_fill_gregset)
5573 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5574 XCHAL_HAVE_LOOP.
5575
5576 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5577
5578 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5579 (regs_info): Replace usrregs pointer with NULL.
5580
5581 2015-04-17 Gary Benson <gbenson@redhat.com>
5582
5583 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5584 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5585 * server.c (handle_qxfer_exec_file): New function.
5586 (qxfer_packets): Add exec-file entry.
5587 (handle_query): Report qXfer:exec-file:read as supported packet.
5588
5589 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5590
5591 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5592
5593 2015-04-09 Gary Benson <gbenson@redhat.com>
5594
5595 * hostio-errno.c (errno_to_fileio_error): Remove function.
5596 Update caller to use remote_fileio_to_fio_error.
5597
5598 2015-04-09 Yao Qi <yao.qi@linaro.org>
5599
5600 * linux-low.c (linux_insert_point): Call
5601 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5602 (linux_remove_point): Call remove_memory_breakpoint if type is
5603 raw_bkpt_type_sw.
5604 * linux-x86-low.c (x86_insert_point): Don't call
5605 insert_memory_breakpoint.
5606 (x86_remove_point): Don't call remove_memory_breakpoint.
5607
5608 2015-04-01 Pedro Alves <palves@redhat.com>
5609 Cleber Rosa <crosa@redhat.com>
5610
5611 * server.c (gdbserver_usage): Reorganize and extend the usage
5612 message.
5613
5614 2015-03-24 Pedro Alves <palves@redhat.com>
5615
5616 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5617 output. Also dump TRAP_TRACE.
5618 (linux_low_filter_event): In debug output, distinguish a
5619 resume_stop SIGSTOP from a delayed SIGSTOP.
5620
5621 2015-03-24 Gary Benson <gbenson@redhat.com>
5622
5623 * linux-x86-low.c (x86_linux_new_thread): Moved to
5624 nat/x86-linux.c.
5625 (x86_linux_prepare_to_resume): Likewise.
5626
5627 2015-03-24 Gary Benson <gbenson@redhat.com>
5628
5629 * Makefile.in (x86-linux-dregs.o): New rule.
5630 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5631 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5632 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5633 (x86_linux_dr_get): Likewise.
5634 (x86_linux_dr_set): Likewise.
5635 (update_debug_registers_callback): Likewise.
5636 (x86_linux_dr_set_addr): Likewise.
5637 (x86_linux_dr_get_addr): Likewise.
5638 (x86_linux_dr_set_control): Likewise.
5639 (x86_linux_dr_get_control): Likewise.
5640 (x86_linux_dr_get_status): Likewise.
5641 (x86_linux_update_debug_registers): Likewise.
5642
5643 2015-03-24 Gary Benson <gbenson@redhat.com>
5644
5645 * linux-x86-low.c (x86_linux_update_debug_registers):
5646 New function, factored out from...
5647 (x86_linux_prepare_to_resume): ...this.
5648
5649 2015-03-24 Gary Benson <gbenson@redhat.com>
5650
5651 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5652 (x86_linux_dr_set): Likewise.
5653 (update_debug_registers_callback): Likewise.
5654 (x86_linux_dr_set_addr): Likewise.
5655 (x86_linux_dr_get_addr): Likewise.
5656 (x86_linux_dr_set_control): Likewise.
5657 (x86_linux_dr_get_control): Likewise.
5658 (x86_linux_dr_get_status): Likewise.
5659 (x86_linux_prepare_to_resume): Likewise.
5660
5661 2015-03-24 Gary Benson <gbenson@redhat.com>
5662
5663 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5664 Use perror_with_name. Pass string through gettext.
5665 (x86_linux_dr_set): Likewise.
5666
5667 2015-03-24 Gary Benson <gbenson@redhat.com>
5668
5669 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5670 (x86_linux_dr_set_addr): ...this.
5671 (x86_dr_low_get_addr): Rename to...
5672 (x86_linux_dr_get_addr): ...this.
5673 (x86_dr_low_set_control): Rename to...
5674 (x86_linux_dr_set_control): ...this.
5675 (x86_dr_low_get_control): Rename to...
5676 (x86_linux_dr_get_control): ...this.
5677 (x86_dr_low_get_status): Rename to...
5678 (x86_linux_dr_get_status): ...this.
5679 (x86_dr_low): Update with new function names.
5680
5681 2015-03-24 Gary Benson <gbenson@redhat.com>
5682
5683 * Makefile.in (x86-linux.o): New rule.
5684 * configure.srv: Add x86-linux.o to relevant targets.
5685 * linux-low.c (lwp_set_arch_private_info): New function.
5686 (lwp_arch_private_info): Likewise.
5687 * linux-x86-low.c: Include nat/x86-linux.h.
5688 (arch_lwp_info): Removed structure.
5689 (update_debug_registers_callback):
5690 Use lwp_set_debug_registers_changed.
5691 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5692 and lwp_set_debug_registers_changed.
5693 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5694
5695 2015-03-24 Gary Benson <gbenson@redhat.com>
5696
5697 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5698 * linux-arm-low.c (arm_new_thread): Likewise.
5699 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5700 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5701 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5702 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5703
5704 2015-03-24 Gary Benson <gbenson@redhat.com>
5705
5706 * linux-low.c (ptid_of_lwp): New function.
5707 (lwp_is_stopped): Likewise.
5708 (lwp_stop_reason): Likewise.
5709 * linux-x86-low.c (update_debug_registers_callback):
5710 Use lwp_is_stopped.
5711 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5712 lwp_stop_reason.
5713
5714 2015-03-24 Gary Benson <gbenson@redhat.com>
5715
5716 * linux-low.h (linux_stop_lwp): Remove declaration.
5717
5718 2015-03-24 Gary Benson <gbenson@redhat.com>
5719
5720 * linux-low.h: Include nat/linux-nat.h.
5721 * linux-low.c (iterate_over_lwps_args): New structure.
5722 (iterate_over_lwps_filter): New function.
5723 (iterate_over_lwps): Likewise.
5724 * linux-x86-low.c (update_debug_registers_callback):
5725 Update signature to what iterate_over_lwps expects.
5726 Remove PID check that iterate_over_lwps now performs.
5727 (x86_dr_low_set_addr): Use iterate_over_lwps.
5728 (x86_dr_low_set_control): Likewise.
5729
5730 2015-03-24 Gary Benson <gbenson@redhat.com>
5731
5732 * linux-x86-low.c (x86_debug_reg_state): New function.
5733 (x86_linux_prepare_to_resume): Use the above.
5734
5735 2015-03-24 Gary Benson <gbenson@redhat.com>
5736
5737 * linux-low.c (current_lwp_ptid): New function.
5738 * linux-x86-low.c: Include nat/linux-nat.h.
5739 (x86_dr_low_get_addr): Use current_lwp_ptid.
5740 (x86_dr_low_get_control): Likewise.
5741 (x86_dr_low_get_status): Likewise.
5742
5743 2015-03-20 Pedro Alves <palves@redhat.com>
5744
5745 * tracepoint.c (cmd_qtstatus): Make "str" const.
5746
5747 2015-03-20 Pedro Alves <palves@redhat.com>
5748
5749 * server.c (handle_general_set): Make "req_str" const.
5750
5751 2015-03-19 Pedro Alves <palves@redhat.com>
5752
5753 * linux-low.c (linux_resume_one_lwp): Rename to ...
5754 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5755 instead call perror_with_name.
5756 (check_ptrace_stopped_lwp_gone): New function.
5757 (linux_resume_one_lwp): Reimplement as wrapper around
5758 linux_resume_one_lwp_throw that swallows errors if the LWP is
5759 gone.
5760
5761 2015-03-19 Pedro Alves <palves@redhat.com>
5762
5763 * linux-low.c (count_events_callback, select_event_lwp_callback):
5764 No longer check whether the thread has resume_stop as last resume
5765 kind.
5766
5767 2015-03-19 Pedro Alves <palves@redhat.com>
5768
5769 * linux-low.c (count_events_callback, select_event_lwp_callback):
5770 Use the lwp's status_pending_p field, not the thread's.
5771
5772 2015-03-19 Pedro Alves <palves@redhat.com>
5773
5774 * linux-low.c (select_event_lwp_callback): Update comments to
5775 no longer mention SIGTRAP.
5776
5777 2015-03-18 Gary Benson <gbenson@redhat.com>
5778
5779 * server.c (handle_query): Do not report vFile:fstat as supported.
5780
5781 2015-03-11 Gary Benson <gbenson@redhat.com>
5782
5783 * hostio.c (sys/types.h): New include.
5784 (sys/stat.h): Likewise.
5785 (common-remote-fileio.h): Likewise.
5786 (handle_fstat): New function.
5787 (handle_vFile): Handle vFile:fstat packets.
5788
5789 2015-03-11 Gary Benson <gbenson@redhat.com>
5790
5791 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5792 struct stat.st_blocks and struct stat.st_blksize.
5793 * configure: Regenerate.
5794 * config.in: Likewise.
5795 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5796 (OBS): Add common-remote-fileio.o.
5797 (common-remote-fileio.o): New rule.
5798
5799 2015-03-09 Pedro Alves <palves@redhat.com>
5800
5801 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5802 'struct sockaddr' pointer in 'accept' call.
5803
5804 2015-03-09 Pedro Alves <palves@redhat.com>
5805
5806 Revert:
5807 2015-03-07 Pedro Alves <palves@redhat.com>
5808 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5809 or <winsock2.h> here. Instead include "gdb_socket.h".
5810 (remote_open): Use union gdb_sockaddr_u.
5811 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5812 or <winsock2.h> here. Instead include "gdb_socket.h".
5813 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5814 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5815 or <sys/un.h>.
5816 (init_named_socket, gdb_agent_helper_thread): Use union
5817 gdb_sockaddr_u.
5818
5819 2015-03-07 Pedro Alves <palves@redhat.com>
5820
5821 * configure.ac (build_warnings): Move
5822 -Wdeclaration-after-statement to the C-specific set.
5823 * configure: Regenerate.
5824
5825 2015-03-07 Pedro Alves <palves@redhat.com>
5826
5827 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5828 or <winsock2.h> here. Instead include "gdb_socket.h".
5829 (remote_open): Use union gdb_sockaddr_u.
5830 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5831 or <winsock2.h> here. Instead include "gdb_socket.h".
5832 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5833 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5834 or <sys/un.h>.
5835 (init_named_socket, gdb_agent_helper_thread): Use union
5836 gdb_sockaddr_u.
5837
5838 2015-03-07 Pedro Alves <palves@redhat.com>
5839
5840 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5841 instead.
5842
5843 2015-03-06 Yao Qi <yao.qi@linaro.org>
5844
5845 * linux-aarch64-low.c (aarch64_insert_point): Use
5846 show_debug_regs as a boolean.
5847 (aarch64_remove_point): Likewise.
5848
5849 2015-03-05 Pedro Alves <palves@redhat.com>
5850
5851 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5852 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5853 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5854 * nto-low.c (nto_target_ops): Likewise.
5855 * spu-low.c (spu_target_ops): Likewise.
5856 * win32-low.c (win32_target_ops): Likewise.
5857
5858 2015-03-04 Pedro Alves <palves@redhat.com>
5859
5860 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5861 Decide whether a breakpoint triggered based on the SIGTRAP's
5862 siginfo.si_code.
5863 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5864 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5865 (linux_low_filter_event): Check for breakpoints before checking
5866 watchpoints.
5867 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5868 siginfo.si_code.
5869 (linux_stopped_by_sw_breakpoint)
5870 (linux_supports_stopped_by_sw_breakpoint)
5871 (linux_stopped_by_hw_breakpoint)
5872 (linux_supports_stopped_by_hw_breakpoint): New functions.
5873 (linux_target_ops): Install new target methods.
5874
5875 2015-03-04 Pedro Alves <palves@redhat.com>
5876
5877 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5878 * server.c (swbreak_feature, hwbreak_feature): New globals.
5879 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5880 (captured_main): Clear swbreak_feature and hwbreak_feature.
5881 * server.h (swbreak_feature, hwbreak_feature): Declare.
5882 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5883 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5884 supports_stopped_by_hw_breakpoint>: New fields.
5885 (target_supports_stopped_by_sw_breakpoint)
5886 (target_stopped_by_sw_breakpoint)
5887 (target_supports_stopped_by_hw_breakpoint)
5888 (target_stopped_by_hw_breakpoint): Declare.
5889
5890 2015-03-04 Pedro Alves <palves@redhat.com>
5891
5892 enum lwp_stop_reason -> enum target_stop_reason
5893 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5894 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5895 (linux_wait_1, stuck_in_jump_pad_callback)
5896 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5897 (linux_stopped_by_watchpoint):
5898 * linux-low.h (enum lwp_stop_reason): Delete.
5899 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5900 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5901
5902 2015-03-04 Yao Qi <yao.qi@linaro.org>
5903
5904 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5905
5906 2015-03-03 Gary Benson <gbenson@redhat.com>
5907
5908 * hostio.c (handle_vFile): Fix prefix lengths.
5909
5910 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5911
5912 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5913 ptr_bits.
5914
5915 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5916
5917 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5918 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5919 (clean): Add "rm -f" for above C files.
5920 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5921 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5922 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5923 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5924 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5925 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5926 (init_registers_s390x_vx_linux64)
5927 (init_registers_s390x_tevx_linux64)
5928 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5929 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5930 declarations.
5931 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5932 (s390_store_vxrs_high): New functions.
5933 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5934 NT_S390_VXRS_HIGH.
5935 (s390_arch_setup): Add logic for selecting one of the new target
5936 descriptions. Activate the new vector regsets if applicable.
5937 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5938 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5939 and init_registers_s390x_tevx_linux64.
5940
5941 2015-03-01 Pedro Alves <palves@redhat.com>
5942
5943 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5944 parameter.
5945
5946 2015-02-27 Pedro Alves <palves@redhat.com>
5947
5948 * linux-x86-low.c (u_debugreg_offset): New function.
5949 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5950
5951 2015-02-27 Pedro Alves <palves@redhat.com>
5952
5953 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5954 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5955 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5956 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5957 (ps_lsetfpregs, ps_getpid)
5958 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5959 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5960 (ps_lsetxregs, ps_plog): Declare.
5961
5962 2015-02-27 Pedro Alves <palves@redhat.com>
5963
5964 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5965 IP_AGENT_EXPORT_FUNC.
5966 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5967 IP_AGENT_EXPORT_FUNC.
5968 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5969 (IP_AGENT_EXPORT): Delete.
5970 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5971 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5972 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5973 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5974 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5975 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5976 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5977 (traceframe_read_count, traceframe_write_count)
5978 (traceframes_created, trace_state_variables, get_raw_reg)
5979 (get_trace_state_variable_value, set_trace_state_variable_value)
5980 (ust_loaded, helper_thread_id, cmd_buf): Use
5981 IPA_SYM_EXPORTED_NAME.
5982 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5983 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5984 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5985 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5986 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5987 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5988 EXTERN_C_PUSH/EXTERN_C_POP.
5989 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5990 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5991 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5992 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5993 (traceframe_write_count, traceframe_read_count)
5994 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5995 (about_to_request_buffer_space, get_trace_state_variable_value)
5996 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5997 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5998 EXTERN_C_PUSH/EXTERN_C_POP.
5999 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6000 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6001 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6002 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6003 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6004 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6005 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6006 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6007 Define.
6008 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6009 (IP_AGENT_EXPORT_VAR_DECL): Define.
6010 (tracing): Declare.
6011 (gdb_agent_get_raw_reg): Declare.
6012
6013 2015-02-27 Tom Tromey <tromey@redhat.com>
6014 Pedro Alves <palves@redhat.com>
6015
6016 Rename symbols whose names are reserved C++ keywords throughout.
6017
6018 2015-02-27 Pedro Alves <palves@redhat.com>
6019
6020 * Makefile.in (COMPILER): New, get it from autoconf.
6021 (CXX): Get from autoconf instead.
6022 (COMPILE.pre): Use COMPILER.
6023 (CC-LD): Rename to ...
6024 (CC_LD): ... this. Use COMPILER.
6025 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6026 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6027 * acinclude.m4: Include build-with-cxx.m4.
6028 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6029 Disable -Werror by default if building in C++ mode.
6030 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6031 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6032 the C++ compiler. Save/restore CXXFLAGS too.
6033 * configure: Regenerate.
6034
6035 2015-02-27 Pedro Alves <palves@redhat.com>
6036
6037 * acinclude.m4: Include libiberty.m4.
6038 * configure.ac: Call libiberty_INIT.
6039 * config.in, configure: Regenerate.
6040
6041 2015-02-26 Pedro Alves <palves@redhat.com>
6042
6043 * linux-low.c (linux_wait_1): When incrementing the PC past a
6044 program breakpoint always use the_low_target.breakpoint_len as
6045 increment, rather than the maximum between that and
6046 the_low_target.decr_pc_after_break.
6047
6048 2015-02-23 Pedro Alves <palves@redhat.com>
6049
6050 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6051 thread was doing a step-over; always adjust the PC if
6052 we stepped over a permanent breakpoint.
6053 (linux_wait_1): If we stepped over breakpoint that was on top of a
6054 permanent breakpoint, manually advance the PC past it.
6055
6056 2015-02-23 Pedro Alves <palves@redhat.com>
6057
6058 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6059 modes.
6060 (x86_fill_gregset, x86_store_gregset): Use it when handling
6061 $orig_eax.
6062
6063 2015-02-20 Pedro Alves <palves@redhat.com>
6064
6065 * thread-db.c: Include "nat/linux-procfs.h".
6066 (thread_db_init): Skip listing new threads if the kernel supports
6067 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6068
6069 2015-02-20 Pedro Alves <palves@redhat.com>
6070
6071 * linux-low.c (status_pending_p_callback): Use ptid_match.
6072
6073 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6074
6075 PR breakpoints/16812
6076 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6077 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6078 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6079
6080 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6081
6082 PR breakpoints/15956
6083 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6084
6085 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6086
6087 * linux-low.c (linux_low_btrace_conf): Print size.
6088 * server.c (handle_btrace_conf_general_set): New.
6089 (hanle_general_set): Call handle_btrace_conf_general_set.
6090 (handle_query): Report Qbtrace-conf:bts:size as supported.
6091
6092 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6093
6094 * linux-low.c (linux_low_enable_btrace): Update parameters.
6095 (linux_low_btrace_conf): New.
6096 (linux_target_ops)<to_btrace_conf>: Initialize.
6097 * server.c (current_btrace_conf): New.
6098 (handle_btrace_enable): Rename to ...
6099 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6100 to target_enable_btrace. Update comment. Update users.
6101 (handle_qxfer_btrace_conf): New.
6102 (qxfer_packets): Add btrace-conf entry.
6103 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6104 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6105 (target_ops)<read_btrace_conf>: New.
6106 (target_enable_btrace): Update parameters.
6107 (target_read_btrace_conf): New.
6108
6109 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6110
6111 * server.c (handle_btrace_general_set): Remove call to
6112 target_supports_btrace.
6113 (supported_btrace_packets): New.
6114 (handle_query): Call supported_btrace_packets.
6115 * target.h: include btrace-common.h.
6116 (btrace_target_info): Removed.
6117 (supports_btrace, target_supports_btrace): Update parameters.
6118
6119 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6120
6121 * Makefile.in (SFILES): Add common/btrace-common.c.
6122 (OBS): Add common/btrace-common.o.
6123 (btrace-common.o): Add build rules.
6124 * linux-low: Include btrace-common.h.
6125 (linux_low_read_btrace): Use struct btrace_data. Call
6126 btrace_data_init and btrace_data_fini.
6127
6128 2015-02-06 Pedro Alves <palves@redhat.com>
6129
6130 * thread-db.c (find_new_threads_callback): Add debug output.
6131
6132 2015-02-04 Pedro Alves <palves@redhat.com>
6133
6134 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6135 (resume_stopped_resumed_lwps): New function.
6136 (linux_wait_for_event_filtered): Use it.
6137
6138 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6139
6140 * Makefile.in (SFILES): Add linux-personality.c.
6141 (linux-personality.o): New rule.
6142 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6143 list of objects to be built.
6144 * linux-low.c: Include nat/linux-personality.h.
6145 (linux_create_inferior): Remove code to disable address space
6146 randomization (moved to ../nat/linux-personality.c). Create
6147 cleanup to disable address space randomization.
6148
6149 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6150
6151 * Makefile.in (posix-strerror.o): New rule.
6152 (mingw-strerror.o): Likewise.
6153 * configure: Regenerated.
6154 * configure.ac: Source file ../common/common.host. Initialize new
6155 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6156
6157 2015-01-14 Yao Qi <yao@codesourcery.com>
6158
6159 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6160 (ppc-linux.o): New rule.
6161 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6162 * configure.ac: AC_CHECK_FUNCS(getauxval).
6163 * config.in: Re-generated.
6164 * configure: Re-generated.
6165 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6166 ppc64_64bit_inferior_p
6167
6168 2015-01-14 Yao Qi <yao@codesourcery.com>
6169
6170 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6171 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6172 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6173 (PT_ORIG_R3, PT_TRAP): Likewise.
6174 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6175 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6176 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6177
6178 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6179
6180 * i387-fp.c (i387_cache_to_xsave): In look over
6181 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6182 zmmh_low_space field by use of zmmh_high_space.
6183
6184 2015-01-09 Pedro Alves <palves@redhat.com>
6185
6186 * linux-low.c (step_over_bkpt): Move higher up in the file.
6187 (handle_extended_wait): Don't store the stop_pc here.
6188 (get_stop_pc): Adjust comments and rename to ...
6189 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6190 stopped for a software breakpoint or hardware breakpoint.
6191 (thread_still_has_status_pending_p): New function.
6192 (status_pending_p_callback): Use
6193 thread_still_has_status_pending_p. If the event is no longer
6194 interesting, resume the LWP.
6195 (handle_tracepoints): Add assert.
6196 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6197 (wstatus_maybe_breakpoint): New function.
6198 (cancel_breakpoint): Delete function.
6199 (check_stopped_by_watchpoint): New function, factored out from
6200 linux_low_filter_event.
6201 (lp_status_maybe_breakpoint): Delete function.
6202 (linux_low_filter_event): Remove filter_ptid argument.
6203 Leave thread group exits pending here. Store the LWP's stop PC.
6204 Always leave events pending.
6205 (linux_wait_for_event_filtered): Pull all events out of the
6206 kernel, and leave them all pending.
6207 (count_events_callback, select_event_lwp_callback): Consider all
6208 events.
6209 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6210 (select_event_lwp): Only give preference to the stepping LWP in
6211 all-stop mode. Adjust comments.
6212 (ignore_event): New function.
6213 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6214 references to cancel_breakpoints. Adjust to renames. Also give
6215 equal priority to all LWPs that have had events in non-stop mode.
6216 If reporting a software breakpoint event, unadjust the LWP's PC.
6217 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6218 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6219 Adjust.
6220 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6221 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6222 (linux_stopped_by_watchpoint): Adjust.
6223 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6224 * linux-low.h (enum lwp_stop_reason): New.
6225 (struct lwp_info) <stop_pc>: Adjust comment.
6226 <stopped_by_watchpoint>: Delete field.
6227 <stop_reason>: New field.
6228 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6229 * mem-break.c (software_breakpoint_inserted_here)
6230 (hardware_breakpoint_inserted_here): New function.
6231 * mem-break.h (software_breakpoint_inserted_here)
6232 (hardware_breakpoint_inserted_here): Declare.
6233 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6234 (cancel_breakpoints): Delete.
6235 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6236 (upload_fast_traceframes): Remove references to
6237 cancel_breakpoints.
6238
6239 2015-01-09 Pedro Alves <palves@redhat.com>
6240
6241 * thread-db.c (find_new_threads_callback): Ignore thread if the
6242 kernel thread ID is -1.
6243
6244 2015-01-09 Pedro Alves <palves@redhat.com>
6245
6246 * linux-low.c (linux_attach_fail_reason_string): Move to
6247 nat/linux-ptrace.c, and rename.
6248 (linux_attach_lwp): Update comment.
6249 (attach_proc_task_lwp_callback): New function.
6250 (linux_attach): Adjust to rename and use
6251 linux_proc_attach_tgid_threads.
6252 (linux_attach_fail_reason_string): Delete declaration.
6253
6254 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6255
6256 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6257 * server.c (gdbserver_version): Likewise.
6258
6259 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6260
6261 * remote-utils.c: Include ctype.h.
6262 (input_interrupt): Explicitly handle the case when the char
6263 received is the NUL byte. Improve the printing of non-ASCII
6264 characters.
6265
6266 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6267
6268 * linux-low.c (linux_low_filter_event): Update call to
6269 linux_enable_event_reporting following the addition of
6270 a new parameter to that function.
6271
6272 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6273
6274 PR server/17457
6275 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6276 (AARCH64_FPCR_REGNO): Likewise.
6277 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6278 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6279 (aarch64_store_fpregset): Likewise.
6280
6281 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6282
6283 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6284 Remove FIXME comment about assumption about N.
6285
6286 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6287
6288 * configure.ac: If large-file support is disabled in GDBserver,
6289 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6290 * configure: Regenerate.
6291
6292 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6293
6294 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6295 warning upon ENODATA from ptrace.
6296 * linux-s390-low.c (s390_store_tdb): New.
6297 (s390_regsets): Add regset for NT_S390_TDB.
6298
6299 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6300
6301 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6302 without a fill_function.
6303 * linux-s390-low.c (s390_fill_last_break): Remove.
6304 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6305 (s390_arch_setup): Use regset's size instead of fill_function for
6306 loop end condition.
6307
6308 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6309
6310 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6311 the regset's store function when ptrace returned an error.
6312 * regcache.c (get_thread_regcache): Invalidate register cache
6313 before fetching inferior's registers.
6314
6315 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6316
6317 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6318 while-loop as for-loop.
6319 (regsets_store_inferior_registers): Likewise.
6320
6321 2014-11-28 Yao Qi <yao@codesourcery.com>
6322
6323 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6324 * config.in, configure: Re-generate.
6325 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6326 is defined.
6327
6328 2014-11-21 Yao Qi <yao@codesourcery.com>
6329
6330 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6331 (AC_CHECK_HEADERS): Remove malloc.h.
6332 * configure: Re-generated.
6333 * config.in: Re-generated.
6334 * server.h: Don't include alloca.h and malloc.h.
6335 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6336 Don't include malloc.h.
6337
6338 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6339
6340 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6341 corresponding ERRNO check in same block.
6342
6343 2014-11-12 Pedro Alves <palves@redhat.com>
6344
6345 * server.c (cont_thread): Update comment.
6346 (start_inferior, attach_inferior): No longer clear cont_thread.
6347 (handle_v_cont): No longer set cont_thread.
6348 (captured_main): Clear cont_thread each time a GDB connects.
6349
6350 2014-11-12 Pedro Alves <palves@redhat.com>
6351
6352 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6353 thread, and don't resume all threads if the Hc thread has exited.
6354
6355 2014-11-12 Pedro Alves <palves@redhat.com>
6356
6357 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6358 the process group instead of to a specific LWP.
6359
6360 2014-10-15 Pedro Alves <palves@redhat.com>
6361
6362 PR server/17487
6363 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6364 parameter.
6365 (arm_set_thread_context): Delete.
6366 (the_low_target): Adjust.
6367 * win32-i386-low.c (debug_registers_changed)
6368 (debug_registers_used): Delete.
6369 (update_debug_registers_callback): New function.
6370 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6371 needing to update their debug registers.
6372 (win32_get_current_dr): New function.
6373 (x86_dr_low_get_addr, x86_dr_low_get_control)
6374 (x86_dr_low_get_status): Fetch the debug register from the thread
6375 record's context.
6376 (i386_initial_stuff): Adjust.
6377 (i386_get_thread_context): Remove current_event parameter. Don't
6378 clear debug_registers_changed nor copy DR values to
6379 debug_reg_state.
6380 (i386_set_thread_context): Delete.
6381 (i386_prepare_to_resume): New function.
6382 (i386_thread_added): Mark the thread as needing to update irs
6383 debug registers.
6384 (the_low_target): Remove i386_set_thread_context and install
6385 i386_prepare_to_resume.
6386 * win32-low.c (win32_get_thread_context): Adjust.
6387 (win32_set_thread_context): Use SetThreadContext
6388 directly.
6389 (win32_prepare_to_resume): New function.
6390 (win32_require_context): New function, factored out from ...
6391 (thread_rec): ... this.
6392 (continue_one_thread): Call win32_prepare_to_resume on each thread
6393 we're about to continue.
6394 (win32_resume): Call win32_prepare_to_resume on the event thread.
6395 * win32-low.h (struct win32_thread_info)
6396 <debug_registers_changed>: New field.
6397 (struct win32_target_ops): Change prototype of set_thread_context,
6398 delete set_thread_context and add prepare_to_resume.
6399 (win32_require_context): New declaration.
6400
6401 2014-10-08 Gary Benson <gbenson@redhat.com>
6402
6403 * server.h: Do not include common-exceptions.h.
6404
6405 2014-10-08 Gary Benson <gbenson@redhat.com>
6406
6407 * server.h: Do not include cleanups.h.
6408
6409 2014-09-30 James Hogan <james.hogan@imgtec.com>
6410
6411 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6412 mips64-dsp-linux.c.
6413
6414 2014-09-23 Yao Qi <yao@codesourcery.com>
6415
6416 * linux-low.c (lp_status_maybe_breakpoint): New function.
6417 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6418 (count_events_callback): Likewise.
6419 (select_event_lwp_callback): Likewise.
6420 (cancel_breakpoints_callback): Likewise.
6421
6422 2014-09-19 Don Breazeal <donb@codesourcery.com>
6423
6424 * linux-low.c (handle_extended_wait): Call
6425 linux_ptrace_get_extended_event.
6426 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6427 linux_is_extended_waitstatus.
6428
6429 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6430
6431 * Makefile.in (CPPFLAGS): Define.
6432 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6433 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6434
6435 2014-09-16 Gary Benson <gbenson@redhat.com>
6436
6437 * inferiors.h (current_inferior): Renamed as...
6438 (current_thread): New variable. All uses updated.
6439 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6440 (maybe_move_out_of_jump_pad): Likewise.
6441 (cancel_breakpoint): Likewise.
6442 (linux_low_filter_event): Likewise.
6443 (wait_for_sigstop): Likewise.
6444 (linux_resume_one_lwp): Likewise.
6445 (need_step_over_p): Likewise.
6446 (start_step_over): Likewise.
6447 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6448 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6449 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6450 and save_inferior as saved_thread.
6451 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6452 saved_thread.
6453 (regcache_invalidate_thread): Likewise.
6454 * remote-utils.c (prepare_resume_reply): Likewise.
6455 * thread-db.c (thread_db_get_tls_address): Likewise.
6456 (disable_thread_event_reporting): Likewise.
6457 (remove_thread_event_breakpoints): Likewise.
6458 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6459 as saved_thread.
6460 * target.h (set_desired_inferior): Renamed as...
6461 (set_desired_thread): New declaration. All uses updated.
6462 * server.c (myresume): Updated comment to reference thread instead
6463 of inferior.
6464 (handle_serial_event): Likewise.
6465 (handle_target_event): Likewise.
6466
6467 2014-09-12 Tom Tromey <tromey@redhat.com>
6468 Gary Benson <gbenson@redhat.com>
6469
6470 * regcache.h: Include common-regcache.h.
6471 (regcache_read_pc): Don't declare.
6472 * regcache.c (get_thread_regcache_for_ptid): New function.
6473
6474 2014-09-11 Tom Tromey <tromey@redhat.com>
6475 Gary Benson <gbenson@redhat.com>
6476
6477 * symbol.c: New file.
6478 * Makefile.in (SFILES): Add symbol.c.
6479 (OBS): Add symbol.o.
6480
6481 2014-09-11 Gary Benson <gbenson@redhat.com>
6482
6483 * target.c (target_stop_ptid, target_continue_ptid): New
6484 functions.
6485
6486 2014-09-11 Tom Tromey <tromey@redhat.com>
6487 Gary Benson <gbenson@redhat.com>
6488
6489 * target.h: Include target/target.h.
6490 * target.c (target_read_memory, target_read_uint32)
6491 (target_write_memory): New functions.
6492
6493 2014-09-11 Gary Benson <gbenson@redhat.com>
6494
6495 * server.h (debug_hw_points): Don't declare.
6496 * server.c (debug_hw_points): Don't define. Replace all uses
6497 with show_debug_regs.
6498 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6499 all uses with show_debug_regs.
6500
6501 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6502
6503 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6504 endianness into account.
6505 (ppc_supply_ptrace_register): Likewise.
6506
6507 2014-09-03 James Hogan <james.hogan@imgtec.com>
6508
6509 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6510 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6511
6512 2014-09-03 Gary Benson <gbenson@redhat.com>
6513
6514 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6515 ALL_DEBUG_ADDRESS_REGISTERS.
6516
6517 2014-09-02 Gary Benson <gbenson@redhat.com>
6518
6519 * i386-low.h: Renamed as...
6520 * x86-low.h: New file. All type, function and variable name
6521 prefixes changed from "i386_" to "x86_". All references updated.
6522 * i386-low.c: Renamed as...
6523 * x86-low.c: New file. All type, function and variable name
6524 prefixes changed from "i386_" to "x86_". All references updated.
6525
6526 2014-09-02 Gary Benson <gbenson@redhat.com>
6527
6528 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6529 (x86_linux_new_thread): Likewise.
6530
6531 2014-08-29 Gary Benson <gbenson@redhat.com>
6532
6533 * server.h (setjmp.h): Do not include.
6534 (toplevel): Do not declare.
6535 (common-exceptions.h): Include.
6536 (cleanups.h): Likewise.
6537 * server.c (toplevel): Do not define.
6538 (exit_code): New static global.
6539 (detach_or_kill_for_exit_cleanup): New function.
6540 (main): New function. Original main renamed to...
6541 (captured_main): New function.
6542 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6543
6544 2014-08-29 Gary Benson <gbenson@redhat.com>
6545
6546 * Makefile.in (SFILES): Add common/common-exceptions.c.
6547 (OBS): Add common-exceptions.o.
6548 (common-exceptions.o): New rule.
6549 * utils.c (prepare_to_throw_exception): New function.
6550
6551 2014-08-29 Gary Benson <gbenson@redhat.com>
6552
6553 * config.in: Regenerate.
6554 * configure: Likewise.
6555
6556 2014-08-29 Gary Benson <gbenson@redhat.com>
6557
6558 * Makefile.in (SFILES): Add common/cleanups.c.
6559 (OBS): cleanups.o.
6560 (cleanups.o): New rule.
6561
6562 2014-08-29 Gary Benson <gbenson@redhat.com>
6563
6564 * utils.c (internal_vwarning): New function.
6565
6566 2014-08-28 Gary Benson <gbenson@redhat.com>
6567
6568 * utils.h (fatal): Remove declaration.
6569 * utils.c (fatal): Remove function.
6570
6571 2014-08-28 Gary Benson <gbenson@redhat.com>
6572
6573 * tracepoint.c (gdb_agent_init): Replace fatal with
6574 perror_with_name.
6575 (initialize_tracepoint): Likewise.
6576
6577 2014-08-28 Gary Benson <gbenson@redhat.com>
6578
6579 * remote-utils.c (remote_prepare): Replace fatal with error.
6580
6581 2014-08-28 Gary Benson <gbenson@redhat.com>
6582
6583 * linux-low.c (linux_async): Replace fatal with warning.
6584 Tidy up and return.
6585 (linux_start_non_stop): Return -1 if linux_async failed.
6586
6587 2014-08-28 Gary Benson <gbenson@redhat.com>
6588
6589 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6590 gdb_assert.
6591 (i386_dr_low_get_addr): Remove vague comment.
6592 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6593 gdb_assert.
6594
6595 2014-08-28 Gary Benson <gbenson@redhat.com>
6596
6597 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6598 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6599 internal_error.
6600 (linux_resume_one_lwp): Likewise.
6601 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6602 gdb_assert.
6603 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6604 with internal_error.
6605 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6606 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6607 (find_register_by_name): Replace fatal with internal_error.
6608 (find_regno): Likewise.
6609 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6610 * thread-db.c (thread_db_create_event): Likewise.
6611 (thread_db_load_search): Likewise.
6612 (try_thread_db_load_1): Likewise.
6613 * tracepoint.c (get_jump_space_head): Replace fatal with
6614 internal_error.
6615 (claim_trampoline_space): Likewise.
6616 (have_fast_tracepoint_trampoline_buffer): Likewise.
6617 (cmd_qtstart): Likewise.
6618 (stop_tracing): Likewise.
6619 (fast_tracepoint_collecting): Likewise.
6620 (target_malloc): Likewise.
6621 (download_tracepoint): Likewise.
6622 (download_trace_state_variables): Replace check with gdb_assert.
6623 (upload_fast_traceframes): Replace fatal with internal_error.
6624
6625 2014-08-19 Tom Tromey <tromey@redhat.com>
6626 Gary Benson <gbenson@redhat.com>
6627
6628 * Makefile.in (SFILES): Add common/common-debug.c.
6629 (OBS): Add common-debug.o.
6630 (common-debug.o): New rule.
6631 * debug.h (debug_printf): Don't declare.
6632 * debug.c (debug_printf): Renamed and rewritten as...
6633 (debug_vprintf): New function.
6634
6635 2014-08-19 Gary Benson <gbenson@redhat.com>
6636
6637 * utils.h: Do not include print-utils.h.
6638
6639 2014-08-19 Tom Tromey <tromey@redhat.com>
6640 Gary Benson <gbenson@redhat.com>
6641
6642 * server.h: Add static assertion.
6643 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6644
6645 2014-08-19 Tom Tromey <tromey@redhat.com>
6646 Gary Benson <gbenson@redhat.com>
6647
6648 * Makefile.in (SFILES): Add common/errors.c.
6649 (OBS): Add errors.o.
6650 (IPA_OBS): Add errors-ipa.o.
6651 (errors.o): New rule.
6652 (errors-ipa.o): Likewise.
6653 * utils.h (perror_with_name, error, warning): Don't declare.
6654 * utils.c (warning): Renamed and rewritten as...
6655 (vwarning): New function.
6656 (error): Renamed and rewritten as...
6657 (verror): New function.
6658 (internal_error): Renamed and rewritten as...
6659 (internal_verror): New function.
6660
6661 2014-08-07 Gary Benson <gbenson@redhat.com>
6662
6663 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6664 * configure: Regenerate.
6665 * config.in: Likewise.
6666 * server.h: Do not include errno.h.
6667 * event-loop.c: Likewise.
6668 * hostio-errno.c: Likewise.
6669 * linux-low.c: Likewise.
6670 * remote-utils.c: Likewise.
6671 * spu-low.c: Likewise.
6672 * utils.c: Likewise.
6673 * gdbreplay.c: Unconditionally include errno.h.
6674
6675 2014-08-07 Gary Benson <gbenson@redhat.com>
6676
6677 * server.h: Do not include string.h.
6678 * event-loop.c: Likewise.
6679 * linux-low.c: Likewise.
6680 * regcache.c: Likewise.
6681 * remote-utils.c: Likewise.
6682 * spu-low.c: Likewise.
6683 * utils.c: Likewise.
6684
6685 2014-08-07 Gary Benson <gbenson@redhat.com>
6686
6687 * server.h: Do not include gdb_assert.h.
6688
6689 2014-08-07 Gary Benson <gbenson@redhat.com>
6690
6691 * server.h: Do not include common-utils.h.
6692
6693 2014-08-07 Gary Benson <gbenson@redhat.com>
6694
6695 * server.h: Do not include ptid.h.
6696 * notif.h: Likewise.
6697
6698 2014-08-07 Gary Benson <gbenson@redhat.com>
6699
6700 * server.h: Do not include gdb_locale.h.
6701
6702 2014-08-07 Gary Benson <gbenson@redhat.com>
6703
6704 * server.h: Do not include gdb/signals.h.
6705 * win32-low.c: Likewise.
6706
6707 2014-08-07 Gary Benson <gbenson@redhat.com>
6708
6709 * server.h: Do not include pathmax.h.
6710
6711 2014-08-07 Gary Benson <gbenson@redhat.com>
6712
6713 * server.h: Do not include libiberty.h.
6714 * linux-bfin-low.c: Likewise.
6715
6716 2014-08-07 Gary Benson <gbenson@redhat.com>
6717
6718 * server.h: Do not include ansidecl.h.
6719
6720 2014-08-07 Gary Benson <gbenson@redhat.com>
6721
6722 * linux-x86-low.c: Do not include stddef.h.
6723 * lynx-ppc-low.c: Likewise.
6724 * tracepoint.c: Likewise.
6725
6726 2014-08-07 Gary Benson <gbenson@redhat.com>
6727
6728 * server.h: Do not include stdarg.h.
6729 * nto-low.c: Likewise.
6730
6731 2014-08-07 Gary Benson <gbenson@redhat.com>
6732
6733 * server.h: Do not include stdlib.h.
6734 * inferiors.c: Likewise.
6735 * linux-low.c: Likewise.
6736 * regcache.c: Likewise.
6737 * spu-low.c: Likewise.
6738 * tracepoint.c: Likewise.
6739 * utils.c: Likewise.
6740
6741 2014-08-07 Gary Benson <gbenson@redhat.com>
6742
6743 * server.h: Do not include stdio.h.
6744 * linux-low.c: Likewise.
6745 * remote-utils.c: Likewise.
6746 * spu-low.c: Likewise.
6747 * utils.c: Likewise.
6748 * wincecompat.c: Likewise.
6749
6750 2014-08-06 Gary Benson <gbenson@redhat.com>
6751
6752 * regcache.c (init_register_cache): Move conditionals inside if.
6753
6754 2014-08-06 Gary Benson <gbenson@redhat.com>
6755
6756 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6757
6758 2014-07-31 Gary Benson <gbenson@redhat.com>
6759
6760 * ax.h: Do not include server.h.
6761 * gdbthread.h: Likewise.
6762 * lynx-low.h: Likewise.
6763 * notif.h: Likewise.
6764
6765 2014-07-30 Gary Benson <gbenson@redhat.com>
6766
6767 * server.h: Include common-defs.h.
6768 Do not include config.h or build-gnulib-gdbserver/config.h.
6769
6770 2014-07-30 Gary Benson <gbenson@redhat.com>
6771
6772 * hostio-errno.c: Move server.h to top of includes list.
6773 * inferiors.c: Likewise.
6774 * linux-x86-low.c: Likewise.
6775 * notif.c: Include server.h.
6776
6777 2014-07-24 Tom Tromey <tromey@redhat.com>
6778 Gary Benson <gbenson@redhat.com>
6779
6780 * server.h (CORE_ADDR): Now unsigned.
6781
6782 2014-07-16 Pedro Alves <palves@redhat.com>
6783
6784 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6785
6786 2014-07-15 Pedro Alves <palves@redhat.com>
6787
6788 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6789 copy.
6790
6791 2014-07-11 Pedro Alves <palves@redhat.com>
6792
6793 * linux-low.c (kill_wait_lwp): New function, based on
6794 kill_one_lwp_callback, but use my_waitpid directly.
6795 (kill_one_lwp_callback, linux_kill): Use it.
6796
6797 2014-06-23 Pedro Alves <palves@redhat.com>
6798
6799 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6800 before setting DR0..DR3.
6801
6802 2014-06-20 Gary Benson <gbenson@redhat.com>
6803
6804 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6805 * configure: Regenerated.
6806 * config.in: Likewise.
6807
6808 2014-06-20 Gary Benson <gbenson@redhat.com>
6809
6810 * Makefile.in (SFILES): Update locations for files moved
6811 from common to nat.
6812 (object file files): Reordered.
6813
6814 2014-06-20 Gary Benson <gbenson@redhat.com>
6815
6816 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6817 (i386_dr_low_set_addr): Likewise.
6818 (i386_dr_low_get_addr): Likewise.
6819 (i386_dr_low_can_set_control): Likewise.
6820 (i386_dr_low_set_control): Likewise.
6821 (i386_dr_low_get_control): Likewise.
6822 (i386_dr_low_get_status): Likewise.
6823 (i386_get_debug_register_length): Likewise.
6824 * linux-x86-low.c (i386_dr_low_set_addr):
6825 Changed signature. Made static.
6826 (i386_dr_low_get_addr): Likewise.
6827 (i386_dr_low_set_control): Likewise.
6828 (i386_dr_low_get_control): Likewise.
6829 (i386_dr_low_get_status): Likewise.
6830 (i386_dr_low): New global variable.
6831 * win32-i386-low.c (i386_dr_low_set_addr):
6832 Changed signature. Made static.
6833 (i386_dr_low_get_addr): Likewise.
6834 (i386_dr_low_set_control): Likewise.
6835 (i386_dr_low_get_control): Likewise.
6836 (i386_dr_low_get_status): Likewise.
6837 (i386_dr_low): New global variable.
6838
6839 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6840
6841 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6842 * Makefile.in (AR, AR_FLAGS): Define.
6843 * configure: Regenerate.
6844
6845 2014-06-19 Gary Benson <gbenson@redhat.com>
6846
6847 * Makefile.in (i386-dregs.o): New rule.
6848 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6849 * i386-low.c (target.h): Remove include.
6850 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6851 (DR_CONTROL_SHIFT): Likewise.
6852 (DR_CONTROL_SIZE): Likewise.
6853 (DR_RW_EXECUTE): Likewise.
6854 (DR_RW_WRITE): Likewise.
6855 (DR_RW_READ): Likewise.
6856 (DR_RW_IORW): Likewise.
6857 (DR_LEN_1): Likewise.
6858 (DR_LEN_2): Likewise.
6859 (DR_LEN_4): Likewise.
6860 (DR_LEN_8): Likewise.
6861 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6862 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6863 (DR_ENABLE_SIZE): Likewise.
6864 (DR_LOCAL_SLOWDOWN): Likewise.
6865 (DR_GLOBAL_SLOWDOWN): Likewise.
6866 (DR_CONTROL_RESERVED): Likewise.
6867 (I386_DR_CONTROL_MASK): Likewise.
6868 (I386_DR_VACANT): Likewise.
6869 (I386_DR_LOCAL_ENABLE): Likewise.
6870 (I386_DR_GLOBAL_ENABLE): Likewise.
6871 (I386_DR_DISABLE): Likewise.
6872 (I386_DR_SET_RW_LEN): Likewise.
6873 (I386_DR_GET_RW_LEN): Likewise.
6874 (I386_DR_WATCH_HIT): Likewise.
6875 (i386_wp_op_t): Likewise.
6876 (i386_show_dr): Likewise.
6877 (i386_length_and_rw_bits): Likewise.
6878 (i386_insert_aligned_watchpoint): Likewise.
6879 (i386_remove_aligned_watchpoint): Likewise.
6880 (i386_handle_nonaligned_watchpoint): Likewise.
6881 i386_update_inferior_debug_regs(): Likewise.
6882 (i386_dr_insert_watchpoint): Likewise.
6883 (i386_dr_remove_watchpoint): Likewise.
6884 (i386_dr_region_ok_for_watchpoint): Likewise.
6885 (i386_dr_stopped_data_address): Likewise.
6886 (i386_dr_stopped_by_watchpoint): Likewise.
6887
6888 2014-06-19 Gary Benson <gbenson@redhat.com>
6889
6890 * i386-low.c (i386_dr_show): Renamed to
6891 i386_show_dr and made static. All uses updated.
6892 (i386_dr_length_and_rw_bits): Renamed to
6893 i386_length_and_rw_bits and made static.
6894 All uses updated.
6895 (i386_dr_insert_aligned_watchpoint): Renamed to
6896 i386_insert_aligned_watchpoint and made static.
6897 All uses updated.
6898 (i386_dr_remove_aligned_watchpoint): Renamed to
6899 i386_remove_aligned_watchpoint and made static.
6900 All uses updated.
6901 (i386_dr_update_inferior_debug_regs): Renamed to
6902 i386_update_inferior_debug_regs and made static.
6903 All uses updated.
6904
6905 2014-06-18 Gary Benson <gbenson@redhat.com>
6906
6907 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6908 (i386_dr_low_can_set_control): Likewise.
6909 (i386_get_debug_register_length): Likewise.
6910 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6911 (i386_dr_low_can_set_control): Likewise.
6912 (i386_get_debug_register_length): Likewise.
6913
6914 2014-06-17 Gary Benson <gbenson@redhat.com>
6915
6916 * i386-low.h (i386-dregs.h): New include.
6917 (DR_FIRSTADDR): Now in i386-dregs.h.
6918 (DR_LASTADDR): Likewise.
6919 (DR_NADDR): Likewise.
6920 (DR_STATUS): Likewise.
6921 (DR_CONTROL): Likewise.
6922 (i386_debug_reg_state): Likewise.
6923 (i386_dr_insert_watchpoint): Likewise.
6924 (i386_dr_remove_watchpoint): Likewise.
6925 (i386_dr_region_ok_for_watchpoint): Likewise.
6926 (i386_dr_stopped_data_address): Likewise.
6927 (i386_dr_stopped_by_watchpoint): Likewise.
6928 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6929
6930 2014-06-18 Gary Benson <gbenson@redhat.com>
6931
6932 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6933 i386_dr_insert_watchpoint.
6934 (i386_low_remove_watchpoint): Renamed to
6935 i386_dr_remove_watchpoint.
6936 (i386_low_region_ok_for_watchpoint): Renamed to
6937 i386_dr_region_ok_for_watchpoint.
6938 (i386_low_stopped_data_address): Renamed to
6939 i386_dr_stopped_data_address.
6940 (i386_low_stopped_by_watchpoint): Renamed to
6941 i386_dr_stopped_by_watchpoint.
6942 * i386-low.c (i386_show_dr): Renamed to
6943 i386_dr_show and made nonstatic. All uses updated.
6944 (i386_length_and_rw_bits): Renamed to
6945 i386_dr_length_and_rw_bits and made nonstatic.
6946 All uses updated.
6947 (i386_insert_aligned_watchpoint): Renamed to
6948 i386_dr_insert_aligned_watchpoint and made nonstatic.
6949 All uses updated.
6950 (i386_remove_aligned_watchpoint): Renamed to
6951 i386_dr_remove_aligned_watchpoint and made nonstatic.
6952 All uses updated.
6953 (i386_update_inferior_debug_regs): Renamed to
6954 i386_dr_update_inferior_debug_regs and made nonstatic.
6955 All uses updated.
6956 (i386_low_insert_watchpoint): Renamed to
6957 i386_dr_insert_watchpoint. All uses updated.
6958 (i386_low_remove_watchpoint): Renamed to
6959 i386_dr_remove_watchpoint. All uses updated.
6960 (i386_low_region_ok_for_watchpoint): Renamed to
6961 i386_dr_region_ok_for_watchpoint. All uses updated.
6962 (i386_low_stopped_data_address): Renamed to
6963 i386_dr_stopped_data_address. All uses updated.
6964 (i386_low_stopped_by_watchpoint): Renamed to
6965 i386_dr_stopped_by_watchpoint. All uses updated.
6966
6967 2014-06-18 Gary Benson <gbenson@redhat.com>
6968
6969 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6970 (i386_dr_low_can_set_control): Likewise.
6971 (i386_insert_aligned_watchpoint): New check.
6972
6973 2014-06-18 Gary Benson <gbenson@redhat.com>
6974
6975 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6976 Renamed to state.
6977
6978 2014-06-18 Gary Benson <gbenson@redhat.com>
6979
6980 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6981 instead of fatal and error.
6982 (i386_handle_nonaligned_watchpoint): Likewise.
6983
6984 2014-06-18 Gary Benson <gbenson@redhat.com>
6985
6986 * i386-low.c (i386_get_debug_register_length): New macro.
6987 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6988 (i386_show_dr): Use debug_printf instead of fprintf. Use
6989 phex to format values.
6990
6991 2014-06-18 Gary Benson <gbenson@redhat.com>
6992
6993 * i386-low.h: Comment changes.
6994 * i386-low.c: Likewise.
6995
6996 2014-06-18 Gary Benson <gbenson@redhat.com>
6997
6998 * i386-low.c: Whitespace changes.
6999
7000 2014-06-12 Tom Tromey <tromey@redhat.com>
7001
7002 * utils.c (freeargv): Remove.
7003
7004 2014-06-12 Tom Tromey <tromey@redhat.com>
7005
7006 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7007 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7008 (parse_debug_format_options): Likewise.
7009 (gdbserver_usage): Likewise.
7010 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7011 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7012 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7013 against libiberty.
7014 ($(LIBGNU)): Depend on libiberty.
7015 (all-lib): Recurse into all subdirs.
7016 (install-only): Invoke "install" target in subdirs.
7017 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7018 targets.
7019 * configure: Rebuild.
7020 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7021 for vasprintf, vsnprintf, or gettimeofday.
7022 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7023 srv_tgtobj.
7024
7025 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7026
7027 * development.sh: Delete.
7028 * Makefile.in (config.status): Adjust dependency on development.sh.
7029 * configure.ac: Adjust development.sh source call.
7030 * configure: Regenerate.
7031
7032 2014-06-02 Pedro Alves <palves@redhat.com>
7033
7034 * ax.c (gdb_free_agent_expr): New function.
7035 * ax.h (gdb_free_agent_expr): New declaration.
7036 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7037 list.
7038 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7039 static.
7040 (clear_breakpoint_conditions_and_commands): New function.
7041 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7042 (clear_breakpoint_conditions_and_commands): New declaration.
7043
7044 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7045
7046 * linux-aarch64-low.c (asm/ptrace.h): Include.
7047
7048 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7049
7050 Fix TLS access for -static -pthread.
7051 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7052 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7053 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7054
7055 2014-05-20 Pedro Alves <palves@redhat.com>
7056
7057 * linux-aarch64-low.c (aarch64_insert_point)
7058 (aarch64_remove_point): No longer check whether the type is
7059 supported here. Adjust to new interface.
7060 (the_low_target): Install aarch64_supports_z_point_type as
7061 supports_z_point_type method.
7062 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7063 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7064 instead of a Z packet char. Adjust.
7065 (arm_supports_z_point_type): New function.
7066 (arm_insert_point, arm_remove_point): Adjust to new interface.
7067 (the_low_target): Install arm_supports_z_point_type.
7068 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7069 (cris_insert_point, cris_remove_point): Adjust to new interface.
7070 Don't check whether the type is supported here.
7071 (the_low_target): Install cris_supports_z_point_type.
7072 * linux-low.c (linux_supports_z_point_type): New function.
7073 (linux_insert_point, linux_remove_point): Adjust to new interface.
7074 * linux-low.h (struct linux_target_ops) <insert_point,
7075 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7076 raw_breakpoint pointer parameter.
7077 <supports_z_point_type>: New method.
7078 * linux-mips-low.c (mips_supports_z_point_type): New function.
7079 (mips_insert_point, mips_remove_point): Adjust to new interface.
7080 Use mips_supports_z_point_type.
7081 (the_low_target): Install mips_supports_z_point_type.
7082 * linux-ppc-low.c (the_low_target): Install NULL as
7083 supports_z_point_type method.
7084 * linux-s390-low.c (the_low_target): Install NULL as
7085 supports_z_point_type method.
7086 * linux-sparc-low.c (the_low_target): Install NULL as
7087 supports_z_point_type method.
7088 * linux-x86-low.c (x86_supports_z_point_type): New function.
7089 (x86_insert_point): Adjust to new insert_point interface. Use
7090 insert_memory_breakpoint. Adjust to new
7091 i386_low_insert_watchpoint interface.
7092 (x86_remove_point): Adjust to remove_point interface. Use
7093 remove_memory_breakpoint. Adjust to new
7094 i386_low_remove_watchpoint interface.
7095 (the_low_target): Install x86_supports_z_point_type.
7096 * lynx-low.c (lynx_target_ops): Install NULL as
7097 supports_z_point_type callback.
7098 * nto-low.c (nto_supports_z_point_type): New.
7099 (nto_insert_point, nto_remove_point): Adjust to new interface.
7100 (nto_target_ops): Install nto_supports_z_point_type.
7101 * mem-break.c: Adjust intro comment.
7102 (struct raw_breakpoint) <raw_type, size>: New fields.
7103 <inserted>: Update comment.
7104 <shlib_disabled>: Delete field.
7105 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7106 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7107 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7108 (raw_bkpt_type_to_target_hw_bp_type): New function.
7109 (find_enabled_raw_code_breakpoint_at): New function.
7110 (find_raw_breakpoint_at): New type and size parameters. Use them.
7111 (insert_memory_breakpoint): New function, based off
7112 set_raw_breakpoint_at.
7113 (remove_memory_breakpoint): New function.
7114 (set_raw_breakpoint_at): Reimplement.
7115 (set_breakpoint): New, based on set_breakpoint_at.
7116 (set_breakpoint_at): Reimplement.
7117 (delete_raw_breakpoint): Go through the_target->remove_point
7118 instead of assuming memory breakpoints.
7119 (find_gdb_breakpoint_at): Delete.
7120 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7121 (find_gdb_breakpoint): New function.
7122 (set_gdb_breakpoint_at): Delete.
7123 (z_type_supported): New function.
7124 (set_gdb_breakpoint_1): New function, loosely based off
7125 set_gdb_breakpoint_at.
7126 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7127 (delete_gdb_breakpoint_at): Delete.
7128 (delete_gdb_breakpoint_1): New function, loosely based off
7129 delete_gdb_breakpoint_at.
7130 (delete_gdb_breakpoint): New function.
7131 (clear_gdb_breakpoint_conditions): Rename to ...
7132 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7133 breakpoint.
7134 (add_condition_to_breakpoint): Make static.
7135 (add_breakpoint_condition): Take a struct breakpoint pointer
7136 instead of an address. Adjust.
7137 (gdb_condition_true_at_breakpoint): Rename to ...
7138 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7139 z_type parameter.
7140 (gdb_condition_true_at_breakpoint): Reimplement.
7141 (add_breakpoint_commands): Take a struct breakpoint pointer
7142 instead of an address. Adjust.
7143 (gdb_no_commands_at_breakpoint): Rename to ...
7144 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7145 parameter. Return true if no breakpoint was found. Change debug
7146 output.
7147 (gdb_no_commands_at_breakpoint): Reimplement.
7148 (run_breakpoint_commands): Rename to ...
7149 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7150 and change return type to boolean.
7151 (run_breakpoint_commands): New function.
7152 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7153 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7154 breakpoint. Go through the_target->remove_point instead of
7155 assuming memory breakpoint.
7156 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7157 software and hardware breakpoints.
7158 (reinsert_raw_breakpoint): Go through the_target->insert_point
7159 instead of assuming memory breakpoint.
7160 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7161 software and hardware breakpoints.
7162 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7163 Check both software and hardware breakpoints.
7164 (validate_inserted_breakpoint): Assert the breakpoint is a
7165 software breakpoint. Set the inserted flag to -1 instead of
7166 setting shlib_disabled.
7167 (delete_disabled_breakpoints): Adjust.
7168 (validate_breakpoints): Only validate software breakpoints.
7169 Adjust to inserted flag change.
7170 (check_mem_read, check_mem_write): Skip breakpoint types other
7171 than software breakpoints. Adjust to inserted flag change.
7172 * mem-break.h (enum raw_bkpt_type): New enum.
7173 (raw_breakpoint, struct process_info): Forward declare.
7174 (Z_packet_to_target_hw_bp_type): Delete declaration.
7175 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7176 (set_gdb_breakpoint, delete_gdb_breakpoint)
7177 (clear_breakpoint_conditions): New declarations.
7178 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7179 (breakpoint_inserted_here): Update comment.
7180 (add_breakpoint_condition, add_breakpoint_commands): Replace
7181 address parameter with a breakpoint pointer parameter.
7182 (gdb_breakpoint_here): Update comment.
7183 (delete_gdb_breakpoint_at): Delete.
7184 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7185 * server.c (process_point_options): Take a struct breakpoint
7186 pointer instead of an address. Adjust.
7187 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7188 delete_gdb_breakpoint.
7189 * spu-low.c (spu_target_ops): Install NULL as
7190 supports_z_point_type method.
7191 * target.h: Include mem-break.h.
7192 (struct target_ops) <prepare_to_access_memory>: Update comment.
7193 <supports_z_point_type>: New field.
7194 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7195 instead of a char. Also take a raw breakpoint pointer.
7196 * win32-arm-low.c (the_low_target): Install NULL as
7197 supports_z_point_type.
7198 * win32-i386-low.c (i386_supports_z_point_type): New function.
7199 (i386_insert_point, i386_remove_point): Adjust to new interface.
7200 (the_low_target): Install i386_supports_z_point_type.
7201 * win32-low.c (win32_supports_z_point_type): New function.
7202 (win32_insert_point, win32_remove_point): Adjust to new interface.
7203 (win32_target_ops): Install win32_supports_z_point_type.
7204 * win32-low.h (struct win32_target_ops):
7205 <supports_z_point_type>: New method.
7206 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7207 instead of a char. Also take a raw breakpoint pointer.
7208
7209 2014-05-20 Pedro Alves <palves@redhat.com>
7210
7211 * mem-break.h: Include break-common.h.
7212 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7213 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7214 (Z_packet_to_target_hw_bp_type): New declaration.
7215 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7216 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7217 (Z_PACKET_ACCESS_WP): Delete macros.
7218 (Z_packet_to_hw_type): Delete function.
7219 * i386-low.h: Don't include break-common.h here.
7220 (Z_packet_to_hw_type): Delete declaration.
7221 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7222 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7223 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7224 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7225 * linux-aarch64-low.c: Don't include break-common.h here.
7226 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7227 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7228 (Z_packet_to_target_hw_bp_type): Delete function.
7229 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7230 function.
7231 (mips_insert_point, mips_remove_point): Use
7232 Z_packet_to_target_hw_bp_type.
7233
7234 2014-05-20 Pedro Alves <palves@redhat.com>
7235
7236 * linux-aarch64-low.c: Include break-common.h.
7237 (enum target_point_type): Delete.
7238 (Z_packet_to_point_type): Rename to ...
7239 (Z_packet_to_target_hw_bp_type): ... this, and return a
7240 target_hw_bp_type instead.
7241 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7242 instead of an enum target_point_type.
7243 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7244 breakpoint type.
7245 (aarch64_dr_state_insert_one_point)
7246 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7247 (aarch64_handle_aligned_watchpoint)
7248 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7249 Take an enum target_hw_bp_type instead of an enum
7250 target_point_type.
7251 (aarch64_supports_z_point_type): New function.
7252 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7253 use Z_packet_to_target_hw_bp_type.
7254
7255 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7256
7257 * configure.ac: Only use -Werror by default when DEVELOPMENT
7258 is true.
7259 * configure: Regenerate.
7260
7261 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7262
7263 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7264 * linux-x86-low.c (X86_64_USER_REGS): New.
7265 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7266
7267 2014-04-28 Yao Qi <yao@codesourcery.com>
7268
7269 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7270 name.
7271
7272 2014-04-25 Pedro Alves <palves@redhat.com>
7273
7274 PR server/16255
7275 * linux-low.c (linux_attach_fail_reason_string): New function.
7276 (linux_attach_lwp): Delete.
7277 (linux_attach_lwp_1): Rename to ...
7278 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7279 argument. Remove "initial" parameter. Return int instead of
7280 void. Don't error or warn here.
7281 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7282 failure to attach to the tgid. Call warning when failing to
7283 attach to an lwp.
7284 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7285 argument. Remove "initial" parameter. Return int instead of
7286 void. Don't error or warn here.
7287 (linux_attach_fail_reason_string): New declaration.
7288 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7289 interface change. Use linux_attach_fail_reason_string.
7290
7291 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7292 Walfred Tedeschi <walfred.tedeschi@intel.com>
7293
7294 * Makefile.in: Added rules to handle new files
7295 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7296 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7297 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7298 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7299 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7300 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7301 x32-avx512-linux.o.
7302 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7303 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7304 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7305 i386/x32-avx512.xml.
7306 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7307 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7308 i386/x32-avx512-linux.xml.
7309 * i387-fp.c (num_avx512_k_registers): New constant for number
7310 of K registers.
7311 (num_avx512_zmmh_low_registers): New constant for number of
7312 lower ZMM registers (0-15).
7313 (num_avx512_zmmh_high_registers): New constant for number of
7314 higher ZMM registers (16-31).
7315 (num_avx512_ymmh_registers): New contant for number of higher
7316 YMM registers (ymm16-31 added by avx521 on x86_64).
7317 (num_avx512_xmm_registers): New constant for number of higher
7318 XMM registers (xmm16-31 added by AVX512 on x86_64).
7319 (struct i387_xsave): Add space for AVX512 registers.
7320 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7321 Add code to handle AVX512 registers.
7322 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7323 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7324 prototypei from generated file.
7325 (tdesc_amd64_avx512_linux): Likewise.
7326 (init_registers_x32_avx512_linux): Likewise.
7327 (tdesc_x32_avx512_linux): Likewise.
7328 (init_registers_i386_avx512_linux): Likewise.
7329 (tdesc_i386_avx512_linux): Likewise.
7330 (x86_64_regmap): Add AVX512 registers.
7331 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7332 mask.
7333 (initialize_low_arch): Add code to initialize AVX512 registers.
7334
7335 2014-04-23 Pedro Alves <palves@redhat.com>
7336
7337 * mem-break.c (find_gdb_breakpoint_at): Make static.
7338 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7339
7340 2014-04-23 Pedro Alves <palves@redhat.com>
7341
7342 * i386-low.c: Don't include break-common.h here.
7343 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7344 prototype to take target_hw_bp_type as argument instead of a Z
7345 packet char.
7346 * i386-low.h: Include break-common.h here.
7347 (Z_packet_to_hw_type): Declare.
7348 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7349 prototypes.
7350 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7351 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7352 (x86_remove_point): Convert the packet number to a
7353 target_hw_bp_type before calling i386_low_remove_watchpoint.
7354 * win32-i386-low.c (i386_insert_point): Convert the packet number
7355 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7356 (i386_remove_point): Convert the packet number to a
7357 target_hw_bp_type before calling i386_low_remove_watchpoint.
7358
7359 2014-04-23 Pedro Alves <palves@redhat.com>
7360
7361 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7362
7363 2014-04-10 Pedro Alves <palves@redhat.com>
7364
7365 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7366 Check if the condition or command is NULL before checking if the
7367 breakpoint is known. On success, return true.
7368 * mem-break.h (add_breakpoint_condition): Document return.
7369 (add_breakpoint_commands): Add describing comment.
7370 * server.c (skip_to_semicolon): New function.
7371 (process_point_options): Use it.
7372
7373 2014-04-09 Pedro Alves <palves@redhat.com>
7374
7375 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7376 to lwpid_of.
7377
7378 2014-02-27 Pedro Alves <palves@redhat.com>
7379
7380 PR 12702
7381 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7382 macros.
7383 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7384 output.
7385 (last_thread_of_process_p): Take a PID argument instead of a
7386 thread pointer.
7387 (linux_wait_for_lwp): Delete.
7388 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7389 functions.
7390 (linux_low_filter_event): New function, party factored out from
7391 linux_wait_for_event.
7392 (linux_wait_for_event): Rename to ...
7393 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7394 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7395 sigsuspend. Check for zombie leaders.
7396 (linux_wait_for_event): Reimplement as wrapper around
7397 linux_wait_for_event_filtered.
7398 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7399 a normal or signal exit is seen, it's the whole process exiting.
7400 (wait_for_sigstop): No longer a for_each_inferior callback.
7401 Rewrite on top of linux_wait_for_event_filtered.
7402 (stop_all_lwps): Call wait_for_sigstop directly.
7403 * server.c (resume, handle_target_event): Handle
7404 TARGET_WAITKIND_NO_RESUMED.
7405
7406 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7407
7408 * win32-low.c (psapi_get_dll_name,
7409 * win32_CreateToolhelp32Snapshot): Delete.
7410 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7411 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7412 Delete.
7413 (handle_load_dll): Add function description.
7414 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7415
7416 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7417
7418 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7419 Add comment.
7420 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7421 base address when calling win32_add_one_solib.
7422 (handle_load_dll): Delete local variable load_addr.
7423 Remove 0x1000 offset applied to DLL base address when calling
7424 win32_add_one_solib.
7425 (handle_unload_dll): Add comment.
7426
7427 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7428
7429 * win32-low.c (win32_add_all_dlls): Renames
7430 win32_ensure_ntdll_loaded. Rewrite function documentation.
7431 Adjust implementation to always load all DLLs.
7432 Add 0x1000 offset to DLL base address when calling
7433 win32_add_one_solib.
7434 (child_initialization_done): New static global.
7435 (do_initial_child_stuff): Set child_initialization_done to
7436 zero during child initialization, and 1 after. Replace call
7437 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7438 Add comment.
7439 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7440 (handle_unload_dll): Add function documentation.
7441 (get_child_debug_event): Ignore load and unload DLL events
7442 during child initialization.
7443
7444 2014-02-20 Doug Evans <dje@google.com>
7445
7446 Remove global all_lwps.
7447 * inferiors.h (ptid_of): Move here from linux-low.h.
7448 (pid_of, lwpid_of): Ditto.
7449 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7450 parameter is a struct thread_info * now.
7451 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7452 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7453 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7454 directly.
7455 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7456 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7457 * linux-arm-low.c (update_registers_callback): Update, "entry"
7458 parameter is a struct thread_info * now.
7459 Fetch lwpid from current_inferior directly.
7460 (arm_insert_point): Pass &all_threads to find_inferior instead of
7461 &all_lwps.
7462 (arm_remove_point): Ditto.
7463 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7464 (arm_prepare_to_resume): Fetch pid from thread.
7465 (arm_read_description): Fetch lwpid from current_inferior directly.
7466 * linux-low.c (all_lwps): Delete.
7467 (delete_lwp): Delete call to remove_inferior.
7468 (handle_extended_wait): Fetch lwpid from thread.
7469 (add_lwp): Don't set lwp->entry.id. Remove call to
7470 add_inferior_to_list.
7471 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7472 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7473 (kill_one_lwp_callback): Ditto.
7474 (linux_kill): Don't dereference NULL pointer.
7475 Fetch ptid,lwpid from thread.
7476 (get_detach_signal): Fetch ptid from thread.
7477 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7478 Simplify call to regcache_invalidate_thread.
7479 (delete_lwp_callback): Update, "entry" parameter is a
7480 struct thread_info * now. Fetch pid from thread.
7481 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7482 (status_pending_p_callback): Update, "entry" parameter is a
7483 struct thread_info * now. Fetch ptid from thread.
7484 (find_lwp_pid): Update, "entry" parameter is a
7485 struct thread_info * now.
7486 (linux_wait_for_lwp): Fetch pid from thread.
7487 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7488 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7489 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7490 (dequeue_one_deferred_signal): Ditto.
7491 (cancel_breakpoint): Fetch ptid from current_inferior.
7492 (linux_wait_for_event): Pass &all_threads to find_inferior,
7493 not &all_lwps. Fetch ptid, lwpid from thread.
7494 (count_events_callback): Update, "entry" parameter is a
7495 struct thread_info * now.
7496 (select_singlestep_lwp_callback): Ditto.
7497 (select_event_lwp_callback): Ditto.
7498 (cancel_breakpoints_callback): Ditto.
7499 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7500 not &all_lwps.
7501 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7502 (unsuspend_one_lwp): Update, "entry" parameter is a
7503 struct thread_info * now.
7504 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7505 not &all_lwps.
7506 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7507 Fetch lwpid from thread, not lwp.
7508 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7509 Pass &all_threads to find_inferior, not &all_lwps.
7510 (send_sigstop): Fetch lwpid from thread, not lwp.
7511 (send_sigstop_callback): Update, "entry" parameter is a
7512 struct thread_info * now.
7513 (suspend_and_send_sigstop_callback): Ditto.
7514 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7515 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7516 struct thread_info * now.
7517 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7518 from thread, lwp.
7519 (lwp_running): Update, "entry" parameter is a
7520 struct thread_info * now.
7521 (stop_all_lwps): Fetch ptid from thread.
7522 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7523 (linux_resume_one_lwp): Fetch lwpid from thread.
7524 (linux_set_resume_request): Update, "entry" parameter is a
7525 struct thread_info * now. Fetch pid, lwpid from thread.
7526 (resume_status_pending_p): Update, "entry" parameter is a
7527 struct thread_info * now.
7528 (need_step_over_p): Ditto. Fetch lwpid from thread.
7529 (start_step_over): Fetch lwpid from thread.
7530 (linux_resume_one_thread): Update, "entry" parameter is a
7531 struct thread_info * now. Fetch lwpid from thread.
7532 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7533 (proceed_one_lwp): Update, "entry" parameter is a
7534 struct thread_info * now. Fetch lwpid from thread.
7535 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7536 struct thread_info * now.
7537 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7538 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7539 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7540 directly.
7541 (regsets_store_inferior_registers): Ditto.
7542 (fetch_register, store_register): Ditto.
7543 (linux_read_memory, linux_write_memory): Ditto.
7544 (linux_request_interrupt): Ditto.
7545 (linux_read_auxv): Ditto.
7546 (linux_xfer_siginfo): Ditto.
7547 (linux_qxfer_spu): Ditto.
7548 (linux_qxfer_libraries_svr4): Ditto.
7549 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7550 moved to inferiors.h.
7551 (get_lwp): Delete.
7552 (get_thread_lwp): Update.
7553 (struct lwp_info): Delete member "entry". Simplify comment for
7554 member "thread".
7555 (all_lwps): Delete.
7556 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7557 current_inferior directly.
7558 (update_watch_registers_callback): Update, "entry" parameter is a
7559 struct thread_info * now. Fetch pid from thread.
7560 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7561 (mips_insert_point): Fetch lwpid from current_inferior.
7562 Pass &all_threads to find_inferior, not &all_lwps.
7563 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7564 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7565 directly.
7566 (mips_stopped_data_address): Ditto.
7567 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7568 directly.
7569 * linux-tile-low.c (tile_arch_setup): Ditto.
7570 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7571 (update_debug_registers_callback): Update, "entry" parameter is a
7572 struct thread_info * now. Fetch pid from thread.
7573 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7574 Pass &all_threads to find_inferior, not &all_lwps.
7575 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7576 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7577 Pass &all_threads to find_inferior, not &all_lwps.
7578 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7579 (i386_dr_low_get_status): Ditto.
7580 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7581 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7582 (x86_linux_read_description): Ditto.
7583 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7584
7585 2014-02-20 Doug Evans <dje@google.com>
7586
7587 * inferiors.c (get_first_inferior): Fix buglet.
7588
7589 2014-02-19 Doug Evans <dje@google.com>
7590
7591 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7592 * inferiors.c (add_thread): Change result type to struct thread_info *.
7593 All callers updated.
7594 (add_lwp): Call add_thread here instead of in callers.
7595 All callers updated.
7596 * linux-low.h (get_lwp_thread): Rewrite.
7597 (struct lwp_info): New member "thread".
7598
7599 2014-02-19 Doug Evans <dje@google.com>
7600
7601 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7602 All callers updated.
7603
7604 2014-02-19 Doug Evans <dje@google.com>
7605
7606 * inferiors.c (add_thread): Fix whitespace.
7607
7608 2014-02-19 Doug Evans <dje@google.com>
7609
7610 * dll.c (clear_dlls): Replace accessing list implemention details
7611 with API function.
7612 * gdbthread.h (get_first_thread): Declare.
7613 * inferiors.c (for_each_inferior_with_data): New function.
7614 (get_first_thread): New function.
7615 (find_thread_ptid): Simplify.
7616 (get_first_inferior): New function.
7617 (clear_list): Delete.
7618 (one_inferior_p): New function.
7619 (clear_inferior_list): New function.
7620 (clear_inferiors): Update.
7621 * inferiors.h (for_each_inferior_with_data): Declare.
7622 (clear_inferior_list): Declare.
7623 (one_inferior_p): Declare.
7624 (get_first_inferior): Declare.
7625 * linux-low.c (linux_wait_for_event): Replace accessing list
7626 implemention details with API function.
7627 * server.c (target_running): Ditto.
7628 (accumulate_file_name_length): New function.
7629 (emit_dll_description): New function.
7630 (handle_qxfer_libraries): Replace accessing list implemention
7631 details with API function.
7632 (handle_qxfer_threads_worker): New function.
7633 (handle_qxfer_threads_proper): Replace accessing list implemention
7634 details with API function.
7635 (handle_query): Ditto.
7636 (visit_actioned_threads_callback_ftype): New typedef.
7637 (visit_actioned_threads_data): New struct.
7638 (visit_actioned_threads): Rewrite to be find_inferior callback.
7639 (resume): Call find_inferior.
7640 (handle_status): Replace accessing list implemention
7641 details with API function.
7642 (process_serial_event): Replace accessing list implemention details
7643 with API function.
7644 * target.c (set_desired_inferior): Replace accessing list implemention
7645 details with API function.
7646 * tracepoint.c (same_process_p): New function.
7647 (gdb_agent_about_to_close): Replace accessing list implemention
7648 details with API function.
7649 * win32-low.c (child_delete_thread): Replace accessing list
7650 implemention details with API function.
7651 (match_dll_by_basename): New function.
7652 (dll_is_loaded_by_basename): New function.
7653 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7654 details call to dll_is_loaded_by_basename.
7655
7656 2014-02-19 Doug Evans <dje@google.com>
7657
7658 * dll.h (struct dll_info): Add comment.
7659 * gdbthread.h (struct thread_info): Add comment.
7660 (current_ptid): Simplify.
7661 * inferiors.c (add_process): Update.
7662 (remove_process): Update.
7663 * inferiors.h (struct process_info): Rename member "head" to "entry".
7664 * linux-low.c (delete_lwp): Update.
7665 (add_lwp): Update.
7666 (last_thread_of_process_p): Update.
7667 (kill_one_lwp_callback, linux_kill): Update.
7668 (status_pending_p_callback): Update.
7669 (wait_for_sigstop): Update. Simplify read of ptid.
7670 (start_step_over): Update.
7671 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7672 (get_lwp_thread): Update.
7673 (struct lwp_info): Rename member "head" to "entry".
7674 * regcache.h (inferior_list_entry): Delete.
7675 * server.c (kill_inferior_callback): Update.
7676 (detach_or_kill_inferior_callback): Update.
7677 (print_started_pid): Update.
7678 (print_attached_pid): Update.
7679 (process_serial_event): Simplify read of ptid.
7680 * thread-db.c (thread_db_create_event): Update.
7681 (thread_db_get_tls_address): Update.
7682 * win32-low.c (current_inferior_ptid): Simplify.
7683
7684 2014-02-19 Tom Tromey <tromey@redhat.com>
7685
7686 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7687 argument.
7688 (target_supports_btrace): Update.
7689
7690 2014-02-14 Yao Qi <yao@codesourcery.com>
7691
7692 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7693 (rsp-low-ipa.o): New target.
7694
7695 2014-02-12 Tom Tromey <tromey@redhat.com>
7696
7697 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7698 convert_ascii_to_int.
7699 * regcache.c (registers_to_string): Likewise.
7700 * remote-utils.c (decode_M_packet): Likewise.
7701 * server.c (process_serial_event): Likewise.
7702
7703 2014-02-12 Tom Tromey <tromey@redhat.com>
7704
7705 * server.c (handle_query, handle_v_run): Use hex2bin, not
7706 unhexify.
7707 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7708
7709 2014-02-12 Tom Tromey <tromey@redhat.com>
7710
7711 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7712 convert_int_to_ascii.
7713 * regcache.c (registers_to_string, collect_register_as_string):
7714 Likewise.
7715 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7716 Likewise.
7717 * server.c (process_serial_event): Likewise.
7718 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7719 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7720
7721 2014-02-12 Tom Tromey <tromey@redhat.com>
7722
7723 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7724 bin2hex, not hexify.
7725 * tracepoint.c (cmd_qtstatus): Likewise.
7726
7727 2014-02-12 Tom Tromey <tromey@redhat.com>
7728
7729 * remote-utils.c (monitor_output): Pass explicit length to
7730 hexify.
7731
7732 2014-02-12 Tom Tromey <tromey@redhat.com>
7733
7734 * tracepoint.c: Include rsp-low.h.
7735 * server.c: Include rsp-low.h.
7736 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7737 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7738 declare.
7739 * remote-utils.c: Include rsp-low.h.
7740 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7741 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7742 (convert_int_to_ascii, convert_ascii_to_int): Move to
7743 common/rsp-low.c.
7744 * regcache.c: Include rsp-low.h.
7745 * ax.c: Include rsp-low.h.
7746 * Makefile.in (SFILES): Add common/rsp-low.c.
7747 (OBS): Add rsp-low.o.
7748 (rsp-low.o): New target.
7749
7750 2014-02-12 Tom Tromey <tromey@redhat.com>
7751
7752 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7753 Include print-utils.h.
7754 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7755 (plongest, thirty_two, phex_nz): Remove.
7756 * Makefile.in (SFILES): Add common/print-utils.c.
7757 (OBS): Add print-utils.o.
7758 (print-utils-ipa.o): New target.
7759 (print-utils.o): New target.
7760 (IPA_OBJS): Add print-utils-ipa.o.
7761
7762 2014-02-06 Tom Tromey <tromey@redhat.com>
7763
7764 * Makefile.in (SFILES): Fix indentation.
7765
7766 2014-02-05 Doug Evans <dje@google.com>
7767
7768 * linux-low.c (linux_wait_for_event): Improve comment.
7769 (linux_wait_1): Keep current_inferior in sync with event_child.
7770
7771 2014-01-22 Doug Evans <dje@google.com>
7772
7773 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7774
7775 2014-01-22 Doug Evans <dje@google.com>
7776
7777 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7778 * configure: Regenerate.
7779 * config.in: Regenerate.
7780 * Makefile.in (SFILES): Add debug.c.
7781 (OBS): Add debug.o.
7782 * debug.c: New file.
7783 * debug.h: New file.
7784 * linux-aarch64-low.c (*): Update all debugging printfs to use
7785 debug_printf instead of fprintf.
7786 * linux-arm-low.c (*): Ditto.
7787 * linux-cris-low.c (*): Ditto.
7788 * linux-crisv32-low.c (*): Ditto.
7789 * linux-m32r-low.c (*): Ditto.
7790 * linux-sparc-low.c (*): Ditto.
7791 * linux-x86.c (*): Ditto.
7792 * linux-low.c (*): Ditto.
7793 (linux_wait_1): Add calls to debug_enter, debug_exit.
7794 (linux_wait): Remove redundant debugging printf.
7795 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7796 (linux_resume, unstop_all_lwps): Ditto.
7797 * mem-break.c (*): Update all debugging printfs to use
7798 debug_printf instead of fprintf.
7799 * remote-utils.c (*): Ditto.
7800 * thread-db.c (*): Ditto.
7801 * server.c #include <ctype.h>, "gdb_vecs.h".
7802 (debug_threads): Moved to debug.c.
7803 (*): Update all debugging printfs to use debug_printf instead of
7804 fprintf.
7805 (start_inferior): Replace call to fflush with call to debug_flush.
7806 (monitor_show_help): Mention set debug-format.
7807 (parse_debug_format_options): New function.
7808 (handle_monitor_command): Handle "monitor set debug-format".
7809 (gdbserver_usage): Mention --debug-format.
7810 (main): Parse --debug-format.
7811 * server.h (debug_threads): Declaration moved to debug.h.
7812 #include "debug.h".
7813 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7814 trace_debug_1 that uses debug_printf.
7815 (tracepoint_look_up_symbols): Update all debugging printfs to use
7816 debug_printf instead of fprintf.
7817
7818 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7819
7820 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7821 sys/ptrace.h.
7822
7823 2014-01-17 Pedro Alves <palves@redhat.com>
7824
7825 PR build/16445
7826 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7827 defined after including gdb_proc_service.h.
7828
7829 2014-01-16 Doug Evans <dje@google.com>
7830
7831 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7832 (match_dll): Use it.
7833
7834 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7835
7836 * target.h (target_ops) <read_btrace>: Change parameters and
7837 return type to allow error reporting.
7838 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7839 trace reading errors on.
7840 * linux-low.c (linux_low_read_btrace): Pass trace reading
7841 errors on.
7842 (linux_low_disable_btrace): New.
7843
7844 2014-01-15 Doug Evans <dje@google.com>
7845
7846 * inferiors.c (thread_id_to_gdb_id): Delete.
7847 * inferiors.h (thread_id_to_gdb_id): Delete.
7848
7849 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7850
7851 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7852 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7853 versions.
7854
7855 2014-01-08 Pedro Alves <palves@redhat.com>
7856
7857 * server.c (handle_status): Don't discard previous queued stop
7858 replies or thread's pending status here.
7859 (main) <disconnection>: Do it here instead.
7860
7861 2014-01-08 Pedro Alves <palves@redhat.com>
7862
7863 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7864 * server.c (visit_actioned_threads, handle_pending_status): New
7865 function.
7866 (handle_v_cont): Factor out parts to ...
7867 (resume): ... this new function. If in all-stop, and a thread
7868 being resumed has a pending status, report it without actually
7869 resuming.
7870 (myresume): Adjust to use the new 'resume' function.
7871 (clear_pending_status_callback, set_pending_status_callback)
7872 (find_status_pending_thread_callback): New functions.
7873 (handle_status): Handle the case of multiple threads having
7874 interesting statuses to report. Report threads' real last signal
7875 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7876 with an interesting thread to report the status for, instead of
7877 always reporting the status of the first thread.
7878
7879 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7880
7881 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7882 * gdbreplay.c (gdbreplay_version): Likewise.
7883
7884 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7885
7886 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7887 iov.iov_len with the real length in use.
7888
7889 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7890
7891 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7892 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7893 for all targets that use win32-low.c.
7894 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7895 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7896
7897 2013-12-13 Pedro Alves <palves@redhat.com>
7898
7899 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7900 if equal to TARGET_WAITKIND_LOADED.
7901 * win32-low.c (cached_status): New static global.
7902 (win32_wait): Add declaration.
7903 (do_initial_child_stuff): Flush all initial pending debug events
7904 up to the initial breakpoint.
7905 (win32_wait): If CACHED_STATUS was set, return that instead
7906 of doing a real wait. Remove the code resuming the execution
7907 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7908 during the initial phase. Also remove the code changing
7909 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7910 TARGET_WAITKIND_STOPPED.
7911
7912 2013-12-11 Yao Qi <yao@codesourcery.com>
7913
7914 * notif.c (handle_notif_ack): Return 0 if no notification
7915 matches.
7916
7917 2013-11-20 Doug Evans <dje@google.com>
7918
7919 * linux-low.c (linux_set_resume_request): Fix comment.
7920
7921 2013-11-20 Doug Evans <dje@google.com>
7922
7923 * linux-low.c (resume_status_pending_p): Tweak comment.
7924
7925 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7926
7927 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7928 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7929 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7930 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7931 (srv_amd64_regobj): Add amd64-mpx.o.
7932 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7933 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7934 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7935 * i387-fp.c (num_pl_bnd_register) Added constant.
7936 (num_pl_bnd_cfg_registers) Added constant.
7937 (struct i387_xsave) Added reserved area and MPX fields.
7938 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7939 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7940 function.
7941 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7942 (init_registers_amd64_mpx_linux): Declare new function.
7943 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7944 (x86_64_regmap): Add MPX registers.
7945 (x86_linux_read_description): Add MPX case.
7946 (initialize_low_arch): Initialize MPX targets.
7947
7948 2013-11-18 Tom Tromey <tromey@redhat.com>
7949
7950 * configure: Rebuild.
7951 * configure.ac: Don't check for stdlib.h.
7952 * gdbreplay.c: Unconditionally include stdlib.h.
7953
7954 2013-11-18 Tom Tromey <tromey@redhat.com>
7955
7956 * config.in: Rebuild.
7957 * configure: Rebuild.
7958 * configure.ac: Don't use AC_HEADER_DIRENT.
7959
7960 2013-11-18 Tom Tromey <tromey@redhat.com>
7961
7962 * server.h: Don't check HAVE_STRING_H.
7963 * gdbreplay.c: Don't check HAVE_STRING_H.
7964 * configure: Rebuild.
7965
7966 2013-11-18 Tom Tromey <tromey@redhat.com>
7967
7968 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7969 LIBGNU.
7970
7971 2013-11-08 Tom Tromey <tromey@redhat.com>
7972
7973 * configure, config.in: Rebuild.
7974 * configure.ac: Remove unused configury.
7975
7976 2013-11-08 Tom Tromey <tromey@redhat.com>
7977
7978 * acinclude.m4: Include common.m4, codeset.m4.
7979 * configure, config.in: Rebuild.
7980 * configure.ac: Use GDB_AC_COMMON.
7981
7982 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7983
7984 * linux-s390-low.c (HWCAP_S390_TE): New define.
7985 (s390_arch_setup): Consider the TE field in the HWCAP for
7986 determining 'have_regset_tdb'.
7987
7988 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7989
7990 PR gdb/16014
7991 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7992 call to sizeof.
7993
7994 2013-10-02 Pedro Alves <palves@redhat.com>
7995
7996 * server.c (process_serial_event): Don't output "GDBserver
7997 exiting" if GDB is connected through stdio.
7998 * target.c (mywait): Likewise, be silent if GDB is connected
7999 through stdio.
8000
8001 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8002
8003 * lynx-low.c (lynx_add_threads_after_attach): New function.
8004 (lynx_attach): Remove call to add_thread. Add call to
8005 lynx_add_threads_after_attach instead.
8006
8007 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8008
8009 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8010 * config.in, configure: Regenerated.
8011
8012 2013-09-18 Yao Qi <yao@codesourcery.com>
8013
8014 PR server/15959
8015 * server.c (start_inferior): Clear 'resume_info'.
8016
8017 2013-09-16 Jiong Wang <jiwang@tilera.com>
8018
8019 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8020 for each register.
8021
8022 2013-09-16 Jiong Wang <jiwang@tilera.com>
8023
8024 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8025 linux-tile-low.o to srv_tgtobj.
8026
8027 2013-09-16 Will Newton <will.newton@linaro.org>
8028
8029 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8030 out regs.
8031
8032 2013-09-06 Pedro Alves <palves@redhat.com>
8033
8034 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8035 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8036 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8037 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8038 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8039 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8040
8041 2013-09-06 Pedro Alves <palves@redhat.com>
8042
8043 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8044 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8045
8046 2013-09-06 Pedro Alves <palves@redhat.com>
8047
8048 * linux-amd64-ipa.c: Include tracepoint.h.
8049 * linux-i386-ipa.c: Include tracepoint.h.
8050
8051 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8052
8053 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8054 (ps_get_thread_area): New function.
8055
8056 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8057
8058 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8059 (initialize_low_arch): Call init_registers_crisv32 rather than
8060 init_register_crisv32.
8061
8062 2013-09-05 Pedro Alves <palves@redhat.com>
8063
8064 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8065 to ...
8066 * hostio.h: ... this new file.
8067 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8068 win32-low.c: Include hostio.h.
8069
8070 2013-09-05 Pedro Alves <palves@redhat.com>
8071
8072 * server.h (gdb_client_data, handler_func, callback_handler_func)
8073 (delete_file_handler, add_file_handler, append_callback_event)
8074 (delete_callback_event, start_event_loop, initialize_event_loop):
8075 Move to event-loop.h and include it.
8076 * event-loop.h: New file.
8077
8078 2013-09-05 Pedro Alves <palves@redhat.com>
8079
8080 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8081 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8082 (loaded_dll, unloaded_dll): Move to ...
8083 * dll.h: ... this new file.
8084 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8085
8086 2013-09-05 Pedro Alves <palves@redhat.com>
8087
8088 * server.h (current_process, get_thread_process, all_processes)
8089 (add_inferior_to_list, for_each_inferior, current_inferior)
8090 (remove_inferior, add_process, remove_process, find_process_pid)
8091 (have_started_inferiors_p, have_attached_inferiors_p)
8092 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8093 (clear_inferiors, find_inferior, find_inferior_id)
8094 (inferior_target_data, set_inferior_target_data)
8095 (inferior_regcache_data, set_inferior_regcache_data): Move to
8096 inferiors.h, and include it.
8097 * inferiors.h: New file.
8098
8099 2013-09-05 Pedro Alves <palves@redhat.com>
8100
8101 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8102 Move ...
8103 * ax.h: ... here.
8104
8105 2013-09-05 Pedro Alves <palves@redhat.com>
8106
8107 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8108 tracepoint.h.
8109 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8110 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8111 (handle_tracepoint_general_set, handle_tracepoint_query)
8112 (tracepoint_finished_step, tracepoint_was_hit)
8113 (release_while_stepping_state_list, current_traceframe)
8114 (in_readonly_region, traceframe_read_mem)
8115 (fetch_traceframe_registers, traceframe_read_sdata)
8116 (traceframe_read_info, struct fast_tpoint_collect_status)
8117 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8118 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8119 (supply_fast_tracepoint_registers)
8120 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8121 (ipa_tdesc, claim_trampoline_space)
8122 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8123 (agent_mem_read, agent_get_trace_state_variable_value)
8124 (agent_set_trace_state_variable_value, agent_tsv_read)
8125 (agent_mem_read_string, get_raw_reg_func_addr)
8126 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8127 * tracepoint.h: ... this new file.
8128
8129 2013-09-05 Pedro Alves <palves@redhat.com>
8130
8131 * server.h (perror_with_name, error, fatal, warning, paddress)
8132 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8133 include it.
8134 * utils.h: New file.
8135
8136 2013-09-05 Pedro Alves <palves@redhat.com>
8137
8138 * server.h (remote_debug, noack_mode, transport_is_reliable)
8139 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8140 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8141 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8142 (write_enn, initialize_async_io, enable_async_io)
8143 (disable_async_io, check_remote_input_interrupt_request)
8144 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8145 (dead_thread_notify, prepare_resume_reply)
8146 (decode_address_to_semicolon, decode_address, decode_m_packet)
8147 (decode_M_packet, decode_X_packet, decode_xfer_write)
8148 (decode_search_memory_packet, unhexify, hexify)
8149 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8150 (look_up_one_symbol, relocate_instruction)
8151 (monitor_output): Move to remote-utils.h, and include it.
8152 * remote-utils.h: New file.
8153
8154 2013-09-05 Pedro Alves <palves@redhat.com>
8155
8156 * server.h (_): Delete.
8157
8158 2013-09-02 Pedro Alves <palves@redhat.com>
8159
8160 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8161 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8162 allocated.
8163 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8164
8165 2013-09-02 Pierre Muller <muller@sourceware.org>
8166
8167 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8168 or WriteProcessMemory complete successfully and handle
8169 ERROR_PARTIAL_COPY error.
8170
8171 2013-09-02 Pedro Alves <palves@redhat.com>
8172
8173 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8174 error instead of EIO.
8175
8176 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8177
8178 PR server/15604
8179 * linux-low.c: Include filestuff.h.
8180 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8181 * lynx-low.c: Include filestuff.h.
8182 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8183 * server.c: Include filestuff.h.
8184 (main): Call notice_open_fds.
8185 * spu-low.c: Include filestuff.h.
8186 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8187
8188 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8189
8190 * Makefile.in: Explain why ../target and ../nat are not
8191 listed as include file search paths.
8192 (linux-waitpid.o): New object file rule.
8193 * configure.srv (srv_native_linux_obj): New variable.
8194 Replace all occurrences of linux native object files with
8195 $srv_native_linux_obj.
8196 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8197 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8198 (linux_enable_event_reporting): Remove declaration.
8199 (my_waitpid): Moved to common/linux-waitpid.c.
8200 (linux_wait_for_event): Pass ptid when calling
8201 linux_enable_event_reporting.
8202 (linux_supports_tracefork_flag): Remove.
8203 (linux_enable_event_reporting): Likewise.
8204 (linux_tracefork_grandchild): Remove.
8205 (STACK_SIZE): Moved to common/linux-ptrace.c.
8206 (linux_tracefork_child): Remove.
8207 (linux_test_for_tracefork): Remove.
8208 (linux_look_up_symbols): Call linux_supports_traceclone.
8209 (initialize_low): Remove call to linux_test_for_tracefork.
8210 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8211 common/linux-ptrace.h.
8212 (PTRACE_TYPE_ARG4): Likewise.
8213 Include linux-ptrace.h.
8214
8215 2013-08-21 Pedro Alves <palves@redhat.com>
8216
8217 * config.in: Renegerate.
8218
8219 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8220
8221 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8222 (SFILES): Remove $(srcdir)/common/target-common.c and
8223 add $(srcdir)/target/waitstatus.c.
8224 (OBS): Remove target-common.o and add waitstatus.o.
8225 (server_h): Remove $(srcdir)/../common/target-common.h and
8226 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8227 and $(srcdir)/../target/waitstatus.h.
8228 (target-common.o): Remove.
8229 (waitstatus.o): New target object file.
8230 * target.h: Do not include target-common.h and
8231 include target/resume.h, target/wait.h and
8232 target/waitstatus.h.
8233
8234 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8235
8236 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8237 to PTRACE_TYPE_ARG3.
8238 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8239 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8240 PTRACE_TYPE_ARG4.
8241 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8242 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8243
8244 2013-07-27 Jie Zhang <jie@codesourcery.com>
8245 Daniel Jacobowitz <dan@codesourcery.com>
8246 Yao Qi <yao@codesourcery.com>
8247
8248 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8249 (mips-linux-watch.o): New rule.
8250 (mips_linux_watch_h): New variable.
8251 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8252 srv_tgtobj.
8253 * linux-mips-low.c: Include mips-linux-watch.h.
8254 (struct arch_process_info, struct arch_lwp_info): New.
8255 (update_watch_registers_callback): New function.
8256 (mips_linux_new_process, mips_linux_new_thread) New functions.
8257 (mips_linux_prepare_to_resume, mips_insert_point): New
8258 functions.
8259 (mips_remove_point, mips_stopped_by_watchpoint): New
8260 functions.
8261 (rsp_bp_type_to_target_hw_bp_type): New function.
8262 (mips_stopped_data_address): New function.
8263 (the_low_target): Add watchpoint support functions.
8264
8265 2013-07-27 Yao Qi <yao@codesourcery.com>
8266
8267 * i386-low.c: Include break-common.h.
8268 (enum target_hw_bp_type): Remove.
8269
8270 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8271
8272 * Makefile.in (SFILES): /common/target-common.c.
8273 (OBS): Add target-common.o.
8274 (server_h): Add $(srcdir)/../common/target-common.h.
8275 (target-common.o): New target.
8276 * server.c (queue_stop_reply_callback): Free
8277 status string after use.
8278 * target.c (target_waitstatus_to_string): Remove.
8279 * target.h: Include target-common.h.
8280 (resume_kind): Likewise.
8281 (target_waitkind): Likewise.
8282 (target_waitstatus): Likewise.
8283 (TARGET_WNOHANG): Likewise.
8284
8285 2013-07-04 Yao Qi <yao@codesourcery.com>
8286
8287 * Makefile.in (host_alias): Use @host_noncanonical@.
8288 (target_alias): Use @target_noncanonical@.
8289 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8290 ACX_NONCANONICAL_HOST.
8291 * configure: Regenerated.
8292
8293 Revert:
8294 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8295
8296 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8297 * configure: Rebuild.
8298 * Makefile.in (version_host, version_target): Get from configure.
8299 (version.c): Use $(version_host) and $(version_target).
8300
8301 2013-07-03 Pedro Alves <palves@redhat.com>
8302
8303 * Makefile.in (config.status): Depend on development.sh.
8304 * acinclude.m4: Include libmcheck.m4.
8305 * configure: Regenerate.
8306
8307 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8308
8309 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8310 attribute inside the parentheses.
8311 (winapi_DebugSetProcessKillOnExit): Ditto.
8312 (winapi_DebugBreakProcess): Ditto.
8313 (winapi_GenerateConsoleCtrlEvent): Ditto.
8314
8315 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8316
8317 * notif.h (notif_event): Add a dummy member to avoid compiler
8318 errors.
8319
8320 2013-07-01 Pedro Alves <palves@redhat.com>
8321
8322 * hostio.c (HOSTIO_PATH_MAX): Define.
8323 (require_filename, handle_open, handle_unlink, handle_readlink):
8324 Use it.
8325
8326 2013-07-01 Pedro Alves <palves@redhat.com>
8327
8328 * server.h: Include "pathmax.h".
8329 * linux-low.c: Don't include sys/param.h.
8330 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8331 MAXPATHLEN.
8332 * win32-low.c: Don't include sys/param.h.
8333 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8334
8335 2013-07-01 Pedro Alves <palves@redhat.com>
8336
8337 * event-loop.c: Don't check HAVE_UNISTD_H before including
8338 <unistd.h>.
8339 * gdbreplay.c: Likewise.
8340 * remote-utils.c: Likewise.
8341 * server.c: Likewise.
8342 * configure.ac: Don't check for unistd.h.
8343 * configure: Regenerate.
8344
8345 2013-06-28 Tom Tromey <tromey@redhat.com>
8346
8347 * Makefile.in (version.c): Use version.in, not
8348 common/version.in.
8349
8350 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8351
8352 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8353 * configure: Rebuild.
8354 * Makefile.in (version_host, version_target): Get from configure.
8355 (version.c): Use $(version_host) and $(version_target).
8356
8357 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8358
8359 Fix trace-status to output user name without trailing colon.
8360 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8361
8362 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8363
8364 Fix trace-status to output proper start-time and stop-time.
8365 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8366 output start time and stop time in hex as gdb expects.
8367
8368 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8369
8370 * tracepoint.c (build_traceframe_info_xml): Output trace state
8371 variables present in the trace buffer.
8372
8373 2013-06-24 Tom Tromey <tromey@redhat.com>
8374
8375 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8376 create-version.sh.
8377 (version.o): Remove.
8378 * gdbreplay.c: Include version.h.
8379 (version, host_name): Don't declare.
8380 * server.h: Include version.h.
8381 (version, host_name): Don't declare.
8382
8383 2013-06-12 Pedro Alves <palves@redhat.com>
8384
8385 * linux-x86-low.c (linux_is_elf64): Delete global.
8386 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8387 with local linux_pid_exe_is_elf_64_file use.
8388
8389 2013-06-11 Pedro Alves <palves@redhat.com>
8390
8391 * linux-low.c (regset_disabled, disable_regset): New functions.
8392 (regsets_fetch_inferior_registers)
8393 (regsets_store_inferior_registers): Use them.
8394 (initialize_regsets_info); Don't allocate the disabled_regsets
8395 array here.
8396 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8397 comment.
8398
8399 2013-06-11 Pedro Alves <palves@redhat.com>
8400
8401 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8402 xmalloc.
8403
8404 2013-06-11 Pedro Alves <palves@redhat.com>
8405
8406 * linux-x86-low.c (initialize_low_arch): Call
8407 init_registers_x32_avx_linux.
8408
8409 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8410
8411 Fix compatibility with Android Bionic.
8412 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8413 it is not empty.
8414
8415 2013-06-07 Pedro Alves <palves@redhat.com>
8416
8417 PR server/14823
8418 * Makefile.in (OBS): Add tdesc.o.
8419 (IPA_OBJS): Add tdesc-ipa.o.
8420 (tdesc-ipa.o): New rule.
8421 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8422 interface.
8423 * linux-low.c (new_inferior): Delete.
8424 (disabled_regsets, num_regsets): Delete.
8425 (linux_add_process): Adjust to set the new per-process
8426 new_inferior flag.
8427 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8428 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8429 was a stop. When calling arch_setup, switch the current inferior
8430 to the thread that got an event.
8431 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8432 (regsets_fetch_inferior_registers)
8433 (regsets_store_inferior_registers): New regsets_info parameter.
8434 Adjust to use it.
8435 (linux_register_in_regsets): New regs_info parameter. Adjust to
8436 use it.
8437 (register_addr, fetch_register, store_register): New usrregs_info
8438 parameter. Adjust to use it.
8439 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8440 parameter regs_info. Adjust to use it.
8441 (linux_fetch_registers): Get the current inferior's regs_info, and
8442 adjust to use it.
8443 (linux_store_registers): Ditto.
8444 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8445 (initialize_low): Don't initialize the target_regsets here. Call
8446 initialize_low_arch.
8447 * linux-low.h (target_regsets): Delete declaration.
8448 (struct regsets_info): New.
8449 (struct usrregs_info): New.
8450 (struct regs_info): New.
8451 (struct process_info_private) <new_inferior>: New field.
8452 (struct linux_target_ops): Delete the num_regs, regmap, and
8453 regset_bitmap fields. New field regs_info.
8454 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8455 * i387-fp.c (num_xmm_registers): Delete.
8456 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8457 calls to new interface.
8458 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8459 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8460 Infer the number of xmm registers from the regcache's target
8461 description.
8462 * i387-fp.h (num_xmm_registers): Delete.
8463 * inferiors.c (add_thread): Don't install the thread's regcache
8464 here.
8465 * proc-service.c (gregset_info): Fetch the current inferior's
8466 regs_info. Adjust to use it.
8467 * regcache.c: Include tdesc.h.
8468 (register_bytes, reg_defs, num_registers)
8469 (gdbserver_expedite_regs): Delete.
8470 (get_thread_regcache): If the thread doesn't have a regcache yet,
8471 create one, instead of aborting gdbserver.
8472 (regcache_invalidate_one): Rename to ...
8473 (regcache_invalidate_thread): ... this.
8474 (regcache_invalidate_one): New.
8475 (regcache_invalidate): Only invalidate registers of the current
8476 process.
8477 (init_register_cache): Add target_desc parameter, and use it.
8478 (new_register_cache): Ditto. Assert the target description has a
8479 non zero registers_size.
8480 (regcache_cpy): Add assertions. Adjust.
8481 (realloc_register_cache, set_register_cache): Delete.
8482 (registers_to_string, registers_from_string): Adjust.
8483 (find_register_by_name, find_regno, find_register_by_number)
8484 (register_cache_size): Add target_desc parameter, and use it.
8485 (free_register_cache_thread, free_register_cache_thread_one)
8486 (regcache_release, register_cache_size): New.
8487 (register_size): Add target_desc parameter, and use it.
8488 (register_data, supply_register, supply_register_zeroed)
8489 (supply_regblock, supply_register_by_name, collect_register)
8490 (collect_register_as_string, collect_register_by_name): Adjust.
8491 * regcache.h (struct target_desc): Forward declare.
8492 (struct regcache) <tdesc>: New field.
8493 (init_register_cache, new_register_cache): Add target_desc
8494 parameter.
8495 (regcache_invalidate_thread): Declare.
8496 (regcache_invalidate_one): Delete declaration.
8497 (regcache_release): Declare.
8498 (find_register_by_number, register_cache_size, register_size)
8499 (find_regno): Add target_desc parameter.
8500 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8501 declarations.
8502 * remote-utils.c: Include tdesc.h.
8503 (outreg, prepare_resume_reply): Adjust.
8504 * server.c: Include tdesc.h.
8505 (gdbserver_xmltarget): Delete declaration.
8506 (get_features_xml, process_serial_event): Adjust.
8507 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8508 declare.
8509 (struct process_info) <tdesc>: New field.
8510 (ipa_tdesc): Declare.
8511 * tdesc.c: New file.
8512 * tdesc.h: New file.
8513 * tracepoint.c: Include tdesc.h.
8514 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8515 (get_context_regcache): Adjust to pass ipa_tdesc down.
8516 (do_action_at_tracepoint): Adjust to get the register cache size
8517 from the context regcache's description.
8518 (traceframe_walk_blocks): Adjust to get the register cache size
8519 from the current trace frame's description.
8520 (traceframe_get_pc): Adjust to get current trace frame's
8521 description and pass it down.
8522 (gdb_collect): Adjust to get the register cache size from the
8523 IPA's description.
8524 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8525 (gdbserver_xmltarget): Delete.
8526 (initialize_low_tracepoint): Set the ipa's target description.
8527 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8528 (initialize_low_tracepoint): Set the ipa's target description.
8529 * linux-x86-low.c: Include tdesc.h.
8530 [__x86_64__] (is_64bit_tdesc): New.
8531 (ps_get_thread_area, x86_get_thread_area): Use it.
8532 (i386_cannot_store_register): Rename to ...
8533 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8534 (i386_cannot_fetch_register): Rename to ...
8535 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8536 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8537 to new interface.
8538 (target_regsets): Rename to ...
8539 (x86_regsets): ... this.
8540 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8541 interface.
8542 (x86_siginfo_fixup): Use is_64bit_tdesc.
8543 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8544 (tdesc_x32_avx_linux, tdesc_x32_linux)
8545 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8546 Declare.
8547 (x86_linux_update_xmltarget): Delete.
8548 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8549 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8550 (AMD64_LINUX_USER64_CS): New.
8551 (x86_linux_read_description): New, based on
8552 x86_linux_update_xmltarget.
8553 (same_process_callback): New.
8554 (x86_arch_setup_process_callback): New.
8555 (x86_linux_update_xmltarget): New.
8556 (x86_regsets_info): New.
8557 (amd64_linux_regs_info): New.
8558 (i386_linux_usrregs_info): New.
8559 (i386_linux_regs_info): New.
8560 (x86_linux_regs_info): New.
8561 (x86_arch_setup): Reimplement.
8562 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8563 (x86_emit_ops): Ditto.
8564 (the_low_target): Adjust. Install x86_linux_regs_info,
8565 x86_cannot_fetch_register, and x86_cannot_store_register.
8566 (initialize_low_arch): New.
8567 * linux-ia64-low.c (tdesc_ia64): Declare.
8568 (ia64_fetch_register): Adjust.
8569 (ia64_usrregs_info, regs_info): New globals.
8570 (ia64_regs_info): New function.
8571 (the_low_target): Adjust.
8572 (initialize_low_arch): New function.
8573 * linux-sparc-low.c (tdesc_sparc64): Declare.
8574 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8575 Adjust.
8576 (sparc_arch_setup): New function.
8577 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8578 (the_low_target): Adjust.
8579 (initialize_low_arch): New function.
8580 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8581 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8582 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8583 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8584 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8585 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8586 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8587 (tdesc_powerpc_isa205_vsx64l): Declare.
8588 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8589 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8590 (ppc_set_pc, ppc_get_hwcap): Adjust.
8591 (ppc_usrregs_info): Forward declare.
8592 (!__powerpc64__) ppc_regmap_adjusted: New global.
8593 (ppc_arch_setup): Adjust to the current process'es target
8594 description.
8595 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8596 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8597 (ppc_store_evrregset): Adjust.
8598 (target_regsets): Rename to ...
8599 (ppc_regsets): ... this, and make static.
8600 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8601 (ppc_regs_info): New function.
8602 (the_low_target): Adjust.
8603 (initialize_low_arch): New function.
8604 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8605 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8606 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8607 (tdesc_s390x_linux64v2): Declare.
8608 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8609 (s390_fill_gregset, s390_store_last_break): Adjust.
8610 (target_regsets): Rename to ...
8611 (s390_regsets): ... this, and make static.
8612 (s390_get_pc, s390_set_pc): Adjust.
8613 (s390_get_hwcap): New target_desc parameter, and use it.
8614 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8615 (s390_arch_setup): Adjust to set the current process'es target
8616 description. Don't adjust the regmap.
8617 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8618 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8619 (regs_info_3264): New globals.
8620 (s390_regs_info): New function.
8621 (the_low_target): Adjust.
8622 (initialize_low_arch): New function.
8623 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8624 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8625 [__mips64] (init_registers_mips_linux)
8626 (init_registers_mips_dsp_linux): Delete defines.
8627 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8628 (have_dsp): New global.
8629 (mips_read_description): New, based on mips_arch_setup.
8630 (mips_arch_setup): Reimplement.
8631 (get_usrregs_info): New function.
8632 (mips_cannot_fetch_register, mips_cannot_store_register)
8633 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8634 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8635 (target_regsets): Rename to ...
8636 (mips_regsets): ... this, and make static.
8637 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8638 (dsp_regs_info, regs_info): New globals.
8639 (mips_regs_info): New function.
8640 (the_low_target): Adjust.
8641 (initialize_low_arch): New function.
8642 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8643 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8644 Declare.
8645 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8646 (arm_read_description): New, with bits factored from
8647 arm_arch_setup.
8648 (arm_arch_setup): Reimplement.
8649 (target_regsets): Rename to ...
8650 (arm_regsets): ... this, and make static.
8651 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8652 (arm_regs_info): New function.
8653 (the_low_target): Adjust.
8654 (initialize_low_arch): New function.
8655 * linux-m68k-low.c (tdesc_m68k): Declare.
8656 (target_regsets): Rename to ...
8657 (m68k_regsets): ... this, and make static.
8658 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8659 (m68k_regs_info): New function.
8660 (m68k_arch_setup): New function.
8661 (the_low_target): Adjust.
8662 (initialize_low_arch): New function.
8663 * linux-sh-low.c (tdesc_sharch): Declare.
8664 (target_regsets): Rename to ...
8665 (sh_regsets): ... this, and make static.
8666 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8667 (sh_regs_info, sh_arch_setup): New functions.
8668 (the_low_target): Adjust.
8669 (initialize_low_arch): New function.
8670 * linux-bfin-low.c (tdesc_bfin): Declare.
8671 (bfin_arch_setup): New function.
8672 (bfin_usrregs_info, regs_info): New globals.
8673 (bfin_regs_info): New function.
8674 (the_low_target): Adjust.
8675 (initialize_low_arch): New function.
8676 * linux-cris-low.c (tdesc_cris): Declare.
8677 (cris_arch_setup): New function.
8678 (cris_usrregs_info, regs_info): New globals.
8679 (cris_regs_info): New function.
8680 (the_low_target): Adjust.
8681 (initialize_low_arch): New function.
8682 * linux-cris-low.c (tdesc_crisv32): Declare.
8683 (cris_arch_setup): New function.
8684 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8685 (cris_regs_info): New function.
8686 (the_low_target): Adjust.
8687 (initialize_low_arch): New function.
8688 * linux-m32r-low.c (tdesc_m32r): Declare.
8689 (m32r_arch_setup): New function.
8690 (m32r_usrregs_info, regs_info): New globals.
8691 (m32r_regs_info): Adjust.
8692 (initialize_low_arch): New function.
8693 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8694 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8695 (tic6x_usrregs_info): Forward declare.
8696 (tic6x_read_description): New function, based on ...
8697 (tic6x_arch_setup): ... this. Reimplement.
8698 (target_regsets): Rename to ...
8699 (tic6x_regsets): ... this, and make static.
8700 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8701 (tic6x_regs_info): New function.
8702 (the_low_target): Adjust.
8703 (initialize_low_arch): New function.
8704 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8705 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8706 (target_regsets): Rename to ...
8707 (xtensa_regsets): ... this, and make static.
8708 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8709 globals.
8710 (xtensa_arch_setup, xtensa_regs_info): New functions.
8711 (the_low_target): Adjust.
8712 (initialize_low_arch): New function.
8713 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8714 (nios2_arch_setup): Set the current process'es tdesc.
8715 (target_regsets): Rename to ...
8716 (nios2_regsets): ... this.
8717 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8718 (nios2_regs_info): New function.
8719 (the_low_target): Adjust.
8720 (initialize_low_arch): New function.
8721 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8722 (aarch64_arch_setup): Set the current process'es tdesc.
8723 (target_regsets): Rename to ...
8724 (aarch64_regsets): ... this.
8725 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8726 (aarch64_regs_info): New function.
8727 (the_low_target): Adjust.
8728 (initialize_low_arch): New function.
8729 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8730 globals.
8731 (target_regsets): Rename to ...
8732 (tile_regsets): ... this.
8733 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8734 (tile_regs_info): New function.
8735 (tile_arch_setup): Set the current process'es tdesc.
8736 (the_low_target): Adjust.
8737 (initialize_low_arch): New function.
8738 * spu-low.c (tdesc_spu): Declare.
8739 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8740 * win32-arm-low.c (tdesc_arm): Declare.
8741 (arm_arch_setup): New function.
8742 (the_low_target): Install arm_arch_setup instead of
8743 init_registers_arm.
8744 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8745 (init_windows_x86): Rename to ...
8746 (i386_arch_setup): ... this. Set `win32_tdesc'.
8747 (the_low_target): Adjust.
8748 * win32-low.c (win32_tdesc): New global.
8749 (child_add_thread): Don't create the thread cache here.
8750 (do_initial_child_stuff): Set the new process'es tdesc.
8751 * win32-low.h (struct target_desc): Forward declare.
8752 (win32_tdesc): Declare.
8753 * lynx-i386-low.c (tdesc_i386): Declare global.
8754 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8755 * lynx-low.c (lynx_tdesc): New global.
8756 (lynx_add_process): Set the new process'es tdesc.
8757 * lynx-low.h (struct target_desc): Forward declare.
8758 (lynx_tdesc): Declare global.
8759 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8760 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8761 * nto-low.c (nto_tdesc): New global.
8762 (do_attach): Set the new process'es tdesc.
8763 * nto-low.h (struct target_desc): Forward declare.
8764 (nto_tdesc): Declare.
8765 * nto-x86-low.c (tdesc_i386): Declare.
8766 (nto_x86_arch_setup): Set `nto_tdesc'.
8767
8768 2013-06-04 Gary Benson <gbenson@redhat.com>
8769
8770 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8771 to qSupported response when appropriate.
8772 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8773 with nonzero-length annex.
8774 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8775 arguments supplied in annex.
8776
8777 2013-05-31 Doug Evans <dje@google.com>
8778
8779 PR server/15594
8780 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8781 64 bits in 64-cross-32 environment.
8782
8783 2013-05-28 Pedro Alves <palves@redhat.com>
8784
8785 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8786 (aarch64-without-fpu.c): Delete rule.
8787 * configure.srv (aarch64*-*-linux*): Remove references to
8788 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8789 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8790 declaration.
8791
8792 2013-05-24 Pedro Alves <palves@redhat.com>
8793
8794 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8795 instead of strchr/decode_address. Error if the range isn't split
8796 with a ','. Don't assume there's be a ':' in the action.
8797
8798 2013-05-23 Yao Qi <yao@codesourcery.com>
8799 Pedro Alves <palves@redhat.com>
8800
8801 * linux-low.c (lwp_in_step_range): New function.
8802 (linux_wait_1): If the thread was range stepping and stopped
8803 outside the stepping range, report the stop to GDB. Otherwise,
8804 continue stepping. Add range stepping debug output.
8805 (linux_set_resume_request): Copy the step range from the resume
8806 request to the lwp.
8807 (linux_supports_range_stepping): New.
8808 (linux_target_ops) <supports_range_stepping>: Set to
8809 linux_supports_range_stepping.
8810 * linux-low.h (struct linux_target_ops)
8811 <supports_range_stepping>: New field.
8812 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8813 * linux-x86-low.c (x86_supports_range_stepping): New.
8814 (the_low_target) <supports_range_stepping>: Set to
8815 x86_supports_range_stepping.
8816 * server.c (handle_v_cont): Handle 'r' action.
8817 (handle_v_requests): Append ";r" if the target supports range
8818 stepping.
8819 * target.h (struct thread_resume) <step_range_start,
8820 step_range_end>: New fields.
8821 (struct target_ops) <supports_range_stepping>:
8822 New field.
8823 (target_supports_range_stepping): New macro.
8824
8825 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8826
8827 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8828 confusion in comment.
8829
8830 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8831
8832 * lynx-low.c (struct process_info_private): New type.
8833 (lynx_add_process): New function.
8834 (lynx_create_inferior, lynx_attach): Replace calls to
8835 add_process by calls to lynx_add_process.
8836 (lynx_resume): If PTID is null, then try using
8837 current_process()->private->last_wait_event_ptid.
8838 Add comments.
8839 (lynx_clear_inferiors): Delete. The contents of that function
8840 has been inlined in lynx_mourn;
8841 (lynx_wait_1): Save the ptid in the process's private data.
8842 (lynx_mourn): Free the process' private data. Replace call
8843 to lynx_clear_inferiors by call to clear_inferiors.
8844
8845 2013-05-17 Yao Qi <yao@codesourcery.com>
8846
8847 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8848 the right place.
8849
8850 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8851
8852 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8853 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8854 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8855 PT_TEXT_END_ADDR guards. Update comments.
8856 (linux_target_op) <read_offsets>: Conditionally define to
8857 linux_read_offsets if the target is UCLIBC and if it defines
8858 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8859
8860 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8861 Andrew Jenner <andrew@codesourcery.com>
8862
8863 * Makefile.in (SFILES): Add linux-nios2-low.c.
8864 (clean): Add action to delete nios2-linux.c.
8865 (nios2-linux.c): New rule.
8866 * configure.srv: Add nios2*-*-linux*.
8867 * linux-nios2-low.c: New.
8868
8869 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8870
8871 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8872
8873 2013-04-25 Hui Zhu <hui@codesourcery.com>
8874
8875 PR gdb/15186
8876 * ax.c (ax_printf): Add fflush.
8877
8878 2013-04-22 Tom Tromey <tromey@redhat.com>
8879
8880 * Makefile.in (SFILES): Add filestuff.c.
8881 (OBS): Add filestuff.o.
8882 (filestuff.o): New target.
8883 * config.in, configure: Rebuild.
8884 * configure.ac: Check for fdwalk, pipe2.
8885
8886 2013-04-17 Pedro Alves <palves@redhat.com>
8887
8888 * configure.ac (USE_THREAD_DB): Delete variable.
8889 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8890 Don't AC_SUBST USE_THREAD_DB.
8891 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8892 * config.in, configure: Regenerate.
8893
8894 2013-04-16 Pedro Alves <palves@redhat.com>
8895
8896 * linux-low.h (struct lwp_info) <thread_known>: Move under
8897 the USE_THREAD_DB #ifdef.
8898
8899 2013-04-16 Pedro Alves <palves@redhat.com>
8900
8901 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8902 (linux-low.o): Delete rule.
8903 * linux-low.h: Always include "gdb_thread_db.h" instead of
8904 conditionally including thread_db.h.
8905 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8906 HAVE_THREAD_DB_H.
8907
8908 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8909
8910 * Makefile.in (install-only): Fix make install regression.
8911
8912 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8913
8914 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8915 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8916 installation.
8917 * gdbserver.1: Remove.
8918
8919 2013-03-22 Pedro Alves <palves@redhat.com>
8920
8921 * linux-low.c (handle_extended_wait): Don't call
8922 linux_enable_event_reporting.
8923
8924 2013-03-15 Tony Theodore <tonyt@logyst.com>
8925
8926 PR build/9098:
8927 * Makefile.in (SHELL): Use @SHELL@.
8928
8929 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8930
8931 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8932 compiler warning.
8933
8934 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8935
8936 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8937 Remove extraneous NULL element.
8938
8939 2013-03-13 Yao Qi <yao@codesourcery.com>
8940
8941 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8942 'V' block in trace frame.
8943
8944 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8945
8946 * target.h (struct target_ops): Add btrace ops.
8947 (target_supports_btrace): New macro.
8948 (target_enable_btrace): New macro.
8949 (target_disable_btrace): New macro.
8950 (target_read_btrace): New macro.
8951 * gdbthread.h (struct thread_info): Add btrace field.
8952 * server.c: Include btrace-common.h.
8953 (handle_btrace_general_set): New function.
8954 (handle_btrace_enable): New function.
8955 (handle_btrace_disable): New function.
8956 (handle_general_set): Call handle_btrace_general_set.
8957 (handle_qxfer_btrace): New function.
8958 (struct qxfer qxfer_packets[]): Add btrace entry.
8959 * inferiors.c (remove_thread): Disable btrace.
8960 * linux-low: Include linux-btrace.h.
8961 (linux_low_enable_btrace): New function.
8962 (linux_low_read_btrace): New function.
8963 (linux_target_ops): Add btrace ops.
8964 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8965 Add srv_linux_btrace=yes.
8966 (x86_64-*-linux*): Add linux-btrace.o.
8967 Add srv_linux_btrace=yes.
8968 * configure.ac: Define HAVE_LINUX_BTRACE.
8969 * config.in: Regenerated.
8970 * configure: Regenerated.
8971
8972 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8973
8974 * server.c (handle_qxfer): Preserve error message if -3 is
8975 returned.
8976 (qxfer): Document the -3 return value.
8977
8978 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8979
8980 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8981 (linux_btrace_h): New variable.
8982 (linux-btrace.o): New rule.
8983
8984 2013-03-08 Stan Shebs <stan@codesourcery.com>
8985 Hafiz Abid Qadeer <abidh@codesourcery.com>
8986
8987 * tracepoint.c (trace_buffer_size): New global.
8988 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8989 (init_trace_buffer): Change to one-argument function. Allocate
8990 trace buffer memory.
8991 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8992 handle QTBuffer:size packet.
8993 (cmd_bigqtbuffer_size): New function.
8994 (initialize_tracepoint): Call init_trace_buffer with
8995 DEFAULT_TRACE_BUFFER_SIZE.
8996 * server.c (handle_query): Add QTBuffer:size in the
8997 supported packets.
8998
8999 2013-03-07 Yao Qi <yao@codesourcery.com>
9000
9001 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9002 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9003 of -1.
9004 (cmd_qtsp): Adjust condition. Do post increment.
9005 Set cur_action and cur_step_action back to 0.
9006
9007 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9008
9009 PR server/15236
9010 * linux-low.c (linux_write_memory): Return early success if LEN is
9011 zero.
9012
9013 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9014
9015 * configure.srv: Add x86_64-*-cygwin* as target.
9016
9017 2013-02-28 Tom Tromey <tromey@redhat.com>
9018
9019 * configure.ac: Invoke AC_SYS_LARGEFILE.
9020 * configure, config.in: Rebuild.
9021
9022 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9023
9024 * win32-low.c: Throughout, fix format strings and casts of
9025 printf-like functions to avoid type related warnings on all
9026 platforms.
9027 (get_child_debug_event): Print dwDebugEventCode as hex since
9028 that's how it's usually documented.
9029
9030 2013-02-28 Yao Qi <yao@codesourcery.com>
9031
9032 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9033 pulongest.
9034
9035 2013-02-27 Jiong Wang <jiwang@tilera.com>
9036
9037 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9038 (reg-tilegx32.c): New rule.
9039 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9040 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9041 different register info initializer according to elf class.
9042 (init_registers_tilgx32): New function. The tilegx32 register info
9043 initializer.
9044 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9045 (tile_store_gregset): Likewise.
9046
9047 2013-02-27 Yao Qi <yao@codesourcery.com>
9048
9049 * server.c (process_point_options): Print debug message when
9050 debug_threads is true.
9051
9052 2013-02-26 Yao Qi <yao@codesourcery.com>
9053
9054 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9055
9056 2013-02-19 Pedro Alves <palves@redhat.com>
9057 Kai Tietz <ktietz@redhat.com>
9058
9059 PR gdb/15161
9060
9061 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9062 instead of strtoul to extract address from packet.
9063 (process_serial_event) <'z'>: Likewise.
9064
9065 2013-02-18 Yao Qi <yao@codesourcery.com>
9066
9067 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9068
9069 2013-02-14 Pedro Alves <palves@redhat.com>
9070
9071 Plug memory leak.
9072
9073 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9074 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9075
9076 2013-02-14 Pedro Alves <palves@redhat.com>
9077
9078 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9079
9080 2013-02-14 Pedro Alves <palves@redhat.com>
9081
9082 * tracepoint.c (save_string): Delete.
9083 (add_tracepoint_action): Use savestring instead of save_string.
9084
9085 2013-02-12 Pedro Alves <palves@redhat.com>
9086
9087 * linux-xtensa-low.c: Ditto.
9088 * xtensa-xtregs.c: Ditto.
9089
9090 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9091
9092 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9093 thread_db.
9094
9095 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9096
9097 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9098 aarch64_num_wp_regs and aarch64_num_bp_regs to
9099 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9100
9101 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9102
9103 * linux-aarch64-low.c (ps_get_thread_area): Replace
9104 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9105
9106 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9107 Marcus Shawcroft <marcus.shawcroft@arm.com>
9108 Nigel Stephens <nigel.stephens@arm.com>
9109 Yufeng Zhang <yufeng.zhang@arm.com>
9110
9111 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9112 (aarch64.c, aarch64-without-fpu.c): New targets.
9113 * configure.srv (aarch64*-*-linux*): New.
9114 * linux-aarch64-low.c: New file.
9115
9116 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9117
9118 * linux-low.c (handle_extended_wait, linux_create_inferior)
9119 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9120 (dequeue_one_deferred_signal, linux_resume_one_thread)
9121 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9122 (linux_tracefork_grandchild, linux_test_for_tracefork)
9123 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9124 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9125 where the argument is 0.
9126
9127 2013-01-25 Yao Qi <yao@codesourcery.com>
9128
9129 * event-loop.c: Include "queue.h".
9130 (gdb_event_p): New typedef.
9131 (struct gdb_event) <next_event>: Remove.
9132 (event_queue): Change to QUEUE(gdb_event_p).
9133 (async_queue_event): Remove.
9134 (gdb_event_xfree): New.
9135 (initialize_event_loop): New.
9136 (process_event): Use API from QUEUE.
9137 (wait_for_event): Likewise.
9138 * server.c (main): Call initialize_event_loop.
9139 * server.h (initialize_event_loop): Declare.
9140
9141 2013-01-18 Yao Qi <yao@codesourcery.com>
9142
9143 * ax.h (struct eval_agent_expr_context): New.
9144 (gdb_eval_agent_expr): Update declaration.
9145 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9146 TFRAME. Add new argument CTX.
9147 * server.h (struct eval_agent_expr_context): Declare.
9148 (agent_mem_read, agent_tsv_read): Update declaration.
9149 (agent_mem_read_string): Likewise.
9150 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9151 (add_traceframe_block): Add new argument TPOINT.
9152 Increase TPOINT->traceframe_usage.
9153 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9154 eval_tracepoint_agent_expr.
9155 (condition_true_at_tracepoint): Likewise.
9156 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9157 (agent_mem_read_string, agent_tsv_read): Likewise.
9158
9159 2013-01-16 Yao Qi <yao@codesourcery.com>
9160
9161 * linux-low.c (linux_resume_one_lwp): Don't check
9162 'lwp->bp_reinsert != 0'.
9163
9164 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9165 Pedro Alves <palves@redhat.com>
9166
9167 * lynx-low.c (ptrace_request_to_str): Define a temporary
9168 macro and use it to simplify this function's implementation.
9169
9170 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9171
9172 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9173 sets errno.
9174
9175 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9176
9177 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9178
9179 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9180
9181 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9182
9183 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9184
9185 * lynx-low.c (lynx_resume): Use the resume_info parameter
9186 to determine the ptid for the lynx_ptrace call, unless
9187 it is equal to minus_one_ptid, in which case we use the
9188 ptid of the current_inferior.
9189 (lynx_wait_1): After having received a thread create/exit
9190 event, resume the inferior's execution using the signaling
9191 thread's ptid, rather than the old ptid.
9192
9193 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9194
9195 * lynx-low.c (lynx_resume): Delete variable ret.
9196
9197 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9198
9199 * gdbreplay.c (gdbreplay_version): Update copyright year.
9200 * server.c (gdbserver_version): Likewise.
9201
9202 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9203
9204 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9205 new thread.
9206
9207 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9208
9209 * lynx-low.c (ptrace_request_to_str): Add handling for
9210 PTRACE_GETTRACESIG.
9211
9212 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9213
9214 * lynx-low.c (lynx_attach): Delete variable new_process.
9215
9216 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9217
9218 * lynx-low.c (lynx_create_inferior): Delete variable
9219 new_process.
9220
9221 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9222
9223 * lynx-low.c (ptrace_request_to_str): Do not handle
9224 PTRACE_GETTHREADLIST if this macro does not exist.
9225
9226 2012-12-15 Yao Qi <yao@codesourcery.com>
9227
9228 * Makefile.in (OBS): Add notif.o.
9229 * notif.c, notif.h: New.
9230 * server.c: Include "notif.h".
9231 (struct vstop_notif) <next>: Remove.
9232 <base>: New field.
9233 (queue_stop_reply): Update.
9234 (push_event, send_next_stop_reply): Remove.
9235 (discard_queued_stop_replies): Update.
9236 (notif_stop): New variable.
9237 (handle_v_stopped): Remove.
9238 (handle_v_requests): Don't call handle_v_stopped. Call
9239 handle_ack_notif instead.
9240 (queue_stop_reply_callback): Call notif_event_enque instead
9241 of queue_stop_reply.
9242 (handle_status): Don't call send_next_stop_reply, call
9243 notif_write_event instead.
9244 (kill_inferior_callback): Likewise.
9245 (detach_or_kill_inferior_callback): Likewise.
9246 (main): Call initialize_notif.
9247 (process_serial_event): Call QUEUE_is_empty.
9248 (handle_target_event): Call notif_push instead of push event.
9249 * server.h (push_event): Remove declaration.
9250
9251 2012-12-10 Tom Tromey <tromey@redhat.com>
9252
9253 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9254 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9255 macros.
9256 (.c.o): Rewrite.
9257 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9258 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9259 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9260 (amd64-linux-ipa.o, ax.o): Rewrite.
9261 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9262 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9263 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9264 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9265 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9266 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9267 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9268 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9269 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9270 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9271 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9272 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9273 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9274 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9275 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9276 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9277 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9278 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9279 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9280 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9281 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9282 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9283 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9284 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9285 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9286 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9287 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9288 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9289 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9290 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9291 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9292 (reg-tilegx.o): Remove.
9293 (all_object_files): New macro.
9294 Include .deps files.
9295 * aclocal.m4, configure: Rebuild.
9296 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9297 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9298 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9299
9300 2012-12-05 Tom Tromey <tromey@redhat.com>
9301
9302 PR gdb/14917:
9303 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9304
9305 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9306
9307 * configure.ac: Check for linux/perf_event.h.
9308 * config.in: Regenerated.
9309 * configure: Regenerated.
9310
9311 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9312
9313 * hostio.c (handle_readlink): Decrease buffer size
9314 parameter passed to readlink by one byte.
9315
9316 2012-11-26 Yao Qi <yao@codesourcery.com>
9317
9318 * configure.ac (build_warnings): Append '-Wempty-body'.
9319 * configure: Regenerated.
9320 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9321 body.
9322
9323 2012-11-15 Pierre Muller <muller@sourceware.org>
9324
9325 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9326 * config.in: Regenerate.
9327 * configure: Regenerate.
9328 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9329 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9330 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9331 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9332 header.
9333 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9334 instead of <sys/wait.h> header.
9335 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9336
9337 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9338
9339 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9340 (various make rules): Remove -DGDBSERVER
9341
9342 2012-11-09 Yao Qi <yao@codesourcery.com>
9343
9344 * spu-low.c (current_ptid): Move it to ..
9345 * gdbthread.h: ... here. New.
9346 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9347 * server.c (myresume, process_serial_event): Likewise.
9348 * thread-db.c (thread_db_find_new_threads): Likewise.
9349 * tracepoint.c (run_inferior_command): Likewise.
9350
9351 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9352
9353 * server.c (handle_search_memory_1): Include access length in
9354 warning message.
9355
9356 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9357
9358 * linux-crisv32-low.c: Fix compile errors.
9359
9360 2012-09-04 Yao Qi <yao@codesourcery.com>
9361
9362 * tracepoint.c (cmd_qtsv): Adjust debug message.
9363 Don't check CUR_TPOINT.
9364
9365 2012-08-28 Yao Qi <yao@codesourcery.com>
9366
9367 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9368 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9369 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9370 Remove declarations of xmalloc, xreallloc, xstrdup and
9371 freeargv.
9372 * Makefile.in (libiberty_h): New.
9373 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9374 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9375
9376 2012-08-23 Yao Qi <yao@codesourcery.com>
9377
9378 * server.h: Remove declaration of 'xsnprintf'.
9379
9380 2012-08-22 Keith Seitz <keiths@redhat.com>
9381
9382 * server.h: Include build-gnulib-gbserver/config.h.
9383 * gdbreplay.c: Likewise.
9384
9385 2012-08-08 Doug Evans <dje@google.com>
9386
9387 * Makefile.in (SFILES): Add gdb_vecs.c.
9388 (OBS): Add gdb_vecs.o.
9389 (gdb_vecs_h, host_defs_h): New variables.
9390 (thread-db.o): Add $(gdb_vecs_h) dependency.
9391 (gdb_vecs.o): New rule.
9392 * thread-db.c: #include "gdb_vecs.h".
9393 (thread_db_load_search): Use a vector to iterate over path elements.
9394 Handle text appearing after "$pdir".
9395
9396 * configure.ac: Add check for strstr.
9397 * config.in: Regenerate.
9398 * configure: Regenerate.
9399
9400 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9401
9402 * hostio.c (handle_pread): If pread fails, fall back to attempting
9403 lseek/read.
9404 (handle_pwrite): Likewise for pwrite.
9405
9406 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9407
9408 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9409 between unsupported TYPE and unimplementable ADDR/LEN combination.
9410 (arm_insert_point): Act on new return value.
9411
9412 2012-07-31 Pedro Alves <palves@redhat.com>
9413
9414 * server.c (process_point_options): Only skip tokens if we find
9415 one that is unrecognized. Don't treat 'X' specially while
9416 skipping unrecognized tokens.
9417
9418 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9419
9420 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9421 to 4-byte-align HW breakpoint addresses for Thumb.
9422
9423 2012-07-27 Yao Qi <yao@codesourcery.com>
9424
9425 PR remote/14161.
9426
9427 * server.h: Declare gdb_agent_about_to_close.
9428 * target.c (kill_inferior): Include "agent.h".
9429 New. Send command 'kill'.
9430 * target.h (kill_inferior): Removed macro.
9431 * tracepoint.c (gdb_agent_about_to_close): New.
9432 (gdb_agent_helper_thread): Handle command 'close'.
9433 Wait endlessly until the inferior stops.
9434 Install gdb_agent_remove_socket to atexit hook.
9435 (agent_socket_name): New static variable.
9436 (gdb_agent_socket_init): Replace local variable 'name' with
9437 'agent_socket_name'.
9438 (gdb_agent_remove_socket): New.
9439
9440 2012-07-27 Yao Qi <yao@codesourcery.com>
9441
9442 * server.c (process_point_options): Stop at 'X' when parsing.
9443
9444 2012-07-19 Michael Eager <eager@eagercon.com>
9445
9446 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9447 to hw_execute.
9448 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9449 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9450 hardware breakpoint.
9451
9452 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9453
9454 * gdbserver/linux-low.c (initialize_low): Call
9455 linux_ptrace_init_warnings.
9456
9457 2012-07-02 Doug Evans <dje@google.com>
9458
9459 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9460 pointer to int.
9461
9462 2012-07-02 Stan Shebs <stan@codesourcery.com>
9463
9464 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9465 (ax.o): Add it to build rule.
9466 (ax-ipa.o): Ditto.
9467 (OBS): Add format.o.
9468 (IPA_OBS): Add format.o.
9469 * server.c (handle_query): Claim support for breakpoint commands.
9470 (process_point_options): Add command case.
9471 (process_serial_event): Leave running if there are printfs in
9472 effect.
9473 * mem-break.h (any_persistent_commands): Declare.
9474 (add_breakpoint_commands): Declare.
9475 (gdb_no_commands_at_breakpoint): Declare.
9476 (run_breakpoint_commands): Declare.
9477 * mem-break.c (struct point_command_list): New struct.
9478 (struct breakpoint): New field command_list.
9479 (any_persistent_commands): New function.
9480 (add_commands_to_breakpoint): New function.
9481 (add_breakpoint_commands): New function.
9482 (gdb_no_commands_at_breakpoint): New function.
9483 (run_breakpoint_commands): New function.
9484 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9485 locally.
9486 * ax.c: Include format.h.
9487 (ax_printf): New function.
9488 (gdb_eval_agent_expr): Add printf opcode.
9489
9490 2012-06-13 Yao Qi <yao@codesourcery.com>
9491
9492 * server.c (start_inferior): Remove duplicated writes to fields
9493 'last_resume_kind' and 'last_status' of 'current_inferior'.
9494
9495 2012-06-12 Yao Qi <yao@codesourcery.com>
9496 Pedro Alves <palves@redhat.com>
9497
9498 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9499 comment.
9500 * server.c (handle_v_cont): Extend comment.
9501
9502 2012-06-11 Yao Qi <yao@codesourcery.com>
9503
9504 * linux-low.c (linux_attach): Add 'static'.
9505
9506 2012-06-06 Yao Qi <yao@codesourcery.com>
9507
9508 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9509
9510 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9511
9512 Fix gcc -flto compilation warning.
9513 * server.c (main): Make variable multi_mode and attach volatile.
9514
9515 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9516
9517 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9518 if the platform doesn't know about it.
9519
9520 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9521
9522 * Makefile.in (SFILES): Add linux-tile-low.c.
9523 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9524 * configure.srv: Handle tilegx-*-linux*.
9525 * linux-tile-low.c: New file.
9526
9527 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9528
9529 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9530
9531 2012-05-24 Pedro Alves <palves@redhat.com>
9532
9533 PR gdb/7205
9534
9535 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9536
9537 2012-05-24 Pedro Alves <palves@redhat.com>
9538
9539 PR gdb/7205
9540
9541 Replace target_signal with gdb_signal throughout.
9542
9543 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9544
9545 * linux-low.c (linux_store_registers): Avoid the copying sequence
9546 when no data has been retrieved by ptrace.
9547
9548 2012-05-22 Will Deacon <will.deacon@arm.com>
9549
9550 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9551 Include asm/ptrace.h.
9552 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9553 already defined.
9554
9555 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9556
9557 * linux-low.c (linux_store_registers): Don't re-retrieve data
9558 with ptrace that has already been obtained from /proc. Always
9559 copy any data retrieved with ptrace to the buffer supplied.
9560
9561 2012-05-11 Yao Qi <yao@codesourcery.com>
9562 Pedro Alves <palves@redhat.com>
9563
9564 * linux-low.c (enum stopping_threads_kind): New.
9565 (stopping_threads): Change type to `enum stopping_threads_kind'.
9566 (handle_extended_wait): If stopping and suspending threads, leave
9567 the new_lwp suspended too.
9568 (linux_wait_for_event): Adjust.
9569 (stop_all_lwps): Set `stopping_threads' to
9570 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9571 whether we're suspending threads or just stopping them. Assert no
9572 recursion happens.
9573
9574 2012-04-29 Yao Qi <yao@codesourcery.com>
9575
9576 * server.h: Move some code to ...
9577 * gdbthread.h: ... here. New.
9578 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9579 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9580 (nto-low.o, win32-low.o): Likewise.
9581 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9582 * regcache.c, remote-utils.c, server.c: Likewise.
9583 * target.c, tracepoint.c, win32-low.c: Likewise.
9584
9585 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9586
9587 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9588 (PTRACE_ARG4_TYPE): Likewise.
9589 (PTRACE_XFER_TYPE): Likewise.
9590 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9591 ptrace to PTRACE_ARG3_TYPE.
9592 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9593 (PTRACE_ARG4_TYPE): Likewise.
9594 (PTRACE_XFER_TYPE): Likewise.
9595 (linux_detach_one_lwp): Cast fourth argument of
9596 ptrace to long then PTRACE_ARG4_TYPE.
9597 (regsets_fetch_inferior_registers): Cast third argument of
9598 ptrace to long then PTRACE_ARG3_TYPE.
9599 (regsets_store_inferior_registers): Likewise.
9600
9601 2012-04-20 Pedro Alves <palves@redhat.com>
9602
9603 * configure: Regenerate.
9604
9605 2012-04-19 Pedro Alves <palves@redhat.com>
9606
9607 * Makefile.in (GNULIB_BUILDDIR): New.
9608 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9609 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9610 (all, install-only, uninstall, clean-info, all-lib, clean): No
9611 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9612 (maintainer-clean realclean distclean): Use subdir_do.
9613 (subdir_do): New.
9614 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9615 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9616 * acinclude.m4: Include acx_configure_dir.m4.
9617 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9618 calls. Call AC_PROG_RANLIB. Configure gnulib using
9619 ACX_CONFIGURE_DIR.
9620 (GNULIB): New.
9621 (GNULIB_STDINT_H): Adjust.
9622 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9623 * gdbreplay.c: Include build-gnulib/config.h.
9624 * server.h: Likewise.
9625 * aclocal.m4: Regenerate.
9626 * config.in: Regenerate.
9627 * configure: Regenerate.
9628
9629 2012-04-19 Pedro Alves <palves@redhat.com>
9630
9631 * Makefile.in (LIBGNU, INCGNU): Adjust.
9632 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9633 (all, install-only, uninstall, clean-info, all-lib, clean)
9634 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9635 * configure.ac: Adjust AC_OUTPUT output.
9636 * aclocal.m4: Regenerate.
9637 * configure: Regenerate.
9638
9639 2012-04-19 Pedro Alves <palves@redhat.com>
9640
9641 * Makefile.in (generated_files): New.
9642 (server_h): Remove the explicit dependency on config.h, and depend
9643 on $generated_files.
9644
9645 2012-04-19 Pedro Alves <palves@redhat.com>
9646
9647 * Makefile.in (INCGNU): Add -Ignulib.
9648
9649 2012-04-19 Pedro Alves <palves@redhat.com>
9650
9651 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9652 (INCGNU): ... this, and spell out -I here.
9653 (GNULIB_LIB): Rename to ...
9654 (LIBGNU): ... this.
9655 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9656
9657 2012-04-19 Pedro Alves <palves@redhat.com>
9658
9659 * config.in: Regenerate.
9660
9661 2012-04-19 Pedro Alves <palves@redhat.com>
9662
9663 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9664 * server.h (memmem): Remove declaration.
9665 * config.in: Regenerate.
9666 * configure: Regenerate.
9667
9668 2012-04-19 Yao Qi <yao@codesourcery.com>
9669
9670 * Makefile.in (SFILES): Add common/vec.c.
9671 (OBS): Add vec.o.
9672 (vec.o): New rule.
9673
9674 2012-04-19 Yao Qi <yao@codesourcery.com>
9675
9676 * remote-utils.c (prepare_resume_reply): Replace with macro
9677 target_core_of_thread.
9678 * server.c (handle_qxfer_threads_proper): Likewise.
9679 * target.h (traget_core_of_thread): New macro.
9680
9681 2012-04-18 Pedro Alves <palves@redhat.com>
9682
9683 * aclocal.m4: Regenerate.
9684 * configure: Regenerate.
9685
9686 2012-04-16 Yao Qi <yao@codesourcery.com>
9687
9688 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9689 duplicated on address.
9690
9691 2012-04-16 Yao Qi <yao@codesourcery.com>
9692
9693 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9694 (struct tracepoint_action_ops) <send>: New field.
9695 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9696 (agent_expr_send, x_tracepoint_action_send): New.
9697 (l_tracepoint_action_send): New.
9698 (cmd_qtdp): Download and install tracepoint
9699 according to `use_agent'.
9700 (run_inferior_command): Add one more parameter `len'.
9701 Update callers.
9702 (tracepoint_send_agent): New.
9703 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9704
9705 2012-04-16 Yao Qi <yao@codesourcery.com>
9706
9707 * tracepoint.c (download_tracepoints): Moved to ...
9708 (cmd_qtstart): ... here.
9709
9710 2012-04-14 Yao Qi <yao@codesourcery.com>
9711
9712 * tracepoint.c: Include inttypes.h.
9713 (struct collect_memory_action): Use sized types.
9714 (struct tracepoint): Likewise.
9715 (cmd_qtdp, stop_tracing): Update print specifiers.
9716 (cmd_qtp, response_tracepoint): Likewise.
9717 (collect_data_at_tracepoint): Likewise.
9718 (collect_data_at_step): Likewise.
9719
9720 2012-04-14 Yao Qi <yao@codesourcery.com>
9721
9722 Import gnulib module inttypes.
9723 * aclocal.m4, config.in, configure: Regenerated.
9724
9725 2012-04-14 Yao Qi <yao@codesourcery.com>
9726
9727 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9728 Makefile and config.status at last.
9729
9730 2012-04-13 Yao Qi <yao@codesourcery.com>
9731
9732 * tracepoint.c: Include stdint.h unconditionally.
9733
9734 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9735
9736 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9737 on BFD_HAVE_SYS_PROCFS_TYPE.
9738 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9739 * configure: Regenerate.
9740 * config.in: Likewise.
9741
9742 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9743
9744 * Makefile.in (clean): Also remove x32.c x32-linux.c
9745 x32-avx.c x32-avx-linux.c.
9746 (x32.o): New target.
9747 (x32.c): Likewise.
9748 (x32-linux.o): Likewise.
9749 (x32-linux.c): Likewise.
9750 (x32-avx.o): Likewise.
9751 (x32-avx.c): Likewise.
9752 (x32-avx-linux.o): Likewise.
9753 (x32-avx-linux.c): Likewise.
9754
9755 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9756 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9757 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9758 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9759 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9760 i386/x32-avx-linux.xml.
9761
9762 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9763 (init_registers_x32_avx_linux): Likwise.
9764 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9765 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9766
9767 2012-04-13 Pedro Alves <palves@redhat.com>
9768
9769 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9770 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9771 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9772 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9773 the sub-make.
9774
9775 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9776
9777 * linux-x86-low.c (compat_x32_clock_t): New.
9778 (compat_x32_siginfo_t): Likewise.
9779 (compat_x32_siginfo_from_siginfo): Likewise.
9780 (siginfo_from_compat_x32_siginfo): Likewise.
9781 (linux_is_elf64): Likewise.
9782 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9783 and siginfo_from_compat_x32_siginfo for x32.
9784 (x86_arch_setup): Set linux_is_elf64.
9785
9786 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9787
9788 PR gdb/13969
9789 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9790 e_machine field.
9791 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9792 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9793 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9794 compatible with process.
9795
9796 2012-04-12 Yao Qi <yao@codesourcery.com>
9797
9798 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9799 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9800 (install-only, install-info, clean): Handle sub dir gnulib.
9801 (all-lib, am--refresh): New targets.
9802 (memmem.o): Remove target.
9803 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9804 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9805 (AC_REPLACE_FUNCS): Remove memmem.
9806 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9807 (AC_OUTPUT): Generate Makefile in gnulib/.
9808 * aclocal.m4, config.in, configure: Regenerated.
9809
9810 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9811
9812 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9813
9814 2012-04-05 Pedro Alves <palves@redhat.com>
9815
9816 -Werror=strict-aliasing
9817
9818 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9819 pointer.
9820
9821 2012-04-04 Pedro Alves <palves@redhat.com>
9822
9823 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9824 (sparc_store_gregset_from_stack, sparc_store_gregset)
9825 (sparc_breakpoint_at): Fix formatting.
9826
9827 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9828
9829 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9830 are available.
9831 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9832 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9833 * config.in: Regenerate.
9834 * configure: Likewise.
9835
9836 2012-03-29 Pedro Alves <palves@redhat.com>
9837
9838 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9839 Correct ptrace arguments.
9840
9841 2012-03-28 Pedro Alves <palves@redhat.com>
9842
9843 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9844 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9845 (IA64_FR1_REGNUM): New defines.
9846 (ia64_fetch_register): New.
9847 (the_low_target): Install it.
9848 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9849 field.
9850 * linux-low.c (linux_fetch_registers): Try the
9851 the_low_target.fetch_register hook first.
9852
9853 * linux-arm-low.c (the_low_target): Adjust.
9854 * linux-bfin-low.c (the_low_target): Adjust.
9855 * linux-cris-low.c (the_low_target): Adjust.
9856 * linux-crisv32-low.c (the_low_target): Adjust.
9857 * linux-m32r-low.c (the_low_target): Adjust.
9858 * linux-m68k-low.c (the_low_target): Adjust.
9859 * linux-mips-low.c (the_low_target): Adjust.
9860 * linux-ppc-low.c (the_low_target): Adjust.
9861 * linux-s390-low.c (the_low_target): Adjust.
9862 * linux-sh-low.c (the_low_target): Adjust.
9863 * linux-sparc-low.c (the_low_target): Adjust.
9864 * linux-tic6x-low.c (the_low_target): Adjust.
9865 * linux-x86-low.c (the_low_target): Adjust.
9866 * linux-xtensa-low.c (the_low_target): Adjust.
9867
9868 2012-03-26 Pedro Alves <palves@redhat.com>
9869
9870 * server.c (handle_qxfer_libraries): Don't bail early if
9871 the_target->qxfer_libraries_svr4 is not NULL.
9872
9873 2012-03-26 Pedro Alves <palves@redhat.com>
9874
9875 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9876
9877 2012-03-23 Pedro Alves <palves@redhat.com>
9878
9879 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9880 "library-list-svr4" element's start tag when the the DSO list is
9881 empty.
9882
9883 2012-03-23 Pedro Alves <palves@redhat.com>
9884
9885 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9886 a variable whose type size is the same as the inferior's pointer
9887 size.
9888
9889 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9890
9891 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9892 struct siginfo.
9893 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9894 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9895 * linux-low.h: Include <signal.h>.
9896 (struct siginfo): Remove forward declaration.
9897 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9898 struct siginfo.
9899
9900 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9901
9902 * .gitignore: Ignore more files.
9903
9904 2012-03-19 Pedro Alves <palves@redhat.com>
9905 Jan Kratochvil <jan.kratochvil@redhat.com>
9906
9907 * server.c (cont_thread, general_thread): Add describing comments.
9908 (start_inferior): Clear `cont_thread'.
9909 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9910 of a process.
9911
9912 2012-03-15 Yao Qi <yao@codesourcery.com>
9913
9914 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9915 handling to ...
9916 (cmd_qtdp): ... here.
9917
9918 2012-03-15 Yao Qi <yao@codesourcery.com>
9919
9920 * tracepoint.c (struct tracepoint_action_ops): New.
9921 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9922 (m_tracepoint_action_download): New.
9923 (r_tracepoint_action_download): New.
9924 (x_tracepoint_action_download): New.
9925 (l_tracepoint_action_download): New.
9926 (add_tracepoint_action): Install `action->ops' according type.
9927 (download_tracepoint_1): Move code `download' function pointer
9928 of various tracepoint_action_ops.
9929
9930 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9931
9932 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9933 linux_ptrace_attach_warnings.
9934
9935 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9936
9937 * Makefile.in (linux-ptrace.o): New.
9938 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9939 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9940 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9941 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9942 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9943 of these targets.
9944 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9945
9946 2012-03-08 Yao Qi <yao@codesourcery.com>
9947 Pedro Alves <palves@redhat.com>
9948
9949 Fix PR server/13392.
9950 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9951 offset of JMP insn.
9952 * tracepoint.c (remove_tracepoint): New.
9953 (cmd_qtdp): Call remove_tracepoint when failed to install.
9954
9955 2012-03-07 Pedro Alves <palves@redhat.com>
9956
9957 * linux-low.c (get_detach_signal): New.
9958 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9959 Pass on pending signals to PTRACE_DETACH. Check the result of the
9960 ptrace call.
9961 * server.c (program_signals, program_signals_p): New.
9962 (handle_general_set): Handle QProgramSignals.
9963 * server.h (program_signals, program_signals_p): Declare.
9964
9965 2012-03-05 Pedro Alves <palves@redhat.com>
9966 Jan Kratochvil <jan.kratochvil@redhat.com>
9967
9968 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9969 New comment why.
9970
9971 2012-03-03 Yao Qi <yao@codesourcery.com>
9972
9973 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9974 agent_look_up_symbols.
9975
9976 2012-03-03 Yao Qi <yao@codesourcery.com>
9977
9978 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9979 (linux-x86-low.o): Likewise.
9980 * server.h: Remove in_process_agent_loaded.
9981 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9982 common/agent.c.
9983 Update callers.
9984
9985 2012-03-03 Yao Qi <yao@codesourcery.com>
9986
9987 * tracepoint.c (gdb_agent_capability): New global.
9988 (in_process_agent_loaded_ust): Renamed to
9989 `in_process_agent_supports_ust'.
9990 Update callers.
9991 (in_process_agent_supports_ust): Call agent_capability_check.
9992 (clear_installed_tracepoints): Assert that agent supports
9993 agent.
9994
9995 2012-03-03 Yao Qi <yao@codesourcery.com>
9996
9997 * linux-low.c (linux_supports_agent): New.
9998 (linux_target_ops): Initialize field `supports_agent' with
9999 linux_supports_agent.
10000 * target.h (struct target_ops) <supports_agent>: New.
10001 (target_supports_agent): New macro.
10002 * server.c (handle_general_set): Handle packet 'QAgent'.
10003 (handle_query): Send `QAgent+'.
10004 * Makefile.in (server.o): Depends on agent.h.
10005
10006 2012-03-03 Yao Qi <yao@codesourcery.com>
10007
10008 * Makefile.in (OBS): Add agent.o.
10009 Add new rule for agent.o.
10010 Track dependence of tracepoint.c on agent.h.
10011 * tracepoint.c (run_inferior_command_1):
10012 (run_inferior_command): Call agent_run_command.
10013 (gdb_ust_connect_sync_socket): Deleted. Move it to
10014 common/agent.c.
10015 (resume_thread, stop_thread): Likewise.
10016 (gdb_ust_socket_init): Renamed to ...
10017 (gdb_agent_socket_init): ... New.
10018 (gdb_ust_thread): Renamed to ...
10019 (gdb_agent_helper_thread): ... New.
10020 (gdb_ust_init): Move some code to ...
10021 (gdb_agent_init): ... here. New.
10022 [HAVE_UST]: Call gdb_ust_init.
10023 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10024 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10025 * config.in, configure: Regenerated.
10026
10027 2012-03-02 Pedro Alves <palves@redhat.com>
10028
10029 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10030 * linux-low.c (struct simple_pid_list): New.
10031 (stopped_pids): New a struct simple_pid_list pointer.
10032 (add_to_pid_list, pull_pid_from_list): New.
10033 (handle_extended_wait): Don't assume the first signal new children
10034 report is SIGSTOP. Adjust call to pull_pid_from_list.
10035 (linux_wait_for_lwp): Adjust.
10036
10037 2012-03-02 Yao Qi <yao@codesourcery.com>
10038
10039 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10040 debug log.
10041
10042 2012-03-02 Yao Qi <yao@codesourcery.com>
10043
10044 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10045 `stop_pc' and `tpoint'. Update caller.
10046
10047 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10048
10049 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10050 * linux-low.c (use_linux_regsets): New macro.
10051 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10052 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10053 (linux_register_in_regsets): New function.
10054 (usr_fetch_inferior_registers): Skip registers covered by
10055 regsets.
10056 (usr_store_inferior_registers): Likewise.
10057 (usr_fetch_inferior_registers): New macro.
10058 (usr_store_inferior_registers): Likewise.
10059 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10060 (linux_store_registers): Likewise.
10061 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10062 prototype.
10063 (init_registers_mips64_dsp_linux): Likewise.
10064 (init_registers_mips_linux): New macro.
10065 (init_registers_mips_dsp_linux): Likewise.
10066 (mips_dsp_num_regs): Likewise.
10067 (DSP_BASE, DSP_CONTROL): New fallback macros.
10068 (mips_base_regs): New macro.
10069 (mips_regmap): Use it. Fix the size.
10070 (mips_dsp_regmap): New variable.
10071 (mips_dsp_regset_bitmap): Likewise.
10072 (mips_arch_setup): New function.
10073 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10074 than mips_regmap.
10075 (mips_cannot_store_register): Likewise.
10076 (the_low_target): Update .arch_setup, .num_regs and .regmap
10077 initializers. Add .regset_bitmap initializer.
10078 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10079 initializer.
10080 * linux-bfin-low.c (the_low_target): Likewise.
10081 * linux-cris-low.c (the_low_target): Likewise.
10082 * linux-crisv32-low.c (the_low_target): Likewise.
10083 * linux-ia64-low.c (the_low_target): Likewise.
10084 * linux-m32r-low.c (the_low_target): Likewise.
10085 * linux-m68k-low.c (the_low_target): Likewise.
10086 * linux-ppc-low.c (the_low_target): Likewise.
10087 * linux-s390-low.c (the_low_target): Likewise.
10088 * linux-sh-low.c (the_low_target): Likewise.
10089 * linux-sparc-low.c (the_low_target): Likewise.
10090 * linux-tic6x-low.c (the_low_target): Likewise.
10091 * linux-x86-low.c (the_low_target): Likewise.
10092 * linux-xtensa-low.c (the_low_target): Likewise.
10093 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10094 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10095 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10096 srv_xmlfiles.
10097 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10098 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10099
10100 2012-02-29 Yao Qi <yao@codesourcery.com>
10101 Pedro Alves <palves@redhat.com>
10102
10103 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10104 `step_over_finished' is true.
10105
10106 2012-02-27 Pedro Alves <palves@redhat.com>
10107
10108 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10109 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10110
10111 2012-02-27 Pedro Alves <palves@redhat.com>
10112
10113 PR server/9684
10114 * linux-low.c (pid_is_stopped): New.
10115 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10116
10117 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10118
10119 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10120 of conditions.
10121
10122 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10123
10124 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10125
10126 2012-02-24 Luis Machado <lgustavo@codesourcery>
10127
10128 * server.c (handle_query): Advertise support for target-side
10129 breakpoint condition evaluation.
10130 (process_point_options): New function.
10131 (process_serial_event): When inserting a breakpoint, check for
10132 a target-side condition that should be evaluated.
10133
10134 * mem-break.c: Include regcache.h and ax.h.
10135 (point_cond_list_t): New data structure.
10136 (breakpoint) <cond_list>: New field.
10137 (find_gdb_breakpoint_at): Make non-static.
10138 (delete_gdb_breakpoint_at): Clear any target-side
10139 conditions.
10140 (clear_gdb_breakpoint_conditions): New function.
10141 (add_condition_to_breakpoint): Likewise.
10142 (add_breakpoint_condition): Likewise.
10143 (gdb_condition_true_at_breakpoint): Likewise.
10144 (gdb_breakpoint_here): Return result directly instead
10145 of going through a local variable.
10146
10147 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10148 (clear_gdb_breakpoint_conditions): Likewise.
10149 (add_breakpoint_condition): Likewise.
10150 (gdb_condition_true_at_breakpoint): Likewise.
10151
10152 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10153 (need_step_over_p): Take target-side breakpoint condition into
10154 consideration.
10155
10156 2012-02-24 Luis Machado <lgustavo@codesourcery>
10157
10158 * server.h: Include tracepoint.h.
10159 (agent_mem_read, agent_get_trace_state_variable_value,
10160 agent_set_trace_state_variable_value,
10161 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10162 get_set_tsv_func_addr): New prototypes.
10163
10164 * ax.h: New include file.
10165 * ax.c: New source file.
10166
10167 * tracepoint.c: Include ax.h.
10168 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10169 agent_expr, eval_result_type): Move to ax.h.
10170 (parse_agent_expr): Rename to ...
10171 (gdb_parse_agent_expr): ... this, make it non-static and move
10172 to ax.h.
10173 (unparse_agent_expr) Rename to ...
10174 (gdb_unparse_agent_expr): ... this, make it non-static and move
10175 to ax.h.
10176 (eval_agent_expr): Rename to ...
10177 (eval_tracepoint_agent_expr): ... this.
10178 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10179 forward declarations.
10180 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10181 (agent_get_trace_state_variable_value): New function.
10182 (agent_set_trace_state_variable_value): New function.
10183 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10184 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10185 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10186 (condition_true_at_tracepoint): Likewise.
10187 (parse_agent_expr): Rename to ...
10188 (gdb_parse_agent_expr): ... this and move to ax.c.
10189 (unparse_agent_expr): Rename to ...
10190 (gdb_unparse_agent_expr): ... this and move to ax.c.
10191 (gdb_agent_op_name): Move to ax.c.
10192 (eval_agent_expr): Rename to ...
10193 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10194 and move to ax.c.
10195 (eval_tracepoint_agent_expr): New function.
10196 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10197 non-static.
10198 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10199 ax.c.
10200 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10201 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10202 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10203 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10204 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10205 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10206 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10207 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10208 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10209 (compile_bytecodes): Remove forward declaration.
10210 (is_goto_target): Move to ax.c.
10211 (compile_bytecodes): Move to ax.c and call
10212 agent_get_trace_state_variable_value (...) and
10213 agent_set_trace_state_variable_value (...).
10214
10215 * Makefile.in: Update ax.c and IPA dependencies.
10216
10217 2012-02-24 Pedro Alves <palves@redhat.com>
10218
10219 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10220 (cmd_bigqtbuffer_circular): ... this. Only handle
10221 'QTBuffer:circular:'.
10222 (handle_tracepoint_general_set): Adjust.
10223
10224 2012-02-16 Yao Qi <yao@codesourcery.com>
10225
10226 * inferiors.c: Move code to ...
10227 * dll.c: .... here. New.
10228 * server.h: Declare clear_dlls.
10229 * Makefile.in (SFILES): Add dll.c.
10230 (OBS): Add dll.o
10231 (dll.o): New rule.
10232
10233 2012-02-11 Yao Qi <yao@codesourcery.com>
10234
10235 * server.c: (handle_monitor_command): Add a new parameter
10236 `own_buf'.
10237 (handle_query): Update caller.
10238
10239 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10240
10241 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10242 * configure, config.in: Regenerate.
10243 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10244 is not defined.
10245
10246 2012-02-02 Pedro Alves <palves@redhat.com>
10247
10248 Try SIGKILL first, then PTRACE_KILL.
10249 * linux-low.c (linux_kill_one_lwp): New.
10250 (linux_kill_one_lwp): Rename to ...
10251 (kill_one_lwp_callback): ... this. Use the new
10252 linux_kill_one_lwp.
10253
10254 2012-02-02 Pedro Alves <palves@redhat.com>
10255
10256 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10257 inferior.
10258
10259 2012-01-27 Pedro Alves <palves@redhat.com>
10260
10261 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10262 (elf_64_file_p): Make static.
10263 (linux_pid_exe_is_elf_64_file): New.
10264 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10265 Delete declarations.
10266 (linux_pid_exe_is_elf_64_file): Declare.
10267 * linux-x86-low.c (x86_arch_setup): Use
10268 linux_pid_exe_is_elf_64_file.
10269
10270 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10271
10272 * linux-low.c (linux_wait_for_event_1): Rename to ...
10273 (linux_wait_for_event): ... here and merge it with former
10274 linux_wait_for_event - new variable wait_ptid, use it.
10275 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10276
10277 2012-01-23 Pedro Alves <palves@redhat.com>
10278
10279 * server.c (main): Avoid yet another case of infinite loop while
10280 detaching/killing after a longjmp.
10281
10282 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10283
10284 Code cleanup.
10285 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10286
10287 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10288
10289 * hostio.c (handle_readlink): New function.
10290 (handle_vFile): Call it to handle "vFile:readlink" packets.
10291
10292 2012-01-20 Pedro Alves <palves@redhat.com>
10293 Ulrich Weigand <ulrich.weigand@linaro.org>
10294
10295 * server.c (handle_v_requests): Only support vAttach and vRun to
10296 start multiple processes when in extended protocol mode.
10297
10298 2012-01-17 Pedro Alves <palves@redhat.com>
10299
10300 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10301 memalign plus mprotect to allocate the scratch buffer.
10302
10303 2012-01-13 Pedro Alves <palves@redhat.com>
10304
10305 * server.c (attach_inferior): Clear `cont_thread'.
10306
10307 2012-01-13 Pedro Alves <palves@redhat.com>
10308
10309 * server.c (main): Avoid infinite loop while detaching/killing
10310 after a longjmp.
10311
10312 2012-01-09 Doug Evans <dje@google.com>
10313
10314 * server.c (start_inferior): Set last_ptid in --wrapper case.
10315
10316 2012-01-06 Yao Qi <yao@codesourcery.com>
10317
10318 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10319 defined.
10320 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10321
10322 2012-01-04 Yao Qi <yao@codesourcery.com>
10323
10324 * tracepoint.c (cmd_qtdp): Print debug message
10325 for static tracepoint.
10326
10327 2012-01-04 Yao Qi <yao@codesourcery.com>
10328
10329 * tracepoint.c (trace_vdebug): Differentiate debug message
10330 between gdbserver and IPA.
10331
10332 2012-01-03 Yao Qi <yao@codesourcery.com>
10333
10334 * tracepoint.c (tracepoint_was_hit): Don't collect for
10335 static tracepoint.
10336
10337 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10338
10339 * terminal.h: Reformat copyright header.
10340
10341 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10342
10343 * server.c (gdbserver_version): Update copyright year.
10344 * gdbreplay.c (gdbreplay_version): Likewise.
10345
10346 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10347
10348 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10349
10350 Revert:
10351 2011-12-18 Hui Zhu <teawater@gmail.com>
10352 * linux-low.c (linux_create_inferior): Save return value to ret.
10353
10354 2011-12-18 Hui Zhu <teawater@gmail.com>
10355
10356 * linux-low.c (linux_create_inferior): Save return value to ret.
10357
10358 2011-12-16 Doug Evans <dje@google.com>
10359
10360 * linux-low.c (linux_create_inferior): If stdio connection,
10361 redirect stdin from /dev/null, stdout to stderr.
10362 * remote-utils.c (remote_is_stdio): New static global.
10363 (remote_connection_is_stdio): New function.
10364 (remote_prepare): Handle stdio connection.
10365 (remote_open): Ditto.
10366 (remote_close): Don't close stdin for stdio connections.
10367 (read_prim,write_prim): New functions. Replace all calls to
10368 read/write to these.
10369 * server.c (main): Watch for "-" argument. Move call to
10370 remote_prepare before start_inferior.
10371 * server.h (STDIO_CONNECTION_NAME): New macro.
10372 (remote_connection_is_stdio): Declare.
10373
10374 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10375 in debugging output.
10376
10377 2011-12-15 Yao Qi <yao@codesourcery.com>
10378
10379 * tracepoint.c: Include sys/syscall.h.
10380 (gdb_ust_thread): Remove preprocessor conditional.
10381
10382 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10383
10384 * linux-low.c (linux_detach_one_lwp): Call
10385 the_low_target.prepare_to_resume before detaching.
10386
10387 2011-12-14 Yao Qi <yao@codesourcery.com>
10388
10389 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10390 of write.
10391
10392 2011-12-14 Yao Qi <yao@codesourcery.com>
10393
10394 * i386-low.c (i386_low_stopped_data_address): Initialize local
10395 variable `control'.
10396
10397 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10398
10399 PR remote/13492
10400
10401 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10402 DR_CONTROL unless necessary. Extend comments.
10403 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10404 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10405
10406 2011-12-13 Yao Qi <yao@codesourcery.com>
10407
10408 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10409 macros.
10410 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10411
10412 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10413
10414 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10415 Print new debug message for such case.
10416
10417 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10418
10419 Fix overlapping memcpy.
10420 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10421 the read_inferior_memory transfer.
10422 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10423 write_inferior_memory transfer.
10424 (set_fast_tracepoint_jump): New variable buf. Use it for the
10425 read_inferior_memory and write_inferior_memory transfers.
10426 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10427 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10428 Use it for the write_inferior_memory transfer.
10429 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10430 buffers.
10431
10432 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10433
10434 * linux-low.c (fetch_register, store_register): Make code
10435 consistent, fix formatting.
10436
10437 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10438
10439 * linux-low.c (usr_store_inferior_registers): Factor out code
10440 to handle individual registers into...
10441 (store_register): ... this new function.
10442
10443 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10444
10445 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10446 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10447 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10448 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10449 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10450 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10451 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10452 (srv_xmlfiles): Add new XML files.
10453
10454 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10455 and <sys/uio.h>.
10456 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10457 (init_registers_s390_linux32v1): Add prototype.
10458 (init_registers_s390_linux32v2): Likewise.
10459 (init_registers_s390_linux64v1): Likewise.
10460 (init_registers_s390_linux64v2): Likewise.
10461 (init_registers_s390x_linux64v1): Likewise.
10462 (init_registers_s390x_linux64v2): Likewise.
10463 (s390_num_regs): Increment to 52.
10464 (s390_regmap): Add orig_r2 register.
10465 (s390_num_regs_3264): Increment to 68.
10466 (s390_regmap_3264): Add orig_r2 register.
10467 (s390_collect_ptrace_register): Handle orig_r2 register.
10468 (s390_supply_ptrace_register): Likewise.
10469 (s390_fill_last_break): New function.
10470 (s390_store_last_break): Likewise.
10471 (s390_fill_system_call): New function.
10472 (s390_store_system_call): Likewise.
10473 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10474 register sets.
10475 (s390_check_regset): New function.
10476 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10477 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10478 Update target_regsets for available register sets.
10479
10480 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10481 Jan Kratochvil <jan.kratochvil@redhat.com>
10482
10483 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10484 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10485 New.
10486 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10487 * linux-low.h (struct process_info_private): New member r_debug.
10488 * server.c (handle_qxfer_libraries): Call
10489 the_target->qxfer_libraries_svr4.
10490 (handle_qxfer_libraries_svr4): New function.
10491 (qxfer_packets): New entry "libraries-svr4".
10492 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10493 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10494 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10495 PACKET_qXfer_libraries_svr4.
10496
10497 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10498
10499 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10500 PSW address/mask between 8-byte and 16-byte formats.
10501 (s390_supply_ptrace_register): Likewise.
10502 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10503 basic addressing mode bit.
10504
10505 2011-11-24 Stan Shebs <stan@codesourcery.com>
10506
10507 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10508
10509 2011-11-17 Stan Shebs <stan@codesourcery.com>
10510
10511 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10512 (tracing_start_time): New global.
10513 (tracing_stop_time): New global.
10514 (tracing_user_name): New global.
10515 (tracing_notes): New global.
10516 (tracing_stop_note): New global.
10517 (cmd_qtstart): Set traceframe_usage, start_time.
10518 (stop_tracing): Set stop_time.
10519 (cmd_qtstatus): Report additional status.
10520 (cmd_qtp): New function.
10521 (handle_tracepoint_query): Call it.
10522 (cmd_qtnotes): New function.
10523 (handle_tracepoint_general_set): Call it.
10524 (get_timestamp): Rename from tsv_get_timestamp.
10525
10526 2011-11-14 Stan Shebs <stan@codesourcery.com>
10527 Kwok Cheung Yeung <kcy@codesourcery.com>
10528
10529 * linux-x86-low.c (small_jump_insn): New.
10530 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10531 trampoline and error message, build a trampoline and issue a small
10532 jump instruction to it.
10533 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10534 trampoline and error message.
10535 (x86_get_min_fast_tracepoint_insn_len): New.
10536 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10537 * linux-low.h (struct linux_target_ops): Add arguments to
10538 install_fast_tracepoint_jump_pad operation, add new operation.
10539 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10540 arguments.
10541 (linux_get_min_fast_tracepoint_insn_len): New function.
10542 (linux_target_op): Add new operation.
10543 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10544 (gdb_trampoline_buffer_end): Ditto.
10545 (gdb_trampoline_buffer_error): Ditto.
10546 (struct ipa_sym_addresses): Add fields for new IPA variables.
10547 (symbol_list): Add entries for new IPA variables.
10548 (struct tracepoint): Add fields to hold the address range of the
10549 trampoline used by the tracepoint.
10550 (trampoline_buffer_head): New static variable.
10551 (trampoline_buffer_tail): Ditto.
10552 (claim_trampoline_space): New function.
10553 (have_fast_tracepoint_trampoline_buffer): New function.
10554 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10555 structure.
10556 (install_fast_tracepoint): Ditto, also add error buffer argument.
10557 (cmd_qtminftpilen): New function.
10558 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10559 (fast_tracepoint_from_trampoline_address): New function.
10560 (fast_tracepoint_collecting): Handle trampoline as part of jump
10561 pad space.
10562 (set_trampoline_buffer_space): New function.
10563 (initialize_tracepoint): Initialize new IPA variables.
10564 * target.h (struct target_ops): Add arguments to
10565 install_fast_tracepoint_jump_pad operation, add new
10566 get_min_fast_tracepoint_insn_len operation.
10567 (target_get_min_fast_tracepoint_insn_len): New.
10568 (install_fast_tracepoint_jump_pad): Add arguments.
10569 * server.h (IPA_BUFSIZ): Define.
10570 * linux-i386-ipa.c: Include extra header files.
10571 (initialize_fast_tracepoint_trampoline_buffer): New function.
10572 (initialize_low_tracepoint): Call it.
10573 * server.h (set_trampoline_buffer_space): Declare.
10574 (claim_trampoline_space): Ditto.
10575 (have_fast_tracepoint_trampoline_buffer): Ditto.
10576
10577 2011-11-14 Yao Qi <yao@codesourcery.com>
10578
10579 * server.c (handle_query): Handle InstallInTrace for qSupported.
10580 * tracepoint.c (add_tracepoint): Sort list.
10581 (install_tracepoint, download_tracepoint): New.
10582 (cmd_qtdp): Call them to install and download tracepoints.
10583 (sort_tracepoints): Removed.
10584 (cmd_qtstart): Update.
10585
10586 2011-11-14 Yao Qi <yao@codesourcery.com>
10587
10588 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10589 * mem-break.h: Declare.
10590 * tracepoint.c (cmd_qtstart): Move some code to ...
10591 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10592 New.
10593 (download_tracepoints): Move some code to ...
10594 (download_tracepoint_1): ... here. New.
10595
10596 2011-11-08 Yao Qi <yao@codesourcery.com>
10597
10598 * remote-utils.c (relocate_instruction): A comment fix.
10599
10600 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10601
10602 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10603 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10604 dr_status_mirror and dr_control_mirror from debug_reg_state.
10605 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10606 (i386_initial_stuff): Remove use of deleted globals.
10607 (i386_get_thread_context, i386_set_thread_context,
10608 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10609 from debug_reg_state.
10610
10611 2011-11-05 Yao Qi <yao@codesourcery.com>
10612
10613 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10614 address as TPOINT's.
10615
10616 2011-11-02 Stan Shebs <stan@codesourcery.com>
10617
10618 * tracepoint.c (agent_mem_read_string): New function.
10619 (eval_agent_expr): Call it for tracenz.
10620 * server.c (handle_query): Report support for tracenz.
10621
10622 2011-11-02 Yao Qi <yao@codesourcery.com>
10623
10624 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10625
10626 2011-11-02 Yao Qi <yao@codesourcery.com>
10627
10628 * target.h: Fix a typo in comment.
10629
10630 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10631
10632 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10633 clobber the breakpoints' shadows with fast tracepoint jumps.
10634 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10635 * target.c (write_inferior_memory): Also pass MYADDR down to
10636 check_mem_write.
10637
10638 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10639
10640 * configure.ac: Check support for personality routine.
10641 * configure: Regenerate.
10642 * config.in: Likewise.
10643 * linux-low.c: Include <sys/personality.h>.
10644 Define ADDR_NO_RANDOMIZE if necessary.
10645 (linux_create_inferior): Disable address space randomization when
10646 forking inferior, if requested.
10647 (linux_supports_disable_randomization): New function.
10648 (linux_target_ops): Install it.
10649 * server.h (disable_randomization): Declare.
10650 * server.c (disable_randomization): New global variable.
10651 (handle_general_set): Handle QDisableRandomization.
10652 (handle_query): Likewise for qSupported.
10653 (main): Support --disable-randomization and --no-disable-randomization
10654 command line arguments.
10655 * target.h (struct target_ops): Add supports_disable_randomization.
10656 (target_supports_disable_randomization): New macro.
10657
10658 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10659
10660 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10661 ifdef check.
10662 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10663 [!PT_GETDSBT] (target_loadmap): New definition.
10664 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10665 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10666 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10667 and PT_GETDSBT to LINUX_LOADMAP.
10668 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10669 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10670
10671 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10672
10673 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10674 (arm_linux_hwbp_cap): New static variable.
10675 (arm_linux_get_hwbp_cap): Replace by ...
10676 (arm_linux_init_hwbp_cap): ... this new function.
10677 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10678 (arm_linux_get_hw_watchpoint_count): Likewise.
10679 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10680 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10681 (arm_prepare_to_resume): Use perror_with_name instead of error.
10682
10683 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10684
10685 * linux-arm-low.c: Include <signal.h>.
10686 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10687 (struct arm_linux_hwbp_cap): New data type.
10688 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10689 (struct arm_linux_hw_breakpoint): New data type.
10690 (MAX_BPTS, MAX_WPTS): Define.
10691 (struct arch_process_info, struct arch_lwp_info): New data types.
10692 (arm_linux_get_hwbp_cap): New function.
10693 (arm_linux_get_hw_breakpoint_count): Likewise.
10694 (arm_linux_get_hw_watchpoint_count): Likewise.
10695 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10696 (arm_hwbp_control_initialize): Likewise.
10697 (arm_hwbp_control_is_enabled): Likewise.
10698 (arm_hwbp_control_is_initialized): Likewise.
10699 (arm_hwbp_control_disable): Likewise.
10700 (arm_linux_hw_breakpoint_equal): Likewise.
10701 (arm_linux_hw_point_initialize): Likewise.
10702 (struct update_registers_data): New data structure.
10703 (update_registers_callback: New function.
10704 (arm_insert_point): Likewise.
10705 (arm_remove_point): Likewise.
10706 (arm_stopped_by_watchpoint): Likewise.
10707 (arm_stopped_data_address): Likewise.
10708 (arm_new_process): Likewise.
10709 (arm_new_thread): Likewise.
10710 (arm_prepare_to_resume): Likewise.
10711 (the_low_target): Register arm_insert_point, arm_remove_point,
10712 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10713 arm_new_thread, and arm_prepare_to_resume.
10714
10715 2011-09-15 Stan Shebs <stan@codesourcery.com>
10716
10717 * server.h (struct emit_ops): Add compare-goto fields.
10718 * tracepoint.c (gdb_agent_op_sizes): New table.
10719 (emit_eq_goto): New function.
10720 (emit_ne_goto): New function.
10721 (emit_lt_goto): New function.
10722 (emit_le_goto): New function.
10723 (emit_gt_goto): New function.
10724 (emit_ge_goto): New function.
10725 (is_goto_target): New function.
10726 (compile_bytecodes): Recognize special cases of compare-goto
10727 combinations and call specialized emitters for them.
10728 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10729 (amd64_emit_ne_goto): New function.
10730 (amd64_emit_lt_goto): New function.
10731 (amd64_emit_le_goto): New function.
10732 (amd64_emit_gt_goto): New function.
10733 (amd64_emit_ge_goto): New function.
10734 (amd64_emit_ops): Add the new functions.
10735 (i386_emit_eq_goto): New function.
10736 (i386_emit_ne_goto): New function.
10737 (i386_emit_lt_goto): New function.
10738 (i386_emit_le_goto): New function.
10739 (i386_emit_gt_goto): New function.
10740 (i386_emit_ge_goto): New function.
10741 (i386_emit_ops): Add the new functions.
10742
10743 2011-09-08 Stan Shebs <stan@codesourcery.com>
10744
10745 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10746 (i386_emit_epilogue): Restore %ebx.
10747
10748 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10749
10750 * server.c (step_thread): Remove definition.
10751 (process_serial_event): Don't handle Hs.
10752 * server.h (step_thread): Remove declaration.
10753 * target.c (set_desired_inferior): Remove use of step_thread.
10754
10755 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10756
10757 * linux-low.c: Include linux-procfs.h.
10758 (linux_attach_lwp_1): Update comments.
10759 (linux_attach): Scan for existing threads when attaching to a
10760 process that is the tgid.
10761 * Makefile.in: Update dependencies.
10762
10763 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10764
10765 * configure.srv: Add linux-procfs.o dependencies.
10766
10767 2011-08-14 Yao Qi <yao@codesourcery.com>
10768
10769 * target.h (struct target_ops): Fix indent.
10770 * win32-low.c (win32_target_ops): Fix comment.
10771
10772 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10773 Yao Qi <yao@codesourcery.com>
10774
10775 * Makefile.in (clean): Remove tic6x-*.c files.
10776 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10777 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10778 (tic6x-c64xp-linux.c): Likewise.
10779 * configure.srv: Add support for tic6x-*-uclinux.
10780 * linux-tic6x-low.c: New.
10781 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10782
10783 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10784 Yao Qi <yao@codesourcery.com>
10785
10786 * target.h (struct target_ops): Add read_loadmap.
10787 * linux-low.c (struct target_loadseg): New type.
10788 (struct target_loadmap): New type.
10789 (linux_read_loadmap): New function.
10790 (linux_target_ops): Add linux_read_loadmap.
10791 * server.c (handle_query): Support qXfer:fdpic:read packet.
10792 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10793 to NULL.
10794
10795 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10796
10797 * win32-low.c: Include <stdint.h>.
10798
10799 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10800
10801 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10802 to the inferior here.
10803 (i386_remove_aligned_watchpoint): Ditto.
10804 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10805 fit part of the watchpoint in the debug registers.
10806 (i386_update_inferior_debug_regs): New.
10807 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10808 registers, and only update the inferior on success.
10809 (i386_low_remove_watchpoint): Ditto.
10810
10811 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10812
10813 * linux-low.c (compare_ints, unique, list_threads, show_process,
10814 linux_core_of_thread): Delete.
10815 (linux_target_ops): Change linux_core_of_thread to
10816 linux_common_core_of_thread.
10817 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10818 * utils.c (malloc_failure): Change type of argument.
10819 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10820 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10821 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10822 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10823 (IPA_OBJS): Add common-utils-ipa.o.
10824 (ptid_h, linux_osdata_h): New macros.
10825 (server_h): Add common/common-utils.h, common/xml-utils.h,
10826 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10827 common/ptid.h.
10828 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10829 ptid.o, buffer.o): New rules.
10830 (linux-low.o): Add common/linux-osdata.h as a dependency.
10831 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10832 * configure.ac: Add AC_HEADER_DIRENT check.
10833 * config.in: Regenerate.
10834 * configure: Regenerate.
10835 * remote-utils.c (xml_escape_text): Delete.
10836 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10837 buffer_xml_printf): Move to common/buffer.c.
10838 * server.c (main): Remove call to initialize_inferiors.
10839 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10840 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10841 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10842 internal_error, gdb_assert, gdb_assert_fail): Delete.
10843 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10844 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10845 common/buffer.h.
10846 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10847 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10848 initialize_inferiors): Delete.
10849
10850 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10851
10852 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10853 symbol error.
10854
10855 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10856
10857 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10858 assertion.
10859 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10860
10861 2011-05-26 Yao Qi <yao@codesourcery.com>
10862
10863 * Makefile.in (thread-db.o): Track dependence to
10864 common/gdb_thread_db.h.
10865 * thread-db.c: include gdb_thread_db.h from right place.
10866
10867 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10868
10869 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10870 __FILE__ and __LINE__ to internal_error.
10871
10872 2011-05-13 Doug Evans <dje@google.com>
10873
10874 * thread-db.c (try_thread_db_load_from_sdir): New function.
10875 (try_thread_db_load_from_dir): New function.
10876 (thread_db_load_search): Handle $sdir, ignore $pdir.
10877 Remove trying of system directories if search of
10878 libthread-db-search-path fails, that is now done via $sdir.
10879
10880 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10881
10882 * server.c (handle_query): Add EnableDisableTracepoints to the list
10883 of supported features.
10884 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10885 tracepoints.
10886 (cmd_qtenable_disable): New.
10887 (cmd_qtstart): Install tracepoints even if disabled.
10888 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10889 receiving a QTEnable or QTDisable packet.
10890 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10891 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10892 tracepoints.
10893 (gdb_probe): Skip data collection if static tracepoint is disabled.
10894
10895 2011-05-10 Doug Evans <dje@google.com>
10896
10897 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10898
10899 2011-05-04 Doug Evans <dje@google.com>
10900
10901 * linux-low.c (linux_join): Skip process lookup.
10902 * spu-low.c (spu_join): Ditto.
10903 * server.c (join_inferiors_callback): Delete.
10904 (process_serial_event): For 'D' packet (detach) call join_inferior
10905 directly.
10906
10907 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10908
10909 * README: Don't mention xscale*-*-linux*.
10910 * configure.srv (xscale*-*-linux*): Don't handle target.
10911
10912 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10913
10914 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10915 casting pointers.
10916 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10917 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10918 (i386_emit_void_call_2): Likewise.
10919
10920 2011-04-26 Yao Qi <yao@codesourcery.com>
10921
10922 * linux-low.c: Move common macros to linux-ptrace.h.
10923 Include linux-ptrace.h.
10924 * Makefile.in (linux_ptrace_h): New.
10925 (linux-low.o): Depends on linux-ptrace.h.
10926
10927 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10928
10929 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10930 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10931 (remote_prepare): New function with most of the TCP code from ...
10932 (remote_open): ... here. Detect PORT here unconditionally. Move also
10933 setting transport_is_reliable.
10934 * server.c (run_once): New variable.
10935 (gdbserver_usage): Document it.
10936 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10937 the first run if RUN_ONCE.
10938 * server.h (run_once, remote_prepare): New declarations.
10939
10940 2011-04-19 Tom Tromey <tromey@redhat.com>
10941
10942 * win32-low.c (handle_load_dll): Remove duplicate "the".
10943
10944 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10945
10946 Remove support for old Cygwin 1.5 versions.
10947 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10948 function to avoid warning.
10949 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10950 warning.
10951
10952 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10953
10954 * gdbserver/server.h (Macro _): Define it if not available.
10955
10956 2011-03-14 Michael Snyder <msnyder@vmware.com>
10957
10958 * hostio.c (handle_close): Remove unnecessary null test.
10959
10960 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10961
10962 * Makefile.in (maintainer-clean realclean distclean): Remove
10963 "make ... subdir_do" command.
10964
10965 2011-03-10 Michael Snyder <msnyder@vmware.com>
10966
10967 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10968
10969 * server.c (handle_v_run): Free alloced buffer on early return.
10970
10971 2011-03-09 Yao Qi <yao@codesourcery.com>
10972
10973 Revert:
10974 2011-03-04 Yao Qi <yao@codesourcery.com>
10975
10976 * Makefile.in: Remove GNU make feature --directory.
10977
10978 2011-03-05 Yao Qi <yao@codesourcery.com>
10979
10980 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10981 (subdir_do): New make target. Copied from gdb/Makefile.
10982 (maintainer-clean, realclean, distclean, clean): Call corresponding
10983 make targets in common/Makefile.
10984
10985 2011-02-11 Yao Qi <yao@codesourcery.com>
10986
10987 * configure.ac: Call AC_PROG_RANLIB.
10988 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10989 * configure: Regenerate.
10990
10991 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10992
10993 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10994
10995 2011-03-06 Yao Qi <yao@codesourcery.com>
10996
10997 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10998
10999 2011-03-05 Yao Qi <yao@codesourcery.com>
11000
11001 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11002 (subdir_do): New make target. Copied from gdb/Makefile.
11003 (maintainer-clean, realclean, distclean, clean): Call corresponding
11004 make targets in common/Makefile.
11005
11006 2011-03-04 Yao Qi <yao@codesourcery.com>
11007
11008 * Makefile.in: Remove GNU make feature --directory.
11009
11010 2011-03-04 Michael Snyder <msnyder@vmware.com>
11011
11012 * server.c (queue_stop_reply): Call xmalloc not malloc.
11013
11014 2011-03-02 Michael Snyder <msnyder@vmware.com>
11015
11016 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11017
11018 2011-02-28 Michael Snyder <msnyder@vmware.com>
11019
11020 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11021 (cmd_qtframe): Ditto.
11022 (cmd_qtbuffer): Ditto.
11023 (cmd_bigqtbuffer): Ditto.
11024
11025 * utils.c (decimal2str): Initialize 'width' to nine, then
11026 don't mess with it.
11027
11028 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11029
11030 * hostio.c (require_data): Free *data, not data.
11031
11032 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11033
11034 * hostio.c (require_data): Use free, not xfree.
11035
11036 2011-02-27 Michael Snyder <msnyder@vmware.com>
11037
11038 * server.c (handle_query): Discard unused value.
11039
11040 * hostio.c (require_data): Free malloc memory before returning
11041 error.
11042
11043 2011-02-26 Michael Snyder <msnyder@vmware.com>
11044
11045 * linux-low.c (list_threads): Call closedir for dirent.
11046
11047 2011-02-27 Michael Snyder <msnyder@vmware.com>
11048
11049 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11050 a case statement falls through.
11051
11052 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11053
11054 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11055 in comparison.
11056
11057 2011-02-26 Michael Snyder <msnyder@vmware.com>
11058
11059 * utils.c (decimal2str): Eliminate dead code and dead param.
11060 (pulongest): Drop dead param from call to decimal2str.
11061 (plongest): Ditto.
11062
11063 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11064
11065 Revert the following patch (not approved yet):
11066 2011-02-21 Hui Zhu <teawater@gmail.com>
11067 * tracepoint.c (tp_printf): New function.
11068 (eval_agent_expr): Handle gdb_agent_op_printf.
11069
11070 2011-02-21 Hui Zhu <teawater@gmail.com>
11071
11072 * tracepoint.c (tp_printf): New function.
11073 (eval_agent_expr): Handle gdb_agent_op_printf.
11074
11075 2011-02-18 Tom Tromey <tromey@redhat.com>
11076
11077 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11078 (tracepoint.o): Likewise.
11079 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11080 (gdb_agent_op_names): Likewise.
11081
11082 2011-02-18 Tom Tromey <tromey@redhat.com>
11083
11084 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11085 gdb_agent_op_rot>: New constants.
11086 (gdb_agent_op_names): Add pick and roll.
11087 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11088 cases.
11089
11090 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11091
11092 * aclocal.m4: Regenerated with aclocal-1.11.1.
11093
11094 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11095
11096 * server.c (handle_qxfer_traceframe_info): New.
11097 (qxfer_packets): Register "traceframe-info".
11098 (handle_query): Report support for qXfer:traceframe-info:read+.
11099 * tracepoint.c (match_blocktype): New.
11100 (traceframe_find_block_type): Rename to ...
11101 (traceframe_walk_blocks): ... this. Add callback filter argument,
11102 and use it.
11103 (traceframe_find_block_type): New, reimplemented on top of
11104 traceframe_walk_blocks.
11105 (build_traceframe_info_xml): New.
11106 (traceframe_read_info): New.
11107 * server.h (traceframe_read_info): Declare.
11108
11109 2011-02-11 Yao Qi <yao@codesourcery.com>
11110
11111 * configure.ac: Call AC_PROG_RANLIB.
11112 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11113 * configure: Regenerate.
11114
11115 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11116
11117 * server.c (gdb_read_memory): Change return semantics to allow
11118 partial transfers.
11119 (handle_search_memory_1): Adjust.
11120 (process_serial_event) <'m' packet>: Handle partial transfers.
11121 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11122
11123 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11124
11125 * regcache.c (init_register_cache): Initialize
11126 regcache->register_status.
11127 (free_register_cache): Release regcache->register_status.
11128 (regcache_cpy): Copy register_status.
11129 (registers_to_string): Print 'x's for unavailable registers.
11130 (supply_register): Mark the register's status valid or
11131 unavailable, depending on whether a buffer was passed in or not.
11132 (supply_register_zeroed): New.
11133 (supply_regblock): Mark the registers' status valid or
11134 unavailable, depending on whether a buffer was passed in or not.
11135 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11136 (struct regcache): New `register_status' field.
11137 (supply_register_zeroed): Declare.
11138 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11139 supply_register_zeroed, rather than passing a NULL buffer to
11140 supply_register.
11141 * tracepoint.c (fetch_traceframe_registers): Update comment.
11142
11143 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11144
11145 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11146 buffer explicit.
11147
11148 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11149
11150 * server.h (decode_xfer_write): Change prototype.
11151 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11152 and don't extract the annex here.
11153 * server.c (decode_xfer_read): Remove `annex' parameter,
11154 and don't extract the annex here.
11155 (decode_xfer): New.
11156 (struct qxfer): New.
11157 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11158 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11159 (handle_qxfer_statictrace): New functions, abstracted out from
11160 handle_query, and made to use the struct qxfer interface.
11161 (handle_threads_qxfer_proper): Rename to ...
11162 (handle_qxfer_threads_proper): ... this.
11163 (handle_threads_qxfer): Rename to ...
11164 (handle_qxfer_threads): ... this. Adjust.
11165 (qxfer_packets): New array.
11166 (handle_qxfer): New function.
11167 (handle_query): Use handle_qxfer.
11168
11169 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11170
11171 * gdbreplay.c: Shorten lines of >= 80 columns.
11172 * linux-low.c: Ditto.
11173 * linux-ppc-low.c: Ditto.
11174 * linux-s390-low.c: Ditto.
11175 * linux-sparc-low.c: Ditto.
11176 * linux-x86-low.c: Ditto.
11177 * linux-xtensa-low.c: Ditto.
11178 * mem-break.c: Ditto.
11179 * nto-low.c: Ditto.
11180 * regcache.h: Ditto.
11181 * remote-utils.c: Ditto.
11182 * server.c: Ditto.
11183 * server.h: Ditto.
11184 * thread-db.c: Ditto.
11185 * tracepoint.c: Ditto.
11186 * utils.c: Ditto.
11187 * win32-low.h: Ditto.
11188
11189 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11190
11191 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11192 update.
11193
11194 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11195
11196 * server.c (gdbserver_version): Update copyright year in version
11197 output.
11198 * gdbreplay.c (gdbreplay_version): Ditto.
11199
11200 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11201
11202 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11203 * linux-bfin-low.c: New file.
11204 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11205 PT_DATA_ADDR for BFIN targets.
11206 * Makefile.in (SFILES): Add linux-bfin-low.c.
11207 (clean): Remove reg-bfin.c.
11208 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11209 * README: Mention supported Blackfin targets.
11210
11211 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11212
11213 * .gitignore: New file.
11214
11215 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11216
11217 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11218
11219 2010-10-22 Jie Zhang <jie@codesourcery.com>
11220
11221 * Makefile.in: Add FLAGS_TO_PASS variable.
11222 (install): Remove dependency of install-only and recursively
11223 invoke make for install-only.
11224
11225 2010-10-04 Doug Evans <dje@google.com>
11226
11227 * Makefile.in (uninstall): Use $(DESTDIR).
11228
11229 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11230
11231 PR gdb/11842
11232
11233 * linux-x86-low.c (compat_siginfo_from_siginfo)
11234 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11235 si_code is < 0. Check for si_code == SI_TIMER before checking for
11236 si_code < 0.
11237
11238 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11239
11240 * lynx-i386-low.c: New file.
11241 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11242
11243 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11244
11245 * lynx-low.c (ptrace_request_to_str): Remove handling for
11246 request values that have been removed in LynxOS 5.x.
11247
11248 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11249
11250 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11251 <ptrace.h>
11252
11253 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11254
11255 * configure.ac: Add --enable-inprocess-agent option.
11256 * configure: Rebuilt.
11257
11258 2010-09-06 Yao Qi <yao@codesourcery.com>
11259
11260 * linux-low.c (linux_kill): Remove unused variable.
11261 (linux_stabilize_threads): Likewise.
11262 * server.c (start_inferior): Likewise.
11263 (queue_stop_reply_callback): Likewise.
11264 * tracepoint.c (do_action_at_tracepoint): Likewise.
11265
11266 2010-09-06 Yao Qi <yao@codesourcery.com>
11267
11268 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11269 on return.
11270
11271 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11272
11273 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11274
11275 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11276
11277 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11278 "$(IPA_DEPFILES)".
11279
11280 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11281
11282 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11283 gdbserver/lynx-ppc-low.c: New files.
11284 * Makefile.in (lynx_low_h): New variable.
11285 (lynx-low.o, lynx-ppc-low.o): New rules.
11286 * configure.ac: On LynxOS, link with -lnetinet.
11287 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11288 * configure: regenerate.
11289
11290 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11291
11292 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11293 * configure.ac: Add check for vasprintf and vsnprintf.
11294 * configure, config.in: Regenerate.
11295 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11296
11297 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11298
11299 * gdbreplay.c: Move include of alloca.h up, next to include of
11300 malloc.h.
11301 * server.h: Add include of malloc.h.
11302 * mem-break.c: Remove include of malloc.h.
11303 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11304
11305 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11306
11307 * Makefile.in (memmem.o): Build with -Wno-error.
11308
11309 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11310
11311 * utils.c (xsnprintf): Make non-static.
11312 * server.h: Add xsnprintf declaration.
11313 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11314 replace calls to snprintf by calls to xsnprintf throughout.
11315
11316 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11317
11318 * configure.ac: Add configure check for alloca.
11319 * configure, config.in: Regenerate.
11320 * server.h: Include alloca.h if it exists.
11321 * gdbreplay.c: Include alloca.h if it exists.
11322
11323 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11324
11325 * linux-low.c (__SIGRTMIN): Define if not already defined.
11326 (linux_create_inferior): Check for __ANDROID__ rather than
11327 __SIGRTMIN.
11328 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11329 are already deferred.
11330 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11331 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11332 stopped and already has a pending signal to report.
11333 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11334 a pending signal to report or is moving out of a jump pad.
11335 (linux_init_signals): Check for __ANDROID__ rather than
11336 __SIGRTMIN.
11337
11338 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11339
11340 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11341 debug_threads check. Avoid a linear search when not doing debug
11342 output.
11343
11344 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11345
11346 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11347 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11348 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11349 (process_event): Change local fd's type to gdb_fildes_t.
11350 (create_file_handler): Adjust prototype.
11351 (delete_file_handler): Adjust prototype.
11352 (handle_file_event): Adjust prototype. Use pfildes.
11353 (create_file_event): Adjsut prototype.
11354 * remote-utils.c (remote_desc, listen_desc): Change type to
11355 gdb_fildes_t.
11356 * server.h: New gdb_fildes_t typedef.
11357 [USE_WIN32API]: Include winsock2.h.
11358 (delete_file_handler, add_file_handler): Adjust prototypes.
11359 (pfildes): Declare.
11360 * utils.c (pfildes): New.
11361
11362 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11363
11364 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11365 * configure: Regenerate.
11366
11367 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11368
11369 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11370 (linux_done_accessing_memory): ... this.
11371 (linux_target_ops): Adjust.
11372 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11373 * nto-low.c (nto_target_ops): Adjust comment.
11374 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11375 * spu-low.c (spu_target_ops): Adjust comment.
11376 * target.h (target_ops): Rename unprepare_to_access_memory field
11377 to done_accessing_memory.
11378 (unprepare_to_access_memory): Rename to ...
11379 (done_accessing_memory): ... this.
11380
11381 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11382
11383 * linux-low.c (linux_prepare_to_access_memory): New.
11384 (linux_unprepare_to_access_memory): New.
11385 (linux_target_ops): Install them.
11386 * server.c (read_memory): Rename to ...
11387 (gdb_read_memory): ... this. Use
11388 prepare_to_access_memory/prepare_to_access_memory.
11389 (write_memory): Rename to ...
11390 (gdb_write_memory): ... this. Use
11391 prepare_to_access_memory/prepare_to_access_memory.
11392 (handle_search_memory_1): Adjust.
11393 (process_serial_event): Adjust.
11394 * target.h (struct target_ops): New fields
11395 prepare_to_access_memory and unprepare_to_access_memory.
11396 (prepare_to_access_memory, unprepare_to_access_memory): New.
11397 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11398 prepare_to_access_memory/prepare_to_access_memory.
11399 * nto-low.c (nto_target_ops): Adjust.
11400 * spu-low.c (spu_target_ops): Adjust.
11401 * win32-low.c (win32_target_ops): Adjust.
11402
11403 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11404
11405 * Makefile.in (WARN_CFLAGS): Get it from configure.
11406 (WERROR_CFLAGS): New.
11407 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11408 * configure.ac: Introduce --enable-werror, which adds -Werror to
11409 the compiler command line. Enabled by default. Disable with
11410 --disable-werror. Add -Wdeclaration-after-statement
11411 Wpointer-arith and -Wformat-nonliteral to warning flags.
11412 * configure: Regenerate.
11413
11414 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11415
11416 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11417
11418 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11419
11420 * gdbreplay.c (remote_error): New.
11421 (gdbchar): New.
11422 (expect): Use gdbchar. Check for error reading from GDB.
11423 Clarify sync error output.
11424 (play): Check for errors writing to GDB.
11425 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11426 * remote-utils.c (getpkt): Check for errors writing to the remote
11427 descriptor.
11428
11429 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11430
11431 * linux-low.c (linux_wait_1): Move non-debugging code out of
11432 `debug_threads' control.
11433
11434 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11435
11436 * linux-low.c (linux_wait_1): Don't set last_status here.
11437 * server.c (push_event, queue_stop_reply_callback): Assert we're
11438 not pushing a TARGET_WAITKIND_IGNORE event.
11439 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11440 (myresume, handle_target_event): Set the thread's last_resume_kind
11441 and last_status from the target returned status.
11442
11443 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11444
11445 PR threads/10729
11446
11447 * linux-x86-low.c (update_debug_registers_callback): New.
11448 (i386_dr_low_set_addr): Use it.
11449 (i386_dr_low_get_addr): New.
11450 (i386_dr_low_set_control): Use update_debug_registers_callback.
11451 (i386_dr_low_get_control): New.
11452 (i386_dr_low_get_status): Adjust.
11453 * linux-low.c (linux_stop_lwp): New.
11454 * linux-low.h (linux_stop_lwp): Declare.
11455
11456 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11457 argument instead of a i386_debug_reg_state.
11458 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11459 a i386_debug_reg_state.
11460 (i386_insert_aligned_watchpoint): Adjust.
11461 (i386_remove_aligned_watchpoint): Adjust.
11462 (i386_low_stopped_data_address): Read the debug registers from the
11463 inferior instead of from the mirrors.
11464 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11465 (i386_dr_low_get_addr): Declare.
11466 (i386_dr_low_get_control): Declare.
11467 (i386_dr_low_get_status): Change prototype.
11468
11469 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11470 (i386_dr_low_get_addr): New.
11471 (i386_dr_low_get_control): New.
11472 (i386_dr_low_get_status): Adjust prototype. Return
11473 dr_status_mirror.
11474 (i386_initial_stuff): Clear dr_status_mirror and
11475 dr_control_mirror.
11476 (i386_get_thread_context): Adjust.
11477 (i386_set_thread_context): Adjust.
11478 (i386_thread_added): Adjust.
11479
11480 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11481
11482 * linux-low.h (linux_thread_area): Delete declaration.
11483
11484 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11485
11486 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11487 after its termination.
11488
11489 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11490
11491 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11492 (gdb_wants_all_stopped): Delete.
11493 (linux_wait_1): Don't call them.
11494 * server.c (handle_v_cont): Tag all threads as want-stopped.
11495 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11496 stopped as "client-wants-stopped".
11497
11498 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11499
11500 * Makefile.in (signals_h): New.
11501 (server_h): Depend on it.
11502 (server.o): Don't depend on $(signals_def).
11503 (signals.o): Depend on $(signals_def).
11504
11505 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11506
11507 * Makefile.in (signals_def): New.
11508 (server_h): Append include/gdb/signals.h and signals_def.
11509 (server.o): Append signals_def.
11510
11511 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11512
11513 * server.c (handle_target_event): Use target_signal_to_host for
11514 resume_info.sig initialization.
11515 * target.h (struct thread_resume) <sig>: New comment.
11516
11517 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11518
11519 * server.c (handle_query): strcpy() the returned string from paddress()
11520 instead of sprintf().
11521 * utils.c (paddress): Return phex_nz().
11522
11523 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11524
11525 * server.c (handle_v_cont): Call mourn_inferior if process
11526 just exited.
11527 (myresume): Likewise.
11528
11529 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11530
11531 Static tracepoints, and integration with UST.
11532
11533 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11534 * mem-break.c (uninsert_all_breakpoints)
11535 (reinsert_all_breakpoints): New.
11536 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11537 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11538 (gdb_agent_ust_loaded, helper_thread_id)
11539 (gdb_agent_helper_thread_id): New macros.
11540 (struct ipa_sym_addresses): Add addr_ust_loaded,
11541 addr_helper_thread_id, addr_cmd_buf.
11542 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11543 (in_process_agent_loaded_ust): New.
11544 (write_e_ust_not_loaded): New.
11545 (maybe_write_ipa_ust_not_loaded): New.
11546 (struct collect_static_trace_data_action): New.
11547 (enum tracepoint_type) <static_tracepoint>: New.
11548 (struct tracepoint) <handle>: Mention static tracepoints.
11549 (struct static_tracepoint_ctx): New.
11550 (CMD_BUF_SIZE): New.
11551 (add_tracepoint_action): Handle static tracepoint actions.
11552 (unprobe_marker_at): New.
11553 (clear_installed_tracepoints): Handle static tracepoints.
11554 (cmd_qtdp): Handle static tracepoints.
11555 (probe_marker_at): New.
11556 (cmd_qtstart): Handle static tracepoints.
11557 (response_tracepoint): Handle static tracepoints.
11558 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11559 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11560 (get_context_regcache): Handle static tracepoints.
11561 (do_action_at_tracepoint): Handle static tracepoint actions.
11562 (traceframe_find_block_type): Handle static trace data blocks.
11563 (traceframe_read_sdata): New.
11564 (download_tracepoints): Download static tracepoint actions.
11565 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11566 (GDB_PROBE_NAME): New.
11567 (ust_ops): New.
11568 (GET_UST_SYM): New.
11569 (USTF): New.
11570 (dlsym_ust): New.
11571 (ust_marker_to_static_tracepoint): New.
11572 (gdb_probe): New.
11573 (collect_ust_data_at_tracepoint): New.
11574 (gdb_ust_probe): New.
11575 (UNIX_PATH_MAX, SOCK_DIR): New.
11576 (gdb_ust_connect_sync_socket): New.
11577 (resume_thread, stop_thread): New.
11578 (run_inferior_command): New.
11579 (init_named_socket): New.
11580 (gdb_ust_socket_init): New.
11581 (cstr_to_hexstr): New.
11582 (next_st): New.
11583 (first_marker, next_marker): New.
11584 (response_ust_marker): New.
11585 (cmd_qtfstm, cmd_qtsstm): New.
11586 (unprobe_marker_at, probe_marker_at): New.
11587 (cmd_qtstmat, gdb_ust_thread): New.
11588 (gdb_ust_init): New.
11589 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11590 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11591 (ST_REGENTRY): New.
11592 (x86_64_st_collect_regmap): New.
11593 (X86_64_NUM_ST_COLLECT_GREGS): New.
11594 (AMD64_RIP_REGNUM): New.
11595 (supply_static_tracepoint_registers): New.
11596 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11597 (ST_REGENTRY): New.
11598 (i386_st_collect_regmap): New.
11599 (i386_NUM_ST_COLLECT_GREGS): New.
11600 (supply_static_tracepoint_registers): New.
11601 * server.c (handle_query): Handle qXfer:statictrace:read.
11602 <qSupported>: Report support for StaticTracepoints, and
11603 qXfer:statictrace:read features.
11604 * server.h (traceframe_read_sdata)
11605 (supply_static_tracepoint_registers): Declare.
11606 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11607 (unpack_varlen_hex): Include in IPA build.
11608 * Makefile.in (ustlibs, ustinc): New.
11609 (IPA_OBJS): Add remote-utils-ipa.o.
11610 ($(IPA_LIB)): Link -ldl and -lpthread.
11611 (UST_CFLAGS): New.
11612 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11613 * config.in, configure: Regenerate.
11614
11615 2010-06-20 Ian Lance Taylor <iant@google.com>
11616 Pedro Alves <pedro@codesourcery.com>
11617
11618 * linux-x86-low.c (always_true): Delete.
11619 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11620 trying to fool the compiler with always_true.
11621
11622 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11623
11624 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11625 conditions in gdbserver.
11626
11627 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11628
11629 * spu-low.c (spu_read_memory): Wrap around local store limit.
11630 (spu_write_memory): Likewise.
11631
11632 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11633
11634 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11635 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11636 LONGEST uses.
11637 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11638 uses.
11639 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11640 uses with LONGEST uses.
11641
11642 2010-06-14 Stan Shebs <stan@codesourcery.com>
11643 Pedro Alves <pedro@codesourcery.com>
11644
11645 Bytecode compiler.
11646
11647 * linux-x86-low.c: Include limits.h.
11648 (add_insns): New.
11649 (always_true): New.
11650 (EMIT_ASM): New.
11651 (EMIT_ASM32): New.
11652 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11653 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11654 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11655 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11656 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11657 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11658 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11659 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11660 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11661 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11662 (amd64_emit_void_call_2): New.
11663 (amd64_emit_ops): New.
11664 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11665 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11666 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11667 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11668 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11669 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11670 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11671 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11672 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11673 (i386_emit_stack_adjust, i386_emit_int_call_1)
11674 (i386_emit_void_call_2): New.
11675 (i386_emit_ops): New.
11676 (x86_emit_ops): New.
11677 (the_low_target): Install x86_emit_ops.
11678 * server.h (struct emit_ops): New.
11679 (get_raw_reg_func_addr): Declare.
11680 (current_insn_ptr, emit_error): Declare.
11681 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11682 (set_trace_state_variable_value): New defines.
11683 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11684 addr_get_trace_state_variable_value and
11685 addr_set_trace_state_variable_value.
11686 (symbol_list): New fields for get_raw_reg,
11687 get_trace_state_variable_value and set_trace_state_variable_value.
11688 (condfn): New typedef.
11689 (struct tracepoint): New field `compiled_cond'.
11690 (do_action_at_tracepoint): Clear compiled_cond.
11691 (get_trace_state_variable_value, set_trace_state_variable_value):
11692 Export in the IPA.
11693 (condition_true_at_tracepoint): If there's a compiled condition,
11694 run that.
11695 (current_insn_ptr, emit_error): New globals.
11696 (struct bytecode_address): New.
11697 (get_raw_reg_func_addr): New.
11698 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11699 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11700 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11701 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11702 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11703 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11704 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11705 (compile_tracepoint_condition, compile_bytecodes): New.
11706 * target.h (emit_ops): Forward declare.
11707 (struct target_ops): New field emit_ops.
11708 (target_emit_ops): New.
11709 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11710 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11711 * linux-low.c (linux_emit_ops): New.
11712 (linux_target_ops): Install it.
11713 * linux-low.h (struct linux_target_ops): New field emit_ops.
11714
11715 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11716
11717 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11718 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11719
11720 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11721 Stan Shebs <stan@codesourcery.com>
11722
11723 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11724 (all): Depend on $(extra_libraries).
11725 (install-only): Install the IPA.
11726 (IPA_OBJS, IPA_LIB): New.
11727 (clean): Remove the IPA lib.
11728 (IPAGENT_CFLAGS): New.
11729 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11730 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11731 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11732 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11733 * configure.ac: Check for atomic builtins support in the compiler.
11734 (IPA_DEPFILES, extra_libraries): Define.
11735 * configure.srv (ipa_obj): Add description.
11736 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11737 (i[34567]86-*-linux*): Set ipa_obj.
11738 (x86_64-*-linux*): Set ipa_obj.
11739 * linux-low.c (stabilizing_threads): New.
11740 (supports_fast_tracepoints): New.
11741 (linux_detach): Stabilize threads before detaching.
11742 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11743 the lwp is either not stabilizing, or is moving out of a jump pad.
11744 (linux_fast_tracepoint_collecting): New.
11745 (maybe_move_out_of_jump_pad): New.
11746 (enqueue_one_deferred_signal): New.
11747 (dequeue_one_deferred_signal): New.
11748 (linux_wait_for_event_1): If moving out of a jump pad, defer
11749 pending signals to later.
11750 (linux_stabilize_threads): New.
11751 (linux_wait_1): Check if threads need moving out of jump pads, and
11752 do it if so.
11753 (stuck_in_jump_pad_callback): New.
11754 (move_out_of_jump_pad_callback): New.
11755 (lwp_running): New.
11756 (linux_resume_one_lwp): Handle moving out of jump pads.
11757 (linux_set_resume_request): Dequeue deferred signals.
11758 (need_step_over_p): Also step over fast tracepoint jumps.
11759 (start_step_over): Also uninsert fast tracepoint jumps.
11760 (finish_step_over): Also reinsert fast tracepoint jumps.
11761 (linux_install_fast_tracepoint_jump): New.
11762 (linux_target_ops): Install linux_stabilize_threads and
11763 linux_install_fast_tracepoint_jump_pad.
11764 * linux-low.h (linux_target_ops) <get_thread_area,
11765 install_fast_tracepoint_jump_pad>: New fields.
11766 (struct lwp_info) <collecting_fast_tracepoint,
11767 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11768 (linux_get_thread_area): Declare.
11769 * linux-x86-low.c (jump_insn): New.
11770 (x86_get_thread_area): New.
11771 (append_insns): New.
11772 (push_opcode): New.
11773 (amd64_install_fast_tracepoint_jump_pad): New.
11774 (i386_install_fast_tracepoint_jump_pad): New.
11775 (x86_install_fast_tracepoint_jump_pad): New.
11776 (the_low_target): Install x86_get_thread_area and
11777 x86_install_fast_tracepoint_jump_pad.
11778 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11779 (struct fast_tracepoint_jump): New.
11780 (fast_tracepoint_jump_insn): New.
11781 (fast_tracepoint_jump_shadow): New.
11782 (find_fast_tracepoint_jump_at): New.
11783 (fast_tracepoint_jump_here): New.
11784 (delete_fast_tracepoint_jump): New.
11785 (set_fast_tracepoint_jump): New.
11786 (uninsert_fast_tracepoint_jumps_at): New.
11787 (reinsert_fast_tracepoint_jumps_at): New.
11788 (set_breakpoint_at): Use write_inferior_memory.
11789 (uninsert_raw_breakpoint): Use write_inferior_memory.
11790 (check_mem_read): Mask out fast tracepoint jumps.
11791 (check_mem_write): Mask out fast tracepoint jumps.
11792 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11793 (set_fast_tracepoint_jump): Declare.
11794 (delete_fast_tracepoint_jump)
11795 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11796 (reinsert_fast_tracepoint_jumps_at): Declare.
11797 * regcache.c: Don't compile many functions when building the
11798 in-process agent library.
11799 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11800 the register buffer in the heap.
11801 (free_register_cache): If the register buffer isn't owned by the
11802 regcache, don't free it.
11803 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11804 pre-existing register caches.
11805 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11806 type.
11807 (convert_ascii_to_int): : Constify `from' parameter type.
11808 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11809 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11810 the needed buffer in-place.
11811 (relocate_instruction): New.
11812 * server.c (handle_query) <qSymbols>: If the target supports
11813 tracepoints, give it a chance of looking up symbols. Report
11814 support for fast tracepoints.
11815 (handle_status): Stabilize threads.
11816 (process_serial_event): Adjust.
11817 * server.h (struct fast_tracepoint_jump): Forward declare.
11818 (struct process_info) <fast_tracepoint_jumps>: New field.
11819 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11820 (decode_X_packet, decode_M_packet): Adjust.
11821 (relocate_instruction): Declare.
11822 (in_process_agent_loaded): Declare.
11823 (tracepoint_look_up_symbols): Declare.
11824 (struct fast_tpoint_collect_status): Declare.
11825 (fast_tracepoint_collecting): Declare.
11826 (force_unlock_trace_buffer): Declare.
11827 (handle_tracepoint_bkpts): Declare.
11828 (initialize_low_tracepoint)
11829 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11830 * target.h (struct target_ops) <stabilize_threads,
11831 install_fast_tracepoint_jump_pad>: New fields.
11832 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11833 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11834 [HAVE_STDINT_H]: Include stdint.h.
11835 (trace_debug_1): Rename to ...
11836 (trace_vdebug): ... this.
11837 (trace_debug): Rename to ...
11838 (trace_debug_1): ... this. Add `level' parameter.
11839 (trace_debug): New.
11840 (ATTR_USED, ATTR_NOINLINE): New.
11841 (IP_AGENT_EXPORT): New.
11842 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11843 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11844 (about_to_request_buffer_space, trace_buffer_is_full)
11845 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11846 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11847 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11848 (traceframe_write_count, traceframes_created)
11849 (trace_state_variables)
11850 New renaming defines.
11851 (struct ipa_sym_addresses): New.
11852 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11853 (symbol_list): New.
11854 (ipa_sym_addrs): New.
11855 (all_tracepoint_symbols_looked_up): New.
11856 (in_process_agent_loaded): New.
11857 (write_e_ipa_not_loaded): New.
11858 (maybe_write_ipa_not_loaded): New.
11859 (tracepoint_look_up_symbols): New.
11860 (debug_threads) [IN_PROCESS_AGENT]: New.
11861 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11862 (UNKNOWN_SIDE_EFFECTS): New.
11863 (stop_tracing): New.
11864 (flush_trace_buffer): New.
11865 (stop_tracing_bkpt): New.
11866 (flush_trace_buffer_bkpt): New.
11867 (read_inferior_integer): New.
11868 (read_inferior_uinteger): New.
11869 (read_inferior_data_pointer): New.
11870 (write_inferior_data_pointer): New.
11871 (write_inferior_integer): New.
11872 (write_inferior_uinteger): New.
11873 (struct collect_static_trace_data_action): Delete.
11874 (enum tracepoint_type): New.
11875 (struct tracepoint) <type>: New field `type'.
11876 <actions_str, step_actions, step_actions_str>: Only include in
11877 GDBserver.
11878 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11879 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11880 (tracepoints): Use IP_AGENT_EXPORT.
11881 (last_tracepoint): Don't include in the IPA.
11882 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11883 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11884 (alloced_trace_state_variables): New.
11885 (trace_state_variables): Use IP_AGENT_EXPORT.
11886 (traceframe_t): Delete unused variable.
11887 (circular_trace_buffer): Don't include in the IPA.
11888 (trace_buffer_start): Delete.
11889 (struct trace_buffer_control): New.
11890 (trace_buffer_free): Delete.
11891 (struct ipa_trace_buffer_control): New.
11892 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11893 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11894 New.
11895 (trace_buffer_ctrl): New.
11896 (TRACE_BUFFER_CTRL_CURR): New.
11897 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11898 Reimplement as macros.
11899 (trace_buffer_wrap): Delete.
11900 (traceframe_write_count, traceframe_read_count)
11901 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11902 (struct tracepoint_hit_ctx) <type>: New field.
11903 (struct fast_tracepoint_ctx): New.
11904 (memory_barrier): New.
11905 (cmpxchg): New.
11906 (record_tracepoint_error): Update atomically in the IPA.
11907 (clear_inferior_trace_buffer): New.
11908 (about_to_request_buffer_space): New.
11909 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11910 updating the same buffer.
11911 (add_tracepoint): Default the tracepoint's type to trap
11912 tracepoint, and orig_size to -1.
11913 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11914 internal variables.
11915 (create_trace_state_variable): New parameter `gdb'. Handle it.
11916 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11917 (cmd_qtdp): Handle fast tracepoints.
11918 (cmd_qtdv): Adjust.
11919 (max_jump_pad_size): New.
11920 (gdb_jump_pad_head): New.
11921 (get_jump_space_head): New.
11922 (claim_jump_space): New.
11923 (sort_tracepoints): New.
11924 (MAX_JUMP_SIZE): New.
11925 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11926 IPA.
11927 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11928 support. Upload fast traceframes, and delete internal IPA
11929 breakpoints.
11930 (stop_tracing_handler): New.
11931 (flush_trace_buffer_handler): New.
11932 (cmd_qtstop): Upload fast tracepoints.
11933 (response_tracepoint): Handle fast tracepoints.
11934 (tracepoint_finished_step): Upload fast traceframes. Set the
11935 tracepoint hit context's tracepoint type.
11936 (handle_tracepoint_bkpts): New.
11937 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11938 type. Add comment about fast tracepoints.
11939 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11940 non-existing action_str field.
11941 (get_context_regcache): Handle fast tracepoints.
11942 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11943 to the regcache.
11944 (fast_tracepoint_from_jump_pad_address): New.
11945 (fast_tracepoint_from_ipa_tpoint_address): New.
11946 (collecting_t): New.
11947 (force_unlock_trace_buffer): New.
11948 (fast_tracepoint_collecting): New.
11949 (collecting): New.
11950 (gdb_collect): New.
11951 (write_inferior_data_ptr): New.
11952 (target_tp_heap): New.
11953 (target_malloc): New.
11954 (download_agent_expr): New.
11955 (UALIGN): New.
11956 (download_tracepoints): New.
11957 (download_trace_state_variables): New.
11958 (upload_fast_traceframes): New.
11959 (IPA_FIRST_TRACEFRAME): New.
11960 (IPA_NEXT_TRACEFRAME_1): New.
11961 (IPA_NEXT_TRACEFRAME): New.
11962 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11963 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11964 (gdb_jump_pad_buffer_end): New.
11965 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11966 (initialize_tracepoint): Adjust.
11967 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11968 buffer. Initialize the low module.
11969 * utils.c (PREFIX, TOOLNAME): New.
11970 (malloc_failure): Use PREFIX.
11971 (error): In the IPA, an error causes an exit.
11972 (fatal, warning): Use PREFIX.
11973 (internal_error): Use TOOLNAME.
11974 (NUMCELLS): Increase to 10.
11975 * configure, config.in: Regenerate.
11976
11977 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11978
11979 * server.c (handle_query) <qSupported>: Do two passes over the
11980 qSupported string to avoid nesting strtok.
11981
11982 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11983
11984 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11985 (CDEPS): New.
11986 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11987 -Wl,--dynamic-list.
11988 * configure: Regenerate.
11989 * proc-service.list: New.
11990
11991 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11992
11993 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11994 New comment.
11995
11996 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11997
11998 * gdbreplay.c (remote_open): Check error return from socket() call by
11999 its equality to -1 not by it being negative.
12000 * remote-utils.c (remote_open): Likewise.
12001
12002 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12003
12004 * config.h: Regenerate.
12005
12006 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12007
12008 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12009 doesn't provide PTRACE_GET_THREAD_AREA.
12010
12011 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12012
12013 * linux-m68k-low.c: Include <asm/ptrace.h>
12014 (ps_get_thread_area): Implement.
12015
12016 2010-05-03 Doug Evans <dje@google.com>
12017
12018 * event-loop.c (struct callback_event): New struct.
12019 (callback_list): New global.
12020 (append_callback_event, delete_callback_event): New functions.
12021 (process_callback): New function.
12022 (start_event_loop): Call it.
12023 * remote-utils.c (NOT_SCHEDULED): Define.
12024 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12025 moved out of readchar.
12026 (readchar): Rewrite. Call reschedule before returning.
12027 (reset_readchar): New function.
12028 (remote_close): Call it.
12029 (process_remaining, reschedule): New functions.
12030 * server.h (callback_handler_func): New typedef.
12031 (append_callback_event, delete_callback_event): Declare.
12032
12033 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12034
12035 * proc-service.c (ps_pglobal_lookup): Use
12036 thread_db_look_up_one_symbol.
12037 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12038 parameter. Use it instead of all_symbols_looked_up.
12039 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12040 field.
12041 (all_symbols_looked_up): Don't declare.
12042 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12043 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12044 field.
12045 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12046 Set all_symbols_looked_up here.
12047 (thread_db_look_up_one_symbol): New.
12048 (thread_db_get_tls_address): Adjust.
12049 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12050 thread_db object on the heap, and tentatively set it in the
12051 process structure.
12052 (thread_db_init): Don't set all_symbols_looked_up here.
12053 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12054
12055 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12056
12057 * linux-low.c (linux_kill, linux_detach): Adjust.
12058 (status_pending_p_callback): Remove redundant statement. Check
12059 for !TARGET_WAITIKIND_IGNORE, instead of
12060 TARGET_WAITKIND_STOPPED.
12061 (handle_tracepoints): Make sure LWP is locked. Adjust.
12062 (linux_wait_for_event_1): Adjust.
12063 (linux_cancel_breakpoints): New.
12064 (unsuspend_one_lwp): New.
12065 (unsuspend_all_lwps): New.
12066 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12067 (send_sigstop_callback): Change return type to int, add new
12068 `except' parameter and handle it.
12069 (suspend_and_send_sigstop_callback): New.
12070 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12071 pass them down. If SUSPEND, also increment the lwp's suspend
12072 count.
12073 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12074 (need_step_over_p): Don't consider suspended LWPs.
12075 (start_step_over): Adjust.
12076 (proceed_one_lwp): Change return type to int, add new `except'
12077 parameter and handle it.
12078 (unsuspend_and_proceed_one_lwp): New.
12079 (proceed_all_lwps): Use find_inferior instead of
12080 for_each_inferior.
12081 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12082 also decrement the suspend count of LWPs. Pass `except' down,
12083 instead of hacking its suspend count.
12084 (linux_pause_all): Add `freeze' parameter. Adjust.
12085 (linux_unpause_all): New.
12086 (linux_target_ops): Install linux_unpause_all.
12087 * server.c (handle_status): Adjust.
12088 * target.h (struct target_ops): New fields `unpause_all' and
12089 `cancel_breakpoints'. Add new parameter to `pause_all'.
12090 (pause_all): Add new `freeze' parameter.
12091 (unpause_all): New.
12092 (cancel_breakpoints): New.
12093 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12094 cancel breakpoints.
12095 (cmd_qtstart): Pause threads.
12096 (stop_tracing): Pause threads, and cancel breakpoints.
12097 * win32-low.c (win32_target_ops): Adjust.
12098
12099 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12100
12101 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12102 the inferior right away from here...
12103 (linux_wait_1): ... to here, and adjust to check the thread's
12104 last_resume_kind instead of the lwp's step or stop_expected flags.
12105
12106 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12107
12108 * README: Use consistent `GDB' and `GDBserver' spellings.
12109
12110 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12111
12112 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12113 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12114 (linux_detach_one_lwp): Assume the lwp is stopped.
12115 (any_thread_of): Delete.
12116 (linux_detach): Stop all lwps here. Don't blindly delete all
12117 breakpoints.
12118 (delete_lwp_callback): New.
12119 (linux_mourn): Delete all lwps of the process that is gone.
12120 (linux_wait_1): Don't delete the last lwp of the process here.
12121 * mem-break.h (mark_breakpoints_out): Declare.
12122 * mem-break.c (mark_breakpoints_out): New.
12123 (free_all_breakpoints): Use it.
12124 * server.c (handle_target_event): If the process is gone, mark
12125 breakpoints out.
12126 * thread-db.c (struct thread_db) <create_bp>: New field.
12127 (thread_db_enable_reporting): Fix prototype. Store a thread event
12128 breakpoint reference in the thread_db struct.
12129 (thread_db_load_search): Clear the thread_db object.
12130 (try_thread_db_load_1): Ditto.
12131 (switch_to_process): New.
12132 (disable_thread_event_reporting): Use it.
12133 (remove_thread_event_breakpoints): New.
12134 (thread_db_detach, thread_db_mourn): Use it.
12135
12136 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12137
12138 * linux-low.c (linux_enable_event_reporting): New.
12139 (linux_wait_for_event_1, handle_extended_wait): Use it.
12140
12141 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12142
12143 * linux-low.c (linux_kill_one_lwp, linux_kill)
12144 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12145 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12146 SIGSTOP even if the LWP is stopped.
12147 (send_sigstop_callback): New.
12148 (stop_all_lwps): Use send_sigstop_callback instead.
12149 (linux_resume_one_thread): Adjust.
12150 (proceed_one_lwp): Still proceed an LWP that the client has
12151 requested to stop, if we haven't reported it as stopped yet. Make
12152 sure that LWPs the client want stopped, have a pending SIGSTOP.
12153
12154 2010-04-26 Doug Evans <dje@google.com>
12155
12156 * server.c (handle_general_set): Make static.
12157
12158 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12159 Print received char after testing for error/eof instead of before.
12160 (input_interrupt): Tweak comment.
12161
12162 2010-04-23 Doug Evans <dje@google.com>
12163
12164 * server.c (start_inferior): Print inferior argv if --debug.
12165
12166 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12167
12168 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12169 * nto-x86-low.c: Include server.h
12170
12171 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12172
12173 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12174 be consistent with other sources of this directory.
12175 (init_registers_amd64): Correct name of source file of this function
12176 in the comment.
12177
12178 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12179
12180 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12181 64-bit executables.
12182
12183 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12184
12185 * win32-i386-low.c: Add 64-bit support.
12186 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12187 (init_registers_amd64): Declare.
12188 (mappings): Add 64-bit version of array.
12189 (init_windows_x86): New function.
12190 (the_low_target): Change init_arch field to init_windows_x86.
12191
12192 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12193
12194 * win32-low.c: Adapt to support also 64-bit architecture.
12195 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12196 (get_image_name): Use SIZE_T type for local variable `done'.
12197 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12198 (toolhelp_get_dll_name): Idem.
12199 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12200 Use uintptr_t typecast to avoid warning.
12201 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12202 (handle_exception): Use phex_nz to avoid warning.
12203 (win32_wait): Remove unused local variable `process'.
12204
12205 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12206
12207 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12208 `amd64-avx.o'.
12209
12210 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12211
12212 * configure.ac: Use `ws2_32' library for srv_mingw.
12213 * configure: Regenerate.
12214 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12215 * remote-utils.c: Likewise.
12216
12217 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12218
12219 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12220 if __x86_64__ is defined.
12221
12222 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12223
12224 * configure: Regenerate.
12225
12226 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12227
12228 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12229 * target.h (target_ops): New get_tib_address field.
12230 * win32-low.h (win32_thread_info): Add thread_local_base field.
12231 * win32-low.c (child_add_thread): Add tlb argument.
12232 Set thread_local_base field to TLB.
12233 (get_child_debug_event): Adapt to child_add_thread change.
12234 (win32_get_tib_address): New function.
12235 (win32_target_ops): Set get_tib_address field to
12236 win32_get_tib_address.
12237 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12238
12239 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12240
12241 * linux-low.c (linux_mourn): Also remove the process.
12242 * server.c (handle_target_event): Don't remove the process here.
12243 * nto-low.c (nto_mourn): New.
12244 (nto_target_ops): Install it.
12245 * spu-low.c (spu_mourn): New.
12246 (spu_target_ops): Install it.
12247 * win32-low.c (win32_mourn): New.
12248 (win32_target_ops): Install it.
12249
12250 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12251
12252 * server.h (buffer_xml_printf): Remove redundant `;'.
12253
12254 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12255
12256 * regcache.c (set_register_cache): Invalidate regcaches before
12257 changing the register cache layout.
12258 (regcache_invalidate_one): Allow a NULL regcache.
12259 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12260 regcaches before changing the register cache layout or the target
12261 regsets.
12262
12263 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12264
12265 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12266 variable warning on Linux/x86-64.
12267
12268 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12269
12270 GDBserver disconnected tracing support.
12271
12272 * linux-low.c (linux_remove_process): Delete.
12273 (add_lwp): Don't set last_resume_kind here.
12274 (linux_kill): Use `mourn'.
12275 (linux_detach): Use `thread_db_detach', and `mourn'.
12276 (linux_mourn): New.
12277 (linux_attach_lwp_1): Adjust comment.
12278 (linux_attach): last_resume_kind moved the thread_info; adjust.
12279 (status_pending_p_callback): Adjust.
12280 (linux_wait_for_event_1): Adjust.
12281 (count_events_callback, select_singlestep_lwp_callback)
12282 (select_event_lwp_callback, cancel_breakpoints_callback)
12283 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12284 (proceed_one_lwp): Adjust.
12285 (linux_async): Add debug output.
12286 (linux_thread_stopped): New.
12287 (linux_pause_all): New.
12288 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12289 linux_pause_all.
12290 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12291 (thread_db_free): Delete declaration.
12292 (thread_db_detach, thread_db_mourn): Declare.
12293 * thread-db.c (thread_db_init): Use thread_db_mourn.
12294 (thread_db_free): Delete, split in two.
12295 (disable_thread_event_reporting): New.
12296 (thread_db_detach): New.
12297 (thread_db_mourn): New.
12298
12299 * server.h (struct thread_info) <last_resume_kind>: New field.
12300 <attached>: Add comment.
12301 <gdb_detached>: New field.
12302 (handler_func): Change return type to int.
12303 (handle_serial_event, handle_target_event): Ditto.
12304 (gdb_connected): Declare.
12305 (tracing): Delete.
12306 (disconnected_tracing): Declare.
12307 (stop_tracing): Declare.
12308
12309 * server.c (handle_query) <qSupported>: Report support for
12310 disconnected tracing.
12311 (queue_stop_reply_callback): Account for running threads.
12312 (gdb_wants_thread_stopped): New.
12313 (gdb_wants_all_threads_stopped): New.
12314 (gdb_reattached_process): New.
12315 (handle_status): Clear the `gdb_detached' flag of all processes.
12316 In all-stop, stop all threads.
12317 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12318 (process_serial_event): If the remote connection breaks, or if an
12319 exit was forced with "monitor exit", force an event loop exit.
12320 Handle disconnected tracing on detach.
12321 (handle_serial_event): Adjust.
12322 (handle_target_event): If GDB isn't connected, forward events back
12323 to the inferior, unless the last process exited, in which case,
12324 exit gdbserver. Adjust interface.
12325
12326 * remote-utils.c (remote_open): Don't block in accept. Instead
12327 register an event loop source on the listen socket file
12328 descriptor. Refactor bits into ...
12329 (listen_desc): ... this new global.
12330 (gdb_connected): ... this new function.
12331 (enable_async_notification): ... this new function.
12332 (handle_accept_event): ... this new function.
12333 (remote_close): Clear remote_desc.
12334
12335 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12336
12337 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12338 New fields.
12339 (mourn_inferior): Define.
12340 (target_process_qsupported): Avoid the dangling else problem.
12341 (thread_stopped): Define.
12342 (pause_all): Define.
12343 (target_waitstatus_to_string): Declare.
12344 * target.c (target_waitstatus_to_string): New.
12345
12346 * tracepoint.c (tracing): Make extern.
12347 (disconnected_tracing): New.
12348 (stop_tracing): Make extern. Handle tracing stops due to GDB
12349 disconnecting.
12350 (cmd_qtdisconnected): New.
12351 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12352 (handle_tracepoint_general_set): Handle QTDisconnected.
12353
12354 * event-loop.c (event_handler_func): Change return type to int.
12355 (process_event): Bail out if the event handler wants the event
12356 loop to stop.
12357 (handle_file_event): Ditto.
12358 (start_event_loop): Bail out if the event handler wants the event
12359 loop to stop.
12360
12361 * nto-low.c (nto_target_ops): Adjust.
12362 * spu-low.c (spu_wait): Don't remove the process here.
12363 (spu_target_ops): Adjust.
12364 * win32-low.c (win32_wait): Don't remove the process here.
12365 (win32_target_ops): Adjust.
12366
12367 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12368
12369 * regcache.c (realloc_register_cache): Invalidate inferior's
12370 regcache before recreating it.
12371
12372 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12373
12374 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12375
12376 2010-04-09 Stan Shebs <stan@codesourcery.com>
12377 Pedro Alves <pedro@codesourcery.com>
12378
12379 * server.h (LONGEST): New.
12380 (struct thread_info) <while_stepping>: New field.
12381 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12382 Declare.
12383 (initialize_tracepoint, handle_tracepoint_general_set)
12384 (handle_tracepoint_query, tracepoint_finished_step)
12385 (tracepoint_was_hit, release_while_stepping_state_list):
12386 (current_traceframe): Declare.
12387 * server.c (handle_general_set): Handle tracepoint packets.
12388 (read_memory): New.
12389 (write_memory): New.
12390 (handle_search_memory_1): Use read_memory.
12391 (handle_query): Report support for conditional tracepoints, trace
12392 state variables, and tracepoint sources. Handle tracepoint
12393 queries.
12394 (main): Initialize the tracepoints module.
12395 (process_serial_event): Handle traceframe reads/writes.
12396
12397 * linux-low.c (handle_tracepoints): New.
12398 (linux_wait_1): Call it.
12399 (linux_resume_one_lwp): Handle while-stepping.
12400 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12401 (linux_target_ops): Install them.
12402 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12403 New field.
12404 * linux-x86-low.c (x86_supports_tracepoints): New.
12405 (the_low_target). Install it.
12406
12407 * mem-break.h (delete_breakpoint): Declare.
12408 * mem-break.c (delete_breakpoint): Make external.
12409
12410 * target.h (struct target_ops): Add `supports_tracepoints',
12411 `read_pc', and `write_pc' fields.
12412 (target_supports_tracepoints): Define.
12413 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12414 (phex_nz): New.
12415
12416 * regcache.h (struct regcache) <registers_owned>: New field.
12417 (init_register_cache, regcache_cpy): Declare.
12418 (regcache_read_pc, regcache_write_pc): Declare.
12419 (register_cache_size): Declare.
12420 (supply_regblock): Declare.
12421 * regcache.c (init_register_cache): New.
12422 (new_register_cache): Use it.
12423 (regcache_cpy): New.
12424 (register_cache_size): New.
12425 (supply_regblock): New.
12426 (regcache_read_pc, regcache_write_pc): New.
12427
12428 * tracepoint.c: New.
12429
12430 * Makefile.in (OBS): Add tracepoint.o.
12431 (tracepoint.o): New rule.
12432
12433 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12434
12435 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12436 (i386-mmx.o): New.
12437 (i386-mmx.c): Likewise.
12438 (i386-mmx-linux.o): Likewise.
12439 (i386-mmx-linux.c): Likewise.
12440
12441 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12442 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12443 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12444 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12445
12446 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12447 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12448 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12449
12450 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12451
12452 * Makefile.in (clean): Updated.
12453 (i386-avx.o): New.
12454 (i386-avx.c): Likewise.
12455 (i386-avx-linux.o): Likewise.
12456 (i386-avx-linux.c): Likewise.
12457 (amd64-avx.o): Likewise.
12458 (amd64-avx.c): Likewise.
12459 (amd64-avx-linux.o): Likewise.
12460 (amd64-avx-linux.c): Likewise.
12461
12462 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12463 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12464 (srv_amd64_regobj): Add amd64-avx.o.
12465 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12466 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12467 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12468 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12469 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12470 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12471 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12472
12473 * i387-fp.c: Include "i386-xstate.h".
12474 (i387_xsave): New.
12475 (i387_cache_to_xsave): Likewise.
12476 (i387_xsave_to_cache): Likewise.
12477 (x86_xcr0): Likewise.
12478
12479 * i387-fp.h (i387_cache_to_xsave): Likewise.
12480 (i387_xsave_to_cache): Likewise.
12481 (x86_xcr0): Likewise.
12482
12483 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12484 * linux-crisv32-low.c (target_regsets): Likewise.
12485 * linux-m68k-low.c (target_regsets): Likewise.
12486 * linux-mips-low.c (target_regsets): Likewise.
12487 * linux-ppc-low.c (target_regsets): Likewise.
12488 * linux-s390-low.c (target_regsets): Likewise.
12489 * linux-sh-low.c (target_regsets): Likewise.
12490 * linux-sparc-low.c (target_regsets): Likewise.
12491 * linux-xtensa-low.c (target_regsets): Likewise.
12492
12493 * linux-low.c: Include <sys/uio.h>.
12494 (regsets_fetch_inferior_registers): Support nt_type.
12495 (regsets_store_inferior_registers): Likewise.
12496 (linux_process_qsupported): New.
12497 (linux_target_ops): Add linux_process_qsupported.
12498
12499 * linux-low.h (regset_info): Add nt_type.
12500 (linux_target_ops): Add process_qsupported.
12501
12502 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12503 and <sys/uio.h>.
12504 (init_registers_i386_avx_linux): New.
12505 (init_registers_amd64_avx_linux): Likewise.
12506 (xmltarget_i386_linux_no_xml): Likewise.
12507 (xmltarget_amd64_linux_no_xml): Likewise.
12508 (PTRACE_GETREGSET): Likewise.
12509 (PTRACE_SETREGSET): Likewise.
12510 (x86_fill_xstateregset): Likewise.
12511 (x86_store_xstateregset): Likewise.
12512 (use_xml): Likewise.
12513 (x86_linux_update_xmltarget): Likewise.
12514 (x86_linux_process_qsupported): Likewise.
12515 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12516 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12517 init_registers_i386_linux here. Call
12518 x86_linux_update_xmltarget.
12519 (the_low_target): Add x86_linux_process_qsupported.
12520
12521 * server.c (handle_query): Call target_process_qsupported.
12522
12523 * target.h (target_ops): Add process_qsupported.
12524 (target_process_qsupported): New.
12525
12526 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12527
12528 * inferiors.c (add_thread): Set last_status kind to
12529 TARGET_WAITKIND_IGNORE.
12530 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12531 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12532 (linux_wait_1): Move `thread' local definition to block that uses
12533 it. Don't NULL initialize `event_child'.
12534 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12535 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12536 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12537
12538 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12539
12540 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12541 an extended waitstatus, or by a watchpoint.
12542 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12543 thread was stepping or has been stopped by a watchpoint.
12544
12545 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12546
12547 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12548 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12549 of another, then delete the previous, and validate all
12550 breakpoints.
12551 (validate_inserted_breakpoint): New.
12552 (delete_disabled_breakpoints): New.
12553 (validate_breakpoints): New.
12554 (check_mem_read): Validate breakpoints before trusting their
12555 shadow. Delete disabled breakpoints.
12556 (check_mem_write): Validate breakpoints before trusting they
12557 should be inserted. Delete disabled breakpoints.
12558 * mem-break.h (validate_breakpoints):
12559 * server.c (handle_query): Validate breakpoints when we see a
12560 qSymbol query.
12561
12562 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12563
12564 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12565 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12566 if we could tell there's a GDB breakpoint at stop_pc.
12567 (need_step_over_p): Don't do a step over if we find a GDB
12568 breakpoint at the resume PC.
12569
12570 * mem-break.c (struct raw_breakpoint): New.
12571 (enum bkpt_type): New type `gdb_breakpoint'.
12572 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12573 fields. New field `raw'.
12574 (find_raw_breakpoint_at): New.
12575 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12576 breakpoint instead.
12577 (set_breakpoint_at): Adjust.
12578 (delete_raw_breakpoint): New.
12579 (release_breakpoint): New.
12580 (delete_breakpoint): Rename to...
12581 (delete_breakpoint_1): ... this. Add proc parameter. Use
12582 release_breakpoint. Return ENOENT.
12583 (delete_breakpoint): Reimplement.
12584 (find_breakpoint_at): Delete.
12585 (find_gdb_breakpoint_at): New.
12586 (delete_breakpoint_at): Delete.
12587 (set_gdb_breakpoint_at): New.
12588 (delete_gdb_breakpoint_at): New.
12589 (gdb_breakpoint_here): New.
12590 (set_reinsert_breakpoint): Use release_breakpoint.
12591 (uninsert_breakpoint): Rename to ...
12592 (uninsert_raw_breakpoint): ... this.
12593 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12594 (reinsert_raw_breakpoint): Change parameter type to
12595 raw_breakpoint.
12596 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12597 instead.
12598 (check_breakpoints): Adjust. Use release_breakpoint.
12599 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12600 (breakpoint_inserted_here): Ditto.
12601 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12602 Don't trust the breakpoint's shadow if it is not inserted.
12603 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12604 (delete_all_breakpoints): Adjust.
12605 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12606 use delete_breakpoint_1.
12607
12608 * mem-break.h (breakpoints_supported): Delete declaration.
12609 (set_gdb_breakpoint_at): Declare.
12610 (gdb_breakpoint_here): Declare.
12611 (delete_breakpoint_at): Delete.
12612 (delete_gdb_breakpoint_at): Declare.
12613
12614 * server.h (struct raw_breakpoint): Forward declare.
12615 (struct process_info): New field `raw_breakpoints'.
12616
12617 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12618 breakpoints.
12619
12620 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12621
12622 * linux-low.c (status_pending_p_callback): Fix comment.
12623 (linux_wait_for_event_1): Move most of the internal breakpoint
12624 handling from here...
12625 (linux_wait_1): ... to here.
12626 (count_events_callback): New.
12627 (select_singlestep_lwp_callback): New.
12628 (select_event_lwp_callback): New.
12629 (cancel_breakpoints_callback): New.
12630 (select_event_lwp): New.
12631 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12632 priority to all LWPs that have had events that should be reported
12633 to the client. Cancel breakpoints when about to reporting the
12634 event to the client, not while stopping lwps. No longer cancel
12635 finished single-steps here.
12636 (cancel_finished_single_step): Delete.
12637 (cancel_finished_single_steps): Delete.
12638
12639 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12640
12641 * mem-break.c (enum bkpt_type): New.
12642 (struct breakpoint): New field `type'.
12643 (set_breakpoint_at): Change return type to struct breakpoint
12644 pointer. Set type to `other_breakpoint' by default.
12645 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12646 in the breakpoint list.
12647 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12648 (reinsert_breakpoint): Rename to ...
12649 (reinsert_raw_breakpoint): ... this.
12650 (reinsert_breakpoints_at): Adjust.
12651 * mem-break.h (struct breakpoint): Declare.
12652 (set_breakpoint_at): Change return type to struct breakpoint
12653 pointer.
12654
12655 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12656
12657 * server.c (handle_query): Assign, not compare.
12658
12659 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12660
12661 Teach linux gdbserver to step-over-breakpoints.
12662
12663 * linux-low.c (can_hardware_single_step): New.
12664 (supports_breakpoints): New.
12665 (handle_extended_wait): If stopping threads, read the stop pc of
12666 the new cloned LWP.
12667 (get_pc): New.
12668 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12669 low target doesn't support retrieving the PC.
12670 (add_lwp): Set last_resume_kind to resume_continue.
12671 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12672 (linux_attach): Don't clear stop_expected. Set the lwp's
12673 last_resume_kind to resume_stop.
12674 (linux_detach_one_lwp): Don't check for removed breakpoints.
12675 (check_removed_breakpoint): Delete.
12676 (status_pending_p): Rename to ...
12677 (status_pending_p_callback): ... this. Don't check for removed
12678 breakpoints. Don't consider threads that are stopped from GDB's
12679 perspective.
12680 (linux_wait_for_lwp): Always read the stop_pc here.
12681 (cancel_breakpoint): New.
12682 (step_over_bkpt): New global.
12683 (linux_wait_for_event_1): Implement stepping over breakpoints.
12684 (gdb_wants_lwp_stopped): New.
12685 (gdb_wants_all_stopped): New.
12686 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12687 single-step traps here. Store the thread's last reported target
12688 wait status.
12689 (send_sigstop): Don't clear stop_expected. Always set it,
12690 instead.
12691 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12692 (cancel_finished_single_step): New.
12693 (cancel_finished_single_steps): New.
12694 (wait_for_sigstop): Don't cancel finished single-step traps here.
12695 (linux_resume_one_lwp): Don't check for removed breakpoints.
12696 Don't set `step' on non-hardware step archs.
12697 (linux_set_resume_request): Ignore resume_stop requests if already
12698 stopping or stopped. Set the lwp's last_resume_kind.
12699 (resume_status_pending_p): Don't check for removed breakpoints.
12700 (need_step_over_p): New.
12701 (start_step_over): New.
12702 (finish_step_over): New.
12703 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12704 requests. Clear the thread's last reported target waitstatus.
12705 Don't use the `suspended' flag. Don't consider pending breakpoints.
12706 (linux_resume): Start a step-over if necessary.
12707 (proceed_one_lwp): New.
12708 (proceed_all_lwps): New.
12709 (unstop_all_lwps): New.
12710 * linux-low.h (struct lwp_info): Rewrite comment for the
12711 `suspended' flag. Add the `stop_pc' field. Delete the
12712 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12713 Add `'last_resume_kind' and `need_step_over' fields.
12714 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12715 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12716 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12717 (set_raw_breakpoint_at): New.
12718 (set_breakpoint_at): Rewrite to use it.
12719 (reinsert_breakpoint_handler): Delete.
12720 (set_reinsert_breakpoint): New.
12721 (reinsert_breakpoint_by_bp): Delete.
12722 (delete_reinsert_breakpoints): New.
12723 (uninsert_breakpoint): Rewrite.
12724 (uninsert_breakpoints_at): New.
12725 (reinsert_breakpoint): Rewrite.
12726 (reinsert_breakpoints_at): New.
12727 (check_breakpoints): Rewrite.
12728 (breakpoint_here): New.
12729 (breakpoint_inserted_here): New.
12730 (check_mem_read): Adjust.
12731 * mem-break.h (breakpoints_supported, breakpoint_here)
12732 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12733 (reinsert_breakpoint_by_bp): Delete declaration.
12734 (delete_reinsert_breakpoints): Declare.
12735 (reinsert_breakpoint): Delete declaration.
12736 (reinsert_breakpoints_at): Declare.
12737 (uninsert_breakpoint): Delete declaration.
12738 (uninsert_breakpoints_at): Declare.
12739 (check_breakpoints): Adjust prototype.
12740 * server.h: Adjust include order.
12741 (struct thread_info): Declare here. Add a `last_status' field.
12742
12743 2010-03-23 Michael Snyder <msnyder@vmware.com>
12744
12745 * server.c (crc32): New function.
12746 (handle_query): Add handling for 'qCRC:' request.
12747
12748 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12749
12750 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12751 lwp had been stopped by a watchpoint.
12752
12753 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12754
12755 * server.h (internal_error): Declare.
12756 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12757 * utils.c (internal_error): New function.
12758
12759 2010-03-15 Andreas Schwab <schwab@redhat.com>
12760
12761 * configure.srv: Fix typo setting srv_regobj.
12762
12763 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12764
12765 * linux-low.c (fetch_register): Avoid passing a non string literal
12766 format to `error'.
12767 (usr_store_inferior_registers): Ditto.
12768
12769 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12770
12771 * linux-low.c (linux_write_memory): Bail out early if peeking
12772 memory failed.
12773
12774 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12775
12776 * linux-low.h (struct lwp_info): New fields
12777 `stopped_by_watchpoint' and `stopped_data_address'.
12778 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12779 here, and cache them in the lwp object.
12780 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12781 directly.
12782 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12783 field.
12784 (linux_stopped_by_watchpoint): Rewrite.
12785 (linux_stopped_data_address): Rewrite.
12786
12787 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12788
12789 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12790 switching the current inferior, not before.
12791
12792 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12793
12794 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12795 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12796 i386-linux.c and amd64-linux.c.
12797 (reg-i386.o): Removed.
12798 (reg-i386.c): Likewise.
12799 (reg-i386-linux.o): Likewise.
12800 (reg-i386-linux.c): Likewise.
12801 (reg-x86-64.o): Likewise.
12802 (reg-x86-64.c): Likewise.
12803 (reg-x86-64-linux.o): Likewise.
12804 (reg-x86-64-linux.c): Likewise.
12805 (i386.o): New.
12806 (i386.c): Likewise.
12807 (i386-linux.o): Likewise.
12808 (i386-linux.c): Likewise.
12809 (amd64.o): Likewise.
12810 (amd64.c): Likewise.
12811 (amd64-linux.o): Likewise.
12812 (amd64-linux.c): Likewise.
12813
12814 * configure.srv (srv_i386_regobj): New.
12815 (srv_i386_linux_regobj): Likewise.
12816 (srv_amd64_regobj): Likewise.
12817 (srv_amd64_linux_regobj): Likewise.
12818 (srv_i386_32bit_xmlfiles): Likewise.
12819 (srv_i386_64bit_xmlfiles): Likewise.
12820 (srv_i386_xmlfiles): Likewise.
12821 (srv_amd64_xmlfiles): Likewise.
12822 (srv_i386_linux_xmlfiles): Likewise.
12823 (srv_amd64_linux_xmlfiles): Likewise.
12824 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12825 srv_xmlfiles to $srv_i386_xmlfiles.
12826 (i[34567]86-*-mingw32ce*): Likewise.
12827 (i[34567]86-*-mingw*): Likewise.
12828 (i[34567]86-*-nto*): Likewise.
12829 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12830 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12831 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12832 (x86_64-*-linux*): Likewise.
12833
12834 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12835 (init_registers_amd64_linux): New.
12836 (x86_arch_setup): Replace init_registers_x86_64_linux with
12837 init_registers_amd64_linux.
12838
12839 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12840
12841 * configure.ac: Check for libdl. If it is not available link against
12842 static libthread_db.
12843 * configure: Regenerate.
12844
12845 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12846
12847 PR9605
12848
12849 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12850 handing a read watchpoint.
12851 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12852
12853 2010-02-12 Doug Evans <dje@google.com>
12854
12855 * linux-low.c (linux_supports_tracefork_flag): Document.
12856 (linux_look_up_symbols): Add comment.
12857
12858 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12859
12860 * regcache.c (supply_register): Clear regcache if buf is NULL.
12861
12862 2010-02-02 Nicolas Roche <roche@sourceware.org>
12863 Joel Brobecker <brobecker@adacore.com>
12864
12865 * inferiors.c (find_inferior): Add function documentation.
12866 (unloaded_dll): Handle the case where the unloaded dll has not
12867 been previously registered in the dll list.
12868
12869 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12870
12871 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12872 (thumb2_breakpoint): New.
12873 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12874
12875 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12876
12877 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12878 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12879 breakpoints.
12880
12881 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12882
12883 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12884
12885 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12886
12887 * linux-s390-low.c (s390_collect_ptrace_register)
12888 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12889
12890 2010-01-21 Doug Evans <dje@google.com>
12891
12892 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12893 (PTRACE_ARG4_TYPE): New macro.
12894 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12895 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12896 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12897 (usr_store_inferior_registers): Ditto.
12898 (linux_read_memory, linux_write_memory): Ditto.
12899 (linux_test_for_tracefork): Ditto.
12900
12901 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12902 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12903
12904 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12905
12906 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12907 target.
12908
12909 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12910
12911 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12912 prototype to take a regcache. Adjust.
12913
12914 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12915
12916 * regcache.h (struct thread_info): Forward declare.
12917 (struct regcache): New.
12918 (new_register_cache): Adjust prototype.
12919 (get_thread_regcache): Declare.
12920 (free_register_cache): Adjust prototype.
12921 (registers_to_string, registers_from_string): Ditto.
12922 (supply_register, supply_register_by_name, collect_register)
12923 (collect_register_as_string, collect_register_by_name): Ditto.
12924 * regcache.c (struct inferior_regcache_data): Delete.
12925 (get_regcache): Rename to ...
12926 (get_thread_regcache): ... this. Adjust. Switch inferior before
12927 fetching registers.
12928 (regcache_invalidate_one): Adjust.
12929 (regcache_invalidate): Fix prototype.
12930 (new_register_cache): Return the new register cache.
12931 (free_register_cache): Change prototype.
12932 (realloc_register_cache): Adjust.
12933 (registers_to_string): Change prototype to take a regcache. Adjust.
12934 (registers_from_string): Ditto.
12935 (register_data): Ditto.
12936 (supply_register): Ditto.
12937 (supply_register_by_name): Ditto.
12938 (collect_register): Ditto.
12939 (collect_register_as_string): Ditto.
12940 (collect_register_by_name): Ditto.
12941 * server.c (process_serial_event): Adjust.
12942 * linux-low.h (regset_fill_func, regset_store_func): Change
12943 prototype.
12944 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12945 Change prototype.
12946 * linux-low.c (get_stop_pc): Adjust.
12947 (check_removed_breakpoint): Adjust.
12948 (linux_wait_for_event): Adjust.
12949 (linux_resume_one_lwp): Adjust.
12950 (fetch_register): Add regcache parameter. Adjust.
12951 (usr_store_inferior_registers): Ditto.
12952 (regsets_fetch_inferior_registers): Ditto.
12953 (regsets_store_inferior_registers): Ditto.
12954 (linux_fetch_registers, linux_store_registers): Ditto.
12955 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12956 regcache. Adjust.
12957 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12958 Ditto.
12959 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12960 prototype to take a regcache.
12961 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12962 * remote-utils.c (convert_ascii_to_int, outreg)
12963 (prepare_resume_reply): Change prototype to take a regcache.
12964 Adjust.
12965 * target.h (struct target_ops) <fetch_registers, store_registers>:
12966 Change prototype to take a regcache.
12967 (fetch_inferior_registers, store_inferior_registers): Change
12968 prototype to take a regcache. Adjust.
12969 * proc-service.c (ps_lgetregs): Adjust.
12970 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12971 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12972 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12973 take a regcache. Adjust.
12974 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12975 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12976 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12977 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12978 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12979 (cris_cannot_fetch_register):
12980 (cris_breakpoint_at): Change prototype to take a regcache.
12981 Adjust.
12982 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12983 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12984 to take a regcache. Adjust.
12985 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12986 Adjust.
12987 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12988 take a regcache. Adjust.
12989 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12990 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12991 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12992 * linux-mips-low.c (mips_get_pc):
12993 (mips_set_pc): Change prototype to take a regcache. Adjust.
12994 (mips_reinsert_addr): Adjust.
12995 (mips_collect_register): Change prototype to take a regcache.
12996 Adjust.
12997 (mips_supply_register):
12998 (mips_collect_register_32bit, mips_supply_register_32bit)
12999 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13000 (mips_store_fpregset): Ditto.
13001 * linux-ppc-low.c (ppc_supply_ptrace_register)
13002 (ppc_supply_ptrace_register): Ditto.
13003 (parse_spufs_run): Adjust.
13004 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13005 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13006 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13007 take a regcache. Adjust.
13008 * linux-s390-low.c (s390_collect_ptrace_register)
13009 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13010 (s390_set_pc): Change prototype to take a regcache. Adjust.
13011 (s390_arch_setup): Adjust.
13012 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13013 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13014 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13015 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13016 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13017 regcache. Adjust.
13018 (sparc_breakpoint_at): Adjust.
13019 * linux-xtensa-low.c (xtensa_fill_gregset):
13020 (xtensa_store_gregset):
13021 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13022 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13023 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13024 prototype to take a regcache. Adjust.
13025 * win32-arm-low.c (arm_fetch_inferior_register)
13026 (arm_store_inferior_register): Change prototype to take a
13027 regcache. Adjust.
13028 * win32-i386-low.c (i386_fetch_inferior_register)
13029 (i386_store_inferior_register): Change prototype to take a
13030 regcache. Adjust.
13031 * win32-low.c (child_fetch_inferior_registers)
13032 (child_store_inferior_registers): Change prototype to take a
13033 regcache. Adjust.
13034 (win32_wait): Adjust.
13035 (win32_fetch_inferior_registers): Change prototype to take a
13036 regcache. Adjust.
13037 (win32_store_inferior_registers): Adjust.
13038 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13039 store_inferior_register>: Change prototype to take a regcache.
13040
13041 2010-01-20 Doug Evans <dje@google.com>
13042
13043 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13044 #ifdef.
13045 (linux_wait_for_event1, linux_init_signals): Ditto.
13046 (W_STOPCODE): Provide definition if missing.
13047
13048 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13049
13050 * linux-low.c (linux_core_of_thread): New.
13051 (compare_ints, show_process, list_threads): New.
13052 (linux_qxfer_osdata): Report threads and cores.
13053 (linux_target_op): Register linux_core_of_thread.
13054 * remote-utils.c (prepare_resume_reply): Report the core.
13055 (buffer_xml_printf): Support %d specifier.
13056 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13057 New.
13058 (handle_query): Handle qXfer:threads. Announce availability
13059 thereof.
13060 * target.h (struct target_ops): New field core_of_thread.
13061
13062 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13063
13064 * Makefile.in (clean): Remove new generated files.
13065 (reg-s390.o, reg-s390.c): Remove rules.
13066 (reg-s390x.o, reg-s390x.c): Likewise.
13067 (s390-linux32.o, s390-linux32.c): Add rules.
13068 (s390-linux64.o, s390-linux64.c): Likewise.
13069 (s390x-linux64.o, s390x-linux64.c): Likewise.
13070 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13071 * linux-s390-low.c: Include <elf.h>.
13072 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13073 (init_registers_s390): Remove prototype.
13074 (init_registers_s390x): Likewise.
13075 (init_registers_s390_linux32): Add prototype.
13076 (init_registers_s390_linux64): Likewise.
13077 (init_registers_s390x_linux64): Likewise.
13078 (s390_num_regs_3264): New define.
13079 (s390_regmap_3264): New global variable.
13080 (s390_cannot_fetch_register): Remove obsolete check.
13081 (s390_cannot_store_register): Likewise.
13082 (s390_collect_ptrace_register): Handle upper/lower register halves.
13083 (s390_supply_ptrace_register): Likewise.
13084 (s390_fill_gregset): Update to register number changes.
13085 (s390_get_hwcap): New routine.
13086 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13087 Install appropriate regmap and register set.
13088
13089 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13090
13091 * server.c (gdbserver_version): Update copyright year to 2010.
13092 * gdbreplay.c (gdbreplay_version): Likewise.
13093
13094 2009-12-28 Doug Evans <dje@google.com>
13095
13096 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13097 elf/external.h. Include <elf.h> instead but only if necessary.
13098
13099 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13100
13101 * linux-low.c (linux_remove_process): Remove `detaching'
13102 parameter. Don't release/detach from thread_db here.
13103 (linux_kill): Release/detach from thread_db here, ...
13104 (linux_detach): ... and here, before actually detaching.
13105 (linux_wait_1): ... and here, when a process exits.
13106 * thread-db.c (any_thread_of): New.
13107 (thread_db_free): Switch the current inferior to a thread of the
13108 passed in process.
13109
13110 2009-12-21 Doug Evans <dje@google.com>
13111
13112 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13113
13114 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13115 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13116 warning ifndef __NR_tkill. Move setting of errno there too.
13117 Delete unnecessary resetting of errno after syscall.
13118 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13119
13120 * configure.ac: Check for dladdr.
13121 * config.in: Regenerate.
13122 * configure: Regenerate.
13123 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13124 (try_thread_db_load): Update.
13125
13126 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13127
13128 2009-12-18 Doug Evans <dje@google.com>
13129
13130 * event-loop.c: Include unistd.h if it exists.
13131
13132 * linux-low.c (my_waitpid): Move definition away from being in
13133 between linux_tracefork_child/linux_test_for_tracefork.
13134
13135 * gdb_proc_service.h (psaddr_t): Fix type.
13136 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13137 signature to match glibc.
13138
13139 2009-12-16 Doug Evans <dje@google.com>
13140
13141 * linux-low.c (linux_read_memory): Fix argument to read.
13142
13143 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13144
13145 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13146 events, don't leave current_inferior pointing at null.
13147
13148 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13149
13150 * win32-low.c (LOG): Delete.
13151 (OUTMSG): Output to stderr.
13152 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13153 on compile time LOG macro.
13154 (win32_wait): Fix debug output.
13155
13156 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13157
13158 * win32-low.c (win32_add_one_solib): If the dll name is
13159 "ntdll.dll", prepend the system directory to the dll path.
13160
13161 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13162
13163 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13164
13165 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13166 Vladimir Prus <vladimir@codesourcery.com>
13167
13168 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13169 * configure.ac: Check for __mcoldfire__ and set
13170 gdb_cv_m68k_is_coldfire.
13171 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13172 reg-cf.o and reg-m68k.o.
13173 * configure: Regenerated.
13174
13175 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13176
13177 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13178 Pass it to thread_db_free.
13179 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13180 proper `detaching' argument to linux_remove_process.
13181 * linux-low.h (thread_db_free): Add `detaching' parameter.
13182 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13183 to thread_db_free.
13184 (thread_db_free): Add `detaching' parameter. Only
13185 call td_ta_clear_event if detaching from process.
13186
13187 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13188
13189 * thread-db.c (thread_db_free): Fix typo.
13190
13191 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13192
13193 PR gdb/10838
13194 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13195
13196 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13197
13198 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13199 with an i686 compiler.
13200 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13201 needed.
13202 * configure: Rebuilt.
13203
13204 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13205
13206 PR gdb/10783
13207
13208 * server.c (handle_search_memory_1): Correct read_addr initialization
13209 in loop for searching subsequent chunks.
13210
13211 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13212
13213 * configure.ac: New --with-libthread-db option.
13214 * thread-db.c: Allow direct dependence on libthread_db.
13215 (thread_db_free): Adjust.
13216 * config.in: Regenerate.
13217 * configure: Likewise.
13218
13219 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13220
13221 PR gdb/10757
13222 * thread-db.c (attach_thread): New function.
13223 (maybe_attach_thread): Return success/failure.
13224 (find_new_threads_callback): Adjust.
13225 (thread_db_find_new_threads): Loop until no new threads.
13226
13227 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13228
13229 * proc-service.c (ps_lgetregs): Formatting.
13230
13231 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13232
13233 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13234 * configure.ac: Adjust.
13235 * linux-low.h (struct process_info_private): Move members to struct
13236 thread_db.
13237 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13238 * linux-low.c (linux_remove_process): Adjust.
13239 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13240 * server.c (handle_query): Move code ...
13241 (handle_monitor_command): ... here. New function.
13242 * target.h (struct target_ops): New member.
13243 * thread-db.c (struct thread_db): New.
13244 (libthread_db_search_path): New variable.
13245 (thread_db_create_event, thread_db_enable_reporting)
13246 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13247 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13248 (try_thread_db_load_1, dladdr_to_soname): New functions.
13249 (try_thread_db_load, thread_db_load_search): New functions.
13250 (thread_db_init): Search for libthread_db.
13251 (thread_db_free): New function.
13252 (thread_db_handle_monitor_command): Likewise.
13253 * config.in: Regenerate.
13254 * configure: Regenerate.
13255
13256 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13257
13258 * spu-low.c (spu_kill): Wait for inferior to terminate.
13259 Call clear_inferiors.
13260 (spu_detach): Call clear_inferiors.
13261
13262 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13263
13264 * aclocal.m4: Regenerate.
13265 * config.in: Likewise.
13266 * configure: Likewise.
13267
13268 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13269
13270 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13271 (parse_spufs_run): New function.
13272 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13273 (ppc_breakpoint_at): Handle SPU breakpoints.
13274
13275 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13276
13277 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13278 (SPUFS_MAGIC): Define.
13279 (spu_enumerate_spu_ids): New function.
13280 (linux_qxfer_spu): New function.
13281 (linux_target_ops): Install linux_qxfer_spu.
13282
13283 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13284
13285 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13286 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13287 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13288 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13289 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13290 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13291 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13292 (init_registers_powerpc_cell32l): Add prototype.
13293 (init_registers_powerpc_cell64l): Likewise.
13294 (ppc_arch_setup): Detect Cell/B.E. architecture.
13295
13296 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13297
13298 * Makefile.in (datarootdir): New variable.
13299
13300 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13301
13302 * linux-low.c (linux_write_memory): Update debugging output.
13303 * Makefile.in (clean): Add new descriptions.
13304 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13305 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13306 * configure.srv: Add new files for arm*-*-linux*.
13307 * linux-arm-low.c: Add new declarations.
13308 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13309 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13310 (HWCAP_VFPv3D16): New.
13311 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13312 instead of __IWMMXT__.
13313 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13314 (arm_arch_setup): New.
13315 (target_regsets): Remove #ifdef. Add VFP regset.
13316 (the_low_target): Use arm_arch_setup.
13317
13318 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13319
13320 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13321 the main thread again.
13322
13323 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13324
13325 Adding Neutrino gdbserver.
13326 * configure: Regenerated.
13327 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13328 * configure.srv (i[34567]86-*-nto*): New target.
13329 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13330 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13331 (nto_comctrl) [__QNX__]: New function.
13332 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13333
13334 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13335
13336 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13337 srv_tgtobj.
13338
13339 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13340 Pedro Alves <pedro@codesourcery.com>
13341
13342 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13343 don't support CONTEXT_EXTENDED_REGISTERS.
13344 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13345 (the_low_target): Install them.
13346 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13347 failing with ERROR_PIPE_NOT_CONNECTED.
13348
13349 2009-06-30 Doug Evans <dje@google.com>
13350 Pierre Muller <muller@ics.u-strasbg.fr>
13351
13352 Add h/w watchpoint support to x86-linux, win32-i386.
13353 * Makefile.in (SFILES): Add i386-low.c
13354 (i386_low_h): Define.
13355 (i386-low.o): Add dependencies.
13356 (linux-x86-low.o): Add i386-low.h dependency.
13357 (win32-i386-low.o): Ditto.
13358 * i386-low.c: New file.
13359 * i386-low.h: New file.
13360 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13361 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13362 * linux-low.c (linux_add_process): Initialize arch_private.
13363 (linux_remove_process): Free arch_private.
13364 (add_lwp): Initialize arch_private.
13365 (delete_lwp): Free arch_private.
13366 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13367 provided.
13368 * linux-low.h (process_info_private): New member arch_private.
13369 (lwp_info): New member arch_private.
13370 (linux_target_ops): New members new_process, new_thread,
13371 prepare_to_resume.
13372 (ptid_of): New macro.
13373 * linux-x86-low.c: Include stddef.h, i386-low.h.
13374 (arch_process_info): New struct.
13375 (arch_lwp_info): New struct.
13376 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13377 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13378 (i386_dr_low_get_status): New function.
13379 (x86_insert_point, x86_remove_point): New functions.
13380 (x86_stopped_by_watchpoint): New function.
13381 (x86_stopped_data_address): New function.
13382 (x86_linux_new_process, x86_linux_new_thread): New functions.
13383 (x86_linux_prepare_to_resume): New function.
13384 (the_low_target): Add entries for insert_point, remove_point,
13385 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13386 prepare_to_resume.
13387 * server.c (debug_hw_points): New global.
13388 (monitor_show_help): Document set debug-hw-points.
13389 (handle_query): Process "set debug-hw-points".
13390 * server.h (debug_hw_points): Declare.
13391 (paddress): Declare.
13392 * utils.c (NUMCELLS, CELLSIZE): New macros.
13393 (get_sell, xsnprintf, paddress): New functions.
13394 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13395 remove_point, stopped_by_watchpoint, stopped_data_address.
13396 * win32-i386-low.c: Include i386-low.h.
13397 (debug_reg_state): Replaces dr.
13398 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13399 (i386_dr_low_get_status): New function.
13400 (i386_insert_point, i386_remove_point): New functions.
13401 (i386_stopped_by_watchpoint): New function.
13402 (i386_stopped_data_address): New function.
13403 (i386_initial_stuff): Update.
13404 (get_thread_context,set_thread_context,i386_thread_added): Update.
13405 (the_low_target): Add entries for insert_point,
13406 remove_point, stopped_by_watchpoint, stopped_data_address.
13407 * win32-low.c (win32_insert_watchpoint): New function.
13408 (win32_remove_watchpoint): New function.
13409 (win32_stopped_by_watchpoint): New function.
13410 (win32_stopped_data_address): New function.
13411 (win32_target_ops): Add entries for insert_watchpoint,
13412 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13413 * win32-low.h (win32_target_ops): New members insert_point,
13414 remove_point, stopped_by_watchpoint, stopped_data_address.
13415
13416 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13417
13418 * server.c (process_serial_event): Re-return unsupported, not
13419 error, if the type isn't recognized. Re-allow supporting only
13420 insert or remove packets. Also call require_running for
13421 breakpoints. Add missing break statement to default case. Tidy.
13422 * target.h (struct target_ops): Rename insert_watchpoint to
13423 insert_point, and remove_watchpoint to remove_point.
13424
13425 * linux-low.h (struct linux_target_ops): Likewise.
13426 * linux-low.c (linux_insert_watchpoint): Rename to ...
13427 (linux_insert_point): ... this. Adjust.
13428 (linux_remove_watchpoint): Rename to ...
13429 (linux_remove_point): ... this. Adjust.
13430 (linux_target_ops): Adjust.
13431 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13432 (cris_insert_point): ... this.
13433 (cris_remove_watchpoint): Rename to ...
13434 (cris_remove_point): ... this.
13435 (the_low_target): Adjust.
13436
13437 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13438
13439 * server.c (handle_v_kill): Pass signal_pid to
13440 kill_inferior if multi_process is zero.
13441
13442 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13443
13444 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13445 * target.h (target_ops): Comment for *_watchpoint to make it clear
13446 the functions can get types '0' and '1'.
13447
13448 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13449
13450 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13451 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13452 * regcache.c (get_regcache): Likewise.
13453 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13454 * win32-low.c (child_fetch_inferior_registers): Remove check for
13455 regno 0.
13456
13457 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13458 Pedro Alves <pedro@codesourcery.com>
13459
13460 * target.h (struct target_ops) <supports_multi_process>: New
13461 callback.
13462 (target_supports_multi_process): New.
13463 * server.c (handle_query): Even if GDB reports support, only
13464 enable multi-process if the target also supports it. Report
13465 multi-process support only if the target backend supports it.
13466 * linux-low.c (linux_supports_multi_process): New function.
13467 (linux_target_ops): Install it as target_supports_multi_process
13468 callback.
13469
13470 2009-05-24 Doug Evans <dje@google.com>
13471
13472 Global renaming of find_thread_pid to find_thread_ptid.
13473 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13474 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13475 All callers updated.
13476
13477 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13478 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13479 directly.
13480
13481 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13482 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13483 (linux_resume_one_lwp): Ditto.
13484
13485 2009-05-23 Doug Evans <dje@google.com>
13486
13487 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13488 from struct inferior_list_entry * to struct lwp_info *.
13489 All callers updated.
13490
13491 2009-05-13 Doug Evans <dje@google.com>
13492
13493 * linux-x86-low.c: Don't include assert.h.
13494 (x86_siginfo_fixup): Use fatal, not assert.
13495 (x86_arch_setup): Fix comment.
13496
13497 2009-05-12 Doug Evans <dje@google.com>
13498
13499 Biarch support for i386/amd64 gdbserver.
13500 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13501 Add linux-x86-low.c.
13502 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13503 (linux-x86-low.o): Add.
13504 * linux-x86-64-low.c: Delete.
13505 * linux-i386-low.c: Delete.
13506 * linux-x86-low.c: New file.
13507 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13508 linux-x86-low.o.
13509 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13510 linux-x86-low.o.
13511 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13512 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13513 (linux_child_pid_to_exec_file): New function.
13514 (elf_64_header_p, elf_64_file_p): New functions.
13515 (siginfo_fixup): New function.
13516 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13517 give target a chance to convert layout.
13518 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13519 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13520
13521 2009-05-07 Doug Evans <dje@google.com>
13522
13523 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13524 (regsets_store_inferior_registers): Ditto.
13525
13526 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13527
13528 PR server/10048
13529
13530 * linux-low.c (must_set_ptrace_flags): Delete.
13531 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13532 of the global.
13533 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13534 `lwp->must_set_ptrace_flags' instead.
13535 (linux_wait_for_event_1): Set ptrace options here.
13536 (linux_wait_1): ... not here.
13537
13538 2009-04-30 Doug Evans <dje@google.com>
13539
13540 * inferiors.c (started_inferior_callback): New function.
13541 (attached_inferior_callback): New function.
13542 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13543 * server.c (print_started_pid, print_attached_pid): New functions.
13544 (detach_or_kill_for_exit): New function.
13545 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13546 * server.h (have_started_inferiors_p): Declare.
13547 (have_attached_inferiors_p): Declare.
13548
13549 * inferiors.c (remove_process): Fix memory leak, free process.
13550 * linux-low.c (linux_remove_process): New function.
13551 (linux_kill): Call it instead of remove_process.
13552 (linux_detach, linux_wait_1): Ditto.
13553
13554 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13555
13556 * configure.srv: Add x86 Windows CE target.
13557
13558 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13559
13560 * inferiors.c (get_thread_process): Make global.
13561 * server.h (get_thread_process): Add prototype.
13562 * thread-db.c (find_one_thread): Use get_thread_process
13563 instead of current_process.
13564 (thread_db_get_tls_address): Do not crash if called when
13565 thread layer is not yet initialized.
13566
13567 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13568
13569 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13570 * spu-low.c (current_tid): Rename to ...
13571 (current_ptid): ... this.
13572 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13573 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13574 ptid_get_lwp (current_ptid) instead of current_tid.
13575 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13576 instead of current_tid. Use find_process_pid to verify pid
13577 argument is valid. Pass proper argument to remove_process.
13578 (spu_thread_alive): Compare current_ptid instead of current_tid.
13579 (spu_resume): Likewise.
13580
13581 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13582
13583 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13584 variable.
13585
13586 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13587
13588 Implement the multiprocess extensions, and add linux multiprocess
13589 support.
13590
13591 * server.h (ULONGEST): Declare.
13592 (struct ptid, ptid_t): New.
13593 (minus_one_ptid, null_ptid): Declare.
13594 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13595 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13596 (struct inferior_list_entry): Change `id' type from unsigned from
13597 to ptid_t.
13598 (struct sym_cache, struct breakpoint, struct
13599 process_info_private): Forward declare.
13600 (struct process_info): Declare.
13601 (current_process): Declare.
13602 (all_processes): Declare.
13603 (initialize_inferiors): Declare.
13604 (add_thread): Adjust to use ptid_t.
13605 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13606 (add_process, remove_process, find_thread_pid): Declare.
13607 (find_inferior_id): Adjust to use ptid_t.
13608 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13609 (multi_process): Declare.
13610 (push_event): Adjust to use ptid_t.
13611 (read_ptid, write_ptid): Declare.
13612 (prepare_resume_reply): Adjust to use ptid_t.
13613 (clear_symbol_cache): Declare.
13614 * inferiors.c (all_processes): New.
13615 (null_ptid, minus_one_ptid): New.
13616 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13617 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13618 (add_thread): Change unsigned long to ptid. Remove gdb_id
13619 parameter. Adjust.
13620 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13621 (gdb_id_to_thread): Rename to ...
13622 (find_thread_pid): ... this. Change unsigned long to ptid.
13623 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13624 (loaded_dll, pull_pid_from_list): Adjust.
13625 (add_process, remove_process, find_process_pid)
13626 (get_thread_process, current_process, initialize_inferiors): New.
13627 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13628 (struct target_waitstatus) <related_pid>: Ditto.
13629 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13630 return type to int.
13631 (struct target_ops) <join>: Add `pid' argument.
13632 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13633 (struct target_ops) <wait>: Add `ptid' field. Change return type
13634 to ptid.
13635 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13636 (mywait): Add `ptid' argument. Change return type to ptid_t.
13637 (target_pid_to_str): Declare.
13638 * target.c (set_desired_inferior): Adjust to use ptids.
13639 (mywait): Add new `ptid' argument. Adjust.
13640 (target_pid_to_str): New.
13641 * mem-break.h (free_all_breakpoints): Declare.
13642 * mem-break.c (breakpoints): Delelete.
13643 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13644 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13645 to use per-process breakpoint list.
13646 (free_all_breakpoints): New.
13647 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13648 (symbol_cache, all_symbols_looked_up): Delete.
13649 (hexchars): New.
13650 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13651 read_ptid): New.
13652 (prepare_resume_reply): Change ptid argument's type from unsigned
13653 long to ptid_t. Adjust. Implement W;process and X;process.
13654 (free_sym_cache, clear_symbol_cache): New.
13655 (look_up_one_symbol): Adjust to per-process symbol cache. *
13656 * server.c (cont_thread, general_thread, step_thread): Change type
13657 to ptid_t.
13658 (attached): Delete.
13659 (multi_process): New.
13660 (last_ptid): Change type to ptid_t.
13661 (struct vstop_notif) <ptid>: Change type to ptid_t.
13662 (queue_stop_reply, push_event): Change `ptid' argument's type to
13663 ptid_t.
13664 (discard_queued_stop_replies): Add `pid' argument.
13665 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13666 changes. Don't reference the `attached' global.
13667 (attach_inferior): Adjust to mywait interface changes.
13668 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13669 features. Handle and report "multiprocess+". Handle
13670 "qAttached:PID".
13671 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13672 changes.
13673 (handle_v_kill): New.
13674 (handle_v_stopped): Adjust to use target_pid_to_str.
13675 (handle_v_requests): Allow multiple attaches and runs when
13676 multiprocess extensions are in effect. Handle "vKill".
13677 (myresume): Adjust to use ptids.
13678 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13679 (handle_status): Adjust to discard_queued_stop_replies interface
13680 change.
13681 (first_thread_of, kill_inferior_callback)
13682 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13683 (main): Call initialize_inferiors. Adjust to use ptids, killing
13684 and detaching from all inferiors. Handle multiprocess packet
13685 variants.
13686 * linux-low.h: Include gdb_proc_service.h.
13687 (struct process_info_private): New.
13688 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13689 <lwpid_of>: Use ptid_get_lwp.
13690 (get_lwp_thread): Adjust.
13691 (struct lwp_info): Add `dead' member.
13692 (find_lwp_pid): Declare.
13693 * linux-low.c (thread_db_active): Delete.
13694 (new_inferior): Adjust comment.
13695 (inferior_pid): Delete.
13696 (linux_add_process): New.
13697 (handle_extended_wait): Adjust.
13698 (add_lwp): Change unsigned long to ptid.
13699 (linux_create_inferior): Add process to processes table. Adjust
13700 to use ptids. Don't set new_inferior here.
13701 (linux_attach_lwp): Rename to ...
13702 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13703 it. Adjust to use ptids.
13704 (linux_attach_lwp): New.
13705 (linux_attach): Add process to processes table. Don't set
13706 new_inferior here.
13707 (struct counter): New.
13708 (second_thread_of_pid_p, last_thread_of_process_p): New.
13709 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13710 multiple processes.
13711 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13712 processes. Remove process from process table.
13713 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13714 to multiple processes.
13715 (any_thread_of): New.
13716 (linux_detach): Add `pid' argument, and handle it. Remove process
13717 from processes table.
13718 (linux_join): Add `pid' argument. Handle it.
13719 (linux_thread_alive): Change unsighed long argument to ptid_t.
13720 Consider dead lwps as not being alive.
13721 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13722 threads we're not interested in.
13723 (same_lwp, find_lwp_pid): New.
13724 (linux_wait_for_lwp): Change `pid' argument's type from int to
13725 ptid_t. Adjust.
13726 (linux_wait_for_event): Rename to ...
13727 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13728 from int to ptid_t. Adjust.
13729 (linux_wait_for_event): New.
13730 (linux_wait_1): Add `ptid' argument. Change return type to
13731 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13732 that exit from the process table.
13733 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13734 Adjust.
13735 (mark_lwp_dead): New.
13736 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13737 stopping all threads, mark its main lwp as dead.
13738 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13739 ptids.
13740 (fetch_register, usr_store_inferior_registers)
13741 (regsets_fetch_inferior_registers)
13742 (regsets_store_inferior_registers, linux_read_memory)
13743 (linux_write_memory): Inline `inferior_pid'.
13744 (linux_look_up_symbols): Adjust to use per-process
13745 `thread_db_active'.
13746 (linux_request_interrupt): Adjust to use ptids.
13747 (linux_read_auxv): Inline `inferior_pid'.
13748 (initialize_low): Don't reference thread_db_active.
13749 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13750 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13751 (ps_getpid): Return the pid of the current inferior.
13752 * thread-db.c (proc_handle, thread_agent): Delete.
13753 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13754 per-process data.
13755 (find_one_thread): Change argument type to ptid_t. Adjust to
13756 per-process data.
13757 (maybe_attach_thread): Adjust to per-process data and ptids.
13758 (thread_db_find_new_threads): Ditto.
13759 (thread_db_init): Ditto.
13760 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13761 processes table. Adjust to use ptids.
13762 (spu_kill, spu_detach): Adjust interface. Remove process from
13763 processes table.
13764 (spu_join, spu_thread_alive): Adjust interface.
13765 (spu_wait): Adjust interface. Remove process from processes
13766 table. Adjust to use ptids.
13767 * win32-low.c (current_inferior_tid): Delete.
13768 (current_inferior_ptid): New.
13769 (debug_event_ptid): New.
13770 (thread_rec): Take a ptid. Adjust.
13771 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13772 (child_delete_thread): Ditto.
13773 (do_initial_child_stuff): Add `attached' argument. Add process to
13774 processes table.
13775 (child_fetch_inferior_registers, child_store_inferior_registers):
13776 Adjust.
13777 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13778 (win32_attach): Pass 1 to do_initial_child_stuff.
13779 (win32_kill): Adjust interface. Remove process from processes
13780 table.
13781 (win32_detach): Ditto.
13782 (win32_join): Adjust interface.
13783 (win32_thread_alive): Take a ptid.
13784 (win32_resume): Adjust to use ptids.
13785 (get_child_debug_event): Ditto.
13786 (win32_wait): Adjust interface. Remove exiting process from
13787 processes table.
13788
13789 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13790
13791 Non-stop mode support.
13792
13793 * server.h (non_stop): Declare.
13794 (gdb_client_data, handler_func): Declare.
13795 (delete_file_handler, add_file_handler, start_event_loop):
13796 Declare.
13797 (handle_serial_event, handle_target_event, push_event)
13798 (putpkt_notif): Declare.
13799 * target.h (enum resume_kind): New.
13800 (struct thread_resume): Replace `step' field by `kind' field.
13801 (TARGET_WNOHANG): Define.
13802 (struct target_ops) <wait>: Add `options' argument.
13803 <supports_non_stop, async, start_non_stop>: New fields.
13804 (target_supports_non_stop, target_async): New.
13805 (start_non_stop): Declare.
13806 (mywait): Add `options' argument.
13807 * target.c (mywait): Add `options' argument. Print child exit
13808 notifications here.
13809 (start_non_stop): New.
13810 * server.c (non_stop, own_buf, mem_buf): New globals.
13811 (struct vstop_notif): New.
13812 (notif_queue): New global.
13813 (queue_stop_reply, push_event, discard_queued_stop_replies)
13814 (send_next_stop_reply): New.
13815 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13816 interface changes.
13817 (attach_inferior): In non-stop mode, don't wait for the target
13818 here.
13819 (handle_general_set): Handle QNonStop.
13820 (handle_query): When handling qC, return the current general
13821 thread, instead of the first thread of the list.
13822 (handle_query): If the backend supports non-stop mode, include
13823 QNonStop+ in the qSupported query response.
13824 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13825 and non-stop mode.
13826 (handle_v_attach, handle_v_run): Handle non-stop mode.
13827 (handle_v_stopped): New.
13828 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13829 (myresume): Adjust to use resume_kind. Handle non-stop.
13830 (queue_stop_reply_callback): New.
13831 (handle_status): Handle non-stop mode.
13832 (main): Clear non_stop flag on reconnection. Use the event-loop.
13833 Refactor serial protocol handling from here ...
13834 (process_serial_event): ... to this new function. When GDB
13835 selects any thread, select one here. In non-stop mode, wait until
13836 GDB acks all pending events before exiting.
13837 (handle_serial_event, handle_target_event): New.
13838 * remote-utils.c (remote_open): Install remote_desc in the event
13839 loop.
13840 (remote_close): Remove remote_desc from the event loop.
13841 (putpkt_binary): Rename to...
13842 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13843 (putpkt_binary): New as wrapper around putpkt_binary_1.
13844 (putpkt_notif): New.
13845 (prepare_resume_reply): In non-stop mode, don't change the
13846 general_thread.
13847 * event-loop.c: New.
13848 * Makefile.in (OBJ): Add event-loop.o.
13849 (event-loop.o): New rule.
13850
13851 * linux-low.h (pid_of): Moved here.
13852 (lwpid_of): New.
13853 (get_lwp_thread): Use lwpid_of.
13854 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13855 * linux-low.c (pid_of): Delete.
13856 (inferior_pid): Use lwpid_of.
13857 (linux_event_pipe): New.
13858 (target_is_async_p): New.
13859 (delete_lwp): New.
13860 (handle_extended_wait): Use lwpid_of.
13861 (add_lwp): Don't set lwpid field.
13862 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13863 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13864 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13865 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13866 first. Adjust to linux_wait_for_event interface changes. Use
13867 lwpid_of.
13868 (linux_detach): Don't delete the main lwp here.
13869 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13870 (status_pending_p): Don't consider explicitly suspended lwps.
13871 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13872 pointer. Add OPTIONS argument. Change return type to int. Use
13873 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13874 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13875 pointer. Add status pointer argument. Return a pid instead of a
13876 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13877 changes. In non-stop mode, don't switch to a random thread.
13878 (linux_wait): Rename to...
13879 (linux_wait_1): ... this. Add target_options argument, and handle
13880 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13881 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13882 clean exit and signal exit code. Don't stop all threads in
13883 non-stop mode. In all-stop mode, only stop all threads when
13884 reporting a stop to GDB. Handle explicit thread stop requests.
13885 (async_file_flush, async_file_mark): New.
13886 (linux_wait): New.
13887 (send_sigstop): Use lwpid_of.
13888 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13889 interface changes. In non-stop mode, don't switch to a random
13890 thread.
13891 (linux_resume_one_lwp): Use lwpid_of.
13892 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13893 (linux_resume_one_thread): ... this. Handle resume_stop. In
13894 non-stop mode, don't look for pending flag in all threads.
13895 (resume_status_pending_p): Don't consider explicitly suspended
13896 threads.
13897 (my_waitpid): Reimplement. Emulate __WALL.
13898 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13899 Use lwpid_of.
13900 (sigchld_handler, linux_supports_non_stop, linux_async)
13901 (linux_start_non_stop): New.
13902 (linux_target_ops): Register linux_supports_non_stop, linux_async
13903 and linux_start_non_stop.
13904 (initialize_low): Install SIGCHLD handler.
13905 * thread-db.c (thread_db_create_event, find_one_thread)
13906 (thread_db_get_tls_address): Use lwpid_of.
13907 * win32-low.c (win32_detach): Adjust to use resume_kind.
13908 (win32_wait): Add `options' argument.
13909 * spu-low.c (spu_resume): Adjust to use resume_kind.
13910 (spu_wait): Add `options' argument.
13911
13912 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13913
13914 Decouple target code from remote protocol.
13915
13916 * target.h (enum target_waitkind): New.
13917 (struct target_waitstatus): New.
13918 (struct target_ops) <wait>: Return an unsigned long. Take a
13919 target_waitstatus pointer instead of a char pointer.
13920 (mywait): Likewise.
13921 * target.c (mywait): Change prototype to return an unsigned long.
13922 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13923 * server.h (thread_from_wait, old_thread_from_wait): Delete
13924 declarations.
13925 (prepare_resume_reply): Change prototype to take a
13926 target_waitstatus.
13927 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13928 (last_status, last_ptid): New.
13929 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13930 pid instead of a signal.
13931 (attach_inferior): Remove "status" and "signal" parameters.
13932 Adjust.
13933 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13934 not as an address.
13935 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13936 (handle_v_requests, myresume): Remove "status" and "signal"
13937 parameters. Adjust.
13938 (handle_status): New.
13939 (main): Delete local `status'. Adjust.
13940 * remote-utils.c: Include target.h.
13941 (prepare_resume_reply): Change prototype to take a
13942 target_waitstatus. Adjust.
13943
13944 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13945 interface.
13946 * spu-low.c (spu_wait): Adjust.
13947 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13948 Delete.
13949 (win32_wait): Adjust.
13950
13951 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13952
13953 * target.h (struct thread_resume): Delete leave_stopped member.
13954 (struct target_ops): Add a `n' argument to the `resume' callback.
13955 * server.c (start_inferior): Adjust.
13956 (handle_v_cont, myresume): Adjust.
13957 * linux-low.c (check_removed_breakpoint): Adjust to resume
13958 interface change, and to removed leave_stopped field.
13959 (resume_ptr): Delete.
13960 (struct thread_resume_array): New.
13961 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13962 resume interface change.
13963 (linux_continue_one_thread, linux_queue_one_thread)
13964 (resume_status_pending_p): Check if the resume field is NULL
13965 instead of checking the leave_stopped member.
13966 (linux_resume): Adjust to the target resume interface change.
13967 * spu-low.c (spu_resume): Adjust to the target resume interface
13968 change.
13969 * win32-low.c (win32_detach, win32_resume): Ditto.
13970
13971 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13972
13973 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13974 flag.
13975 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13976 pending.
13977 (linux_continue_one_thread): Only preserve the stepping flag if
13978 there's a pending breakpoint.
13979
13980 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13981
13982 * server.c (main): After the inferior having exited, call
13983 remote_close before exiting gdbserver.
13984
13985 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13986
13987 Fix size of FPSCR in Power 7 processors.
13988 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13989 (PPC_FEATURE_HAS_DFP): New #define.
13990 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13991 size of the FPSCR.
13992
13993 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13994
13995 * server.c (handle_query) Whitespace and formatting.
13996
13997 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13998
13999 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14000 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14001 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14002 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14003 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14004 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14005 Makefile.in, configure.ac: Fix whitespace throughout.
14006 * configure: Regenerate.
14007
14008 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14009
14010 * inferiors.c (find_inferior): Make it safe for the callback
14011 function to delete the currently iterated inferior.
14012
14013 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14014
14015 * Makefile.in (linuw_low_h): Move higher.
14016 (thread-db.o): Depend on $(linux_low_h).
14017
14018 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14019
14020 Rename "process" to "lwp" throughout.
14021
14022 * linux-low.c (all_processes): Rename to...
14023 (all_lwps): ... this.
14024 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14025 (add_process): Rename to ...
14026 (add_lwp): ... this. Adjust.
14027 (linux_create_inferior): Adjust.
14028 (linux_attach_lwp): Adjust.
14029 (linux_attach): Adjust.
14030 (linux_kill_one_process): Rename to ...
14031 (linux_kill_one_lwp): ... this. Adjust.
14032 (linux_kill): Adjust.
14033 (linux_detach_one_process): Rename to ...
14034 (linux_detach_one_lwp): ... this. Adjust.
14035 (linux_detach): Adjust.
14036 (check_removed_breakpoint): Adjust.
14037 (status_pending_p): Adjust.
14038 (linux_wait_for_process): Rename to ...
14039 (linux_wait_for_lwp): ... this. Adjust.
14040 (linux_wait_for_event): Adjust.
14041 (send_sigstop): Adjust.
14042 (wait_for_sigstop): Adjust.
14043 (stop_all_processes): Rename to ...
14044 (stop_all_lwps): ... this.
14045 (linux_resume_one_process): Rename to ...
14046 (linux_resume_one_lwp): ... this. Adjust.
14047 (linux_set_resume_request, linux_continue_one_thread)
14048 (linux_queue_one_thread, resume_status_pending_p)
14049 (usr_store_inferior_registers, regsets_store_inferior_registers)
14050 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14051 Adjust.
14052 * linux-low.h (get_process): Rename to ...
14053 (get_lwp): ... this. Adjust.
14054 (get_thread_process): Rename to ...
14055 (get_thread_lwp): ... this. Adjust.
14056 (get_process_thread): Rename to ...
14057 (get_lwp_thread): ... this. Adjust.
14058 (struct process_info): Rename to ...
14059 (struct lwp_info): ... this.
14060 (all_processes): Rename to ...
14061 (all_lwps): ... this.
14062 * proc-service.c (ps_lgetregs): Adjust.
14063 * thread-db.c (thread_db_create_event, find_one_thread)
14064 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14065
14066 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14067
14068 * server.c (handle_query): Handle "qAttached".
14069
14070 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14071
14072 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14073 GPLv3, update license URL.
14074
14075 2009-03-01 Doug Evans <dje@google.com>
14076
14077 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14078 (server_h): Add gdb_signals.h.
14079 (signals.o): Update.
14080 * server.h (target_signal_from_host,target_signal_to_host_p)
14081 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14082
14083 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14084
14085 * remote-utils.c (getpkt): Also generate remote-debug
14086 information if noack_mode is set.
14087
14088 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14089
14090 * server.c (handle_query): Report qXfer:siginfo:read and
14091 qXfer:siginfo:write as supported and handle them.
14092 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14093 * linux-low.c (linux_xfer_siginfo): New.
14094 (linux_target_ops): Set it.
14095
14096 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14097
14098 * server.c (gdbserver_usage): Mention --remote-debug.
14099 (main): Accept '--remote-debug' switch.
14100
14101 2009-01-18 Doug Evans <dje@google.com>
14102
14103 * regcache.c (new_register_cache): No need to check result of xcalloc.
14104 * server.c (handle_search_memory): Back out calls to xmalloc,
14105 result is checked and error is returned to user upon failure.
14106 (handle_query): Ditto. Add more checks for result of malloc.
14107 (handle_v_cont): Check result of malloc, report error back to
14108 user upon failure.
14109 (handle_v_run): Ditto. Call freeargv.
14110 * server.h (freeargv): Declare.
14111 * utils.c (freeargv): New fn.
14112
14113 2009-01-15 Doug Evans <dje@google.com>
14114
14115 * gdbreplay.c (perror_with_name): Make arg const char *.
14116 * server.h (target_signal_to_name): Make return type const char *.
14117 * thread-db.c (thread_db_err_str): Make return type const char *.
14118 * utils.c (perror_with_name): Make arg const char *.
14119
14120 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14121
14122 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14123 when handling a EXIT_PROCESS_DEBUG_EVENT.
14124
14125 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14126
14127 * gdbreplay.c (gdbreplay_version): Update copyright year.
14128 * server.c (gdbserver_version): Likewise.
14129
14130 2009-01-05 Doug Evans <dje@google.com>
14131
14132 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14133 (handle_extended_wait): Improve comment.
14134
14135 2008-12-13 Doug Evans <dje@google.com>
14136
14137 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14138 * server.h (ATTR_MALLOC): New macro.
14139 (xmalloc,xcalloc,xstrdup): Declare.
14140 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14141 * inferiors.c: Ditto.
14142 * linux-low.c: Ditto.
14143 * mem-break.c: Ditto.
14144 * regcache.c: Ditto.
14145 * remote-utils.c: Ditto.
14146 * server.c: Ditto.
14147 * target.c: Ditto.
14148 * win32-low.c: Ditto.
14149
14150 2008-12-12 Doug Evans <dje@google.com>
14151
14152 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14153 in debugging printf.
14154
14155 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14156
14157 2008-12-09 Doug Evans <dje@google.com>
14158
14159 * linux-low.h (struct process_info): Delete member tid, unused.
14160 * thread-db.c (find_one_thread): Update.
14161 (maybe_attach_thread): Update.
14162
14163 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14164
14165 * target.h (struct target_ops): Add qxfer_osdata member.
14166 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14167 and dirent.h.
14168 (linux_qxfer_osdata): New functions.
14169 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14170 callback.
14171 * server.c (handle_query): Handle "qXfer:osdata:read:".
14172 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14173 (buffer_xml_printf): New functions.
14174 * server.h (struct buffer): New.
14175 (buffer_grow_str, buffer_grow_str0): New macros.
14176 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14177 (buffer_xml_printf): Declare.
14178
14179 2008-11-24 Doug Evans <dje@google.com>
14180
14181 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14182
14183 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14184
14185 * server.c (handle_v_run): Always use the supplied argument list.
14186
14187 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14188
14189 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14190 (xtensa_regmap_table): Add entry for scompare1.
14191
14192 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14193
14194 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14195 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14196 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14197 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14198 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14199 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14200 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14201 XML target descriptions.
14202 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14203 when inferior is running on an ISA 2.05 or later processor. Add
14204 special case to return offset for full 64-bit slot of FPSCR when
14205 in 32-bits.
14206
14207 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14208
14209 * Makefile.in (SFILES, clean): Added sparc64 files.
14210 (reg-sparc64.o, reg-sparc64.c): New.
14211 * configure.srv (sparc*-*-linux*): New configuration.
14212 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14213 syscall arguments for SPARC.
14214 (regsets_store_inferior_registers): Likewise.
14215 * linux-sparc-low.c: New file.
14216
14217 2008-10-21 Doug Evans <dje@google.com>
14218
14219 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14220 (READLINE_DIR,READLINE_DEP): Delete.
14221 (INTERNAL_CFLAGS): Update.
14222 (LINTFLAGS): Update.
14223
14224 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14225
14226 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14227 whole argv from the last run, not just argv[0].
14228
14229 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14230
14231 * regcache.c (new_register_cache): Return NULL if the register
14232 cache size isn't known yet.
14233 (free_register_cache): Avoid dereferencing a NULL regcache.
14234
14235 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14236
14237 * configure.srv: Merge MIPS and MIPS64.
14238
14239 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14240
14241 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14242
14243 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14244
14245 * Makefile.in: Add required vsx dependencies.
14246
14247 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14248 Declare init_registers_powerpc_vsx32l.
14249 Declare init_registers_powerpc_vsx64l.
14250 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14251 (ppc_arch_setup): Check for VSX in hwcap.
14252 (ppc_fill_vsxregset): New function.
14253 (ppc_store_vsxregset): New function.
14254 Add new VSX entry in regset_info target_regsets.
14255
14256 * configure.srv: Add new VSX dependencies.
14257
14258 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14259
14260 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14261 (remote_open): Set or clear transport_is_reliable.
14262 (putpkt_binary): Don't expect acks in noack mode.
14263 (getpkt): Don't send ack/nac in noack mode.
14264 * server.c (handle_general_set): Handle QStartNoAckMode.
14265 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14266 qSupported.
14267 (main): Reset noack_mode on every connection.
14268 * server.h (noack_mode): Declare.
14269
14270 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14271
14272 * Makefile.in (GDBREPLAY_OBS): New variable.
14273 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14274
14275 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14276 Daniel Jacobowitz <dan@codesourcery.com>
14277
14278 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14279 (usr_store_inferior_registers): Likewise.
14280 (regsets_store_inferior_registers): Likewise.
14281
14282 2008-07-31 Rolf Jansen <rj@surtec.com>
14283 Pedro Alves <pedro@codesourcery.com>
14284
14285 * configure.ac: Check for memmem declaration.
14286 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14287 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14288 (disable_packet_qfThreadInfo): Unconditionally compile.
14289 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14290 * configure, config.in: Regenerate.
14291
14292 2008-07-28 Doug Kwan <dougkwan@google.com>
14293
14294 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14295 (linux_write_memory): Remove declaration of errno.
14296
14297 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14298
14299 * linux-low.c (handle_extended_wait): Do not use "status"
14300 variable uninitialized.
14301
14302 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14303
14304 * server.c (handle_v_attach): Inhibit reporting dll changes.
14305
14306 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14307
14308 * remote-utils.c (prepare_resume_reply): If requested, don't
14309 output "thread:TID" in the T stop reply.
14310
14311 * server.c (disable_packet_vCont, disable_packet_Tthread)
14312 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14313 (handle_query): If requested, disable support for qC, qfThreadInfo
14314 and qsThreadInfo.
14315 (handle_v_requests): If requested, disable support for vCont.
14316 (gdbserver_show_disableable): New.
14317 (main): Handle --disable-packet and --disable-packet=LIST.
14318
14319 * server.h (disable_packet_vCont, disable_packet_Tthread)
14320 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14321
14322 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14323
14324 * server.c (gdbserver_usage): Mention --version.
14325
14326 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14327
14328 * Makefile.in (gdbreplay.o): New rule.
14329
14330 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14331
14332 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14333 message, not gdbserver.
14334
14335 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14336 Nathan Sidwell <nathan@codesourcery.com>
14337 Joseph Myers <joseph@codesourcery.com>
14338
14339 * acinclude.m4: Include ../../config/acx.m4.
14340 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14341 * configure, config.in: Regenerate.
14342 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14343 * server.c (gdbserver_version): Print PKGVERSION.
14344 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14345 (main): Adjust gdbserver_usage calls.
14346 * gdbreplay.c (version, host_name): Add declarations.
14347 (gdbreplay_version, gdbreplay_usage): New.
14348 (main): Accept --version and --help options.
14349
14350 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14351
14352 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14353 (arm_breakpoint_at): Handle Thumb.
14354 (the_low_target): Add comment.
14355
14356 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14357
14358 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14359
14360 2008-05-09 Doug Evans <dje@google.com>
14361
14362 * server.h (decode_search_memory_packet): Declare.
14363 * remote-utils.c (decode_search_memory_packet): New fn.
14364 * server.c (handle_search_memory_1): New fn.
14365 (handle_search_memory): New fn.
14366 (handle_query): Process qSearch:memory packets.
14367
14368 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14369
14370 * regcache.c (registers_length): Remove.
14371 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14372 full register packet.
14373 * regcache.h (registers_length): Remove prototype.
14374 * server.h (PBUFSIZ): Define to 16384.
14375
14376 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14377
14378 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14379 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14380 powerpc-64l.o, and powerpc-altivec64l.o.
14381 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14382 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14383 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14384 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14385 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14386 to srv_xmlfiles.
14387
14388 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14389 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14390 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14391 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14392 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14393 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14394 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14395 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14396 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14397 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14398 (clean): Update.
14399
14400 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14401 (init_registers_powerpc_32l): ... this new prototype.
14402 (init_registers_powerpc_32): Remove, replace by ...
14403 (init_registers_powerpc_altivec32l): ... this new prototype.
14404 (init_registers_powerpc_e500): Remove, replace by ...
14405 (init_registers_powerpc_e500l): ... this new prototype.
14406 (init_registers_ppc64): Remove, replace by ...
14407 (init_registers_powerpc_64l): ... this new prototype.
14408 (init_registers_powerpc_64): Remove, replace by ...
14409 (init_registers_powerpc_altivec64l): ... this new prototype.
14410 (ppc_num_regs): Set to 73.
14411 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14412 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14413 (ppc_cannot_store_register): Handle orig_r3 and trap.
14414 (ppc_arch_setup): Update init_registers_... calls.
14415 (ppc_fill_gregset): Handle orig_r3 and trap.
14416
14417 * inferiors.c (clear_inferiors): Reset current_inferior.
14418
14419 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14420
14421 * acinclude.m4: Add override.m4.
14422 * configure: Regenerate.
14423
14424 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14425
14426 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14427 initial call to init_register_ppc64.
14428
14429 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14430
14431 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14432 single powerpc*-*-linux* case.
14433 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14434
14435 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14436
14437 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14438 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14439 from reg_xmlfiles.
14440 * linux-ppc-low.c: Include <elf.h>.
14441 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14442 (ppc_hwcap): New global variable.
14443 (ppc_regmap): Remove __SPE__ #ifdef sections.
14444 (ppc_regmap_e500): New global variable.
14445 (ppc_cannot_store_register): Update __SPE__ special case.
14446 (ppc_get_hwcap): New function.
14447 (ppc_arch_setup): Use it to determine whether inferior supports
14448 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14449 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14450 Do not access registers if target does not support AltiVec.
14451 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14452 Do not access registers if target does not support SPE.
14453 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14454
14455 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14456
14457 * linux-low.c (disabled_regsets, num_regsets): New.
14458 (use_regsets_p): Delete.
14459 (linux_wait_for_process): Clear disabled_regsets.
14460 (regsets_fetch_inferior_registers): Check and set it.
14461 (regsets_store_inferior_registers): Likewise.
14462 (linux_fetch_registers, linux_store_registers): Do not use
14463 use_regsets_p.
14464 (initialize_low): Allocate disabled_regsets.
14465
14466 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14467
14468 * Makefile.in (LIBOBJS): New.
14469 (OBS): Use LIBOBJS.
14470 (memmem.o): New rule.
14471 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14472 * configure: Regenerated.
14473
14474 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14475
14476 * server.c (handle_query): Never return "unsupported" for
14477 qXfer:features:read queries.
14478
14479 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14480
14481 * server.c (get_features_xml): Fix inverted condition.
14482 (handle_query): Always support qXfer:feature:read.
14483
14484 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14485
14486 * server.c (wrapper_argv): New.
14487 (start_inferior): Handle wrapper_argv. If set, expect an extra
14488 trap.
14489 (gdbserver_usage): Document --wrapper.
14490 (main): Parse --wrapper.
14491
14492 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14493
14494 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14495 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14496 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14497 (ppc_set_pc): Likewise.
14498 (ppc_arch_setup): New function.
14499 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14500 of collect_register.
14501 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14502
14503 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14504
14505 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14506 instead of linux-ppc64-low.o.
14507 * linux-ppc64-low.c: Remove file.
14508 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14509 (linux-ppc64-low.o): Remove rule.
14510
14511 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14512 (init_registers_powerpc_64): Likewise.
14513 (ppc_regmap): Conditionally define depending on __powerpc64__.
14514 (ppc_cannot_store_register): Do not special-case "fpscr" when
14515 compiled on __powerpc64__.
14516 (ppc_collect_ptrace_register): New function.
14517 (ppc_supply_ptrace_register): New function.
14518 (ppc_breakpoint): Change type to "unsigned int".
14519 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14520 (the_low_target): Conditionally provide initializers for the
14521 arch_setup member depending on __powerpc64__. Install
14522 collect_ptrace_register and supply_ptrace_register members.
14523
14524 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14525
14526 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14527 * server.c (gdbserver_xmltarget): Define.
14528 (get_features_xml): Use it to replace "target.xml" and arch_string.
14529
14530 * configure.srv: Remove srv_xmltarget. Add XML files that were
14531 mentioned there to srv_xmlfiles instead. Remove conditional tests
14532 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14533 srv_xmlfiles and srv_regobj to include all possible choices.
14534 * configure.ac (srv_xmltarget): Remove.
14535 (srv_xmlfiles): Do not add "target.xml".
14536 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14537 checks for supplementary target information.
14538 * configure: Regenerate.
14539 * Makefile.in (XML_TARGET): Remove.
14540 (target.xml): Remove rule.
14541 (clean): Do not clean up target.xml.
14542 (.PRECIOUS): Do not mention target.xml.
14543
14544 * target.h (struct target_ops): Remove arch_string member.
14545 * linux-low.c (linux_arch_string): Remove.
14546 (linux_target_ops): Remove arch_string initializer.
14547 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14548 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14549 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14550 * spu-low.c (spu_arch_string): Remove.
14551 (spu_target_ops): Remove arch_string initializer.
14552 * win32-low.c (win32_arch_string): Remove.
14553 (win32_target_ops): Remove arch_string initializer.
14554 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14555 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14556 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14557
14558 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14559
14560 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14561 by collect_ptrace_register and supply_ptrace_register hooks.
14562 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14563 instead of checking for the_low_target.left_pad_xfer.
14564 (usr_store_inferior_registers): Use collect_ptrace_register callback
14565 instead of checking for the_low_target.left_pad_xfer.
14566
14567 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14568 (s390_supply_ptrace_register): Likewise.
14569 (s390_fill_gregset): Call s390_collect_ptrace_register.
14570 (the_low_target): Update.
14571
14572 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14573 (ppc_supply_ptrace_register): Likewise.
14574 (the_low_target): Update.
14575
14576 * linux-i386-low.c (the_low_target): Update.
14577 * linux-x86-64-low.c (the_low_target): Update.
14578
14579 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14580
14581 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14582 reg-s390.o and reg-s390x.o.
14583
14584 * linux-low.c (new_inferior): New global variable.
14585 (linux_create_inferior, linux_attach): Set it.
14586 (linux_wait_for_process): Call the_low_target.arch_setup after the
14587 target has stopped for the first time.
14588 (initialize_low): Do not call the_low_target.arch_setup.
14589
14590 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14591 (s390_set_pc): Likewise.
14592 (s390_arch_setup): New function.
14593 (the_low_target): Use s390_arch_setup as arch_setup routine.
14594
14595 * regcache.c (realloc_register_cache): New function.
14596 (set_register_cache): Call it for each existing regcache.
14597
14598 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14599
14600 * server.h (init_registers): Remove prototype.
14601
14602 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14603 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14604 instead of init_registers ().
14605 * linux-arm-low.c (init_registers_arm): Add prototype.
14606 (init_registers_arm_with_iwmmxt): Likewise.
14607 (the_low_target): Add initializer for arch_setup field.
14608 * linux-cris-low.c (init_registers_cris): Add prototype.
14609 (the_low_target): Add initializer for arch_setup field.
14610 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14611 (the_low_target): Add initializer for arch_setup field.
14612 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14613 (the_low_target): Add initializer for arch_setup field.
14614 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14615 (the_low_target): Add initializer for arch_setup field.
14616 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14617 (the_low_target): Add initializer for arch_setup field.
14618 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14619 (the_low_target): Add initializer for arch_setup field.
14620 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14621 (init_registers_mips64_linux): Likewise.
14622 (the_low_target): Add initializer for arch_setup field.
14623 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14624 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14625 (the_low_target): Add initializer for arch_setup field.
14626 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14627 (init_registers_powerpc_64): Likewise.
14628 (the_low_target): Add initializer for arch_setup field.
14629 * linux-s390-low.c (init_registers_s390): Add prototype.
14630 (init_registers_s390x): Likewise.
14631 (the_low_target): Add initializer for arch_setup field.
14632 * linux-sh-low.c (init_registers_sh): Add prototype.
14633 (the_low_target): Add initializer for arch_setup field.
14634 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14635 (the_low_target): Add initializer for arch_setup field.
14636 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14637 (the_low_target): Add initializer for arch_setup field.
14638
14639 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14640 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14641 instead of init_registers ().
14642 * win32-arm-low.c (init_registers_arm): Add prototype.
14643 (the_low_target): Add initializer for arch_setup field.
14644 * win32-i386-low.c (init_registers_i386): Add prototype.
14645 (the_low_target): Add initializer for arch_setup field.
14646
14647 * spu-low.c (init_registers_spu): Add prototype.
14648 (initialize_low): Call initialie_registers_spu () instead of
14649 initialize_registers ().
14650
14651 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14652
14653 * server.c (handle_v_requests): When handling the vRun and vAttach
14654 packets, if already debugging a process, don't kill it. Return an
14655 error instead.
14656
14657 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14658
14659 * server.c (handle_query): Correct length check.
14660
14661 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14662
14663 * win32-low.c (do_initial_child_stuff): Add process handle
14664 parameter. Set current_process_handle and current_process_id from the
14665 parameters. Clear globals.
14666 (win32_create_inferior): Don't set current_process_handle and
14667 current_process_id here. Instead pass them on the call to
14668 do_initial_child_stuff.
14669 (win32_attach): Likewise.
14670 (win32_clear_inferiors): New.
14671 (win32_kill): Don't close the current process handle or the
14672 current thread handle here. Instead call win32_clear_inferiors.
14673 (win32_detach): Don't open a new handle to the process. Call
14674 win32_clear_inferiors.
14675 (win32_join): Don't rely on current_process_handle; open a new
14676 handle using the process id.
14677 (win32_wait): Call win32_clear_inferiors when the inferior process
14678 has exited.
14679
14680 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14681
14682 * server.c (monitor_show_help): Add "exit".
14683
14684 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14685
14686 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14687 (clean): Add reg-xtensa.c.
14688 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14689 * configure.srv (xtensa*-*-linux*) New target.
14690 * linux-xtensa-low.c: New.
14691 * xtensa-xtregs.c: New.
14692
14693 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14694
14695 * hostio.c: Don't include errno.h.
14696 (errno_to_fileio_errno): Move to hostio-errno.
14697 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14698 error number outputting to the target->hostio_last_error callback.
14699 (hostio_packet_error): Use FILEIO_EINVAL directly.
14700 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14701 calls to hostio_error.
14702 * hostio-errno.c: New.
14703 * server.h (hostio_last_error_from_errno): Declare.
14704 * target.h (target_ops): Add hostio_last_error member.
14705 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14706 as hostio_last_error handler.
14707 * spu-low.c (spu_target_ops): Likewise.
14708 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14709 (wince_hostio_last_error): New functions.
14710 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14711 as hostio_last_error handler.
14712 (win32_target_ops) [!_WIN32_WCE]: Register
14713 hostio_last_error_from_errno as hostio_last_error handler.
14714 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14715 (hostio-errno.o): New rule.
14716 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14717 * configure.srv (srv_hostio_err_objs): New variable. Default to
14718 hostio-errno.o.
14719 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14720 * configure: Regenerate.
14721
14722 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14723
14724 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14725 (linux_kill, linux_detach): Clean up the process list.
14726 * remote-utils.c (remote_open): Improve port number parsing.
14727 (putpkt_binary, input_interrupt): Only send interrupts if the target
14728 is running.
14729 * server.c (extended_protocol): Make static.
14730 (attached): Define earlier.
14731 (exit_requested, response_needed, program_argv): New variables.
14732 (target_running): New.
14733 (start_inferior): Clear attached here.
14734 (attach_inferior): Set attached here.
14735 (require_running): Define.
14736 (handle_query): Use require_running and target_running. Implement
14737 "monitor exit".
14738 (handle_v_attach, handle_v_run): New.
14739 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14740 (gdbserver_usage): Update.
14741 (main): Redo argument parsing. Handle --debug and --multi. Handle
14742 --attach along with other options or after the port. Save
14743 program_argv. Support no initial program. Resynchronize
14744 communication with GDB after an error. Handle "monitor exit".
14745 Use require_running and target_running. Always allow the extended
14746 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14747 restart in extended mode.
14748 * README: Refer to the GDB manual. Update --attach usage.
14749
14750 2007-12-20 Andreas Schwab <schwab@suse.de>
14751
14752 * linux-low.c (STACK_SIZE): Define.
14753 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14754 (linux_test_for_tracefork): Likewise.
14755
14756 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14757
14758 * linux-low.c (linux_wait_for_event): Update messages. Do not
14759 reinsert auto-delete breakpoints.
14760 * mem-break.c (struct breakpoint): Change return type of handler to
14761 int.
14762 (set_breakpoint_at): Update handler type.
14763 (reinsert_breakpoint_handler): Return 1 instead of calling
14764 delete_breakpoint.
14765 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14766 setting a new one.
14767 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14768 * mem-break.h (set_breakpoint_at): Update handler type.
14769 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14770 * win32-low.c (auto_delete_breakpoint): New.
14771 (get_child_debug_event): Use it.
14772
14773 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14774
14775 * configure.ac: Check for pread and pwrite.
14776 * hostio.c (handle_pread): Fall back to lseek and read.
14777 (handle_pwrite): Fall back to lseek and write.
14778 * config.in, configure: Regenerated.
14779
14780 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14781
14782 * server.c (myresume): Add own_buf argument.
14783 (main): Update calls.
14784
14785 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14786
14787 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14788 * remote-utils.c (remote_open): Do not call disable_async_io.
14789 (block_async_io): Delete.
14790 (unblock_async_io): Make static.
14791 (initialize_async_io): New.
14792 * server.c (handle_v_cont): Handle async I/O here.
14793 (myresume): Likewise. Move other common resume tasks here...
14794 (main): ... from here. Call initialize_async_io. Disable async
14795 I/O before the main loop.
14796 * server.h (initialize_async_io): Declare.
14797 (block_async_io, unblock_async_io): Delete prototypes.
14798 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14799
14800 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14801
14802 * remote-utils.c (readchar): Allow binary data in received messages.
14803
14804 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14805
14806 * win32-low.c (attaching): New global.
14807 (win32_create_inferior): Clear the `attaching' global.
14808 (win32_attach): Set the `attaching' global.
14809 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14810 attaching. Only set a breakpoint at the entry point if not
14811 attaching.
14812
14813 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14814
14815 * server.c (main): Don't report dll events on the initial
14816 connection on attaches.
14817
14818 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14819
14820 * server.c (main): Relax numerical bases supported for the pid of
14821 the --attach command line argument.
14822
14823 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14824
14825 * win32-low.c (win32_attach): Call OpenProcess before
14826 DebugActiveProcess, not after. Add last error output to error
14827 call.
14828
14829 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14830
14831 * win32-low.c (win32_get_thread_context)
14832 (win32_set_thread_context): New functions.
14833 (thread_rec): Use win32_get_thread_context.
14834 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14835 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14836 field.
14837
14838 2007-12-03 Leo Zayas
14839 Pedro Alves <pedro_alves@portugalmail.pt>
14840
14841 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14842 global variables.
14843 (child_add_thread): Minor cleanup.
14844 (child_continue): Resume artificially suspended threads before
14845 calling ContinueDebugEvent.
14846 (suspend_one_thread): New.
14847 (fake_breakpoint_event): New.
14848 (get_child_debug_event): Change return type to int. Check here if
14849 gdb sent an interrupt request. If a soft interrupt was requested,
14850 fake a breakpoint event. Return 0 if there is no event to handle,
14851 and 1 otherwise.
14852 (win32_wait): Don't check here if gdb sent an interrupt request.
14853 Ensure there is a valid event to handle.
14854 (win32_request_interrupt): Add soft interruption method as last
14855 resort.
14856
14857 2007-12-03 Leo Zayas
14858 Pedro Alves <pedro_alves@portugalmail.pt>
14859
14860 * win32-low.h (win32_thread_info): Add descriptions to the
14861 structure members. Replace `suspend_count' counter by a
14862 `suspended' flag.
14863 * win32-low.c (thread_rec): Update condition of when to get the
14864 context from the inferior. Rely on ContextFlags being set if it
14865 has already been retrieved. Only suspend the inferior thread if
14866 we haven't already. Warn if that fails.
14867 (continue_one_thread): s/suspend_count/suspended/. Only call
14868 ResumeThread once. Warn if that fails.
14869
14870 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14871
14872 * win32-low.c (win32_wait): Don't read from the inferior when it
14873 has already exited.
14874
14875 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14876
14877 * Makefile.in (win32_low_h): New variable.
14878 (win32-low.o): Add dependency on $(win32_low_h).
14879 (win32-arm-low.o, win32-i386-low.o): New rules.
14880
14881 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14882
14883 * hostio.c: Correct copyright year.
14884
14885 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14886
14887 * Makefile.in (OBS): Add hostio.o.
14888 (hostio.o): New rule.
14889 * server.h (handle_vFile): Declare.
14890 * hostio.c: New file.
14891 * server.c (handle_v_requests): Take packet_len and new_packet_len
14892 for binary packets. Call handle_vFile.
14893 (main): Update call to handle_v_requests.
14894
14895 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14896
14897 * linux-low.c: Include <sched.h>.
14898
14899 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14900
14901 * linux-low.c (linux_tracefork_grandchild): New.
14902 (linux_tracefork_child): Use clone.
14903 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14904
14905 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14906
14907 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14908
14909 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14910
14911 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14912
14913 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14914
14915 * inferiors.c (change_inferior_id): Delete.
14916 (add_pid_to_list, pull_pid_from_list): New.
14917 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14918 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14919 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14920 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14921 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14922 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14923 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14924 (using_threads): Always set to 1.
14925 (handle_extended_wait): New.
14926 (add_process): Do not set TID.
14927 (linux_create_inferior): Set must_set_ptrace_flags.
14928 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14929 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14930 (linux_thread_alive): Rename TID argument to LWPID.
14931 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14932 (linux_wait_for_event): Do not use TID or check using_threads. Update
14933 call to dead_thread_notify. Call handle_extended_wait.
14934 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14935 (send_sigstop): Delete sigstop_sent.
14936 (wait_for_sigstop): Avoid TID.
14937 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14938 (linux_test_for_tracefork): New.
14939 (linux_lookup_signals): Use thread_db_active and
14940 linux_supports_tracefork_flag.
14941 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14942 * linux-low.h (get_process_thread): Avoid TID.
14943 (struct process_ifo): Move thread_known and tid to the end. Remove
14944 sigstop_sent.
14945 (linux_attach_lwp, thread_db_init): Update prototypes.
14946 * server.h (change_inferior_id): Delete prototype.
14947 (add_pid_to_list, pull_pid_from_list): New prototypes.
14948 * thread-db.c (thread_db_use_events): New.
14949 (find_first_thread): Rename to...
14950 (find_one_thread): ...this. Update callers and messages. Do not
14951 call fatal. Check thread_db_use_events. Do not call
14952 change_inferior_id or new_thread_notify.
14953 (maybe_attach_thread): Update. Do not call new_thread_notify.
14954 (thread_db_init): Set thread_db_use_events. Check use_events.
14955 * utils.c (fatal, warning): Correct message prefix.
14956
14957 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14958
14959 * Makefile.in (clean): Remove new files.
14960 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14961 (powerpc-64.o, powerpc-64.c): New rules.
14962 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14963 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14964 with SPE.
14965 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14966 SPE targets.
14967 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14968 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14969 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14970 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14971 (target_regsets): Add AltiVec and SPE register sets.
14972 * configure.ac: Check for AltiVec and SPE.
14973 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14974 (ppc_fill_vrregset, ppc_store_vrregset): New.
14975 (target_regsets): Add AltiVec register set.
14976 * configure: Regenerated.
14977
14978 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14979
14980 * linux-low.c (O_LARGEFILE): Define.
14981 (linux_read_memory): Use /proc/PID/mem.
14982 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14983 * configure, config.in: Regenerated.
14984
14985 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14986
14987 * linux-low.c (linux_wait_for_event): Do not pass signals while
14988 single-stepping.
14989
14990 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14991
14992 * win32-low.c (create_process): New.
14993 (win32_create_inferior): Use create_process instead of
14994 CreateProcess. If create_process failed retry appending an ".exe"
14995 suffix. Store the GetLastError result immediatelly after
14996 create_process calls and use it on the call to error.
14997
14998 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14999
15000 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15001
15002 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15003
15004 * configure.ac: Switch license to GPLv3.
15005
15006 2007-08-01 Michael Snyder <msnyder@access-company.com>
15007
15008 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15009
15010 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15011
15012 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15013 typedef.
15014 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15015 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15016 CloseToolhelp32Snapshot.
15017 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15018 CloseToolhelp32Snapshot.
15019
15020 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15021
15022 * server.c (main): Check for inferior exit before main loop.
15023
15024 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15025
15026 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15027 instead of on tmp_desc.
15028
15029 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15030 Daniel Jacobowitz <dan@codesourcery.com>
15031
15032 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15033 (add_thread): Minor cleanups.
15034 (clear_inferiors): Move lower in the file. Clear the DLL
15035 list.
15036 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15037 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15038 (xml_escape_text): New.
15039 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15040 for qSupported.
15041 (handle_v_cont): Report errors.
15042 (gdbserver_version): Update.
15043 (main): Correct size of own_buf. Do not report initial DLL events.
15044 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15045 (unloaded_dll, xml_escape_text): New.
15046 * win32-low.c (enum target_waitkind): Update comments.
15047 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15048 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15049 (win32_EnumProcessModules, win32_GetModuleInformation)
15050 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15051 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15052 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15053 (win32_Module32First, win32_Module32Next, load_toolhelp)
15054 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15055 (get_child_debug_event): Handle DLL events.
15056 (win32_wait): Likewise.
15057
15058 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15059
15060 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15061 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15062
15063 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15064
15065 * win32-low.c (handle_output_debug_string): Ignore event if not
15066 waiting.
15067
15068 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15069
15070 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15071
15072 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15073
15074 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15075
15076 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15077
15078 * inferiors.c (change_inferior_id): Add comment.
15079 * linux-low.c (check_removed_breakpoint): Add an early
15080 prototype. Improve debug output.
15081 (linux_attach): Doc update.
15082 (linux_detach_one_process, linux_detach): Clean up before releasing
15083 each process.
15084 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15085 * linux-low.h (struct process_info): Doc improvement.
15086 * mem-break.c (delete_all_breakpoints): New.
15087 * mem-break.h (delete_all_breakpoints): New prototype.
15088 * thread-db.c (find_first_thread): New.
15089 (thread_db_create_event): Call it instead of
15090 thread_db_find_new_threads. Clean up unused variables.
15091 (maybe_attach_thread): Remove first thread handling.
15092 (thread_db_find_new_threads): Use find_first_thread.
15093 (thread_db_get_tls_address): Likewise.
15094
15095 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15096
15097 * thread-db.c (thread_db_find_new_threads): Add prototype.
15098 (thread_db_create_event): Check for the main thread before adding
15099 a new thread.
15100 (maybe_attach_thread): Only enable event reporting if TID == 0.
15101 (thread_db_get_tls_address): Check for new threads.
15102
15103 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15104
15105 * linux-low.c (linux_create_inferior): Try execv before execvp.
15106 * spu-low.c (spu_create_inferior): Likewise.
15107
15108 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15109
15110 * linux-low.c (linux_create_inferior): Change execv to execvp.
15111 * spu-low.c (spu_create_inferior): Likewies.
15112
15113 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15114
15115 * Makefile.in (clean): Clean new files instead of deleted ones.
15116 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15117 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15118 rules.
15119 * configure.srv: Specify XML files and new regformats for MIPS and
15120 MIPS64 GNU/Linux.
15121 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15122 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15123 an entry for the restart register.
15124 (mips_cannot_fetch_register, mips_cannot_store_register)
15125 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15126 register names to match the XML descriptions.
15127 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15128 restart register instead of $0.
15129
15130 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15131 Markus Deuling <deuling@de.ibm.com>
15132
15133 * remote-utils.c (decode_xfer_write): New function.
15134 * server.h (decode_xfer_write): Add prototype.
15135 * server.c (handle_query): Add PACKET_LEN argument. Support
15136 qXfer:spu:read and qXfer:spu:write packets.
15137 (main): Pass packet_len to handle_query.
15138 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15139 * target.h (target_ops): Add qxfer_spu.
15140
15141 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15142
15143 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15144 accessing non-seekable spufs files.
15145
15146 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15147
15148 * server.c (handle_query): Add reply for qC packet.
15149
15150 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15151 Leo Zayas <lerele@champenstudios@com>
15152
15153 * server.h (check_remote_input_interrupt_request): New function.
15154 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15155 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15156 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15157 (check_remote_input_interrupt_request): New function.
15158 * server.h (check_remote_input_interrupt_request): Declare.
15159 * win32-low.c (winapi_DebugBreakProcess,
15160 winapi_GenerateConsoleCtrlEvent): New typedefs.
15161 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15162 to 250 ms.
15163 (win32_wait): Check for remote interrupt request
15164 with check_remote_input_interrupt_request.
15165 (win32_request_interrupt): New function.
15166 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15167
15168 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15169
15170 * win32-low.c (debug_registers_changed,
15171 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15172 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15173 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15174 (thread_rec): Get context using the low target.
15175 (child_add_thread): Call thread_added on the low target,
15176 which does the same thing.
15177 (regptr): Delete.
15178 (do_initial_child_stuff): Remove debug registers references.
15179 Set context using the low target. Resume threads after
15180 setting the contexts.
15181 (child_continue): Remove dead variable. Remove debug
15182 registers references.
15183 (child_fetch_inferior_registers): Go through the low target.
15184 (do_child_store_inferior_registers): Remove.
15185 (child_store_inferior_registers): Go through the low target.
15186 (win32_resume): Remove debug registers references.
15187 Set context using the low target.
15188 (handle_exception): Change return type to void. Don't record
15189 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15190 first chance exception.
15191 (get_child_debug_event): Change return type to void. Remove
15192 goto loop. Always return after waiting for debug event.
15193 (win32_wait): Convert to switch statement. Handle spurious
15194 events.
15195
15196 * win32-i386-low.c (debug_registers_changed,
15197 debug_registers_used): New.
15198 (initial_stuff): Rename to ...
15199 (i386_initial_stuff): ... this. Clear debug registers
15200 state variables.
15201 (store_debug_registers): Delete.
15202 (i386_get_thread_context): New.
15203 (load_debug_registers): Delete.
15204 (i386_set_thread_context): New.
15205 (i386_thread_added): New.
15206 (single_step): Rename to ...
15207 (i386_single_step): ... this.
15208 (do_fetch_inferior_registers): Rename to ...
15209 (i386_fetch_inferior_register): ... this.
15210 (i386_store_inferior_register): New.
15211 (the_low_target): Adapt to new interface.
15212
15213 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15214 (arm_get_thread_context): New.
15215 (arm_set_thread_context): New.
15216 (regptr): New.
15217 (do_fetch_inferior_registers): Rename to ...
15218 (arm_fetch_inferior_register): ... this.
15219 (arm_store_inferior_register): New.
15220 (arm_wince_breakpoint): Reimplement as unsigned long.
15221 (arm_wince_breakpoint_len): Define.
15222 (the_low_target): Adapt to new interface.
15223
15224 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15225 load_debug_registers. Add get_thread_context, set_thread_context,
15226 thread_added and store_inferior_register. Rename
15227 fetch_inferior_registers to fetch_inferior_register.
15228 (regptr): Remove declaration.
15229
15230 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15231
15232 * linux-low.c (linux_detach): Change return type to int. Return 0.
15233 * spu-low.c (spu_detach): Likewise.
15234
15235 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15236
15237 * target.h (target_ops): Change return type of detach to int.
15238 Add join.
15239 (join_inferior): New.
15240 * server.c (main): Don't skip detach support on mingw32.
15241 If the inferior doesn't support detaching return error.
15242 Call join_inferior instead of using waitpid.
15243 * linux-low.c (linux_join): New.
15244 (linux_target_op): Add linux_join.
15245 * spu-low.c (spu_join): New.
15246 (spu_target_ops): Add spu_join.
15247 * win32-low.c (win32_detach): Adapt to new interface.
15248 Reopen current_process_handle before detaching. Issue a child
15249 resume before detaching.
15250 (win32_join): New.
15251 (win32_target_op): Add win32_join.
15252
15253 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15254
15255 * win32-low.c (win32-attach): Fix return value.
15256 * target.h (target_ops): Describe ATTACH return values.
15257
15258 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15259
15260 * win32-low.c (GETPROCADDRESS): Define.
15261 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15262 (winapi_DebugSetProcessKillOnExit): Likewise.
15263 (win32_create_inferior): Force usage of ansi CreateProcessA.
15264 (win32_attach): Use GETPROCADDRESS.
15265 (win32_detach): Likewise.
15266
15267 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15268
15269 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15270
15271 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15272
15273 * win32-low.c: Commit leftover changes from 2007-03-29.
15274
15275 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15276
15277 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15278 fields short instead of int. Add explicit padding.
15279 (i387_cache_to_fsave): Remove unnecessary casts.
15280 (i387_fsave_to_cache): Doc fix.
15281 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15282
15283 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15284
15285 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15286 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15287
15288 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15289
15290 * configure.srv (arm*-*-mingw32ce*): Move near the other
15291 arm targets.
15292
15293 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15294
15295 * configure.ac: Add errno checking.
15296 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15297 sys/file.h and malloc.h.
15298 (AC_CHECK_DECLS): Add perror.
15299 (srv_mingwce): Handle.
15300 * configure.srv (i[34567]86-*-cygwin*): Add
15301 win32-i386-low.o to srv_tgtobj.
15302 (i[34567]86-*-mingw*): Likewise.
15303 (arm*-*-mingw32ce*): Add case.
15304 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15305 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15306 [__MINGW32CE__] (strerror): New function.
15307 [__MINGW32CE__] (errno): Define to GetLastError.
15308 [__MINGW32CE__] (COUNTOF): New macro.
15309 (remote_open): Remove extra close call.
15310 * mem-break.c (delete_breakpoint_at): New function.
15311 * mem-break.h (delete_breakpoint_at): Declare.
15312 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15313 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15314 [USE_WIN32API] (read, write): Add char* casts.
15315 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15316 * server.h: Include wincecompat.h on Windows CE.
15317 [HAVE_ERRNO_H]: Check.
15318 (perror): Declare if not declared.
15319 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15320 (perror_with_name): Remove errno declaration.
15321 * wincecompat.h: New.
15322 * wincecompat.c: New.
15323 * win32-low.h: New.
15324 * win32-arm-low.c: New.
15325 * win32-i386-low.c: New.
15326 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15327 (OUTMSG2): Make it safe.
15328 (_T): New macro.
15329 (COUNTOF): New macro.
15330 (NUM_REGS): Get it from the low target.
15331 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15332 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15333 (thread_rec): Let low target handle debug registers.
15334 (child_add_thread): Likewise.
15335 (child_init_thread_list): Likewise.
15336 (continue_one_thread): Likewise.
15337 (regptr): New.
15338 (do_child_fetch_inferior_registers): Move to ...
15339 * win32-i386-low.c: ... here, and rename to ...
15340 (do_fetch_inferior_registers): ... this.
15341 * win32-low.c (child_fetch_inferior_registers):
15342 Go through the low target.
15343 (do_child_store_inferior_registers): Use regptr.
15344 (strwinerror): New function.
15345 (win32_create_inferior): Handle Windows CE.
15346 Use strwinerror instead of strerror on Windows error
15347 codes. Add program to the error output.
15348 Don't close the main thread handle on Windows CE.
15349 (win32_attach): Use coredll.dll on Windows CE.
15350 (win32_kill): Close current process and current
15351 thread handles.
15352 (win32_detach): Use coredll.dll on Windows CE.
15353 (win32_resume): Let low target handle debug registers, and
15354 step request.
15355 (handle_exception): Add/Remove initial breakpoint. Avoid
15356 non-existant WSTOPSIG on Windows CE.
15357 (win32_read_inferior_memory): Cast to remove warning.
15358 (win32_arch_string): Go through the low target.
15359 (initialize_low): Call set_breakpoint_data with the low
15360 target's breakpoint.
15361 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15362 FOP_REGNUM, mappings): Move to ...
15363 * win32-i386-low.c: ... here.
15364 * win32-low.c (win32_thread_info): Move to ...
15365 * win32-low.h: ... here.
15366 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15367 win32-arm-low.c and wincecompat.c.
15368 (all:): Add $EXEEXT.
15369 (install-only:): Likewise.
15370 (gdbserver:): Likewise.
15371 (gdbreplay:): Likewise.
15372 * config.in: Regenerate.
15373 * configure: Regenerate.
15374
15375 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15376
15377 * win32-low.c: Rename typedef thread_info to
15378 win32_thread_info throughout.
15379
15380 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15381
15382 * win32-i386-low.c: Rename to ...
15383 * win32-low.c: ... this.
15384 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15385 * Makefile.in: Likewise.
15386
15387 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15388
15389 * remote-utils.c (monitor_output): Constify msg parameter.
15390 * server.h (monitor_output): Likewise.
15391 * win32-i386-low.c (handle_output_debug_string): New.
15392 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15393 handle_output_debug_string.
15394 (get_child_debug_event): Likewise.
15395
15396 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15397
15398 * server.c (main): Correct strtoul check.
15399
15400 2007-03-27 Jon Ringle <jon@ringle.org>
15401
15402 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15403
15404 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15405
15406 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15407
15408 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15409
15410 * terminal.h: Check HAVE_SGTTY_H.
15411
15412 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15413
15414 * remote-utils.c (remote_open): Print out the assigned port number.
15415
15416 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15417
15418 * remote-utils.c (monitor_output): New function.
15419 * server.c (debug_threads): Define here.
15420 (monitor_show_help): New function.
15421 (handle_query): Handle qRcmd.
15422 (main): Do not handle 'd' packet.
15423 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15424 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15425 of debug_threads.
15426
15427 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15428
15429 * Makefile.in (EXEEXT): New.
15430 (clean): Use $(EXEEXT).
15431
15432 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15433
15434 * target.h (target_ops): Rename send_signal to request_interrupt,
15435 and remove enum target_signal parameter.
15436 * linux-low.c (linux_request_interrupt): Rename from
15437 linux_send_signal, and always send SIGINT.
15438 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15439 and always send SIGINT.
15440 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15441 of send_signal.
15442 (input_interrupt): Likewise.
15443
15444 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15445
15446 * server.c (get_features_xml): Check if target implemented
15447 arch_string.
15448 * win32-i386-low.c (win32_arch_string): New.
15449 (win32_target_ops): Add win32_arch_string as arch_string member.
15450
15451 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15452
15453 * spu-low.c (spu_arch_string): New.
15454 (spu_target_ops): Add spu_arch_string.
15455
15456 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15457
15458 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15459 * configure.ac: Do not check for terminal.h.
15460 * configure, config.in: Regenerated.
15461
15462 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15463
15464 * Makefile.in (OBS): Add $(XML_BUILTIN).
15465 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15466 (clean): Update.
15467 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15468 (arm-with-iwmmxt.c): New.
15469 * config.in, configure: Regenerate.
15470 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15471 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15472 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15473 (arm*-*-linux*): Add iWMMXt and regset support.
15474 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15475 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15476 (arm_store_wmmxregset, target_regsets): New.
15477 * server.c (get_features_xml): Take annex argument. Check builtin
15478 XML documents.
15479 (handle_query): Handle multiple annexes.
15480
15481 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15482
15483 * remote-utils.c [USE_WIN32API] (read, write): Define.
15484 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15485 write.
15486
15487 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15488
15489 * linux-i386-low.c (the_low_target): Set arch_string.
15490 * linux-x86-64-low.c (the_low_target): Likewise.
15491 * linux-low.c (linux_arch_string): New.
15492 (linux_target_ops): Add it.
15493 * linux-low.h (struct linux_target_ops): Add arch_string.
15494 * server.c (write_qxfer_response): Use const void * for DATA.
15495 (get_features_xml): New.
15496 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15497 * target.h (struct target_ops): Add arch_string method.
15498
15499 2007-01-03 Denis Pilat <denis.pilat@st.com>
15500 Daniel Jacobowitz <dan@codesourcery.com>
15501
15502 * linux-low.c (linux_kill): Handle being called with no threads.
15503 * win32-i386-low.c (win32_kill): Likewise.
15504 (get_child_debug_event): Clear current_process_handle.
15505
15506 2006-12-30 Denis PILAT <denis.pilat@st.com>
15507 Daniel Jacobowitz <dan@codesourcery.com>
15508
15509 * remote-utils.c (remote_open): Check the type of specified
15510 serial port devices before opening them.
15511 * server.c (main): Kill the inferior if an error occurs during
15512 the first remote_open.
15513
15514 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15515
15516 * README: Update supported targets.
15517
15518 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15519
15520 * Makefile.in (clean): Remove reg-mips64.c.
15521 (reg-mips64.c, reg-mips64.o): New rules.
15522 * configure.srv: Handle mips64. Include regset support for mips.
15523 * linux-mips-low.c (union mips_register): New.
15524 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15525 (mips_breakpoint, mips_breakpoint_at): Use int.
15526 (mips_collect_register, mips_supply_register)
15527 (mips_collect_register_32bit, mips_supply_register_32bit)
15528 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15529 (mips_store_fpregset, target_regsets): New.
15530 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15531
15532 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15533
15534 * configure.srv: Add target "spu*-*-*".
15535 * Makefile.in (clean): Remove reg-spu.c.
15536 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15537 * spu-low.c: New file.
15538
15539 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15540
15541 * configure.ac: Correct td_thr_tls_get_addr test.
15542 * configure: Regenerated.
15543
15544 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15545
15546 * linux-low.c (linux_wait_for_event): Reformat. Use the
15547 pass_signals array.
15548 * remote-utils.c (decode_address_to_semicolon): New.
15549 * server.c (pass_signals, handle_general_set): New.
15550 (handle_query): Mention QPassSignals for qSupported.
15551 (main): Call handle_general_set.
15552 * server.h (pass_signals, decode_address_to_semicolon): New.
15553
15554 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15555
15556 * server.c (handle_query): Correct error handling for read_auxv.
15557
15558 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15559
15560 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15561 and srv_linux_thread_db to yes.
15562 * linux-s390-low.c (s390_fill_gregset): New function.
15563 (target_regsets): Define data structure.
15564
15565 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15566
15567 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15568 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15569 * config.in, configure: Regenerated.
15570 * inferiors.c (gdb_id_to_thread): New function.
15571 (gdb_id_to_thread_id): Use it.
15572 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15573 * linux-low.h (struct process_info): Add th member.
15574 (thread_db_get_tls_address): New prototype.
15575 * remote-utils.c (decode_address): Make non-static.
15576 * server.c (handle_query): Handle qGetTLSAddr.
15577 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15578 * target.h (struct target_ops): Add get_tls_address.
15579 * thread-db.c (maybe_attach_thread): Save the thread handle.
15580 (thread_db_get_tls_address): New.
15581
15582 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15583
15584 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15585 (linux_resume_one_process): Take a siginfo_t *. Update all
15586 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15587 (struct pending_signals): Add a siginfo_t.
15588 (linux_wait_for_process): Always set last_status.
15589 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15590 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15591 * linux-low.h (struct process_info): Add last_status.
15592
15593 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15594
15595 * remote-utils.c (try_rle): New function.
15596 (putpkt_binary): Use it.
15597
15598 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15599
15600 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15601 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15602 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15603 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15604 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15605 point registers.
15606
15607 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15608
15609 * server.c (terminal_fd): New variable.
15610 (old_foreground_pgrp): Likewise.
15611 (restore_old_foreground_pgrp): New function.
15612 (start_inferior): Record the terminal file descriptor in terminal_fd
15613 and its original foreground group in old_foreground_pgrp. Register
15614 restore_old_foreground_pgrp with atexit().
15615
15616 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15617
15618 * server.c (handle_query): Correct qPart to qXfer.
15619
15620 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15621
15622 * configure.ac: Check for more headers which are missing on
15623 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15624 * configure.srv: Add Cygwin and mingw32.
15625 * remote-utils.c: Don't include headers unconditionally which
15626 are missing on mingw32. Include <winsock.h> for mingw32.
15627 (remote_open): Adjust for mingw32 support. Flush
15628 standard error after writing to it.
15629 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15630 (unblock_async_io, enable_async_io, disable_async_io)
15631 (readchar, getpkt): Update for Winsock support.
15632 (prepare_resume_reply): Expect a protocol signal number.
15633 * server.c: Disable <sys/wait.h> on mingw32.
15634 (start_inferior): Adjust for mingw32 support. Flush
15635 standard error after writing to it.
15636 (attach_inferior): Likewise. Use protocol signal
15637 numbers.
15638 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15639 and names.
15640 * win32-i386-low.c: New file.
15641 * Makefile.in (XM_CLIBS): Set.
15642 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15643 (win32-i386-low.o): New dependency rule.
15644 * linux-low.c (linux_wait): Use target signal numbers.
15645 * target.h (struct target_ops): Doc fix.
15646 * server.h (target_signal_to_name): New prototype.
15647 * gdbreplay.c: Don't include headers unconditionally which
15648 are missing on mingw32. Include <winsock.h> for mingw32.
15649 (remote_close, remote_open): Adjust for Winsock support.
15650 * configure, config.in: Regenerated.
15651
15652 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15653
15654 * server.c (decode_xfer_read, write_qxfer_response): New.
15655 (handle_query): Take a packet length argument. Handle
15656 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15657 the qSupported response.
15658 (main): Update call to handle_query.
15659
15660 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15661
15662 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15663 (putpkt_binary): Renamed from putpkt and adjusted for binary
15664 data.
15665 (putpkt): New wrapper for putpkt_binary.
15666 (readchar): Don't mask off the high bit.
15667 (decode_X_packet): New function.
15668 * server.c (main): Call putpkt_binary if a handler sets the packet
15669 length. Save the length of the incoming packet. Handle 'X'.
15670 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15671
15672 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15673
15674 * server.c (handle_query): Handle qSupported.
15675
15676 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15677
15678 * remote-utils.c (all_symbols_looked_up): New variable.
15679 (look_up_one_symbol): Check it.
15680 * server.h (look_up_one_symbol): New declaration.
15681 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15682
15683 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15684
15685 * Makefile.in (linux-arm-low.o): Update dependencies.
15686 * linux-arm-low.c: Include "gdb_proc_service.h".
15687 (PTRACE_GET_THREAD_AREA): Define.
15688 (ps_get_thread_area): New function.
15689
15690 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15691
15692 * configure.srv (m68k*-*-uclinux*): New target.
15693 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15694 (linux_resume_one_process): Remove extraneous cast.
15695 (linux_read_offsets): New.
15696 (linux_target_op): Add linux_read_offsets on mmuless systems.
15697 * server.c (handle_query): Add qOffsets logic.
15698 * target.h (struct target_ops): Add read_offsets.
15699
15700 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15701
15702 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15703 (PTRACE_GET_THREAD_AREA): Define.
15704 (ps_get_thread_area): New function.
15705 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15706 (linux-x86-64-low.o): Update.
15707
15708 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15709
15710 * configure.ac: Remove checks for prfpregset_t.
15711 * gdb_proc_service.h: New file.
15712 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15713 new "gdb_proc_service.h".
15714 * proc-service.c: Likewise.
15715 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15716 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15717 * Makefile.in (gdb_proc_service_h): Updated.
15718 * configure, config.in: Regenerated.
15719
15720 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15721
15722 * remote-utils.c (prepare_resume_reply): Move declaration
15723 of gdb_id_from_wait to the top of the block.
15724
15725 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15726
15727 * linux-low.c (regsets_store_inferior_registers): Read the regset
15728 from the target before filling it.
15729
15730 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15731
15732 * server.c (attach_inferior): Return SIGTRAP for a successful
15733 attach.
15734
15735 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15736
15737 * Makefile.in (OBS): Add version.o.
15738 (STAGESTUFF): Delete.
15739 (version.o): Add dependencies.
15740 (version.c): Replace rule.
15741 (clean): Remove version.c.
15742 * server.c (gdbserver_version): New.
15743 (gdbserver_usage): Use printf.
15744 (main): Handle --version and --help.
15745 * server.h (version, host_name): Add declarations.
15746
15747 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15748
15749 * linux-arm-low.c:
15750 * linux-arm-low.c:
15751 * inferiors.c:
15752 * i387-fp.h:
15753 * i387-fp.c:
15754 * gdbreplay.c:
15755 * regcache.c:
15756 * proc-service.c:
15757 * mem-break.h:
15758 * mem-break.c:
15759 * linux-x86-64-low.c:
15760 * linux-sh-low.c:
15761 * linux-s390-low.c:
15762 * linux-ppc64-low.c:
15763 * linux-ppc-low.c:
15764 * linux-mips-low.c:
15765 * linux-m68k-low.c:
15766 * linux-m32r-low.c:
15767 * linux-low.h:
15768 * linux-low.c:
15769 * linux-ia64-low.c:
15770 * linux-i386-low.c:
15771 * linux-crisv32-low.c:
15772 * thread-db.c:
15773 * terminal.h:
15774 * target.h:
15775 * target.c:
15776 * server.h:
15777 * server.c:
15778 * remote-utils.c:
15779 * regcache.h:
15780 * utils.c:
15781 * Makefile.in:
15782 * configure.ac:
15783 * gdbserver.1: Add (C) after Copyright. Update the FSF
15784 address.
15785
15786 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15787
15788 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15789 (arm_breakpoint_at): Recognize both breakpoints.
15790 (the_low_target): Use the correct breakpoint instruction.
15791
15792 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15793
15794 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15795 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15796 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15797 (the_low_target): Update.
15798
15799 2005-10-25 Andreas Schwab <schwab@suse.de>
15800
15801 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15802
15803 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15804 (ia64_num_regs): Reduce to 462.
15805
15806 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15807
15808 * acinclude.m4: Correct quoting.
15809 * aclocal.m4: Regenerated.
15810
15811 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15812 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15813 (thread_db_init): Call thread_db_err_str.
15814 * configure.ac: Check for TD_VERSION.
15815 * config.in, configure: Regenerated.
15816
15817 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15818
15819 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15820
15821 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15822
15823 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15824 is not available. Define HAVE_PTRACE_GETREGS if it is.
15825 * config.in, configure: Regenerated.
15826 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15827 * linux-i386-low.c, linux-m68k-low.c: Update to use
15828 HAVE_PTRACE_GETREGS.
15829 * linux-low.c (regsets_fetch_inferior_registers)
15830 (regsets_store_inferior_registers): Only return 0 if we processed
15831 GENERAL_REGS.
15832 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15833 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15834
15835 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15836
15837 * inferiors.c (struct thread_info): Add gdb_id.
15838 (add_thread): Add gdb_id argument.
15839 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15840 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15841 calls to add_thread.
15842 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15843 * server.c (handle_query): Use thread_to_gdb_id.
15844 (handle_v_cont, main): Use gdb_id_to_thread_id.
15845 * server.h (add_thread): Update prototype.
15846 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15847 prototypes.
15848
15849 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15850
15851 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15852 left-padded registers.
15853 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15854 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15855
15856 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15857
15858 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15859 * configure: Regenerate.
15860 * config.in: Regenerate.
15861 * server.h (NEED_DECLARATION_STRERROR):
15862 Replace with !HAVE_DECL_STRERROR.
15863
15864 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15865
15866 * linux-low.c (linux_wait, linux_send_signal): Don't test
15867 an unsigned long variable for > 0 if it could be MAX_ULONG.
15868 * server.c (myresume): Likewise.
15869 * target.c (set_desired_inferior): Likewise.
15870
15871 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15872
15873 * configure.ac: Simplify and improve check for socklen_t.
15874 * configure, config.in: Regenerate.
15875
15876 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15877
15878 * acconfig.h: Remove.
15879 * configure.ac: Add a test for socklen_t. Use three-argument
15880 AC_DEFINE throughout.
15881 * config.in: Regenerated using autoheader 2.59.
15882 * configure: Regenerated.
15883
15884 * gdbreplay.c (socklen_t): Provide a default.
15885 (remote_open): Use socklen_t.
15886 * remote-utils.c (socklen_t): Provide a default.
15887 (remote_open): Use socklen_t.
15888 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15889 unsigned char.
15890
15891 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15892 char for buffers.
15893 * linux-low.c (linux_read_memory, linux_write_memory)
15894 (linux_read_auxv): Likewise.
15895 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15896 (check_mem_write): Likewise.
15897 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15898 Likewise.
15899 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15900 (registers_from_string, register_data): Likewise.
15901 * server.c (handle_query, main): Likewise.
15902 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15903 (decode_M_packet): Likewise.
15904 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15905 * target.h (struct target_ops): Update read_memory, write_memory,
15906 and read_auxv.
15907 (read_inferior_memory, write_inferior_memory): Update.
15908 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15909 to unsigned char *.
15910 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15911 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15912 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15913 linux-s390-low.c, linux-sh-low.c: Update for changes in
15914 read_inferior_memory and the_low_target->breakpoint.
15915
15916 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15917
15918 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15919 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15920 * configure.srv: Add powerpc64-*-linux*.
15921 * linux-ppc64-low.c: New file.
15922
15923 2005-05-23 Orjan Friberg <orjanf@axis.com>
15924
15925 * linux-cris-low.c: New file with support for CRIS.
15926 * linux-crisv32-low.c: Ditto for CRISv32.
15927 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15928 (clean): Add reg-cris.c and reg-crisv32.c.
15929 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15930 reg-crisv32.o, and reg-crisv32.c to make rules.
15931 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15932 recognized targets.
15933
15934 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15935
15936 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15937 of sizeof (PTRACE_XFER_TYPE).
15938 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15939
15940 2005-05-12 Orjan Friberg <orjanf@axis.com>
15941
15942 * target.h (struct target_ops): Add insert_watchpoint,
15943 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15944 pointers for hardware watchpoint support.
15945 * linux-low.h (struct linux_target_ops): Ditto.
15946 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15947 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15948 to linux_target_ops.
15949 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15950 reply packet.
15951 * server.c (main): Recognize 'Z' and 'z' packets.
15952
15953 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15954
15955 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15956 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15957 (the_low_target): Add new members.
15958
15959 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15960
15961 * proc-service.c (ps_lgetregs): Search all_processes instead of
15962 all_threads.
15963
15964 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15965
15966 * server.c (start_inferior): Change return type to int.
15967 (attach_inferior): Change sigptr to int *.
15968 (handle_v_cont, handle_v_requests): Change signal to int *.
15969 (main): Change signal to int.
15970
15971 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15972
15973 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15974 * configure.srv: Add m32r*-*-linux*.
15975 * linux-m32r-low.c: New file.
15976
15977 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15978
15979 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15980
15981 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15982
15983 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15984 Take unsigned long arguments for PIDs.
15985 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15986 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15987 (wait_for_sigstop, linux_resume_one_process)
15988 (regsets_fetch_inferior_registers, linux_send_signal)
15989 (linux_read_auxv): Likewise. Update the types of variables holding
15990 PIDs. Update format string specifiers.
15991 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15992 * remote-utils.c (prepare_resume_reply): Likewise.
15993 * server.c (cont_thread, general_thread, step_thread)
15994 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15995 unsigned long.
15996 (handle_query): Update format specifiers.
15997 (handle_v_cont, main): Use strtoul for thread IDs.
15998 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15999 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16000 (general_thread, step_thread, thread_from_wait)
16001 (old_thread_from_wait): Update.
16002 * target.h (struct thread_resume): Use unsigned long for THREAD.
16003 (struct target_ops): Use unsigned long for arguments to attach and
16004 thread_alive.
16005
16006 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16007
16008 * acinclude.m4: Include bfd/bfd.m4 directly.
16009 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16010 <agriffis@toolchain.org>.
16011 * aclocal.m4, configure: Regenerated.
16012
16013 2005-01-07 Andrew Cagney <cagney@gnu.org>
16014
16015 * configure.ac: Rename configure.in, require autoconf 2.59.
16016 * configure: Re-generate.
16017
16018 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16019
16020 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16021 LIBS when finished.
16022 * aclocal.m4: Regenerated.
16023 * configure: Regenerated.
16024
16025 2004-11-21 Andreas Schwab <schwab@suse.de>
16026
16027 * linux-m68k-low.c (m68k_num_gregs): Define.
16028 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16029 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16030 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16031 (m68k_breakpoint_at): New. Add to the_low_target.
16032
16033 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16034 srv_linux_thread_db to yes.
16035
16036 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16037
16038 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16039 (ARCH_SET_FS): Likewise.
16040 (ARCH_GET_FS): Likewise.
16041 (ARCH_GET_GS): Likewise.
16042
16043 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16044
16045 * linux-i386-low.c (ps_get_thread_area): New.
16046 * linux-x86-64-low.c (ps_get_thread_area): New.
16047 * linux-low.c: Include <sys/syscall.h>.
16048 (linux_kill_one_process): Don't kill the first thread here.
16049 (linux_kill): Kill the first thread here.
16050 (kill_lwp): New function.
16051 (send_sigstop, linux_send_signal): Use it.
16052 * proc-service.c: Clean up #ifdefs.
16053 (fpregset_info): Delete.
16054 (ps_lgetregs): Update and enable implementation.
16055 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16056 implementations.
16057 * remote-utils.c (struct sym_cache, symbol_cache): New.
16058 (input_interrupt): Print a clearer message.
16059 (async_io_enabled): New variable.
16060 (enable_async_io, disable_async_io): Use it. Update comments.
16061 (look_up_one_symbol): Use the symbol cache.
16062 * thread-db.c (thread_db_look_up_symbols): New function.
16063 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16064
16065 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16066
16067 * configure.in: Test for -rdynamic.
16068 * configure: Regenerated.
16069 * Makefile (INTERNAL_LDFLAGS): New.
16070 (gdbserver, gdbreplay): Use it.
16071
16072 2004-09-02 Andrew Cagney <cagney@gnu.org>
16073
16074 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16075
16076 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16077
16078 * linux-low.c (linux_wait): Clear all_processes list also.
16079
16080 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16081
16082 * linux-low.c: Include <errno.h>. Remove extern declaration of
16083 errno.
16084
16085 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16086
16087 * gdbreplay.c, server.h, utils.c: Update copyright years.
16088
16089 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16090
16091 * server.c (main): Print child status or termination signal from
16092 variable 'signal', not 'sig'.
16093
16094 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16095
16096 * linux-low.c (linux_read_memory): Change return type to
16097 int. Check for and return error from ptrace().
16098 * target.c (read_inferior_memory): Change return type to int. Pass
16099 back return status from the_target->read_memory().
16100 * target.h (struct target_ops): Adapt *read_memory() prototype.
16101 Update comment.
16102 (read_inferior_memory): Adapt prototype.
16103 * server.c (main): Return an error packet if
16104 read_inferior_memory() returns an error.
16105
16106 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16107
16108 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16109 Unify with other clean targets.
16110
16111 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16112
16113 * server.c (handle_v_cont): Call set_desired_inferior.
16114
16115 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16116
16117 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16118
16119 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16120
16121 * linux-low.c (linux_wait): Unblock async I/O.
16122 (linux_resume): Block and enable async I/O.
16123 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16124 * server.h (block_async_io, unblock_async_io): Add prototypes.
16125
16126 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16127
16128 * remote-utils.c (remote_open): Print a status notice after
16129 opening a TCP port.
16130 * server.c (attach_inferior): Print a status notice after
16131 attaching.
16132
16133 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16134
16135 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16136
16137 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16138
16139 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16140 error packet.
16141 * server.c, target.h: Update copyright years.
16142
16143 2004-02-25 Roland McGrath <roland@redhat.com>
16144
16145 * target.h (struct target_ops): New member `read_auxv'.
16146 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16147 * linux-low.c (linux_read_auxv): New function.
16148 (linux_target_ops): Initialize `read_auxv' member to that.
16149
16150 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16151
16152 Committed by Jim Blandy <jimb@redhat.com>.
16153
16154 * linux-s390-low.c (s390_num_regs): Update.
16155 (s390_regmap): Remove control registers. Use __s390x__ predefine
16156 instead of GPR_SIZE to distiguish s390 and s390x targets.
16157
16158 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16159
16160 * linux-low.c: Update copyright year.
16161 (check_removed_breakpoint): Clear pending_is_breakpoint.
16162 (linux_set_resume_request, linux_queue_one_thread)
16163 (resume_status_pending_p): New functions.
16164 (linux_continue_one_thread): Use process->resume.
16165 (linux_resume): Only resume threads if there are no pending events.
16166 * linux-low.h (struct process_info): Add resume request
16167 pointer.
16168
16169 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16170
16171 * regcache.c (new_register_cache): Clear the allocated register
16172 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16173
16174 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16175
16176 * linux-low.c (linux_resume): Take a struct thread_resume *
16177 argument.
16178 (linux_wait): Update call.
16179 (resume_ptr): New static variable.
16180 (linux_continue_one_thread): Renamed from
16181 linux_continue_one_process. Use resume_ptr.
16182 (linux_resume): Use linux_continue_one_thread.
16183 * server.c (handle_v_cont, handle_v_requests): New functions.
16184 (myresume): New function.
16185 (main): Handle 'v' case.
16186 * target.h (struct thread_resume): New type.
16187 (struct target_ops): Change argument of "resume" to struct
16188 thread_resume *.
16189 (myresume): Delete macro.
16190
16191 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16192
16193 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16194 (uninstall): Support DESTDIR.
16195
16196 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16197
16198 * configure.srv: Add xscale*linux copy of arm*linux entry.
16199
16200 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16201
16202 * linux-arm-low.c (arm_reinsert_addr): New function.
16203 (the_low_target): Add arm_reinsert_addr.
16204
16205 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16206
16207 * mem-break.c: Remove whitespace at end of file.
16208
16209 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16210
16211 * configure.in: Check whether we need to prototype strerror.
16212 * server.h: Optionally prototype strerror.
16213 * gdbreplay.c (perror_with_name): Use strerror.
16214 * linux-low.c (linux_attach_lwp): Use strerror.
16215 * utils.c (perror_with_name): Use strerror.
16216 * config.in, configure: Regenerated.
16217
16218 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16219
16220 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16221 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16222
16223 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16224
16225 * Makefile.in (SFILES): Update.
16226 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16227 low-sun3.c: Remove files.
16228
16229 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16230
16231 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16232 (linux_detach_one_process, linux_detach): New functions.
16233 (linux_target_ops): Add linux_detach.
16234 * server.c (main): Handle 'D' packet.
16235 * target.h (struct target_ops): Add "detach" member.
16236 (detach_inferior): Define.
16237
16238 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16239
16240 From Kelley Cook <kelleycook@wideopenwest.com>:
16241 * configure.srv: Accept i[34567]86 variants.
16242
16243 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16244
16245 * linux-low.c (linux_wait_for_event): Correct comment typos.
16246 (linux_resume_one_process): Call check_removed_breakpoint.
16247 (linux_send_signal): New function.
16248 (linux_target_ops): Add linux_send_signal.
16249 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16250 of kill.
16251 * target.h (struct target_ops): Add send_signal.
16252
16253 2003-05-29 Jim Blandy <jimb@redhat.com>
16254
16255 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16256 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16257 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16258 away part of the register's value.
16259
16260 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16261
16262 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16263 (linux_wait_for_event, linux_init_signals): Likewise.
16264
16265 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16266
16267 * configure.in: Check for stdlib.h.
16268 * configure: Regenerated.
16269 * config.in: Regenerated.
16270
16271 2003-01-04 Andreas Schwab <schwab@suse.de>
16272
16273 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16274
16275 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16276
16277 * Makefile.in: Remove obsolete code.
16278
16279 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16280
16281 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16282 defined(PT_FPR0_HI).
16283
16284 2002-11-17 Stuart Hughes <seh@zee2.com>
16285
16286 * linux-arm-low.c (arm_num_regs): Increase.
16287 (arm_regmap): Include status register.
16288
16289 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16290
16291 * linux-low.c (register_addr): Remove incorrect -1 check.
16292
16293 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16294
16295 * linux-low.c (linux_create_inferior): Call setpgid. Return
16296 the new PID.
16297 (unstopped_p, linux_signal_pid): Remove.
16298 (linux_target_ops): Remove linux_signal_pid.
16299 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16300 global instead of target method.
16301 * target.h (struct target_ops): Remove signal_pid. Update comment
16302 for create_inferior.
16303 * server.c (signal_pid): New variable.
16304 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16305 gdbserver. Set the child to be the foreground process group.
16306 (attach_inferior): Set signal_pid.
16307
16308 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16309
16310 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16311
16312 2002-08-20 Jim Blandy <jimb@redhat.com>
16313
16314 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16315 default for this.
16316
16317 2002-08-01 Andrew Cagney <cagney@redhat.com>
16318
16319 * Makefile.in: Make chill references obsolete.
16320
16321 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16322
16323 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16324 * configure: Regenerate.
16325 * config.in: Regenerate.
16326
16327 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16328
16329 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16330 (perror_with_name, remote_close, remote_open, expect, play): Static.
16331
16332 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16333
16334 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16335 byte offsets instead of an array of indexes.
16336 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16337
16338 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16339
16340 * regcache.c: Add comment.
16341
16342 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16343
16344 * thread-db.c: New file.
16345 * proc-service.c: New file.
16346 * acinclude.m4: New file.
16347 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16348 proc-service.o, and thread-db.o.
16349 (linux-low.o): Add USE_THREAD_DB.
16350 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16351 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16352 * aclocal.m4: Regenerated.
16353 * config.in: Regenerated.
16354 * configure: Regenerated.
16355 * configure.in: Check for proc_service.h, sys/procfs.h,
16356 thread_db.h, and linux/elf.h headrs.
16357 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16358 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16359 Check for -lthread_db and thread support.
16360 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16361 PowerPC, and SuperH.
16362 * i387-fp.c: Constify arguments.
16363 * i387-fp.h: Likewise.
16364 * inferiors.c: (struct thread_info): Renamed from
16365 `struct inferior_info'. Remove PID member. Use generic inferior
16366 list header. All uses updated.
16367 (inferiors, signal_pid): Removed.
16368 (all_threads): New variable.
16369 (get_thread): Define.
16370 (add_inferior_to_list): New function.
16371 (for_each_inferior): New function.
16372 (change_inferior_id): New function.
16373 (add_inferior): Removed.
16374 (remove_inferior): New function.
16375 (add_thread): New function.
16376 (free_one_thread): New function.
16377 (remove_thread): New function.
16378 (clear_inferiors): Use for_each_inferior and free_one_thread.
16379 (find_inferior): New function.
16380 (find_inferior_id): New function.
16381 (inferior_target_data): Update argument type.
16382 (set_inferior_target_data): Likewise.
16383 (inferior_regcache_data): Likewise.
16384 (set_inferior_regcache_data): Likewise.
16385 * linux-low.c (linux_bp_reinsert): Remove.
16386 (all_processes, stopping_threads, using_thrads)
16387 (struct pending_signals, debug_threads, pid_of): New.
16388 (inferior_pid): Replace with macro.
16389 (struct inferior_linux_data): Remove.
16390 (get_stop_pc, add_process): New functions.
16391 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16392 Use add_process and add_thread.
16393 (linux_attach_lwp): New function, based on old linux_attach. Use
16394 add_process and add_thread. Set stop_expected for new threads.
16395 (linux_attach): New function.
16396 (linux_kill_one_process): New function.
16397 (linux_kill): Kill all LWPs.
16398 (linux_thread_alive): Use find_inferior_id.
16399 (check_removed_breakpoints, status_pending_p): New functions.
16400 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16401 Update. Use WNOHANG. Wait for cloned processes also. Update process
16402 struct for the found process.
16403 (linux_wait_for_event): New function.
16404 (linux_wait): Use it. Support LWPs.
16405 (send_sigstop, wait_for_sigstop, stop_all_processes)
16406 (linux_resume_one_process, linux_continue_one_process): New functions.
16407 (linux_resume): Support LWPs.
16408 (REGISTER_RAW_SIZE): Remove.
16409 (fetch_register): Use register_size instead. Call supply_register.
16410 (usr_store_inferior_registers): Likewise. Call collect_register.
16411 Fix recursive case.
16412 (regsets_fetch_inferior_registers): Improve error message.
16413 (regsets_store_inferior_registers): Add debugging.
16414 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16415 (unstopped_p, linux_signal_pid): New functions.
16416 (linux_target_ops): Add linux_signal_pid.
16417 (linux_init_signals): New function.
16418 (initialize_low): Call it. Initialize using_threads.
16419 * regcache.c (inferior_regcache_data): Add valid
16420 flag.
16421 (get_regcache): Fetch registers lazily. Add fetch argument
16422 and update all callers.
16423 (regcache_invalidate_one, regcache_invalidate): New
16424 functions.
16425 (new_register_cache): Renamed from create_register_cache.
16426 Return the new regcache.
16427 (free_register_cache): Change argument to a void *.
16428 (registers_to_string, registers_from_string): Call get_regcache
16429 with fetch flag set.
16430 (register_data): Make static. Pass fetch flag to get_regcache.
16431 (supply_register): Call get_regcache with fetch flag clear.
16432 (collect_register): Call get_regcache with fetch flag set.
16433 (collect_register_as_string): New function.
16434 * regcache.h: Update.
16435 * remote-utils.c (putpkt): Flush after debug output and use
16436 stderr.
16437 Handle input interrupts while waiting for an ACK.
16438 (input_interrupt): Use signal_pid method.
16439 (getpkt): Flush after debug output and use stderr.
16440 (outreg): Use collect_register_as_string.
16441 (new_thread_notify, dead_thread_notify): New functions.
16442 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16443 and general_thread.
16444 (look_up_one_symbol): Flush after debug output.
16445 * server.c (step_thread, server_waiting): New variables.
16446 (start_inferior): Don't use signal_pid. Update call to mywait.
16447 (attach_inferior): Update call to mywait.
16448 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16449 (main): Don't fetch/store registers explicitly. Use
16450 set_desired_inferior. Support proposed ``Hs'' packet. Update
16451 calls to mywait.
16452 * server.h: Update.
16453 (struct inferior_list, struct_inferior_list_entry): New.
16454 * target.c (set_desired_inferior): New.
16455 (write_inferior_memory): Constify.
16456 (mywait): New function.
16457 * target.h: Update.
16458 (struct target_ops): New signal_pid method.
16459 (mywait): Removed macro, added prototype.
16460
16461 * linux-low.h (regset_func): Removed.
16462 (regset_fill_func, regset_store_func): New.
16463 (enum regset_type): New.
16464 (struct regset_info): Add type field. Use new operation types.
16465 (struct linux_target_ops): stop_pc renamed to get_pc.
16466 Add decr_pc_after_break and breakpoint_at.
16467 (get_process, get_thread_proess, get_process_thread)
16468 (strut process_info, all_processes, linux_attach_lwp)
16469 (thread_db_init): New.
16470
16471 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16472 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16473 (the_low_target): Add new members.
16474 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16475 (i386_store_fpxregset): Constify.
16476 (target_regsets): Add new kind identifier.
16477 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16478 (i386_set_pc): Add debugging.
16479 (i386_breakpoint_at): New function.
16480 (the_low_target): Add new members.
16481 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16482 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16483 (mips_breakpoint_at): New.
16484 (the_low_target): Add new members.
16485 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16486 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16487 (the_low_target): Add new members.
16488 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16489 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16490 (the_low_target): Add new members.
16491 * linux-x86-64-low.c (target_regsets): Add new kind
16492 identifier.
16493
16494 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16495
16496 From Martin Pool <mbp@samba.org>:
16497 * server.c (gdbserver_usage): New function.
16498 (main): Call it.
16499
16500 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16501
16502 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16503 stop_at -> stop_pc.
16504
16505 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16506
16507 * Makefile.in: Remove obsolete code.
16508
16509 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16510
16511 * linux-low.c (regsets_fetch_inferior_registers),
16512 (regsets_store_inferior_registers): Removed cast to int from
16513 ptrace() calls.
16514 * regcache.h: Added declaration of struct inferior_info.
16515
16516 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16517
16518 * inferiors.c (struct inferior_info): Add regcache_data.
16519 (add_inferior): Call create_register_cache.
16520 (clear_inferiors): Call free_register_cache.
16521 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16522 * regcache.c (struct inferior_regcache_data): New.
16523 (registers): Remove.
16524 (get_regcache): New function.
16525 (create_register_cache, free_register_cache): New functions.
16526 (set_register_cache): Don't initialize the register cache here.
16527 (registers_to_string, registers_from_string, register_data): Call
16528 get_regcache.
16529 * regcache.h: Add prototypes.
16530 * server.h: Likewise.
16531
16532 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16533
16534 * mem-break.c: New file.
16535 * mem-break.h: New file.
16536 * Makefile.in: Add mem-break.o rule; update server.h
16537 dependencies.
16538 * inferiors.c (struct inferior_info): Add target_data
16539 member.
16540 (clear_inferiors): Free target_data member if set.
16541 (inferior_target_data, set_inferior_target_data): New functions.
16542 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16543 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16544 * linux-low.c (linux_bp_reinsert): New variable.
16545 (struct inferior_linux_data): New.
16546 (linux_create_inferior): Use set_inferior_target_data.
16547 (linux_attach): Likewise. Call add_inferior.
16548 (linux_wait_for_one_inferior): New function.
16549 (linux_wait): Call it.
16550 (linux_write_memory): Add const.
16551 (initialize_low): Call set_breakpoint_data.
16552 * linux-low.h (struct linux_target_ops): Add breakpoint
16553 handling members.
16554 * server.c (attach_inferior): Remove extra add_inferior
16555 call.
16556 * server.h: Include mem-break.h. Update inferior.c
16557 prototypes.
16558 * target.c (read_inferior_memory)
16559 (write_inferior_memory): New functions.
16560 * target.h (read_inferior_memory)
16561 (write_inferior_memory): Change macros to prototypes.
16562 (struct target_ops): Update comments. Add const to write_memory
16563 definition.
16564
16565 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16566
16567 * linux-low.c (usr_store_inferior_registers): Support
16568 registers which are allowed to fail to store.
16569 * linux-low.h (linux_target_ops): Likewise.
16570 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16571 (ppc_cannot_store_register): FPSCR may not be storable.
16572
16573 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16574
16575 * server.h: Include <string.h> if HAVE_STRING_H.
16576 * ChangeLog: Correct paths in last ChangeLog entry.
16577
16578 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16579
16580 * linux-low.h: Remove obsolete prototypes.
16581 (struct linux_target_ops): New.
16582 (extern the_low_target): New.
16583 * linux-low.c (num_regs, regmap): Remove declarations.
16584 (register_addr): Use the_low_target explicitly.
16585 (fetch_register): Likewise.
16586 (usr_fetch_inferior_registers): Likewise.
16587 (usr_store_inferior_registers): Likewise.
16588 * linux-arm-low.c (num_regs): Remove.
16589 (arm_num_regs): Define.
16590 (arm_regmap): Renamed from regmap, made static.
16591 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16592 made static.
16593 (arm_cannot_store_register): Renamed from cannot_store_register,
16594 made static.
16595 (the_low_target): New.
16596 * linux-i386-low.c (num_regs): Remove.
16597 (i386_num_regs): Define.
16598 (i386_regmap): Renamed from regmap, made static.
16599 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16600 made static.
16601 (i386_cannot_store_register): Renamed from cannot_store_register,
16602 made static.
16603 (the_low_target): New.
16604 * linux-ia64-low.c (num_regs): Remove.
16605 (ia64_num_regs): Define.
16606 (ia64_regmap): Renamed from regmap, made static.
16607 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16608 made static.
16609 (ia64_cannot_store_register): Renamed from cannot_store_register,
16610 made static.
16611 (the_low_target): New.
16612 * linux-m68k-low.c (num_regs): Remove.
16613 (m68k_num_regs): Define.
16614 (m68k_regmap): Renamed from regmap, made static.
16615 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16616 made static.
16617 (m68k_cannot_store_register): Renamed from cannot_store_register,
16618 made static.
16619 (the_low_target): New.
16620 * linux-mips-low.c (num_regs): Remove.
16621 (mips_num_regs): Define.
16622 (mips_regmap): Renamed from regmap, made static.
16623 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16624 made static.
16625 (mips_cannot_store_register): Renamed from cannot_store_register,
16626 made static.
16627 (the_low_target): New.
16628 * linux-ppc-low.c (num_regs): Remove.
16629 (ppc_num_regs): Define.
16630 (ppc_regmap): Renamed from regmap, made static.
16631 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16632 made static.
16633 (ppc_cannot_store_register): Renamed from cannot_store_register,
16634 made static.
16635 (the_low_target): New.
16636 * linux-s390-low.c (num_regs): Remove.
16637 (s390_num_regs): Define.
16638 (s390_regmap): Renamed from regmap, made static.
16639 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16640 made static.
16641 (s390_cannot_store_register): Renamed from cannot_store_register,
16642 made static.
16643 (the_low_target): New.
16644 * linux-sh-low.c (num_regs): Remove.
16645 (sh_num_regs): Define.
16646 (sh_regmap): Renamed from regmap, made static.
16647 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16648 made static.
16649 (sh_cannot_store_register): Renamed from cannot_store_register,
16650 made static.
16651 (the_low_target): New.
16652 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16653 (the_low_target): New.
16654
16655 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16656
16657 * Makefile.in: Add stamp-h target.
16658 * configure.in: Create stamp-h.
16659 * configure: Regenerated.
16660
16661 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16662
16663 * inferiors.c: New file.
16664 * target.c: New file.
16665 * target.h: New file.
16666 * Makefile.in: Add target.o and inferiors.o. Update
16667 dependencies.
16668 * linux-low.c (inferior_pid): New static variable,
16669 moved from server.c.
16670 (linux_create_inferior): Renamed from create_inferior.
16671 Call add_inferior. Return 0 on success instead of a PID.
16672 (linux_attach): Renamed from myattach.
16673 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16674 (linux_thread_alive): Renamed from mythread_alive.
16675 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16676 child dies.
16677 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16678 (regsets_store_inferior_registers): Correct error message.
16679 Add missing ``return 0''.
16680 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16681 (linux_store_registers): Renamed from store_inferior_registers.
16682 (linux_read_memory): Renamed from read_inferior_memory.
16683 (linux_write_memory): Renamed from write_inferior_memory.
16684 (linux_target_ops): New structure.
16685 (initialize_low): Call set_target_ops ().
16686 * remote-utils.c (unhexify): New function.
16687 (hexify): New function.
16688 (input_interrupt): Send signals to ``signal_pid''.
16689 * server.c (inferior_pid): Remove.
16690 (start_inferior): Update create_inferior call.
16691 (attach_inferior): Call add_inferior.
16692 (handle_query): New function.
16693 (main): Call handle_query for `q' packets.
16694 * server.h: Include "target.h". Remove obsolete prototypes.
16695 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16696
16697 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16698
16699 * Makefile.in: Add WARN_CFLAGS. Update configury
16700 dependencies.
16701 * configure.in: Check for <string.h>
16702 * configure: Regenerate.
16703 * config.in: Regenerate.
16704 * gdbreplay.c: Include needed system headers.
16705 (remote_open): Remove strchr prototype.
16706 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16707 * regcache.c (supply_register): Change buf argument to const void *.
16708 (supply_register_by_name): Likewise.
16709 (collect_register): Change buf argument to void *.
16710 (collect_register_by_name): Likewise.
16711 * regcache.h: Add missing prototypes.
16712 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16713 * server.c (handle_query): New function.
16714 (attached): New static variable, moved out of main.
16715 (main): Quiet longjmp clobber warnings.
16716 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16717 * utils.c (error): Remove NORETURN.
16718 (fatal): Likewise.
This page took 0.356147 seconds and 5 git commands to generate.