Add client_state struct.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-06-04 Stan Cox <scox@redhat.com>
2
3 * server.h (struct client_state): New.
4 * server.c (cont_thread, general_thread, multi_process)
5 (report_fork_events, report_vfork_events, report_exec_events)
6 (report_thread_events, swbreak_feature, hwbreak_feature)
7 (vCont_supported, disable_randomization, pass_signals)
8 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
9 Moved to client_state.
10 * remote-utils.c (remote_debug, noack_mode)
11 (transport_is_reliable): Moved to client_state.
12 * tracepoint.c (current_traceframe): Moved to client_state.
13
14 Update all callers.
15 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
16 linux-low.c, remote-utils.h, target.c: Use client_state.
17
18 2018-05-31 Alan Hayward <alan.hayward@arm.com>
19
20 * configure.srv: Add new c/h file.
21
22 2018-05-31 Alan Hayward <alan.hayward@arm.com>
23
24 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
25 null VQ.
26
27 2018-05-25 Maciej W. Rozycki <macro@mips.com>
28
29 * gdb.arch/mips-fpregset-core.exp: New test.
30 * gdb.arch/mips-fpregset-core.c: New test source.
31
32 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
33
34 PR server/23198
35 * hostio.c (require_int): Do not report overflow for integers
36 between 0xfffffff and 0x7fffffff.
37
38 2018-05-22 Maciej W. Rozycki <macro@mips.com>
39
40 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
41 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
42 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
43 functions.
44 (the_low_target): Wire them.
45
46 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
47
48 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
49 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
50 mode. Call collect_register_by_name with vscr using
51 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
52 (ppc_store_vrregset): Add and set vscr_offset variable as in
53 ppc_fill_vrregset. Call supply_register_by_name with vscr using
54 vscr_offset.
55
56 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
57
58 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
59 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
60 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
61
62 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
63
64 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
65 (ppc_store_vsxregset): Likewise.
66 (ppc_fill_vrregset): Likewise.
67 (ppc_store_vrregset): Likewise.
68 (ppc_fill_evrregset): Likewise.
69 (ppc_store_evrregset): Likewise.
70 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
71 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
72 needed.
73
74 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
75
76 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
77 wordsize of the inferior. Call ppc_linux_target_wordsize.
78
79 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
80
81 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
82 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
83 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
84 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
85 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
86 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
87 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
88 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
89 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
90 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
91 (tdesc_powerpc_e500l): Remove.
92 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
93 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
94 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
95 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
96 linux-ppc-tdesc.h.
97 (ppc_arch_setup): Remove target description matching code. Fill a
98 ppc_linux_features struct and call ppc_linux_match_description
99 with it.
100
101 2018-05-22 Maciej W. Rozycki <macro@mips.com>
102
103 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
104 width of the requested register exceeds the width of the
105 `ptrace' data type.
106 (mips_cannot_store_register): Likewise.
107
108 2018-05-21 Maciej W. Rozycki <macro@mips.com>
109
110 * linux-mips-low.c (mips_fetch_register): New function. Update
111 preceding comment.
112 (mips_store_gregset): Supply 0 rather than $restart for $zero.
113 (the_low_target): Wire `mips_fetch_register'.
114
115 2018-05-10 Joel Brobecker <brobecker@adacore.com>
116
117 * lynx-i386-low.c (LYNXOS_178): New macro.
118 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
119 the layout on LynxOS-178.
120 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
121 handle floating point registers that are not supported by
122 LynxOS-178.
123
124 2018-05-10 Tom Tromey <tom@tromey.com>
125
126 * configure: Rebuild.
127
128 2018-05-10 Joel Brobecker <brobecker@adacore.com>
129
130 PR server/23158:
131 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
132 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
133 Use it to set the expedite_regs field in the given tdesc.
134 * x86-tdesc.h: New file.
135 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
136 Adjust following the addition of the new expedite_regs parameter
137 to init_target_desc.
138 * linux-tic6x-low.c (tic6x_read_description): Likewise.
139 * linux-x86-tdesc.c: #include "x86-tdesc.h".
140 (i386_linux_read_description, amd64_linux_read_description):
141 Adjust following the addition of the new expedite_regs parameter
142 to init_target_desc.
143 * lynx-i386-low.c: #include "x86-tdesc.h".
144 (lynx_i386_arch_setup): Adjust following the addition of the new
145 expedite_regs parameter to init_target_desc.
146 * nto-x86-low.c: #include "x86-tdesc.h".
147 (nto_x86_arch_setup): Adjust following the addition of the new
148 expedite_regs parameter to init_target_desc.
149 * win32-i386-low.c: #include "x86-tdesc.h".
150 (i386_arch_setup): Adjust following the addition of the new
151 expedite_regs parameter to init_target_desc.
152
153 2018-05-10 Joel Brobecker <brobecker@adacore.com>
154
155 PR server/23158:
156 * win32-low.c (win32_create_inferior): Add call to my_wait
157 setting last_status global.
158
159 2018-05-10 Joel Brobecker <brobecker@adacore.com>
160
161 PR server/23158:
162 * win32-low.c (create_process): Only call gdb_tilde_expand if
163 inferior_cwd is not NULL.
164
165 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
166
167 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
168 registers to the cache if their values have changed.
169 (i387_xsave_to_cache): Provide default values for x87 control
170 registers when these features are available, but disabled.
171 * regcache.c (supply_register_by_name_zeroed): New function.
172 * regcache.h (supply_register_by_name_zeroed): Declare new
173 function.
174
175 2018-05-07 Tom Tromey <tom@tromey.com>
176
177 * configure: Rebuild.
178
179 2018-05-04 Tom Tromey <tom@tromey.com>
180
181 * configure: Rebuild.
182
183 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
184 Pedro Alves <palves@redhat.com>
185
186 * linux-aarch64-low.c (aarch64_stopped_data_address):
187 Likewise.
188
189 2018-04-27 Tom Tromey <tom@tromey.com>
190
191 * configure: Rebuild.
192
193 2018-04-23 Tom Tromey <tom@tromey.com>
194
195 * configure: Rebuild.
196
197 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
198
199 * Makefile.in (depcomp): Add "..".
200 (all_deps_files): New and use it.
201
202 2018-04-18 Alan Hayward <alan.hayward@arm.com>
203
204 * configure.srv (aarch64*-*-linux*): Don't include xml.
205 (i[34567]86-*-cygwin*): Likewise.
206 (i[34567]86-*-linux*): Likewise.
207 (i[34567]86-*-lynxos*): Likewise.
208 (i[34567]86-*-mingw32ce*): Likewise.
209 (i[34567]86-*-mingw*): Likewise.
210 (i[34567]86-*-nto*): Likewise.
211 (tic6x-*-uclinux): Likewise.
212 (x86_64-*-linux*): Likewise.
213 (x86_64-*-mingw*): Likewise.
214 (x86_64-*-cygwin*): Likewise.
215
216 2018-04-18 Alan Hayward <alan.hayward@arm.com>
217
218 * tdesc.c: Remove xml parameter.
219
220 2018-04-18 Alan Hayward <alan.hayward@arm.com>
221
222 * server.c (get_features_xml): Remove cast.
223 * tdesc.c (void target_desc::accept): Fill in function.
224 (tdesc_get_features_xml): Remove old xml creation.
225 (print_xml_feature::visit_pre): Add xml vistor.
226 * tdesc.h (struct target_desc): Make xmltarget mutable.
227 (tdesc_get_features_xml): Remove declaration.
228
229 2018-04-18 Alan Hayward <alan.hayward@arm.com>
230
231 * tdesc.c (tdesc_architecture_name): Add new function.
232 (tdesc_osabi_name): Likewise.
233 (tdesc_get_features_xml): Use new functions.
234
235 2018-04-18 Alan Hayward <alan.hayward@arm.com>
236
237 * tdesc.c (tdesc_create_flags): Remove.
238 (tdesc_add_flag): Likewise.
239 (tdesc_named_type): Likewise.
240 (tdesc_create_union): Likewise.
241 (tdesc_create_struct): Likewise.
242 (tdesc_create_vector): Likewise.
243 (tdesc_add_bitfield): Likewise.
244 (tdesc_add_field): Likewise.
245 (tdesc_set_struct_size): Likewise.
246
247 2018-04-18 Alan Hayward <alan.hayward@arm.com>
248
249 * tdesc.c (~target_desc): Remove implictly deleted items.
250 (init_target_desc): Iterate all features.
251 (tdesc_get_features_xml): Use vector.
252 (tdesc_create_feature): Create feature.
253 * tdesc.h (tdesc_feature) Remove
254 (target_desc): Add features.
255
256 2018-04-18 Alan Hayward <alan.hayward@arm.com>
257
258 * Makefile.in: Add common/tdesc.c
259 * tdesc.c (init_target_desc): init all reg_defs from register
260 vector.
261 (tdesc_create_reg): Create tdesc_reg.
262 * tdesc.h (tdesc_feature): Add register vector.
263
264 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
265
266 * tdesc.h (struct target_desc) <features>: Change type to
267 std::vector<std::string>.
268 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
269 changes.
270 (tdesc_get_features_xml): Likewise.
271 (tdesc_create_feature): Likewise.
272
273 2018-03-26 Alan Hayward <alan.hayward@arm.com>
274
275 * regcache.c (find_register_by_number): Return a ref.
276 (find_regno): Use references.
277 (register_size): Likewise.
278 (register_data): Likewise.
279 * tdesc.c (target_desc::~target_desc): Remove free calls.
280 (target_desc::operator==): Use std::vector compare.
281 (init_target_desc): Use reference.
282 (tdesc_create_reg): Use reg constructors.
283 * tdesc.h (struct target_desc): Replace pointer with object.
284
285 2018-03-23 Alan Hayward <alan.hayward@arm.com>
286
287 * regcache.c (find_register_by_number): Make static.
288 (find_regno): Use find_register_by_number
289 * regcache.h (struct reg): Remove declaration.
290
291 2018-03-23 Alan Hayward <alan.hayward@arm.com>
292
293 * tdesc.c (target_desc::~target_desc): Move to here.
294 (target_desc::operator==): Likewise.
295 * tdesc.h (target_desc::~target_desc): Move from here.
296 (target_desc::operator==): Likewise.
297
298 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
299
300 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
301
302 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
303
304 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
305 S390_TDESC_GS.
306 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
307 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
308 and init_registers_s390_gs_linux64.
309
310 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
311
312 * linux-s390-low.c (s390_fill_gs): Remove function.
313 (s390_fill_gsbc): Remove function.
314 (s390_regsets): Set fill functions for the guarded storage regsets
315 to NULL.
316
317 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
318
319 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
320 the word size. Add comment.
321 (s390_get_wordsize): New function.
322 (s390_arch_setup): No longer select a temporary tdesc to fetch the
323 pswm with it. Instead, use s390_get_wordsize to determine the
324 word size first and derive the correct tdesc from that directly.
325
326 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
327
328 * Makefile.in: Include silent-rules.mk.
329 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
330 (COMPILE): Add ECHO_CXX.
331 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
332 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
333 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
334 (version-generated.c): Add ECHO_GEN.
335 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
336 (IPAGENT_COMPILE): Add ECHO_CXX.
337 (%-generated.c): Add ECHO_REGDAT.
338
339 2018-03-14 Tom Tromey <tom@tromey.com>
340
341 PR cli/14977:
342 * ax.c (ax_printf): Special case for NULL.
343
344 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
345
346 * linux-low.c (linux_qxfer_libraries_svr4): Use
347 xml_escape_text_append.
348
349 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
350
351 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
352
353 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
354
355 * server.c (handle_general_set): Remove unnecessary xstrdup.
356
357 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
358
359 * server.c (parse_debug_format_options): Adjust to
360 delim_string_to_char_ptr_vec changes.
361 * thread-db.c (thread_db_load_search): Adjust to
362 dirnames_to_char_ptr_vec changes.
363
364 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
365
366 * target.h (target_enable_btrace, target_disable_btrace)
367 (target_read_btrace, target_read_btrace_conf): Turn macro into
368 inline function. Throw error if target method is not defined.
369 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
370 check for btrace target method. Be prepared to handle exceptions
371 from btrace target methods.
372
373 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
374
375 * server.c (captured_main): Change order of error message printed
376 when the current working directory cannot be found.
377
378 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
379
380 * server.c: Include "filenames.h" and "pathstuff.h".
381 (program_name): Delete variable.
382 (program_path): New anonymous class.
383 (get_exec_wrapper): Use "program_path" instead of
384 "program_name".
385 (handle_v_run): Likewise.
386 (captured_main): Likewise.
387 (process_serial_event): Likewise.
388
389 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
390
391 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
392 (OBJS): Add "pathstuff.o".
393 * server.c (current_directory): New global variable.
394 (captured_main): Initialize "current_directory".
395
396 2018-02-26 Alan Hayward <alan.hayward@arm.com>
397
398 * tdesc.c: Use common/tdesc.h.
399 * tdesc.h: Likewise.
400
401 2018-02-20 Alan Hayward <alan.hayward@arm.com>
402 Simon Marchi <simon.marchi@ericsson.com>
403
404 * Makefile.in: Switch order of make rules.
405
406 2018-02-19 Alan Hayward <alan.hayward@arm.com>
407
408 * Makefile.in: Add common directory in build.
409 * configure.ac: Add common reference.
410 * configure: Regenerate.
411
412 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
413
414 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
415 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
416 * spu-low.c (spu_target_ops): Likewise.
417 * win32-low.c (win32_target_ops): Likewise.
418 * server.c (supported_btrace_packets): Report packets unconditionally.
419 * target.h (target_ops) <supports_btrace>: Remove.
420 (target_supports_btrace): Remove.
421
422 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
423
424 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
425 (handle_btrace_disable): Change return type to void. Use exceptions
426 to report errors.
427 (handle_btrace_general_set): Catch exception and copy message to
428 return message.
429
430 2018-02-08 Tom Tromey <tom@tromey.com>
431
432 * linux-low.c (install_software_single_step_breakpoints): Use
433 make_scoped_restore.
434 * inferiors.c (make_cleanup_restore_current_thread): Remove.
435 (do_restore_current_thread_cleanup): Remove.
436 * gdbthread.h (make_cleanup_restore_current_thread): Don't
437 declare.
438
439 2018-02-08 Tom Tromey <tom@tromey.com>
440
441 * mem-break.c (set_raw_breakpoint_at): Use
442 gdb::unique_xmalloc_ptr.
443
444 2018-01-30 Pedro Alves <palves@redhat.com>
445
446 PR gdb/13211
447 * target.c (target_terminal::terminal_state): Rename to ...
448 (target_terminal::m_terminal_state): ... this.
449
450 2018-01-19 James Clarke <jrtc27@jrtc27.com>
451
452 * linux-low.c (handle_extended_wait): Surround call to
453 thread_db_notice_clone with #ifdef USE_THREAD_DB.
454
455 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
456
457 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
458 linux_ptrace_attach_fail_reason_string now returning an
459 std::string.
460 (linux_attach): Likewise.
461 * thread-db.c (attach_thread): Likewise.
462
463 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
464
465 PR gdb/21559
466 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
467 checking for fs_base/gs_base fields in struct user_regs_struct.
468 * configure: Regenerate.
469
470 2018-01-16 Yao Qi <yao.qi@linaro.org>
471
472 PR gdb/18749
473 * linux-low.c (fetch_register): Call supply_register instead of
474 error.
475
476 2018-01-08 Yao Qi <yao.qi@linaro.org>
477 Simon Marchi <simon.marchi@ericsson.com>
478
479 * Makefile.in (OBS): Remove selftest.o.
480 * configure.ac: Set srv_selftest_objs if $development is true.
481 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
482 * configure: Re-generated.
483 * server.c (captured_main): Wrap variable selftest_filter with
484 GDB_SELF_TEST.
485
486 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
487
488 * server.c (parse_debug_format_options): Return std::string.
489 (handle_monitor_command, captured_main): Adjust.
490
491 2018-01-05 Pedro Alves <palves@redhat.com>
492
493 PR gdb/18653
494 * server.c (captured_main): Pass quiet=false to
495 save_original_signals_state.
496
497 2018-01-01 Joel Brobecker <brobecker@adacore.com>
498
499 * gdbreplay.c (gdbreplay_version): Update copyright year in
500 version message.
501 * server.c (gdbserver_version): Likewise.
502
503 2017-12-08 Tom Tromey <tom@tromey.com>
504
505 * ax.c (ax_printf): Update.
506
507 2017-12-07 Yao Qi <yao.qi@linaro.org>
508
509 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
510 aarch64_linux_read_description.
511 * linux-amd64-ipa.c (idx2mask): New array.
512 (get_ipa_tdesc): Move idx2mask out.
513 (initialize_low_tracepoint): Initialize target descriptions.
514 * linux-i386-ipa.c (idx2mask): New array.
515 (get_ipa_tdesc): Move idx2mask out.
516 (initialize_low_tracepoint): Initialize target descriptions.
517
518 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
519
520 * tdesc.c (struct tdesc_type): Change return type.
521 (tdesc_add_flag): Change parameter type.
522 (tdesc_add_bitfield): Likewise.
523 (tdesc_add_field): Likewise.
524 (tdesc_set_struct_size): Likewise.
525
526 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
527
528 * regcache.c (registers_to_string): Remove unused variable.
529
530 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
531
532 * inferiors.c (for_each_inferior_with_data): Remove.
533 * inferiors.h (for_each_inferior_with_data): Remove.
534 * server.c (handle_qxfer_threads_worker): Change parameter type.
535 (handle_qxfer_threads_proper): Use for_each_thread.
536
537 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
538
539 * inferiors.c (for_each_inferior): Remove.
540 (clear_inferiors): Use for_each_thread.
541 * inferiors.h (for_each_inferior): Remove.
542 * linux-low.c (linux_wait_for_event_filtered): Use
543 for_each_thread.
544 (linux_stabilize_threads): Likewise.
545 * regcache.c (regcache_release): Likewise.
546 * server.c (gdb_wants_all_threads_stopped): Likewise.
547 (clear_pending_status_callback): Remove.
548 (handle_status): Use for_each_thread.
549 (captured_main): Likewise.
550 * win32-low.c (child_init_thread_list): Likewise.
551 (win32_clear_inferiors): Likewise.
552 (fake_breakpoint_event): Likewise.
553
554 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
555
556 * inferiors.h (find_inferior): Remove.
557 * inferiors.c (find_inferior): Remove.
558
559 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
560
561 * linux-low.c (resume_status_pending_p): Update comment.
562 (need_step_over_p): Update comment.
563
564 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
565
566 * linux-low.c (proceed_one_lwp): Return void, change parameter
567 type.
568 (unsuspend_and_proceed_one_lwp): Likewise.
569 (proceed_all_lwps): Use for_each_thread.
570 (unstop_all_lwps): Likewise.
571
572 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
573
574 * linux-low.c (linux_resume_one_thread): Return void, take
575 parameter directly.
576 (linux_resume): Use for_each_thread.
577
578 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
579
580 * linux-low.c (send_sigstop_callback): Return void, change
581 parameter type. Rename to...
582 (send_sigstop): ... this.
583 (suspend_and_send_sigstop_callback): Return void, change parameter
584 type. Rename to...
585 (suspend_and_send_sigstop): ... this.
586 (stop_all_lwps): Use for_each_thread.
587
588 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
589
590 * linux-low.c (lwp_running): Return bool, remove unused
591 argument.
592 (linux_stabilize_threads): Use find_thread.
593
594 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
595
596 * linux-low.c (select_singlestep_lwp_callback): Remove.
597 (count_events_callback): Remove.
598 (select_event_lwp_callback): Remove.
599 (select_event_lwp): Use find_thread/for_each_thread.
600
601 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
602
603 * linux-low.c (not_stopped_callback): Return bool, take filter
604 argument directly.
605 (linux_wait_for_event_filtered): Use find_thread.
606 (linux_wait_1): Likewise.
607
608 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
609
610 * linux-low.c (same_lwp): Remove.
611 (find_lwp_pid): Use find_thread.
612
613 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
614
615 * linux-low.c (delete_lwp_callback): Remove.
616 (linux_mourn): Use for_each_thread.
617
618 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
619
620 * linux-low.c (linux_detach_lwp_callback): Return void, remove
621 args parameter, don't check for pid.
622 (linux_detach): Use for_each_thread.
623
624 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
625
626 * linux-low.c (struct counter): Remove.
627 (second_thread_of_pid_p): Remove.
628 (last_thread_of_process_p): Use find_thread.
629
630 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
631
632 * inferiors.c (find_inferior_in_random): Remove.
633 * inferiors.h (find_inferior_in_random): Remove.
634 * linux-low.c (status_pending_p_callback): Return bool, accept
635 parameter ptid directly.
636 (linux_wait_for_event_filtered): Use find_thread_in_random.
637 (linux_wait_1): Likewise.
638
639 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
640
641 * inferiors.c (find_inferior_id): Remove.
642 (find_thread_ptid): Move implemention from find_inferior_id to
643 here.
644 * inferiors.h (find_inferior_id): Remove.
645 * server.c (handle_status): Use find_thread_ptid.
646 (process_serial_event): Likewise.
647 * thread-db.c (find_one_thread): Likewise.
648 (thread_db_thread_handle): Likewise.
649 * win32-low.c (thread_rec): Likewise.
650 (child_delete_thread): Likewise.
651 (win32_thread_alive): Likewise.
652 (get_child_debug_event): Likewise.
653
654 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
655
656 * linux-mips-low.c (update_watch_registers_callback): Return
657 void, remove pid_p parameter, don't check for pid.
658 (mips_insert_point, mips_remove_point): Use for_each_thread.
659
660 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
661
662 * lynx.low (lynx_delete_thread_callback): Remove.
663 (lynx_mourn): Use for_each_thread.
664
665 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
666
667 * regcache.c (regcache_invalidate_one): Remove.
668 (regcache_invalidate_pid): use for_each_thread.
669
670 2017-11-26 Tom Tromey <tom@tromey.com>
671
672 * linux-low.c (linux_create_inferior): Update.
673
674 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
675
676 * spu-low.c (spu_create_inferior): Fix typo in argument name.
677
678 2017-11-24 Alan Hayward <alan.hayward@arm.com>
679
680 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
681 * linux-aarch64-low.c (initialize_low_arch): Call init func.
682 * linux-aarch64-tdesc-selftest.c: New file.
683 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
684
685 2017-11-24 Alan Hayward <alan.hayward@arm.com>
686
687 * configure.srv: Add new file.
688 * linux-aarch64-low.c (initialize_low_arch): Call init func.
689 * linux-aarch64-tdesc-selftest.c: New file.
690 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
691
692 2017-11-24 Alan Hayward <alan.hayward@arm.com>
693
694 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
695 * linux-aarch64-low.c (initialize_low_arch): Remove init.
696 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
697
698 2017-11-24 Alan Hayward <alan.hayward@arm.com>
699
700 * configure.srv: Add new files.
701 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
702 aarch64_linux_read_description.
703 * linux-aarch64-low.c (aarch64_linux_read_description):
704 Merge with aarch64_arch_setup.
705 (aarch64_arch_setup): Call aarch64_linux_read_description.
706 * linux-aarch64-tdesc.c: New file.
707 * linux-aarch64-tdesc.h: New file.
708
709 2017-11-24 Yao Qi <yao.qi@linaro.org>
710
711 * configure.srv: Set $srv_regobj for tic6x-linux.
712 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
713 (tic6x_read_description): Move some code to tic6x_arch_setup.
714 (tic6x_tdesc_test): New function.
715 (initialize_low_arch): Call selftests::register_test.
716
717 2017-11-22 Yao Qi <yao.qi@linaro.org>
718
719 * remote-utils.c (prepare_resume_reply): Use memcpy.
720
721 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
722
723 * linux-low.c (kill_one_lwp_callback): Return void, take
724 argument directly, don't filter on pid.
725 (linux_kill): Use for_each_thread.
726
727 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
728
729 * linux-low.c (need_step_over_p): Return bool, remove dummy
730 argument.
731 (linux_resume, proceed_all_lwps): Use find_thread.
732
733 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
734
735 * linux-low.c (resume_status_pending_p): Return bool, remove
736 flag_p argument.
737 (linux_resume): Use find_thread.
738
739 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
740
741 * linux-low.c (struct thread_resume_array): Remove.
742 (linux_set_resume_request): Return void, take arguments
743 directly.
744 (linux_resume): Use for_each_thread.
745
746 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
747
748 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
749 return bool, remove data argument.
750 (linux_stabilize_threads): Use find_thread.
751
752 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
753
754 * linux-low.c (unsuspend_one_lwp): Remove.
755 (unsuspend_all_lwps): Use for_each_thread, inline code from
756 unsuspend_one_lwp.
757
758 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
759
760 * gdbthread.h (find_thread): Add overload with ptid_t filter.
761 * linux-low.c (struct iterate_over_lwps_args): Remove.
762 (iterate_over_lwps_filter): Remove.
763 (iterate_over_lwps): Use find_thread.
764
765 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
766
767 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
768 (linux_handle_new_gdb_connection): Use for_each_thread, inline
769 code from reset_lwp_ptrace_options_callback.
770
771 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
772
773 * linux-arm-low.c (struct update_registers_data): Remove.
774 (update_registers_callback): Return void, take arguments
775 directly, don't check thread's pid.
776 (arm_insert_point, arm_remove_point): Use for_each_thread.
777
778 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
779
780 * win32-low.c (continue_one_thread): Return void, take argument
781 directly.
782 (child_continue): Use for_each_thread.
783
784 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
785
786 * win32-i386-low.c (update_debug_registers_callback): Rename
787 to ...
788 (update_debug_registers): ... this, return void, remove pid_p arg.
789 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
790
791 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
792
793 * inferiors.h (struct process_info): Add constructor, initialize
794 fields..
795 <syscalls_to_catch>: Change type to std::vector<int>.
796 * inferiors.c (add_process): Allocate process_info with new.
797 (remove_process): Free process_info with delete.
798 * linux-low.c (handle_extended_wait): Adjust.
799 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
800 * server.c (handle_general_set): Adjust.
801
802 2017-11-16 Pedro Alves <palves@redhat.com>
803
804 * remote-utils.c (remote_close): Block SIGIO signals instead of
805 uninstalling the SIGIO handler.
806
807 2017-11-16 Alan Hayward <alan.hayward@arm.com>
808
809 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
810
811 2017-11-16 Yao Qi <yao.qi@linaro.org>
812
813 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
814 (tic6x_store_gregset): Likewise.
815 (tic6x_usrregs_info): Move it up.
816
817 2017-11-15 Alan Hayward <alan.hayward@arm.com>
818
819 * Makefile.in: Update arch rules.
820 * configure.srv: Explicitly mark arch/ files.
821
822 2017-11-13 Andreas Schwab <schwab@suse.de>
823
824 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
825 function.
826 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
827
828 2017-11-06 Pedro Alves <palves@redhat.com>
829
830 * config.in, configure: Regenerate.
831
832 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
833
834 * target.c (struct thread_search): Remove.
835 (thread_search_callback): Remove.
836 (prepare_to_access_memory): Use for_each_thread instead of
837 find_inferior. Inline code from thread_search_callback.
838
839 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
840
841 * server.c (struct visit_actioned_threads_data): Remove.
842 (visit_actioned_threads): Change prototype to take arguments
843 directly.
844 (resume): Use find_thread instead of find_inferior.
845
846 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
847
848 * server.c (queue_stop_reply_callback): Change prototype, return
849 void.
850 (find_status_pending_thread_callback): Remove.
851 (handle_status): Replace find_inferior with find_thread and
852 for_each_thread.
853
854 2017-10-25 Alan Hayward <alan.hayward@arm.com>
855
856 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
857 with REGNO.
858 (aarch64_store_gregset): Likewise.
859 (aarch64_fill_fpregset): Likewise.
860 (aarch64_store_fpregset): Likewise.
861
862 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
863
864 * gdbthread.h (find_thread, for_each_thread): New functions.
865 * inferiors.c (thread_of_pid): Remove.
866 (find_any_thread_of_pid): Use find_thread.
867 * linux-low.c (num_lwps): Use for_each_thread.
868
869 2017-10-17 Yao Qi <yao.qi@linaro.org>
870
871 * Makefile.in: Remove one rule.
872 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
873
874 2017-10-17 Yao Qi <yao.qi@linaro.org>
875
876 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
877 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
878
879 2017-10-17 Yao Qi <yao.qi@linaro.org>
880
881 * configure.srv: Rename arm.o with arch/arm.o.
882
883 2017-10-17 Yao Qi <yao.qi@linaro.org>
884
885 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
886 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
887 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
888 (arch-i386.o, arch-amd64.o): Remove rules.
889 (arch/%.o): New rule.
890 Update POSTCOMPILE and COMPILE.pre.
891 * configure.ac: Invoke AC_CONFIG_COMMANDS.
892 * configure: Re-generated.
893 * configure.srv: Replace arch-i386.o with arch/i386.o.
894 Replace arch-amd64.o with arch/amd64.o.
895
896 2017-10-16 Yao Qi <yao.qi@linaro.org>
897
898 * configure: Regenerated.
899
900 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
901
902 * inferiors.h: (struct inferior_list): Remove.
903 (struct inferior_list_entry); Remove.
904 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
905 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
906 get_first_inferior): Remove.
907 (for_each_inferior, for_each_inferior_with_data, find_inferior,
908 find_inferior_id, find_inferior_in_random): Change signature.
909 * inferiors.c (all_threads): Change type to
910 std::list<thread_info *>.
911 (get_thread): Remove macro.
912 (find_inferior, find_inferior_id): Change signature, implement
913 using find_thread.
914 (find_inferior_in_random): Change signature, implement using
915 find_thread_in_random.
916 (for_each_inferior, for_each_inferior_with_data): Change
917 signature, implement using for_each_thread.
918 (add_inferior_to_list, remove_inferior): Remove.
919 (add_thread, get_first_thread, thread_of_pid,
920 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
921 (get_first_inferior, one_inferior_p, clear_inferior_list):
922 Remove.
923 (clear_inferiors, get_thread_process): Update.
924 * gdbthread.h: Include <list>.
925 (struct thread_info) <entry>: Remove field.
926 <id>: New field.
927 (all_threads): Change type to std::list<thread_info *>.
928 (get_first_inferior): Add doc.
929 (find_thread, for_each_thread, find_thread_in_random): New
930 functions.
931 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
932 * linux-arm-low.c (update_registers_callback): Update.
933 * linux-low.c (second_thread_of_pid_p): Update.
934 (kill_one_lwp_callback, linux_detach_lwp_callback,
935 delete_lwp_callback, status_pending_p_callback, same_lwp,
936 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
937 iterate_over_lwps, not_stopped_callback,
938 resume_stopped_resumed_lwps, count_events_callback,
939 select_singlestep_lwp_callback, select_event_lwp_callback,
940 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
941 suspend_and_send_sigstop_callback, wait_for_sigstop,
942 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
943 lwp_running, linux_set_resume_request, resume_status_pending_p,
944 need_step_over_p, start_step_over, linux_resume_one_thread,
945 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
946 reset_lwp_ptrace_options_callback): Update.
947 * linux-mips-low.c (update_watch_registers_callback): Update.
948 * regcache.c (regcache_invalidate_one, regcache_invalidate):
949 Update.
950 (free_register_cache_thread_one): Remove.
951 (regcache_release): Update.
952 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
953 handle_qxfer_threads_worker): Update.
954 (handle_query): Update, use list iterator.
955 (visit_actioned_threads, handle_pending_status,
956 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
957 clear_pending_status_callback, set_pending_status_callback,
958 find_status_pending_thread_callback, handle_status,
959 process_serial_event): Update.
960 * target.c (thread_search_callback): Update.
961 * thread-db.c (thread_db_get_tls_address): Update.
962 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
963 Update.
964 * win32-i386-low.c (update_debug_registers_callback): Update.
965 * win32-low.c (delete_thread_info, child_delete_thread,
966 continue_one_thread, suspend_one_thread,
967 get_child_debug_event): Adjust.
968
969 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
970
971 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
972 * inferiors.h: Include <list>.
973 (struct process_info) <entry>: Remove field.
974 <pid>: New field.
975 (pid_of): Change macro to function.
976 (ptid_of, lwpid_of): Remove macro.
977 (all_processes): Change type to std::list<process_info *>.
978 (ALL_PROCESSES): Remove macro.
979 (for_each_process, find_process): New function.
980 * inferiors.c (all_processes): Change type to
981 std::list<process_info *>.
982 (find_thread_process): Adjust.
983 (add_process): Likewise.
984 (remove_process): Likewise.
985 (find_process_pid): Likewise.
986 (get_first_process): Likewise.
987 (started_inferior_callback): Remove.
988 (have_started_inferiors_p): Adjust.
989 (attached_inferior_callback): Remove.
990 (have_attached_inferiors_p): Adjust.
991 * linux-low.c (check_zombie_leaders): Likewise.
992 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
993 (x86_linux_update_xmltarget): Adjust.
994 * server.c (handle_query): Likewise.
995 (gdb_reattached_process): Remove.
996 (handle_status): Adjust.
997 (kill_inferior_callback): Likewise.
998 (detach_or_kill_inferior): Remove.
999 (print_started_pid): Likewise.
1000 (print_attached_pid): Likewise.
1001 (detach_or_kill_for_exit): Update.
1002 (process_serial_event): Likewise.
1003 * linux-arm-low.c (arm_new_fork): Likewise.
1004
1005 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1006
1007 * dll.h: Include <list>.
1008 (struct dll_info): Add constructor.
1009 <entry>: Remove field.
1010 (all_dlls): Change type to std::list<dll_info>.
1011 * dll.c: Include <algorithm>.
1012 (get_dll): Remove macro.
1013 (all_dlls): Change type to std::list<dll_info *>.
1014 (free_one_dll): Remove.
1015 (match_dll): Likewise.
1016 (loaded_dll): Adjust.
1017 (unloaded_dll): Adjust to all_dlls type change, use
1018 std::find_if. Inline code from match_dll.
1019 (clear_dlls): Adjust to all_dlls type change.
1020 * server.c (emit_dll_description): Remove.
1021 (handle_qxfer_libraries): Adjust to all_dlls type change,
1022 integrate emit_dll_description's functionality.
1023
1024 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1025
1026 * linux-low.h (struct linux_target_ops) <delete_process>: New
1027 field.
1028 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1029 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1030 (struct linux_target_ops): Add delete_process callback.
1031 * linux-arm-low.c (arm_delete_process): New.
1032 (struct linux_target_ops): Add delete_process callback.
1033 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1034 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1035 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1036 * linux-mips-low.c (mips_linux_delete_process): New.
1037 (struct linux_target_ops): Add delete_process callback.
1038 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1039 * linux-s390-low.c (struct linux_target_ops): Likewise.
1040 * linux-sh-low.c (struct linux_target_ops): Likewise.
1041 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1042 * linux-tile-low.c (struct linux_target_ops): Likewise.
1043 * linux-x86-low.c (x86_linux_delete_process): New.
1044 (struct linux_target_ops): Add delete_process callback.
1045 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1046
1047 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1048
1049 * linux-aarch64-low.c (the_low_target): Add thread delete
1050 callback.
1051 * linux-arm-low.c (arm_delete_thread): New function.
1052 (the_low_target): Add thread delete callback.
1053 * linux-bfin-low.c (the_low_target): Likewise.
1054 * linux-crisv32-low.c (the_low_target): Likewise.
1055 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1056 set.
1057 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1058 field.
1059 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1060 * linux-mips-low.c (mips_linux_delete_thread): New function.
1061 (the_low_target): Add thread delete callback.
1062 * linux-ppc-low.c (the_low_target): Likewise.
1063 * linux-s390-low.c (the_low_target): Likewise.
1064 * linux-sh-low.c (the_low_target): Likewise.
1065 * linux-tic6x-low.c (the_low_target): Likewise.
1066 * linux-tile-low.c (the_low_target): Likewise.
1067 * linux-x86-low.c (the_low_target): Likewise.
1068 * linux-xtensa-low.c (the_low_target): Likewise.
1069
1070 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1071
1072 * win32-low.c: Include "common-inferior.h".
1073
1074 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1075
1076 * inferiors.c (set_inferior_cwd): New function.
1077 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1078 (handle_query): Inform that QSetWorkingDir is supported.
1079 * win32-low.c (create_process): Pass the inferior's cwd to
1080 CreateProcess.
1081
1082 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1083
1084 * inferiors.c (current_inferior_cwd): New global variable.
1085 (get_inferior_cwd): New function.
1086 * inferiors.h (struct process_info) <cwd>: New field.
1087
1088 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1089
1090 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1091 (OBS): Add gdb_tilde_expand.o.
1092
1093 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1094
1095 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1096 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1097
1098 2017-09-29 Pedro Alves <palves@redhat.com>
1099
1100 * ax.c (gdb_parse_agent_expr): Constify.
1101 * ax.h (gdb_parse_agent_expr): Constify.
1102 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1103 Constify.
1104 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1105 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1106 * remote-utils.h (read_ptid): Constify.
1107 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1108 (process_point_options, process_serial_event): Constify.
1109 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1110 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1111 (cmd_qtbuffer): Constify.
1112
1113 2017-09-29 Pedro Alves <palves@redhat.com>
1114
1115 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1116 fails.
1117
1118 2017-09-29 Pedro Alves <palves@redhat.com>
1119
1120 * linux-low.c (handle_extended_wait): Pass parent thread instead
1121 of process to thread_db_notice_clone.
1122 * linux-low.h (thread_db_notice_clone): Replace parent process
1123 parameter with parent thread parameter.
1124 * thread-db.c (find_one_thread): Add comment.
1125 (thread_db_notice_clone): Replace parent process parameter with
1126 parent thread parameter. Temporarily switch to the parent thread.
1127
1128 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1129
1130 * gdbthread.h: Include "common-gdbthread.h".
1131 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1132 "if" when validating the ptid.
1133 * remote-utils.c: Include "gdbthread.h".
1134 (prepare_resume_reply): Use "switch_to_thread".
1135 * target.c (done_accessing_memory): Likewise.
1136
1137 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1138
1139 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1140 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1141 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1142 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1143 s390x-gs-linux64-ipa.o to ipa_obj.
1144 * linux-s390-low.c (HWCAP_S390_GS): New define.
1145 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1146 New functions.
1147 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1148 (s390_arch_setup): Check for guarded-storage support and choose
1149 appropriate tdesc.
1150 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1151 init_registers_s390x_gs_linux64.
1152 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1153 enum value.
1154 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1155 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1156
1157 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1158
1159 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1160
1161 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1162
1163 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1164 (thread_db_thread_handle): Declare.
1165 * linux-low.c (linux_target_ops): Initialize thread_handle.
1166 * server.c (handle_qxfer_threads_worker): Add support for
1167 "handle" attribute.
1168 * target.h (struct target_ops): Add new function pointer,
1169 thread_handle.
1170 (target_thread_handle): Define.
1171 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1172 field in lwp.
1173 (thread_db_thread_handle): New function.
1174
1175 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1176
1177 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1178 * linux-low.h (thread_db_notice_clone): Declare.
1179 * thread-db.c (thread_db_notice_clone): New function.
1180
1181 2017-09-21 Pedro Alves <palves@redhat.com>
1182
1183 * server.c (gdb_read_memory, handle_status, process_serial_event)
1184 (handle_serial_event, handle_target_event): Adjust to
1185 set_desired_thread prototype change.
1186 * target.c (set_desired_thread): Remove 'use_general' parameter
1187 and adjust.
1188 * target.h (set_desired_thread): Remove 'use_general' parameter.
1189
1190 2017-09-20 Tom Tromey <tom@tromey.com>
1191
1192 * target.c (target_terminal::terminal_state): Define.
1193 (target_terminal::init): Rename from target_terminal_init.
1194 (target_terminal::inferior): Rename from
1195 target_terminal_inferior.
1196 (target_terminal::ours): Rename from target_terminal_ours.
1197 (target_terminal::ours_for_output, target_terminal::info): New.
1198
1199 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1200
1201 * server.c (accumulate_file_name_length): Remove.
1202 (emit_dll_description): Adjust to std::string change.
1203 (handle_qxfer_libraries): Use std::string to hold document.
1204
1205 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1206
1207 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1208 return type of xml_escape_text.
1209 * server.c (emit_dll_description): Likewise.
1210
1211 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1212
1213 * server.c (captured_main): Accept argument for --selftest.
1214 Update run_tests call.
1215 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1216 when registering selftests.
1217
1218 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1219
1220 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1221 instead of "VEC" for "target_desc.reg_defs".
1222 (regcache_cpy): Likewise.
1223 (registers_to_string): Likewise.
1224 (registers_from_string): Likewise.
1225 (find_regno): Likewise.
1226 (supply_regblock): Likewise.
1227 (regcache_raw_read_unsigned): Likewise.
1228 * tdesc.c (init_target_desc): Likewise.
1229 (tdesc_create_reg): Likewise.
1230 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1231 (struct target_desc) <reg_defs>: Convert to "std::vector".
1232 (target_desc): Do not initialize "reg_defs".
1233 (~target_desc): Update code to use "std::vector" instead of "VEC"
1234 for "target_desc.reg_defs".
1235 (operator==): Likewise.
1236
1237 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1238
1239 * inferiors.h (thread_to_gdb_id): Remove.
1240 * inferiors.c (thread_to_gdb_id): Remove.
1241 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1242 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1243 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1244 Likewise.
1245 * nto-low.c (nto_fetch_registers, nto_store_registers,
1246 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1247
1248 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1249
1250 * inferiors.h (gdb_id_to_thread_id): Remove.
1251 * inferiors.c (gdb_id_to_thread_id): Remove.
1252 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1253 removal. Move pid declaration closer to where it's used.
1254
1255 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1256
1257 * server.c (handle_detach): New function.
1258 (process_serial_event): Move code out, call handle_detach.
1259
1260 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1261
1262 * server.c (require_running): Rename to ...
1263 (require_running_or_return): ... this ...
1264 (require_running_or_break): ... and this.
1265 (handle_query, process_serial_event): Adjust.
1266
1267 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1268
1269 * linux-low.c (linux_set_resume_request): Remove unused
1270 variables.
1271
1272 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1273
1274 * server.c (first_thread_of): Remove.
1275 (process_serial_event): Replace usage of first_thread_of with
1276 find_any_thread_of_pid.
1277 * tracepoint.c (same_process_p): Remove.
1278 (gdb_agent_about_to_close): Replace usage of same_process_p with
1279 find_any_thread_of_pid.
1280 * linux-x86-low.c (same_process_callback): Remove.
1281 (x86_arch_setup_process_callback): Replace usage of
1282 same_process_callback with find_any_thread_of_pid.
1283 * thread-db.c (any_thread_of): Remove.
1284 (switch_to_process): Replace usage of any_thread_of with
1285 find_any_thread_of_pid.
1286 * inferiors.c (thread_pid_matches_callback): Remove.
1287 (find_thread_process): Adjust to use find_any_thread_of_pid.
1288
1289 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1290
1291 * regcache.c (get_thread_regcache): Guard calls to "memset"
1292 with "!VEC_empty".
1293
1294 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1295
1296 * linux-low.c (handle_extended_wait): Use
1297 "allocate_target_description" instead of "XNEW".
1298 * linux-x86-low.c (initialize_low_arch): Likewise.
1299
1300 2017-09-05 Yao Qi <yao.qi@linaro.org>
1301
1302 * configure.srv (srv_i386_regobj): Remove.
1303 (srv_amd64_regobj): Remove.
1304 (srv_regobj): Set it to "" for x86 non-linux targets.
1305 * linux-x86-tdesc.c (i386_linux_read_description):
1306 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1307 (init_registers_i386): Remove the declaration.
1308 (tdesc_i386): Remove the declaration.
1309 (lynx_i386_arch_setup): Call i386_create_target_description.
1310 * nto-x86-low.c: Likewise.
1311 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1312 [!__x86_64__]: include arch/i386.h.
1313 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1314
1315 2017-09-05 Yao Qi <yao.qi@linaro.org>
1316
1317 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1318 i386/amd64-XXX-linux from it.
1319
1320 2017-09-05 Yao Qi <yao.qi@linaro.org>
1321
1322 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1323 false.
1324 (ipa_amd64_linux_regobj): Remove.
1325 (ipa_x32_linux_regobj): Remove.
1326
1327 2017-09-05 Yao Qi <yao.qi@linaro.org>
1328
1329 * Makefile.in (arch-amd64.o): New rule.
1330 * configure.srv: Append arch-amd64.o.
1331 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1332 (get_ipa_tdesc): Call amd64_linux_read_description.
1333 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1334 and init_registers_amd64_XXX.
1335 * linux-x86-low.c (x86_linux_read_description): Call
1336 amd64_linux_read_description.
1337 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1338 (initialize_low_arch): Don't call init_registers_x32_XXX and
1339 init_registers_amd64_XXX.
1340 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1341 and tdesc_amd64_XXX.
1342 [__x86_64__] (amd64_tdesc_test): New function.
1343 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1344 and init_registers_amd64_XXX.
1345 * linux-x86-tdesc.c: Include arch/amd64.h.
1346 (xcr0_to_tdesc_idx): New function.
1347 (i386_linux_read_description): New function.
1348 (amd64_get_ipa_tdesc_idx): New function.
1349 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1350 (amd64_get_ipa_tdesc): Declare.
1351
1352 2017-09-05 Yao Qi <yao.qi@linaro.org>
1353
1354 * configure.srv (srv_i386_linux_xmlfiles): Remove
1355 i386/i386-XXX-linux.xml from it.
1356
1357 2017-09-05 Yao Qi <yao.qi@linaro.org>
1358
1359 * configure.srv: Set srv_i386_linux_regobj empty if $development
1360 is false.
1361 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1362 initialize_low_tdesc.
1363 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1364 with #if initialize_low_tdesc.
1365 * linux-x86-tdesc-selftest.c: New file.
1366 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1367
1368 2017-09-05 Yao Qi <yao.qi@linaro.org>
1369
1370 * Makefile.in (arch-i386.o): New rule.
1371 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1372 (x86_64-*-linux*): Likewise.
1373 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1374 include arch/i386.h.
1375 (i386_linux_read_description): Remove code and call
1376 i386_create_target_description.
1377 * tdesc.c (allocate_target_description): New function.
1378 * tdesc.h (set_tdesc_architecture): Remove declaration.
1379 (set_tdesc_osabi): Likewise.
1380
1381 2017-09-05 Yao Qi <yao.qi@linaro.org>
1382
1383 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1384 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1385 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1386 .xmltarget.
1387 * server.c (get_features_xml): Call tdesc_get_features_xml.
1388 * tdesc.c (set_tdesc_architecture): New function.
1389 (set_tdesc_osabi): New function.
1390 (tdesc_get_features_xml): New function.
1391 (tdesc_create_feature): Add an argument.
1392 * tdesc.h (struct target_desc) <features>: New field.
1393 <arch, osabi>: New field.
1394 (~target_desc): xfree features, arch, and osabi.
1395 (target_desc::oerator==): Don't compare .xmltarget.
1396 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1397 (set_tdesc_osabi): Likewise.
1398 (tdesc_get_features_xml): Likewise.
1399
1400 2017-09-05 Yao Qi <yao.qi@linaro.org>
1401
1402 * linux-x86-tdesc.c: Include selftest.h.
1403 (i386_tdesc_test): New function.
1404 (initialize_low_tdesc): Call selftests::register_test.
1405 * tdesc.h: Include regdef.h.
1406 (target_desc): Override operator == and !=.
1407
1408 2017-09-05 Yao Qi <yao.qi@linaro.org>
1409
1410 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1411 (ipa_obj): Likewise.
1412 * linux-i386-ipa.c: Include common/x86-xstate.h
1413 (get_ipa_tdesc): Call i386_linux_read_description.
1414 (initialize_low_tracepoint): Don't call init_registers_XXX
1415 functions, call initialize_low_tdesc instead.
1416 * linux-x86-low.c (x86_linux_read_description): Call
1417 i386_linux_read_description.
1418 (initialize_low_arch): Don't call init_registers_i386_XXX
1419 functions, call initialize_low_tdesc.
1420 * linux-x86-tdesc.c: New file.
1421 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1422 (i386_get_ipa_tdesc_idx): Declare.
1423 (i386_get_ipa_tdesc): Declare.
1424 (initialize_low_tdesc): Declare.
1425
1426 2017-09-05 Yao Qi <yao.qi@linaro.org>
1427
1428 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1429 instead of 0.
1430
1431 2017-09-05 Yao Qi <yao.qi@linaro.org>
1432
1433 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1434 * regcache.c (get_thread_regcache): Use VEC_length.
1435 (init_register_cache): Likewise.
1436 (regcache_cpy): Likewise.
1437 (registers_to_string): Iterate reg_defs via VEC_iterate.
1438 (find_regno): Likewise.
1439 (find_register_by_number): Use VEC_index.
1440 (register_size): Call find_register_by_number.
1441 (register_data): Call find_register_by_number.
1442 (supply_regblock): Use VEC_length.
1443 (regcache_raw_read_unsigned): Likewise.
1444 * tdesc.c (init_target_desc): Iterate reg_defs via
1445 VEC_iterate.
1446 (default_description): Update initializer.
1447 (copy_target_description): Don't update field num_registers.
1448 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1449 <num_registers>: Remove.
1450
1451 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1452
1453 * Makefile.in (.SECONDARY): Define target.
1454
1455 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1456
1457 * linux-low.c (linux_wait_1): Adjust.
1458 * server.c (queue_stop_reply_callback): Adjust.
1459
1460 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1461
1462 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1463 QEnvironmentUnset and QEnvironmentReset packets.
1464 (handle_query): Inform remote that QEnvironmentHexEncoded,
1465 QEnvironmentUnset and QEnvironmentReset are supported.
1466
1467 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1468
1469 * inferiors.h (inferior_target_data): Rename to ...
1470 (thread_target_data): ... this.
1471 (inferior_regcache_data): Rename to ...
1472 (thread_regcache_data): ... this.
1473 (set_inferior_regcache_data): Rename to ...
1474 (set_thread_regcache_data): ... this.
1475 * inferiors.c (inferior_target_data): Rename to ...
1476 (thread_target_data): ... this.
1477 (inferior_regcache_data): Rename to ...
1478 (thread_regcache_data): ... this.
1479 (set_inferior_regcache_data): Rename to ...
1480 (set_thread_regcache_data): ... this.
1481 (free_one_thread): Update.
1482 * linux-low.h (get_thread_lwp): Update.
1483 * regcache.c (get_thread_regcache): Update.
1484 (regcache_invalidate_thread): Update.
1485 (free_register_cache_thread): Update.
1486 * win32-i386-low.c (update_debug_registers_callback): Update.
1487 (win32_get_current_dr): Update.
1488 * win32-low.c (thread_rec): Update.
1489 (delete_thread_info): Update.
1490 (continue_one_thread): Update.
1491 (suspend_one_thread): Update.
1492
1493 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1494
1495 * inferiors.c (set_inferior_target_data): Remove.
1496 * inferiors.h (set_inferior_target_data): Remove.
1497
1498 2017-08-18 Yao Qi <yao.qi@linaro.org>
1499
1500 * Makefile.in (OBS): Add selftest.o.
1501 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1502 * configure, config.in: Re-generated.
1503 * server.c: Include common/sefltest.h.
1504 (captured_main): Handle option --selftest.
1505
1506 2017-08-09 Yao Qi <yao.qi@linaro.org>
1507
1508 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1509 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1510 i386-avx-mpx.o and i386-mmx.o.
1511 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1512 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1513 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1514 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1515 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1516 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1517 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1518 i386/amd64-avx-mpx.xml.
1519
1520 2017-08-09 Yao Qi <yao.qi@linaro.org>
1521
1522 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1523 and x32-avx-avx512.o.
1524 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1525 i386/x32-avx-avx512.xml.
1526
1527 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1528
1529 * tracepoint.h (enum class fast_tpoint_collect_result): New
1530 enumeration.
1531 (fast_tracepoint_collecting): Change return type to
1532 fast_tpoint_collect_result.
1533 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1534 * linux-low.h: Include tracepoint.h.
1535 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1536 fast_tpoint_collect_result.
1537 * linux-low.c (handle_tracepoints): Adjust.
1538 (linux_fast_tracepoint_collecting): Change return type to
1539 fast_tpoint_collect_result.
1540 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1541 linux_wait_1, stuck_in_jump_pad_callback,
1542 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1543 proceed_one_lwp): Adjust to type change.
1544
1545 2017-07-10 Yao Qi <yao.qi@linaro.org>
1546
1547 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1548
1549 2017-06-29 Yao Qi <yao.qi@linaro.org>
1550
1551 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1552 Remove.
1553 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1554
1555 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1556
1557 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1558
1559 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1560
1561 * linux-low.c (linux_create_inferior): Adjust code to access the
1562 environment information via 'gdb_environ' class.
1563 * lynx-low.c (lynx_create_inferior): Likewise.
1564 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1565 (get_environ): Return a pointer to 'our_environ'.
1566 (captured_main): Initialize 'our_environ'.
1567 * server.h (get_environ): Adjust prototype.
1568 * spu-low.c (spu_create_inferior): Adjust code to access the
1569 environment information via 'gdb_environ' class.
1570
1571 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1572
1573 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1574 usage of "register" keyword.
1575
1576 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1577
1578 * configure: Re-generate.
1579
1580 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1581
1582 * configure: Re-generate.
1583
1584 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1585
1586 * Makefile.in (COMPILE.pre): Add "-x c++".
1587
1588 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1589
1590 * fork-child.c: Conditionally include <signal.h>.
1591
1592 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1593
1594 * server.c (handle_general_set): Handle new packet
1595 "QStartupWithShell".
1596 (handle_query): Add "QStartupWithShell" to the list of supported
1597 packets.
1598 (gdbserver_usage): Add help text explaining the
1599 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1600 options.
1601 (captured_main): Recognize and act upon the presence of the new
1602 CLI options.
1603
1604 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1605 Pedro Alves <palves@redhat.com>
1606
1607 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1608 * configure: Regenerate.
1609 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1610 "fork-inferior.o".
1611 (i[34567]86-*-lynxos*): Likewise.
1612 (spu*-*-*): Likewise.
1613 * fork-child.c: New file.
1614 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1615 and "environ.h".
1616 (linux_ptrace_fun): New function.
1617 (linux_create_inferior): Adjust function prototype to reflect
1618 change on "target.h". Adjust function code to use
1619 "fork_inferior".
1620 (linux_request_interrupt): Delete "signal_pid".
1621 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1622 (lynx_ptrace_fun): New function.
1623 (lynx_create_inferior): Adjust function prototype to reflect
1624 change on "target.h". Adjust function code to use
1625 "fork_inferior".
1626 * nto-low.c (nto_create_inferior): Adjust function prototype and
1627 code to reflect change on "target.h". Update comments.
1628 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1629 "common-terminal.h" and "environ.h".
1630 (terminal_fd): Moved to fork-child.c.
1631 (old_foreground_pgrp): Likewise.
1632 (restore_old_foreground_pgrp): Likewise.
1633 (last_status): Make it global.
1634 (last_ptid): Likewise.
1635 (our_environ): New variable.
1636 (startup_with_shell): Likewise.
1637 (program_name): Likewise.
1638 (program_argv): Rename to...
1639 (program_args): ...this.
1640 (wrapper_argv): New variable.
1641 (start_inferior): Delete function.
1642 (get_exec_wrapper): New function.
1643 (get_exec_file): Likewise.
1644 (get_environ): Likewise.
1645 (prefork_hook): Likewise.
1646 (post_fork_inferior): Likewise.
1647 (postfork_hook): Likewise.
1648 (postfork_child_hook): Likewise.
1649 (handle_v_run): Update code to deal with arguments coming from the
1650 remote host. Update calls from "start_inferior" to
1651 "create_inferior".
1652 (captured_main): Likewise. Initialize environment variable. Call
1653 "have_job_control".
1654 * server.h (post_fork_inferior): New prototype.
1655 (get_environ): Likewise.
1656 (last_status): Declare.
1657 (last_ptid): Likewise.
1658 (signal_pid): Likewise.
1659 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1660 (spu_ptrace_fun): New function.
1661 (spu_create_inferior): Adjust function prototype to reflect change
1662 on "target.h". Adjust function code to use "fork_inferior".
1663 * target.c (target_terminal_init): New function.
1664 (target_terminal_inferior): Likewise.
1665 (target_terminal_ours): Likewise.
1666 * target.h: Include <vector>.
1667 (struct target_ops) <create_inferior>: Update prototype.
1668 (create_inferior): Update macro.
1669 * utils.c (gdb_flush_out_err): New function.
1670 * win32-low.c (win32_create_inferior): Adjust function prototype
1671 and code to reflect change on "target.h".
1672
1673 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1674
1675 * inferiors.c (switch_to_thread): New function.
1676
1677 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1678
1679 * Makefile.in (SFILE): Add "common/job-control.c".
1680 (OBS): Add "job-control.o".
1681
1682 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1683
1684 * Makefile: Remove "@host_makefile_frag@".
1685
1686 2017-05-05 Pedro Alves <palves@redhat.com>
1687
1688 * configure: Regenerate.
1689
1690 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1691
1692 * configure: Regenerate.
1693
1694 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1695
1696 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1697 software_single_step change of return type to
1698 std::vector<CORE_ADDR>.
1699 * linux-low.c (install_software_single_step_breakpoints):
1700 Likewise.
1701 * linux-low.h (install_software_single_step_breakpoints):
1702 Likewise.
1703
1704 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1705
1706 * remote-utils.c: Include "gdb_termios.h" instead of
1707 "terminal.h".
1708 * terminal.h: Delete file.
1709
1710 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1711
1712 * server.c: Include <vector>.
1713 <program_argv, wrapper_argv>: Convert to std::vector.
1714 (start_inferior): Rewrite function to use C++.
1715 (handle_v_run): Likewise. Update code that calculates the argv
1716 based on the vRun packet; use C++.
1717 (captured_main): Likewise.
1718
1719 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1720
1721 * server.c (handle_v_cont): Initialize thread_resume::thread
1722 with null_ptid.
1723
1724 2017-04-05 Pedro Alves <palves@redhat.com>
1725
1726 * configure: Regenerate.
1727
1728 2017-04-05 Pedro Alves <palves@redhat.com>
1729
1730 * gdbreplay.c (sync_error): Constify.
1731 * linux-x86-low.c (push_opcode): Constify.
1732
1733 2017-04-05 Pedro Alves <palves@redhat.com>
1734
1735 * win32-low.c (get_child_debug_event)
1736 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1737 Report TARGET_WAITKIND_SPURIOUS instead.
1738
1739 2017-04-05 Pedro Alves <palves@redhat.com>
1740
1741 * remote-utils.c (remote_prepare, remote_open): Constify.
1742 * remote-utils.h (remote_prepare, remote_open): Constify.
1743 * server.c (captured_main): Constify 'port' handling.
1744
1745 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1746
1747 * Makefile.in (clean): Clear .deps.
1748
1749 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1750
1751 * .gitignore: Remove generated files, replace with wildcard.
1752 * (clean): Replace removal of generated files with wildcard.
1753 (version.c): Replace with...
1754 (version-generated.c): ...this.
1755 (xml-builtin.c): Replace with...
1756 (xml-builtin-generated.c): ...this.
1757 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1758 (%.c: *regformats*): Replace with...
1759 (%-generated.c: *regformats*): ...this.
1760
1761 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1762
1763 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1764 (xtensa_fill_gregset): Call collect_register_by_name for
1765 threadptr register.
1766 (xtensa_store_gregset): Call supply_register_by_name for
1767 threadptr register.
1768
1769 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1770
1771 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1772 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1773 (xtensa_store_gregset): Call supply_register for all registers in
1774 a0_regnum..a0_regnum + C0_NREGS range.
1775
1776 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1777
1778 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1779 (ax-ipa.o: ax.c): Remove.
1780 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1781 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1782 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1783 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1784 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1785
1786 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1787
1788 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1789 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1790 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1791 (errors-ipa.o: ../common/errors.c): Remove.
1792 (format-ipa.o: ../common/format.c): Remove.
1793 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1794
1795 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1796
1797 * Makefile.in (%-ipa.o: %.c): New rule.
1798 (tracepoint-ipa.o: tracepoint.c): Remove.
1799 (utils-ipa.o: utils.c): Remove.
1800 (remote-utils-ipa.o: remote-utils.c): Remove.
1801 (regcache-ipa.o: regcache.c): Remove.
1802 (i386-linux-ipa.o: i386-linux.c): Remove.
1803 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1804 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1805 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1806 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1807 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1808 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1809 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1810 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1811 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1812 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1813 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1814 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1815 (aarch64-ipa.o: aarch64.c): Remove.
1816 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1817 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1818 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1819 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1820 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1821 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1822 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1823 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1824 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1825 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1826 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1827 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1828 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1829 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1830 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1831 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1832 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1833 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1834 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1835 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1836 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1837 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1838 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1839 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1840 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1841 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1842 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1843 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1844 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1845 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1846 (tdesc-ipa.o: tdesc.c): Remove.
1847 (x32-linux-ipa.o: x32-linux.c): Remove.
1848 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1849 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1850
1851 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1852
1853 * Makefile.in (%.o: ../arch/%.c): New rule.
1854 (arm.o: ../arch/arm.c): Remove.
1855 (arm-linux.o: ../arch/arm-linux.c): Remove.
1856 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1857 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1858
1859 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1860
1861 * Makefile.in (%.o: ../nat/%.c): New rule.
1862 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1863 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1864 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1865 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1866 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1867 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1868 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1869 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1870 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1871 (linux-personality.o: ../nat/linux-personality.c): Remove.
1872 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1873 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1874 (x86-linux.o: ../nat/x86-linux.c): Remove.
1875 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1876 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1877
1878 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1879
1880 * Makefile.in (%.o: ../common/%.c): New rule.
1881 (signals.o: ../common/signals.c): Remove.
1882 (print-utils.o: ../common/print-utils.c): Remove.
1883 (rsp-low.o: ../common/rsp-low.c): Remove.
1884 (common-utils.o: ../common/common-utils.c): Remove.
1885 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1886 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1887 (vec.o: ../common/vec.c): Remove.
1888 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1889 (xml-utils.o: ../common/xml-utils.c): Remove.
1890 (ptid.o: ../common/ptid.c): Remove.
1891 (buffer.o: ../common/buffer.c): Remove.
1892 (format.o: ../common/format.c): Remove.
1893 (filestuff.o: ../common/filestuff.c): Remove.
1894 (agent.o: ../common/agent.c): Remove.
1895 (errors.o: ../common/errors.c): Remove.
1896 (environ.o: ../common/environ.c): Remove.
1897 (common-debug.o: ../common/common-debug.c): Remove.
1898 (cleanups.o: ../common/cleanups.c): Remove.
1899 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1900 (fileio.o: ../common/fileio.c): Remove.
1901 (common-regcache.o: ../common/common-regcache.c): Remove.
1902 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1903 (new-op.o: ../common/new-op.c): Remove.
1904 (btrace-common.o: ../common/btrace-common.c): Remove.
1905
1906 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1907
1908 * Makefile.in (%.o: ../target/%.c): New rule.
1909 (waitstatus.o: ../target/waitstatus.c): Remove.
1910
1911 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1912
1913 * Makefile.in
1914 (%.c: ../regformats/%.dat,
1915 (%.c: ../regformats/arm/%.dat,
1916 (%.c: ../regformats/i386/%.dat,
1917 (%.c: ../regformats/rs6000/%.dat): New rules.
1918 (aarch64.c): Remove.
1919 (reg-arm.c): Remove.
1920 (arm-with-iwmmxt.c): Remove.
1921 (arm-with-vfpv2.c): Remove.
1922 (arm-with-vfpv3.c): Remove.
1923 (arm-with-neon.c): Remove.
1924 (reg-bfin.c): Remove.
1925 (reg-cris.c): Remove.
1926 (reg-crisv32.c): Remove.
1927 (i386.c): Remove.
1928 (i386-linux.c): Remove.
1929 (i386-avx.c): Remove.
1930 (i386-avx-linux.c): Remove.
1931 (i386-avx-avx512.c): Remove.
1932 (i386-avx-avx512-linux.c): Remove.
1933 (i386-mpx.c): Remove.
1934 (i386-mpx-linux.c): Remove.
1935 (i386-avx-mpx-avx512-pku.c): Remove.
1936 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1937 (i386-avx-mpx.c): Remove.
1938 (i386-avx-mpx-linux.c): Remove.
1939 (i386-mmx.c): Remove.
1940 (i386-mmx-linux.c): Remove.
1941 (reg-ia64.c): Remove.
1942 (reg-m32r.c): Remove.
1943 (reg-m68k.c): Remove.
1944 (reg-cf.c): Remove.
1945 (mips-linux.c): Remove.
1946 (mips-dsp-linux.c): Remove.
1947 (mips64-linux.c): Remove.
1948 (mips64-dsp-linux.c): Remove.
1949 (nios2-linux.c): Remove.
1950 (powerpc-32.c): Remove.
1951 (powerpc-32l.c): Remove.
1952 (powerpc-altivec32l.c): Remove.
1953 (powerpc-cell32l.c): Remove.
1954 (powerpc-vsx32l.c): Remove.
1955 (powerpc-isa205-32l.c): Remove.
1956 (powerpc-isa205-altivec32l.c): Remove.
1957 (powerpc-isa205-vsx32l.c): Remove.
1958 (powerpc-e500l.c): Remove.
1959 (powerpc-64l.c): Remove.
1960 (powerpc-altivec64l.c): Remove.
1961 (powerpc-cell64l.c): Remove.
1962 (powerpc-vsx64l.c): Remove.
1963 (powerpc-isa205-64l.c): Remove.
1964 (powerpc-isa205-altivec64l.c): Remove.
1965 (powerpc-isa205-vsx64l.c): Remove.
1966 (s390-linux32.c): Remove.
1967 (s390-linux32v1.c): Remove.
1968 (s390-linux32v2.c): Remove.
1969 (s390-linux64.c): Remove.
1970 (s390-linux64v1.c): Remove.
1971 (s390-linux64v2.c): Remove.
1972 (s390-te-linux64.c): Remove.
1973 (s390-vx-linux64.c): Remove.
1974 (s390-tevx-linux64.c): Remove.
1975 (s390x-linux64.c): Remove.
1976 (s390x-linux64v1.c): Remove.
1977 (s390x-linux64v2.c): Remove.
1978 (s390x-te-linux64.c): Remove.
1979 (s390x-vx-linux64.c): Remove.
1980 (s390x-tevx-linux64.c): Remove.
1981 (tic6x-c64xp-linux.c): Remove.
1982 (tic6x-c64x-linux.c): Remove.
1983 (tic6x-c62x-linux.c): Remove.
1984 (reg-sh.c): Remove.
1985 (reg-sparc64.c): Remove.
1986 (reg-spu.c): Remove.
1987 (amd64.c): Remove.
1988 (amd64-linux.c): Remove.
1989 (amd64-avx.c): Remove.
1990 (amd64-avx-linux.c): Remove.
1991 (amd64-avx-avx512.c): Remove.
1992 (amd64-avx-avx512-linux.c): Remove.
1993 (amd64-mpx.c): Remove.
1994 (amd64-mpx-linux.c): Remove.
1995 (amd64-avx-mpx-avx512-pku.c): Remove.
1996 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1997 (amd64-avx-mpx.c): Remove.
1998 (amd64-avx-mpx-linux.c): Remove.
1999 (x32.c): Remove.
2000 (x32-linux.c): Remove.
2001 (x32-avx.c): Remove.
2002 (x32-avx-linux.c): Remove.
2003 (x32-avx-avx512.c): Remove.
2004 (x32-avx-avx512-linux.c): Remove.
2005 (reg-xtensa.c): Remove.
2006 (reg-tilegx.c): Remove.
2007 (reg-tilegx32.c): Remove.
2008
2009 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2010
2011 * Makefile.in (SFILES): Add "common/environ.c".
2012 (OBJS): Add "common/environ.h".
2013
2014 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2015
2016 * configure.ac: Check if the fs_base and gs_base members of
2017 `struct user_regs_struct' exist.
2018 * config.in: Regenerated.
2019 * configure: Likewise.
2020
2021 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2022
2023 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2024 target_read_memory.
2025 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2026 (get_next_pcs_syscall_next_pc): Likewise.
2027
2028 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2029
2030 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2031 * nto-x86-low.c: Likewise.
2032
2033 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2034
2035 * Makefile.in: Include disable-implicit-rules.mk.
2036
2037 2016-11-23 Pedro Alves <palves@redhat.com>
2038
2039 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2040 (debug_vprintf): Use std::chrono::steady_clock instead of
2041 gettimeofday. Use '.' instead of ':'.
2042 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2043 (get_timestamp): Use std::chrono::steady_clock instead of
2044 gettimeofday.
2045
2046 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2047
2048 * Makefile.in: Fix whitespace formatting.
2049
2050 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2051
2052 * Makefile.in (SFILES, OBS): Flatten list and order
2053 alphabetically.
2054
2055 2016-11-23 Pedro Alves <palves@redhat.com>
2056
2057 * event-loop.c (handle_file_event): Use warning.
2058 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2059 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2060 Use warning.
2061
2062 2016-11-23 Pedro Alves <palves@redhat.com>
2063
2064 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2065 output.
2066 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2067 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2068 debug_printf and debug_flush for debug output.
2069 * server.c (handle_general_set): Likewise.
2070 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2071 output.
2072
2073 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2074
2075 * Makefile.in (.c.o): Replace rule with ...
2076 (%.o: %.c): ... this one.
2077
2078 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2079
2080 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2081 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2082 make.
2083 * configure.ac: Remove checks for the make program.
2084 * configure: Re-generate.
2085
2086 2016-10-28 Pedro Alves <palves@redhat.com>
2087
2088 * Makefile.in (CXX_DIALECT): Get from configure.
2089 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2090 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2091 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2092 * config.in: Regenerate.
2093 * configure: Regenerate.
2094
2095 2016-10-27 Yao Qi <yao.qi@linaro.org>
2096
2097 * linux-low.c (linux_supports_range_stepping): Return true if
2098 can_software_single_step return true.
2099
2100 2016-10-27 Yao Qi <yao.qi@linaro.org>
2101
2102 * inferiors.c (find_inferior_in_random): New function.
2103 * inferiors.h (find_inferior_in_random): Declare.
2104 * linux-low.c (linux_wait_for_event_filtered): Call
2105 find_inferior_in_random instead of find_inferior.
2106
2107 2016-10-27 Yao Qi <yao.qi@linaro.org>
2108
2109 * linux-low.c (linux_wait_1): If single-step breakpoints are
2110 inserted, remove them.
2111
2112 2016-10-26 Pedro Alves <palves@redhat.com>
2113
2114 * linux-low.c (handle_extended_wait): Link parent/child fork
2115 threads.
2116 (linux_wait_1): Unlink them.
2117 (linux_set_resume_request): Ignore resume requests for
2118 already-resumed and unhandled fork child threads.
2119 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2120 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2121 New functions.
2122 (handle_v_requests) <vCont>: Don't call require_running.
2123 * server.h (in_queued_stop_replies): New declaration.
2124
2125 2016-10-24 Yao Qi <yao.qi@linaro.org>
2126
2127 PR server/20733
2128 * linux-aarch64-low.c (append_insns): Cast the return value to
2129 'uint32_t *'.
2130
2131 2016-10-10 Yao Qi <yao.qi@linaro.org>
2132
2133 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2134
2135 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2136
2137 * target.c (target_supports_multi_process): New function, moved
2138 from...
2139 * target.h (target_supports_multi_process): ... here. Remove
2140 macro.
2141
2142 2016-10-05 Tom Tromey <tom@tromey.com>
2143
2144 PR remote/20655:
2145 * tracepoint.c (handle_tracepoint_bkpts): Check
2146 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2147
2148 2016-10-05 Yao Qi <yao.qi@linaro.org>
2149
2150 * configure.srv: Update the path of arm-*.xml files.
2151
2152 2016-10-05 Terry Guo <terry.guo@arm.com>
2153 Yao Qi <yao.qi@linaro.org>
2154
2155 * Makefile.in: Adjust the path of rules.
2156 * configure.srv: Update the path of xml files.
2157 * regformats/arm-with-iwmmxt.dat: Regenerated.
2158 * regformats/arm-with-neon.dat: Likewise.
2159 * regformats/arm-with-vfpv2.dat: Likewise.
2160 * regformats/arm-with-vfpv3.dat Likewise.
2161
2162 2016-09-30 Yao Qi <yao.qi@linaro.org>
2163
2164 PR gdbserver/20627
2165 * target.c (target_stop_and_wait): Don't call
2166 target_continue_no_signal, use resume_stop instead.
2167
2168 2016-09-26 Yao Qi <yao.qi@linaro.org>
2169
2170 * linux-low.c (linux_wait_1): Call debug_exit.
2171
2172 2016-09-23 Pedro Alves <palves@redhat.com>
2173
2174 * Makefile.in (SFILES): Add common/new-op.c.
2175 (OBS): Add common/new-op.o.
2176 (new-op.o): New rule.
2177
2178 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2179
2180 * .gitinore: Ignore more files.
2181
2182 2016-09-21 Yao Qi <yao.qi@linaro.org>
2183
2184 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2185 23.
2186
2187 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2188
2189 * server.c (start_inferior): Call target_mourn_inferior instead of
2190 mourn_inferior; pass ptid_t argument to it.
2191 (resume): Likewise.
2192 (handle_target_event): Likewise.
2193 * target.c (target_mourn_inferior): New function.
2194 * target.h (mourn_inferior): Delete macro.
2195
2196 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2197
2198 * linux-low.c (lwp_is_stepping): New function.
2199
2200 2016-09-06 Carl Love <cel@us.ibm.com>
2201
2202 * server.c (start_inferior): Fixed comment, requested comment change
2203 didn't get updated correctly. Removed reference to ptrace () call as
2204 it is only true on Linux systems.
2205
2206 2016-09-06 Carl Love <cel@us.ibm.com>
2207
2208 * server.c (start_inferior): Do not call
2209 function target_post_create_inferior () if the
2210 inferior process has already exited.
2211
2212 2016-09-05 Pedro Alves <palves@redhat.com>
2213
2214 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2215 (COMPILE.pre, CC_LD): Use CXX directly.
2216 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2217 * acinclude.m4: Don't include build-with-cxx.m4.
2218 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2219 * configure: Regenerate.
2220
2221 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2222
2223 PR gdb/19495
2224 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2225 call writing data to own_buf.
2226
2227 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2228
2229 * target.c (mywait): Call target_wait instead of
2230 the_target->wait.
2231 (target_wait): New function.
2232
2233 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2234
2235 * server.c (start_inferior): New variable 'ptid'. Replace calls
2236 to the_target->resume by target_continue{,_no_signal}, depending
2237 on the case.
2238 * target.c (target_stop_and_wait): Call target_continue_no_signal
2239 instead of the_target->resume.
2240 (target_continue): New function.
2241
2242 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2243
2244 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2245
2246 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2247
2248 PR server/20491
2249 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2250 ps_prochandle.
2251 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2252 * linux-arm-low.c (ps_get_thread_area): Likewise.
2253 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2254 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2255 * linux-mips-low.c (ps_get_thread_area): Likewise.
2256 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2257 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2258 * linux-x86-low.c (ps_get_thread_area): Likewise.
2259 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2260
2261 2016-08-19 Pedro Alves <palves@redhat.com>
2262
2263 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2264
2265 2016-08-19 Pedro Alves <palves@redhat.com>
2266
2267 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2268 comment. Use memcpy instead of casting through unsigned long.
2269
2270 2016-08-19 Pedro Alves <palves@redhat.com>
2271
2272 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2273 allocating around 0x80000000.
2274
2275 2016-08-19 Pedro Alves <palves@redhat.com>
2276
2277 PR gdb/20415
2278 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2279 (x32-avx512-linux-ipa.o): New rules.
2280 * configure.ac (x86_64-*-linux*): New x32 check.
2281 * configure.srv (ipa_x32_linux_regobj): New.
2282 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2283 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2284 descriptions.
2285 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2286 descriptions.
2287 * configure: Regenerate.
2288
2289 2016-08-09 Pedro Alves <palves@redhat.com>
2290
2291 PR gdb/18653
2292 * Makefile.in (OBS): Add signals-state-save-restore.o.
2293 (signals-state-save-restore.o): New rule.
2294 * config.in: Regenerate.
2295 * configure: Regenerate.
2296 * linux-low.c: Include "signals-state-save-restore.h".
2297 (linux_create_inferior): Call
2298 restore_original_signals_state.
2299 * server.c: Include "dispositions-save-restore.h".
2300 (captured_main): Call save_original_signals_state.
2301
2302 2016-08-05 Pedro Alves <palves@redhat.com>
2303
2304 * configure: Regenerate.
2305
2306 2016-08-04 Yao Qi <yao.qi@linaro.org>
2307
2308 * linux-low.c (regsets_fetch_inferior_registers): Check
2309 errno is ESRCH or not.
2310
2311 2016-08-02 Yao Qi <yao.qi@linaro.org>
2312
2313 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2314 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2315 (thread_db_load_search): Update.
2316 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2317 td_ta_set_event and td_ta_event_getmsg.
2318
2319 2016-07-26 Pedro Alves <palves@redhat.com>
2320
2321 PR server/20414
2322 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2323 of unsigned long for 64-bit registers and use uint32_t instead of
2324 unsigned int for 32-bit registers.
2325
2326 2016-07-26 Pedro Alves <palves@redhat.com>
2327
2328 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2329 to 'ptrace'.
2330
2331 2016-07-21 Tom Tromey <tom@tromey.com>
2332
2333 * configure: Rebuild.
2334
2335 2016-07-21 Yao Qi <yao.qi@linaro.org>
2336
2337 * mem-break.c (find_gdb_breakpoint): Cast bp to
2338 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2339
2340 2016-07-21 Yao Qi <yao.qi@linaro.org>
2341
2342 * server.c (handle_v_requests): Support s and S actions
2343 if target_supports_software_single_step return true.
2344
2345 2016-07-21 Yao Qi <yao.qi@linaro.org>
2346
2347 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2348 is resume_step, call maybe_hw_step.
2349 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2350 and unstop them.
2351 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2352 breakpoints or not.
2353 (proceed_one_lwp): If resume request is resume_step, install
2354 reinsert breakpoints and call maybe_hw_step.
2355
2356 2016-07-21 Yao Qi <yao.qi@linaro.org>
2357
2358 * linux-low.c (proceed_one_lwp): Declare.
2359 (linux_resume_one_thread): Remove local variable 'step'.
2360 Lift code enqueue signal. Call proceed_one_lwp instead of
2361 linux_resume_one_lwp.
2362
2363 2016-07-21 Yao Qi <yao.qi@linaro.org>
2364
2365 * linux-low.c (linux_resume_one_thread): Call
2366 enqueue_pending_signal.
2367
2368 2016-07-21 Yao Qi <yao.qi@linaro.org>
2369
2370 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2371 * inferiors.c (do_restore_current_thread_cleanup): New function.
2372 (make_cleanup_restore_current_thread): Likewise.
2373 * linux-low.c (install_software_single_step_breakpoints): Call
2374 make_cleanup_restore_current_thread. Switch current_thread to
2375 thread.
2376
2377 2016-07-21 Yao Qi <yao.qi@linaro.org>
2378
2379 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2380 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2381 (clone_one_breakpoint): Likewise.
2382 (delete_reinsert_breakpoints): Change parameter to thread.
2383 Callers updated.
2384 (has_reinsert_breakpoints): Likewise.
2385 (uninsert_reinsert_breakpoints): Likewise.
2386 (reinsert_reinsert_breakpoints): Likewise.
2387 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2388 (delete_reinsert_breakpoints): Likewise.
2389 (reinsert_reinsert_breakpoints): Likewise.
2390 (uninsert_reinsert_breakpoints): Likewise.
2391 (has_reinsert_breakpoints): Likewise.
2392
2393 2016-07-21 Yao Qi <yao.qi@linaro.org>
2394
2395 * inferiors.c (get_thread_process): Make parameter const.
2396 * inferiors.h (get_thread_process): Update declaration.
2397 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2398 Add new parameters child_thread and parent_thread. Callers
2399 updated.
2400 * mem-break.h (clone_all_breakpoints): Update declaration.
2401
2402 2016-07-21 Yao Qi <yao.qi@linaro.org>
2403
2404 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2405 <command_list, handler>: Remove.
2406 (struct gdb_breakpoint): New.
2407 (struct other_breakpoint): New.
2408 (struct reinsert_breakpoint): New.
2409 (is_gdb_breakpoint): New function.
2410 (any_persistent_commands): Update command_list if
2411 is_gdb_breakpoint returns true.
2412 (set_breakpoint): Create breakpoints according to their types.
2413 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2414 (set_gdb_breakpoint_1): Likewise.
2415 (set_gdb_breakpoint): Likewise.
2416 (clear_breakpoint_conditions): Change parameter type to
2417 'struct gdb_breakpoint *'.
2418 (clear_breakpoint_commands): Likewise.
2419 (clear_breakpoint_conditions_and_commands): Likewise.
2420 (add_condition_to_breakpoint): Likewise.
2421 (add_breakpoint_condition): Likewise.
2422 (add_commands_to_breakpoint): Likewise.
2423 (check_breakpoints): Check other_breakpoint.
2424 (clone_one_breakpoint): Clone breakpopint according to its type.
2425 * mem-break.h (struct gdb_breakpoint): Declare.
2426 (set_gdb_breakpoint): Update declaration.
2427 (clear_breakpoint_conditions_and_commands): Likewise.
2428 (add_breakpoint_condition): Likewise.
2429 (add_breakpoint_commands): Likewise.
2430 * server.c (process_point_options): Change parameter type to
2431 'struct gdb_breakpoint *'.
2432
2433 2016-07-21 Yao Qi <yao.qi@linaro.org>
2434
2435 * mem-break.c (set_breakpoint_at): Rename it to ...
2436 (set_breakpoint_type_at): ... it.
2437 (set_breakpoint_at): Call set_breakpoint_type_at.
2438 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2439 * mem-break.h (set_breakpoint_at): Update comments.
2440
2441 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2442
2443 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2444 to buf parameter.
2445 (nios2_store_gregset): Likewise.
2446
2447 2016-07-01 Pedro Alves <palves@redhat.com>
2448 Antoine Tremblay <antoine.tremblay@ericsson.com>
2449
2450 * linux-low.c: Change interface to take the target lwp_info
2451 pointer directly and return void. Handle detaching from a zombie
2452 thread.
2453 (linux_detach_lwp_callback): New function.
2454 (linux_detach): Detach from the leader thread after detaching from
2455 the clone threads.
2456
2457 2016-06-28 Yao Qi <yao.qi@linaro.org>
2458
2459 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2460 for variable new_offset.
2461 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2462 (aarch64_ftrace_insn_reloc_cb): Likewise.
2463 (aarch64_ftrace_insn_reloc_tb): Likewise.
2464 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2465 PRIx64 instead of PRIx32.
2466
2467 2016-06-28 Yao Qi <yao.qi@linaro.org>
2468
2469 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2470 (the_low_target): Install arm_get_syscall_trapinfo.
2471
2472 2016-06-28 Yao Qi <yao.qi@linaro.org>
2473
2474 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2475 function.
2476 (the_low_target): Install aarch64_get_syscall_trapinfo.
2477
2478 2016-06-28 Yao Qi <yao.qi@linaro.org>
2479
2480 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2481 Callers updated.
2482 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2483 Remove parameter sysno.
2484 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2485 sysret.
2486
2487 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2488
2489 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2490 (s390_emit_ne_goto): Likewise.
2491 (s390_emit_lt_goto): Likewise.
2492 (s390_emit_le_goto): Likewise.
2493 (s390_emit_gt_goto): Likewise.
2494 (s390_emit_ge_goto): Likewise.
2495 (s390x_emit_eq_goto): Likewise.
2496 (s390x_emit_ne_goto): Likewise.
2497 (s390x_emit_lt_goto): Likewise.
2498 (s390x_emit_le_goto): Likewise.
2499 (s390x_emit_gt_goto): Likewise.
2500 (s390x_emit_ge_goto): Likewise.
2501 (s390_emit_ops_impl): Mark variable static.
2502 (s390x_emit_ops): Likewise.
2503
2504 2016-06-17 Yao Qi <yao.qi@linaro.org>
2505
2506 * linux-low.c (handle_extended_wait): Call
2507 uninsert_reinsert_breakpoints for the parent process. Remove
2508 reinsert breakpoints from the child process. Reinsert them to
2509 the parent process when vfork is done.
2510 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2511 (reinsert_reinsert_breakpoints): New function.
2512 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2513 (reinsert_reinsert_breakpoints): Declare.
2514
2515 2016-06-17 Yao Qi <yao.qi@linaro.org>
2516
2517 * linux-low.c (handle_extended_wait): If the parent is doing
2518 step-over, remove the reinsert breakpoints from the forked child.
2519
2520 2016-06-17 Yao Qi <yao.qi@linaro.org>
2521
2522 * linux-low.c (unsuspend_all_lwps): Declare.
2523 (linux_low_filter_event): If thread exited, call finish_step_over.
2524 If step-over is finished, unsuspend other threads.
2525
2526 2016-06-17 Yao Qi <yao.qi@linaro.org>
2527
2528 * linux-low.c (linux_resume_one_lwp_throw): Assert
2529 has_reinsert_breakpoints returns false.
2530 * mem-break.c (delete_disabled_breakpoints): Assert
2531 bp type isn't reinsert_breakpoint.
2532
2533 2016-06-17 Yao Qi <yao.qi@linaro.org>
2534
2535 * linux-low.c (maybe_hw_step): New function.
2536 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2537 (finish_step_over): Switch current_thread to lwp temporarily,
2538 and assert has_reinsert_breakpoints returns true.
2539 (proceed_one_lwp): Call maybe_hw_step.
2540 * mem-break.c (has_reinsert_breakpoints): New function.
2541 * mem-break.h (has_reinsert_breakpoints): Declare.
2542
2543 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2544
2545 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2546
2547 2016-05-17 Yao Qi <yao.qi@linaro.org>
2548
2549 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2550 instead of find_inferior.
2551
2552 2016-05-05 Yao Qi <yao.qi@linaro.org>
2553
2554 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2555 Initialize res to zero.
2556
2557 2016-05-05 Yao Qi <yao.qi@linaro.org>
2558
2559 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2560 to uint32_t.
2561
2562 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2563
2564 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2565 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2566 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2567
2568 2016-04-28 Par Olsson <par.olsson@windriver.com>
2569 Simon Marchi <simon.marchi@ericsson.com>
2570
2571 * tracepoint.c (write_inferior_int8): New function.
2572 (cmd_qtenable_disable): Write enable flag using
2573 write_inferior_int8.
2574
2575 2016-04-25 Yao Qi <yao.qi@linaro.org>
2576
2577 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2578 (need_step_over_p): Return zero if the LWP has pending signals
2579 can be delivered on software single step target.
2580
2581 2016-04-25 Yao Qi <yao.qi@linaro.org>
2582
2583 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2584 return instead of error.
2585
2586 2016-04-22 Yao Qi <yao.qi@linaro.org>
2587
2588 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2589 to 23.
2590
2591 2016-04-22 Yao Qi <yao.qi@linaro.org>
2592
2593 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2594 signal when stepping over breakpoint with software single
2595 step.
2596
2597 2016-04-21 Pedro Alves <palves@redhat.com>
2598
2599 * linux-s390-low.c (s390_collect_ptrace_register)
2600 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2601 add casts.
2602 (s390_check_regset): Use void * instead of gdb_byte *.
2603
2604 2016-04-20 Pedro Alves <palves@redhat.com>
2605
2606 * configure: Renegerate.
2607
2608 2016-04-20 Yao Qi <yao.qi@linaro.org>
2609
2610 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2611 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2612 number 16.
2613 (arm_store_gregset): Likewise.
2614
2615 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2616
2617 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2618 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2619 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2620 (amd64-avx-mpx-linux.c): New rules.
2621 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2622 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2623 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2624 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2625 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2626 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2627 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2628 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2629 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2630 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2631 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2632 * linux-x86-low.c (x86_linux_read_description): Add case for
2633 X86_XSTATE_AVX_MPX_MASK.
2634 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2635 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2636 init_registers_i386_avx_mpx_linux.
2637 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2638 (initialize_low_tracepoint): Call
2639 init_registers_i386_avx_mpx_linux.
2640 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2641 (initialize_low_tracepoint): Call
2642 init_registers_amd64_avx_mpx_linux.
2643 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2644 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2645 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2646 declarations.
2647
2648 2016-04-18 Pedro Alves <palves@redhat.com>
2649
2650 * configure: Regenerate.
2651
2652 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2653
2654 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2655 (aarch64_emit_sub): Likewise.
2656
2657 2016-04-12 Pedro Alves <palves@redhat.com>
2658
2659 * utils.c (prepare_to_throw_exception): Delete.
2660
2661 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2662
2663 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2664
2665 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2666
2667 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2668
2669 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2670
2671 * linux-aarch64-ipa.c: Add <elf.h> include.
2672 * linux-ppc-ipa.c: Add <elf.h> include.
2673 * linux-s390-ipa.c: Add <elf.h> include.
2674
2675 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2676
2677 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2678 (get_raw_reg_ptr): Likewise.
2679 (get_trace_state_variable_value_ptr): Likewise.
2680 (set_trace_state_variable_value_ptr): Likewise.
2681 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2682 char *.
2683
2684 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2685 Marcin Kościelnicki <koriakin@0x04.net>
2686
2687 PR/17221
2688 * linux-ppc-low.c (emit_insns): New function.
2689 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2690 (ppc_emit_prologue): New function.
2691 (ppc_emit_epilogue): New function.
2692 (ppc_emit_add): New function.
2693 (ppc_emit_sub): New function.
2694 (ppc_emit_mul): New function.
2695 (ppc_emit_lsh): New function.
2696 (ppc_emit_rsh_signed): New function.
2697 (ppc_emit_rsh_unsigned): New function.
2698 (ppc_emit_ext): New function.
2699 (ppc_emit_zero_ext): New function.
2700 (ppc_emit_log_not): New function.
2701 (ppc_emit_bit_and): New function.
2702 (ppc_emit_bit_or): New function.
2703 (ppc_emit_bit_xor): New function.
2704 (ppc_emit_bit_not): New function.
2705 (ppc_emit_equal): New function.
2706 (ppc_emit_less_signed): New function.
2707 (ppc_emit_less_unsigned): New function.
2708 (ppc_emit_ref): New function.
2709 (ppc_emit_const): New function.
2710 (ppc_emit_reg): New function.
2711 (ppc_emit_pop): New function.
2712 (ppc_emit_stack_flush): New function.
2713 (ppc_emit_swap): New function.
2714 (ppc_emit_stack_adjust): New function.
2715 (ppc_emit_call): New function.
2716 (ppc_emit_int_call_1): New function.
2717 (ppc_emit_void_call_2): New function.
2718 (ppc_emit_if_goto): New function.
2719 (ppc_emit_goto): New function.
2720 (ppc_emit_eq_goto): New function.
2721 (ppc_emit_ne_goto): New function.
2722 (ppc_emit_lt_goto): New function.
2723 (ppc_emit_le_goto): New function.
2724 (ppc_emit_gt_goto): New function.
2725 (ppc_emit_ge_goto): New function.
2726 (ppc_write_goto_address): New function.
2727 (ppc_emit_ops_impl): New static variable.
2728 (ppc64v1_emit_prologue): New function.
2729 (ppc64v2_emit_prologue): New function.
2730 (ppc64_emit_epilogue): New function.
2731 (ppc64_emit_add): New function.
2732 (ppc64_emit_sub): New function.
2733 (ppc64_emit_mul): New function.
2734 (ppc64_emit_lsh): New function.
2735 (ppc64_emit_rsh_signed): New function.
2736 (ppc64_emit_rsh_unsigned): New function.
2737 (ppc64_emit_ext): New function.
2738 (ppc64_emit_zero_ext): New function.
2739 (ppc64_emit_log_not): New function.
2740 (ppc64_emit_bit_and): New function.
2741 (ppc64_emit_bit_or): New function.
2742 (ppc64_emit_bit_xor): New function.
2743 (ppc64_emit_bit_not): New function.
2744 (ppc64_emit_equal): New function.
2745 (ppc64_emit_less_signed): New function.
2746 (ppc64_emit_less_unsigned): New function.
2747 (ppc64_emit_ref): New function.
2748 (ppc64_emit_const): New function.
2749 (ppc64v1_emit_reg): New function.
2750 (ppc64v2_emit_reg): New function.
2751 (ppc64_emit_pop): New function.
2752 (ppc64_emit_stack_flush): New function.
2753 (ppc64_emit_swap): New function.
2754 (ppc64v1_emit_call): New function.
2755 (ppc64v2_emit_call): New function.
2756 (ppc64v1_emit_int_call_1): New function.
2757 (ppc64v2_emit_int_call_1): New function.
2758 (ppc64v1_emit_void_call_2): New function.
2759 (ppc64v2_emit_void_call_2): New function.
2760 (ppc64_emit_if_goto): New function.
2761 (ppc64_emit_eq_goto): New function.
2762 (ppc64_emit_ne_goto): New function.
2763 (ppc64_emit_lt_goto): New function.
2764 (ppc64_emit_le_goto): New function.
2765 (ppc64_emit_gt_goto): New function.
2766 (ppc64_emit_ge_goto): New function.
2767 (ppc64v1_emit_ops_impl): New static variable.
2768 (ppc64v2_emit_ops_impl): New static variable.
2769 (ppc_emit_ops): New function.
2770 (linux_low_target): Wire in ppc_emit_ops.
2771
2772 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2773 Marcin Kościelnicki <koriakin@0x04.net>
2774
2775 PR/17221
2776 * Makefile.in: Add powerpc-*-ipa.o
2777 * configure.srv: Add ipa_obj for powerpc*-linux.
2778 * linux-ppc-ipa.c: New file.
2779 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2780 includes.
2781 (PPC_FIELD): New macro.
2782 (PPC_SEXT): New macro.
2783 (PPC_OP6): New macro.
2784 (PPC_BO): New macro.
2785 (PPC_LI): New macro.
2786 (PPC_BD): New macro.
2787 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2788 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2789 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2790 (ppc_get_thread_area): New function.
2791 (is_elfv2_inferior): New function.
2792 (gen_ds_form): New function.
2793 (GEN_STD): New macro.
2794 (GEN_STDU): New macro.
2795 (GEN_LD): New macro.
2796 (GEN_LDU): New macro.
2797 (gen_d_form): New function.
2798 (GEN_ADDI): New macro.
2799 (GEN_ADDIS): New macro.
2800 (GEN_LI): New macro.
2801 (GEN_LIS): New macro.
2802 (GEN_ORI): New macro.
2803 (GEN_ORIS): New macro.
2804 (GEN_LWZ): New macro.
2805 (GEN_STW): New macro.
2806 (GEN_STWU): New macro.
2807 (gen_xfx_form): New function.
2808 (GEN_MFSPR): New macro.
2809 (GEN_MTSPR): New macro.
2810 (GEN_MFCR): New macro.
2811 (GEN_MTCR): New macro.
2812 (GEN_SYNC): New macro.
2813 (GEN_LWSYNC): New macro.
2814 (gen_x_form): New function.
2815 (GEN_OR): New macro.
2816 (GEN_MR): New macro.
2817 (GEN_LWARX): New macro.
2818 (GEN_STWCX): New macro.
2819 (GEN_CMPW): New macro.
2820 (gen_md_form): New function.
2821 (GEN_RLDICL): New macro.
2822 (GEN_RLDICR): New macro.
2823 (gen_i_form): New function.
2824 (GEN_B): New macro.
2825 (GEN_BL): New macro.
2826 (gen_b_form): New function.
2827 (GEN_BNE): New macro.
2828 (GEN_LOAD): New macro.
2829 (GEN_STORE): New macro.
2830 (gen_limm): New function.
2831 (gen_atomic_xchg): New function.
2832 (gen_call): New function.
2833 (ppc_relocate_instruction): New function.
2834 (ppc_install_fast_tracepoint_jump_pad): New function.
2835 (ppc_get_min_fast_tracepoint_insn_len): New function.
2836 (ppc_get_ipa_tdesc_idx): New function.
2837 (the_low_target): Wire in the new functions.
2838 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2839 tdescs.
2840 * linux-ppc-tdesc.h: New file.
2841
2842 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2843
2844 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2845 (alloc_jump_pad_buffer): New function.
2846 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2847 (alloc_jump_pad_buffer): New function.
2848 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2849 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2850 (alloc_jump_pad_buffer): New function.
2851 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2852 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2853 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2854 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2855
2856 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2857
2858 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2859 * linux-amd64-ipa.c: Likewise.
2860 * linux-i386-ipa.c: Likewise.
2861 * linux-s390-ipa.c: Likewise.
2862 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2863 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2864 set_trace_state_variable_value_ptr.
2865 (struct ipa_sym_addresses): Likewise.
2866 (symbol_list): Likewise.
2867 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2868 accessing gdb_collect directly.
2869 (gdb_collect_ptr_type): New typedef.
2870 (get_raw_reg_ptr_type): New typedef.
2871 (get_trace_state_variable_value_ptr_type): New typedef.
2872 (set_trace_state_variable_value_ptr_type): New typedef.
2873 (gdb_collect_ptr): New global.
2874 (get_raw_reg_ptr): New global.
2875 (get_trace_state_variable_value_ptr): New global.
2876 (set_trace_state_variable_value_ptr): New global.
2877 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2878 accessing get_raw_reg directly.
2879 (get_get_tsv_func_addr): Likewise for
2880 get_trace_state_variable_value_ptr.
2881 (get_set_tsv_func_addr): Likewise for
2882 set_trace_state_variable_value_ptr.
2883 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2884
2885 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2886
2887 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2888
2889 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2890
2891 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2892 packets.
2893 (relocate_instruction): Remove own_buf.
2894 * server.c (own_buf): Make global.
2895 (handle_v_requests): Make global.
2896 * server.h (own_buf): New declaration.
2897 (handle_v_requests): New prototype.
2898
2899 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2900
2901 PR 18377
2902 * linux-s390-low.c (add_insns): New function.
2903 (s390_emit_prologue): New function.
2904 (s390_emit_epilogue): New function.
2905 (s390_emit_add): New function.
2906 (s390_emit_sub): New function.
2907 (s390_emit_mul): New function.
2908 (s390_emit_lsh): New function.
2909 (s390_emit_rsh_signed): New function.
2910 (s390_emit_rsh_unsigned): New function.
2911 (s390_emit_ext): New function.
2912 (s390_emit_log_not): New function.
2913 (s390_emit_bit_and): New function.
2914 (s390_emit_bit_or): New function.
2915 (s390_emit_bit_xor): New function.
2916 (s390_emit_bit_not): New function.
2917 (s390_emit_equal): New function.
2918 (s390_emit_less_signed): New function.
2919 (s390_emit_less_unsigned): New function.
2920 (s390_emit_ref): New function.
2921 (s390_emit_if_goto): New function.
2922 (s390_emit_goto): New function.
2923 (s390_write_goto_address): New function.
2924 (s390_emit_litpool): New function.
2925 (s390_emit_const): New function.
2926 (s390_emit_call): New function.
2927 (s390_emit_reg): New function.
2928 (s390_emit_pop): New function.
2929 (s390_emit_stack_flush): New function.
2930 (s390_emit_zero_ext): New function.
2931 (s390_emit_swap): New function.
2932 (s390_emit_stack_adjust): New function.
2933 (s390_emit_set_r2): New function.
2934 (s390_emit_int_call_1): New function.
2935 (s390_emit_void_call_2): New function.
2936 (s390_emit_eq_goto): New function.
2937 (s390_emit_ne_goto): New function.
2938 (s390_emit_lt_goto): New function.
2939 (s390_emit_le_goto): New function.
2940 (s390_emit_gt_goto): New function.
2941 (s390_emit_ge_goto): New function.
2942 (s390x_emit_prologue): New function.
2943 (s390x_emit_epilogue): New function.
2944 (s390x_emit_add): New function.
2945 (s390x_emit_sub): New function.
2946 (s390x_emit_mul): New function.
2947 (s390x_emit_lsh): New function.
2948 (s390x_emit_rsh_signed): New function.
2949 (s390x_emit_rsh_unsigned): New function.
2950 (s390x_emit_ext): New function.
2951 (s390x_emit_log_not): New function.
2952 (s390x_emit_bit_and): New function.
2953 (s390x_emit_bit_or): New function.
2954 (s390x_emit_bit_xor): New function.
2955 (s390x_emit_bit_not): New function.
2956 (s390x_emit_equal): New function.
2957 (s390x_emit_less_signed): New function.
2958 (s390x_emit_less_unsigned): New function.
2959 (s390x_emit_ref): New function.
2960 (s390x_emit_if_goto): New function.
2961 (s390x_emit_const): New function.
2962 (s390x_emit_call): New function.
2963 (s390x_emit_reg): New function.
2964 (s390x_emit_pop): New function.
2965 (s390x_emit_stack_flush): New function.
2966 (s390x_emit_zero_ext): New function.
2967 (s390x_emit_swap): New function.
2968 (s390x_emit_stack_adjust): New function.
2969 (s390x_emit_int_call_1): New function.
2970 (s390x_emit_void_call_2): New function.
2971 (s390x_emit_eq_goto): New function.
2972 (s390x_emit_ne_goto): New function.
2973 (s390x_emit_lt_goto): New function.
2974 (s390x_emit_le_goto): New function.
2975 (s390x_emit_gt_goto): New function.
2976 (s390x_emit_ge_goto): New function.
2977 (s390_emit_ops): New function.
2978 (struct linux_target_ops): Fill in emit_ops hook.
2979
2980 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2981
2982 PR 18377
2983 * Makefile.in: Add s390 IPA files.
2984 * configure.srv: Build IPA for s390.
2985 * linux-s390-ipa.c: New file.
2986 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2987 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2988 (tdesc_s390_linux32): Likewise.
2989 (init_registers_s390_linux32v1): Likewise.
2990 (tdesc_s390_linux32v1): Likewise.
2991 (init_registers_s390_linux32v2): Likewise.
2992 (tdesc_s390_linux32v2): Likewise.
2993 (init_registers_s390_linux64): Likewise.
2994 (tdesc_s390_linux64): Likewise.
2995 (init_registers_s390_linux64v1): Likewise.
2996 (tdesc_s390_linux64v1): Likewise.
2997 (init_registers_s390_linux64v2): Likewise.
2998 (tdesc_s390_linux64v2): Likewise.
2999 (init_registers_s390_te_linux64): Likewise.
3000 (tdesc_s390_te_linux64): Likewise.
3001 (init_registers_s390_vx_linux64): Likewise.
3002 (tdesc_s390_vx_linux64): Likewise.
3003 (init_registers_s390_tevx_linux64): Likewise.
3004 (tdesc_s390_tevx_linux64): Likewise.
3005 (init_registers_s390x_linux64): Likewise.
3006 (tdesc_s390x_linux64): Likewise.
3007 (init_registers_s390x_linux64v1): Likewise.
3008 (tdesc_s390x_linux64v1): Likewise.
3009 (init_registers_s390x_linux64v2): Likewise.
3010 (tdesc_s390x_linux64v2): Likewise.
3011 (init_registers_s390x_te_linux64): Likewise.
3012 (tdesc_s390x_te_linux64): Likewise.
3013 (init_registers_s390x_vx_linux64): Likewise.
3014 (tdesc_s390x_vx_linux64): Likewise.
3015 (init_registers_s390x_tevx_linux64): Likewise.
3016 (tdesc_s390x_tevx_linux64): Likewise.
3017 (have_hwcap_s390_vx): New static variable.
3018 (s390_arch_setup): Fill have_hwcap_s390_vx.
3019 (s390_get_thread_area): New function.
3020 (s390_ft_entry_gpr_esa): New const.
3021 (s390_ft_entry_gpr_zarch): New const.
3022 (s390_ft_entry_misc): New const.
3023 (s390_ft_entry_fr): New const.
3024 (s390_ft_entry_vr): New const.
3025 (s390_ft_main_31): New const.
3026 (s390_ft_main_64): New const.
3027 (s390_ft_exit_fr): New const.
3028 (s390_ft_exit_vr): New const.
3029 (s390_ft_exit_misc): New const.
3030 (s390_ft_exit_gpr_esa): New const.
3031 (s390_ft_exit_gpr_zarch): New const.
3032 (append_insns): New function.
3033 (s390_relocate_instruction): New function.
3034 (s390_install_fast_tracepoint_jump_pad): New function.
3035 (s390_get_min_fast_tracepoint_insn_len): New function.
3036 (s390_get_ipa_tdesc_idx): New function.
3037 (struct linux_target_ops): Wire in the above functions.
3038 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3039 * linux-s390-tdesc.h: New file.
3040
3041 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3042
3043 * linux-s390-low.c (s390_supports_tracepoints): New function.
3044 (struct linux_target_ops): Fill supports_tracepoints hook.
3045
3046 2016-03-18 Yao Qi <yao.qi@linaro.org>
3047
3048 * linux-low.c (lwp_signal_can_be_delivered): New function.
3049 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3050
3051 2016-03-18 Yao Qi <yao.qi@linaro.org>
3052
3053 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3054 0 if signal is enqueued. Remove 'signal' from one debugging
3055 message. Move one debugging message to some lines below.
3056 Remove code setting 'signal' to 0.
3057
3058 2016-03-18 Yao Qi <yao.qi@linaro.org>
3059
3060 * linux-low.c (linux_low_filter_event): Remove redundant
3061 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3062
3063 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3064
3065 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3066 (struct linux_target_ops): Wire in the above.
3067
3068 2016-03-03 Yao Qi <yao.qi@linaro.org>
3069
3070 * linux-low.c: Update comments to start_step_over.
3071
3072 2016-03-03 Yao Qi <yao.qi@linaro.org>
3073
3074 PR server/19736
3075 * linux-low.c (handle_extended_wait): Set child suspended
3076 if event_lwp->bp_reinsert isn't zero.
3077
3078 2016-03-02 Yao Qi <yao.qi@linaro.org>
3079
3080 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3081 enqueue_pending_signal.
3082
3083 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3084
3085 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3086 is actually loaded.
3087
3088 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3089
3090 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3091 (s390_regmap_3264) [!__s390x__]: New global.
3092 (s390_collect_ptrace_register): Skip map entries containing -1.
3093 (s390_supply_ptrace_register): Ditto.
3094 (s390_fill_gprs_high): New function.
3095 (s390_store_gprs_high): New function.
3096 (s390_regsets): Add NT_S390_HIGH_GPRS.
3097 (s390_get_hwcap): Enable on 31-bit.
3098 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3099 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3100 Detect NT_S390_HIGH_GPRS.
3101 (s390_usrregs_info_3264): Enable on 31-bit.
3102 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3103 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3104
3105 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3106
3107 PR gdb/13808
3108 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3109 * configure.srv: Ditto.
3110 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3111 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3112 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3113 (init_registers_amd64_linux): Remove prototype.
3114 (tdesc_amd64_linux): Remove declaration.
3115 (get_ipa_tdesc): New function.
3116 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3117 initialize remaining tdescs.
3118 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3119 (init_registers_i386_linux): Remove prototype.
3120 (tdesc_i386_linux): Remove declaration.
3121 (get_ipa_tdesc): New function.
3122 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3123 initialize remaining tdescs.
3124 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3125 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3126 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3127 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3128 (x86_get_ipa_tdesc_idx): New function.
3129 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3130 * linux-x86-tdesc.h: New file.
3131 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3132 (target_get_ipa_tdesc_idx): New macro.
3133 * tracepoint.c (ipa_tdesc_idx): New macro.
3134 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3135 (symbol_list): Add ipa_tdesc_idx.
3136 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3137 (ipa_tdesc): Remove.
3138 (ipa_tdesc_idx): New variable.
3139 (get_context_regcache): Use get_ipa_tdesc.
3140 (gdb_collect): Ditto.
3141 (gdb_probe): Ditto.
3142 * tracepoint.h (get_ipa_tdesc): New prototype.
3143 (ipa_tdesc): Remove.
3144
3145 2016-02-24 Pedro Alves <palves@redhat.com>
3146
3147 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3148 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3149 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3150 Factor out common code between the USE_SIGTRAP_SIGINFO and
3151 !USE_SIGTRAP_SIGINFO blocks.
3152 (linux_low_filter_event): Call save_stop_reason instead of
3153 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3154 Update comments.
3155 (linux_wait_1): Update comments.
3156
3157 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3158
3159 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3160 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3161 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3162 ppc_insert_point, ppc_remove_point.
3163
3164 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3165
3166 * linux-s390-low.c (s390_supports_z_point_type): New function.
3167 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3168
3169 2016-02-16 Yao Qi <yao.qi@linaro.org>
3170
3171 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3172 PC. Get pc from regcache_read_pc.
3173
3174 2016-02-12 Yao Qi <yao.qi@linaro.org>
3175
3176 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3177 or linux_get_pc_32bit.
3178 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3179
3180 2016-02-12 Yao Qi <yao.qi@linaro.org>
3181
3182 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3183 arm_linux_get_next_pcs_fixup.
3184
3185 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3186
3187 * tracepoint.c (x_tracepoint_action_download): Change
3188 write_inferior_data_ptr to write_inferior_data_pointer.
3189 (cmd_qtstart): Likewise.
3190 (write_inferior_data_ptr): Remove.
3191 (download_agent_expr): Change write_inferior_data_ptr to
3192 write_inferior_data_pointer.
3193 (download_tracepoint_1): Likewise.
3194 (download_tracepoint): Likewise.
3195 (download_trace_state_variables): Likewise.
3196
3197 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3198 Marcin Kościelnicki <koriakin@0x04.net>
3199
3200 * tracepoint.c (struct tracepoint_action_ops): Remove.
3201 (struct tracepoint_action): Remove ops.
3202 (m_tracepoint_action_download, r_tracepoint_action_download)
3203 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3204 size and offset accordingly.
3205 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3206 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3207 (tracepoint_action_send, tracepoint_action_download): New functions.
3208 Helpers for trace action handlers.
3209 (add_tracepoint_action): Remove setup actions ops.
3210 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3211
3212 2016-02-10 Yao Qi <yao.qi@linaro.org>
3213
3214 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3215
3216 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3217
3218 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3219 to AC_OUTPUT.
3220 * configure: Regenerate.
3221
3222 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3223
3224 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3225 void * to gdb_byte *.
3226 * linux-low.c (siginfo_fixup): Likewise.
3227 (linux_xfer_siginfo): Likewise.
3228 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3229 Likewise.
3230 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3231
3232 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3233
3234 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3235 to srv_tgtobj.
3236 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3237 to srv_tgtobj.
3238 * linux-x86-low.c [__x86_64__]: Include
3239 "nat/amd64-linux-siginfo.h".
3240 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3241 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3242 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3243 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3244 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3245 (cpt_si_fd, si_timerid, si_overrun): Move from
3246 nat/amd64-linux-siginfo.c.
3247 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3248
3249 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3250
3251 * server.c (skip_to_semicolon): Remove.
3252 (process_point_options): Use strchrnul instead of
3253 skip_to_semicolon.
3254
3255 2016-01-26 Yao Qi <yao.qi@linaro.org>
3256
3257 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3258 * linux-low.c (install_software_single_step_breakpoints): Don't
3259 call regcache_read_pc.
3260 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3261 argument pc.
3262
3263 2016-01-26 Yao Qi <yao.qi@linaro.org>
3264
3265 * linux-low.c (install_software_single_step_breakpoints): Call
3266 regcache_read_pc instead of get_pc.
3267
3268 2016-01-26 Yao Qi <yao.qi@linaro.org>
3269
3270 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3271 (unblock_async_io): Rename to ...
3272 (block_unblock_async_io): ... it. New function.
3273 (enable_async_io): Don't install SIGIO handler. Unblock it
3274 instead.
3275 (disable_async_io): Don't ignore SIGIO. Block it instead.
3276 (initialize_async_io): Install SIGIO handler. Don't call
3277 unblock_async_io.
3278
3279 2016-01-26 Yao Qi <yao.qi@linaro.org>
3280
3281 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3282 first character is '\003', call *the_target->request_interrupt.
3283
3284 2016-01-25 Yao Qi <yao.qi@linaro.org>
3285
3286 * remote-utils.c (new_thread_notify): Remove.
3287 (dead_thread_notify): Likewise.
3288 * remote-utils.h (new_thread_notify): Remove declaration.
3289 (dead_thread_notify): Likewise.
3290
3291 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3292
3293 * gdb.trace/pending.exp: Fix expected message on continue.
3294
3295 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3296
3297 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3298 it works properly on big-endian machines where sizeof (CORE_ADDR)
3299 != sizeof (void *).
3300
3301 2016-01-21 Pedro Alves <palves@redhat.com>
3302
3303 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3304 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3305 * configure: Regenerate.
3306
3307 2016-01-21 Yao Qi <yao.qi@linaro.org>
3308
3309 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3310 is_thumb and set it according to CPSR saved on the stack.
3311 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3312 arm_sigreturn_next_pc.
3313
3314 2016-01-18 Yao Qi <yao.qi@linaro.org>
3315
3316 * linux-low.c (linux_set_pc_64bit): New function.
3317 (linux_get_pc_64bit): New function.
3318 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3319 Declare.
3320 * linux-sparc-low.c (debug_threads): Remove declaration.
3321 (sparc_get_pc): Remove.
3322 (the_low_target): Use linux_get_pc_64bit instead of
3323 sparc_get_pc.
3324 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3325 (the_low_target): Use linux_get_pc_64bit and
3326 linux_set_pc_64bit.
3327
3328 2016-01-18 Yao Qi <yao.qi@linaro.org>
3329
3330 * linux-arm-low.c (debug_threads): Remove declaration.
3331 (arm_get_pc, arm_set_pc): Remove.
3332 (the_low_target): Use linux_get_pc_32bit and
3333 linux_set_pc_32bit.
3334 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3335 (the_low_target): Use linux_get_pc_32bit and
3336 linux_set_pc_32bit.
3337 * linux-cris-low.c (debug_threads): Remove declaration.
3338 (cris_get_pc, cris_set_pc,): Remove.
3339 (the_low_target): Use linux_get_pc_32bit and
3340 linux_set_pc_32bit.
3341 * linux-crisv32-low.c (debug_threads): Remove declaration.
3342 (cris_get_pc, cris_set_pc): Remove.
3343 (the_low_target): Use linux_get_pc_32bit and
3344 linux_set_pc_32bit.
3345 * linux-low.c: Include inttypes.h.
3346 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3347 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3348 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3349 (the_low_target): Use linux_get_pc_32bit and
3350 linux_set_pc_32bit.
3351 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3352 (the_low_target): Use linux_get_pc_32bit and
3353 linux_set_pc_32bit.
3354 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3355 (the_low_target): Use linux_get_pc_32bit and
3356 linux_set_pc_32bit.
3357 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3358 (the_low_target): Use linux_get_pc_32bit and
3359 linux_set_pc_32bit.
3360 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3361 (the_low_target): Use linux_get_pc_32bit and
3362 linux_set_pc_32bit.
3363
3364 2016-01-18 Gary Benson <gbenson@redhat.com>
3365
3366 * configure.ac (AC_FUNC_FORK): New check.
3367 * config.in: Regenerate.
3368 * configure: Likewise.
3369
3370 2016-01-14 Yao Qi <yao.qi@linaro.org>
3371
3372 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3373 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3374 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3375 arm_get_next_pcs_ctor.
3376
3377 2016-01-12 Josh Stone <jistone@redhat.com>
3378 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3379
3380 * inferiors.h: Include "gdb_vecs.h".
3381 (struct process_info): Add syscalls_to_catch.
3382 * inferiors.c (remove_process): Free syscalls_to_catch.
3383 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3384 syscall_return stops.
3385 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3386 * server.c (handle_general_set): Handle QCatchSyscalls.
3387 (handle_query): Report support for QCatchSyscalls.
3388 * target.h (struct target_ops): Add supports_catch_syscall.
3389 (target_supports_catch_syscall): New macro.
3390 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3391 (struct lwp_info): Add syscall_state.
3392 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3393 Maintain syscall_state and syscalls_to_catch across exec.
3394 (get_syscall_trapinfo): New function, proxy to the_low_target.
3395 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3396 (linux_low_filter_event): Toggle syscall_state entry/return for
3397 syscall traps, and set it ignored for all others.
3398 (gdb_catching_syscalls_p): New function.
3399 (gdb_catch_this_syscall_p): New function.
3400 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3401 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3402 (linux_supports_catch_syscall): New function.
3403 (linux_target_ops): Install it.
3404 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3405 (the_low_target): Install it.
3406
3407 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3408
3409 * acinclude.m4: Include new ../warning.m4 file.
3410 * configure: Regenerated.
3411 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3412
3413 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3414
3415 * ax.c (is_goto_target): Mark static.
3416 * linux-low.c (register_addr): Likewise.
3417 (linux_fetch_registers, linux_store_registers): Likewise.
3418 * mem-break.c (any_persistent_commands): Fix old prototype.
3419 (add_commands_to_breakpoint): Mark static.
3420 * regcache.c (find_register_by_name): Delete unused func.
3421 * remote-utils.c (hex_or_minus_one): Mark static.
3422 * server.c (monitor_show_help): Mark static.
3423 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3424 handle_v_requests): Likewise.
3425
3426 2016-01-12 Pedro Alves <palves@redhat.com>
3427
3428 Remove use of the registered trademark symbol throughout.
3429
3430 2016-01-08 Yao Qi <yao.qi@linaro.org>
3431
3432 * remote-utils.c (getpkt): If c is '\003', call target hook
3433 request_interrupt.
3434
3435 2016-01-06 Yao Qi <yao.qi@linaro.org>
3436
3437 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3438 linux-aarch32-low.c.
3439 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3440 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3441 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3442 (thumb2_breakpoint): Declare.
3443 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3444 linux-aarch32-low.h.
3445 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3446 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3447 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3448
3449 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3450
3451 * gdbreplay.c (gdbreplay_version): Change copyright year in
3452 version message.
3453 * server.c (gdbserver_version): Likewise.
3454
3455 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3456
3457 * server.c (crc32_table): Delete.
3458 (crc32): Use libiberty's xcrc32 function.
3459
3460 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3461
3462 * lynx-low.c (lynx_delete_thread_callback): New function.
3463 (lynx_mourn): Properly delete our process and all of its
3464 threads. Remove call to clear_inferiors.
3465
3466 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3467
3468 * target.c (thread_search_callback): Add check that
3469 the thread_stopped target callback is not NULL before
3470 calling it.
3471
3472 2015-12-21 Yao Qi <yao.qi@linaro.org>
3473
3474 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3475 arm breakpoint.
3476
3477 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3478
3479 * server.c (handle_query): Call target_supports_software_single_step.
3480
3481 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3482
3483 * linux-low.c (single_step): New function.
3484 (linux_resume_one_lwp_throw): Call single_step.
3485 (start_step_over): Likewise.
3486
3487 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3488
3489 * Makefile.in (SFILES): Append arch/arm-linux.c,
3490 arch/arm-get-next-pcs.c.
3491 (arm-linux.o): New rule.
3492 (arm-get-next-pcs.o): New rule.
3493 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3494 arm-linux.o.
3495 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3496 to linux-aarch32-low.c.
3497 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3498 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3499 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3500 (thumb2_breakpoint_len): Likewise.
3501 (arm_is_thumb_mode): Make non-static.
3502 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3503 from linux-aarch32-low.c.
3504 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3505 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3506 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3507 (thumb2_breakpoint_len): Likewise.
3508 (arm_is_thumb_mode): New declaration.
3509 * linux-arm-low.c: Include arch/arm-linux.h
3510 aarch/arm-get-next-pcs.h, sys/syscall.h.
3511 (get_next_pcs_ops): New struct.
3512 (get_next_pcs_addr_bits_remove): New function.
3513 (get_next_pcs_is_thumb): New function.
3514 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3515 (arm_sigreturn_next_pc): Likewise.
3516 (get_next_pcs_syscall_next_pc): Likewise.
3517 (arm_gdbserver_get_next_pcs): Likewise.
3518 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3519 Initialize.
3520 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3521 * server.h: Include gdb_vecs.h.
3522
3523 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3524
3525 * Makefile.in (SFILES): Append common/common-regcache.c.
3526 (OBS): Append common-regcache.o.
3527 (common-regcache.o): New rule.
3528 * regcache.c (init_register_cache): Initialize cache to
3529 REG_UNAVAILABLE.
3530 (regcache_raw_read_unsigned): New function.
3531 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3532 register_status enum.
3533
3534 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3535
3536 * linux-aarch64-low.c (the_low_targets): Rename
3537 breakpoint_reinsert_addr to get_next_pcs.
3538 * linux-arm-low.c (the_low_targets): Likewise.
3539 * linux-bfin-low.c (the_low_targets): Likewise.
3540 * linux-cris-low.c (the_low_targets): Likewise.
3541 * linux-crisv32-low.c (the_low_targets): Likewise.
3542 * linux-low.c (can_software_single_step): Likewise.
3543 (install_software_single_step_breakpoints): New function.
3544 (start_step_over): Use install_software_single_step_breakpoints.
3545 * linux-low.h: New CORE_ADDR vector.
3546 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3547 get_next_pcs.
3548 * linux-mips-low.c (the_low_targets): Likewise.
3549 * linux-nios2-low.c (the_low_targets): Likewise.
3550 * linux-sparc-low.c (the_low_targets): Likewise.
3551
3552 2015-12-17 Pedro Alves <palves@redhat.com>
3553
3554 * linux-low.c (linux_kill_one_lwp): Remove references to
3555 LinuxThreads.
3556 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3557 to 'kill'.
3558 (linux_init_signals): Delete.
3559 (initialize_low): Adjust.
3560 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3561
3562 2015-12-16 Pedro Alves <palves@redhat.com>
3563
3564 * configure.ac (compiler warning flags): When testing a
3565 -Wno-foo option, check whether -Wfoo works instead.
3566 * configure: Regenerate.
3567
3568 2015-12-11 Don Breazeal <donb@codesourcery.com>
3569
3570 * server.c (process_serial_event): Don't exit from gdbserver
3571 in remote mode if there are still active inferiors.
3572
3573 2015-12-11 Yao Qi <yao.qi@linaro.org>
3574
3575 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3576 arm_breakpoint_at if the process is 32-bit.
3577
3578 2015-12-11 Yao Qi <yao.qi@linaro.org>
3579
3580 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3581 arm breakpoint.
3582
3583 2015-12-07 Yao Qi <yao.qi@linaro.org>
3584
3585 * configure.srv: Append arm.o to srv_tgtobj for
3586 aarch64*-*-linux* target.
3587 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3588 from linux-arm-low.c.
3589 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3590 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3591 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3592 (thumb2_breakpoint_len): Likewise.
3593 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3594 (arm_breakpoint_kinds): Likewise.
3595 (arm_breakpoint_kind_from_pc): Likewise.
3596 (arm_sw_breakpoint_from_kind): Likewise.
3597 (arm_breakpoint_kind_from_current_state): Likewise.
3598 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3599 (arm_sw_breakpoint_from_kind): Declare.
3600 (arm_breakpoint_kind_from_current_state): Declare.
3601 (arm_breakpoint_at): Declare.
3602 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3603 arm_sw_breakpoint_from_kind if process is 32-bit.
3604 (aarch64_breakpoint_kind_from_pc): New function.
3605 (aarch64_breakpoint_kind_from_current_state): New function.
3606 (the_low_target): Initialize fields breakpoint_kind_from_pc
3607 and breakpoint_kind_from_current_state.
3608 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3609 linux-aarch32-low.c.
3610 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3611 (arm_breakpoint, arm_breakpoint_len): Likewise.
3612 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3613 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3614 (arm_is_thumb_mode): Likewise.
3615 (arm_breakpoint_at): Likewise.
3616 (arm_breakpoint_kind_from_pc): Likewise.
3617 (arm_sw_breakpoint_from_kind): Likewise.
3618 (arm_breakpoint_kind_from_current_state): Likewise.
3619
3620 Revert:
3621 2015-08-04 Yao Qi <yao.qi@linaro.org>
3622
3623 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3624 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3625 * server.c (extended_protocol): Remove "static".
3626 * server.h (extended_protocol): Declare it.
3627
3628 2015-12-04 Josh Stone <jistone@redhat.com>
3629
3630 * target.h (struct target_ops) <arch_setup>: Rename to ...
3631 (struct target_ops) <post_create_inferior>: ... this.
3632 (target_arch_setup): Rename to ...
3633 (target_post_create_inferior): ... this, calling post_create_inferior.
3634 * server.c (start_inferior): Update target_arch_setup calls to
3635 target_post_create_inferior.
3636 * linux-low.c (linux_low_ptrace_options): Forward declare.
3637 (linux_arch_setup): Update its comment for general use.
3638 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3639 (struct linux_target_ops): Use linux_post_create_inferior.
3640 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3641 to post_create_inferior.
3642 * nto-low.c (struct nto_target_ops): Likewise.
3643 * spu-low.c (struct spu_target_ops): Likewise.
3644 * win32-low.c (struct win32_target_ops): Likewise.
3645
3646 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3647
3648 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3649
3650 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3651
3652 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3653 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3654 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3655 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3656 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3657 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3658 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3659 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3660 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3661 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3662 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3663 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3664
3665 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3666
3667 * linux-low.c (linux_look_up_symbols): Don't call
3668 linux_supports_traceclone.
3669 * linux-low.h (thread_db_init): Remove use_events argument.
3670 * thread-db.c (thread_db_use_event): Remove global variable.
3671 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3672 (struct thread_db) <td_create_bp>: Remove field.
3673 (thread_db_create_event): Remove function.
3674 (thread_db_enable_reporting): Likewise.
3675 (find_one_thread): Don't check for thread_db_use_events.
3676 (attach_thread): Likewise.
3677 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3678 (try_thread_db_load_1): Don't check for thread_db_use_events.
3679 (thread_db_init): Remove use_events argument and thread events
3680 handling.
3681 (remove_thread_event_breakpoints): Remove function.
3682 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3683
3684 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3685
3686 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3687 New function.
3688 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3689 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3690 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3691 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3692 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3693 Initialize.
3694 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3695 New function.
3696 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3697 * linux-low.c (can_hardware_single_step): Use
3698 supports_hardware_single_step.
3699 (can_software_single_step): New function.
3700 (start_step_over): Call can_software_single_step.
3701 (linux_supports_hardware_single_step): New function.
3702 (struct target_ops) <supports_software_single_step>: Initialize.
3703 * linux-low.h (struct linux_target_ops)
3704 <supports_hardware_single_step>: Initialize.
3705 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3706 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3707 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3708 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3709 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3710 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3711 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3712 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3713 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3714 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3715 Initialize.
3716 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3717 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3718 Initialize.
3719 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3720 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3721 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3722 New function.
3723 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3724 * target.h (struct target_ops): <supports_software_single_step>:
3725 New field.
3726 (target_supports_software_single_step): New macro.
3727
3728 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3729
3730 * linux-low.c (linux_wait_1): Fix pc advance condition.
3731 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3732 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3733
3734 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3735
3736 * linux-arm-low.c (arm_is_thumb_mode): New function.
3737 (arm_breakpoint_at): Use arm_is_thumb_mode.
3738 (arm_breakpoint_kind_from_current_state): New function.
3739 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3740 Initialize.
3741 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3742 (linux_breakpoint_kind_from_current_state): New function.
3743 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3744 * linux-low.h (struct linux_target_ops)
3745 <breakpoint_kind_from_current_state>: New field.
3746 * target.h (struct target_ops): Likewise.
3747 (target_breakpoint_kind_from_current_state): New macro.
3748
3749 2015-11-30 Pedro Alves <palves@redhat.com>
3750
3751 * linux-low.c (linux_resume): Wake up the event loop before
3752 returning.
3753
3754 2015-11-30 Pedro Alves <palves@redhat.com>
3755
3756 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3757 check.
3758 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3759 to -1.
3760 * target.c (struct thread_search): New structure.
3761 (thread_search_callback): New function.
3762 (prev_general_thread): New global.
3763 (prepare_to_access_memory, done_accessing_memory): New functions.
3764 * target.h (prepare_to_access_memory, done_accessing_memory):
3765 Replace macros with function declarations.
3766
3767 2015-11-30 Pedro Alves <palves@redhat.com>
3768
3769 PR 14618
3770 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3771 report TARGET_WAITKIND_NO_RESUMED.
3772 * remote-utils.c (prepare_resume_reply): Handle
3773 TARGET_WAITKIND_NO_RESUMED.
3774 * server.c (report_no_resumed): New global.
3775 (handle_query) <qSupported>: Handle "no-resumed+". Report
3776 "no-resumed+" support.
3777 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3778 return error if the client doesn't support no-resumed events.
3779 (push_stop_notification): New function.
3780 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3781 events if the client supports them.
3782
3783 2015-11-30 Pedro Alves <palves@redhat.com>
3784
3785 * linux-low.c (thread_still_has_status_pending_p): Don't check
3786 vCont;t here.
3787 (lwp_resumed): New function.
3788 (status_pending_p_callback): Return early if the LWP is not
3789 supposed to be resumed.
3790
3791 2015-11-30 Pedro Alves <palves@redhat.com>
3792
3793 * linux-low.c (handle_extended_wait): Assert that the LWP's
3794 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3795 thread create events, leave the new child's status pending.
3796 (linux_low_filter_event): If GDB wants to hear about thread exit
3797 events, leave the LWP marked dead and don't delete it.
3798 (linux_wait_for_event_filtered): Don't check for thread exit.
3799 (filter_exit_event): New function.
3800 (linux_wait_1): Use it, when returning an exit event.
3801 (linux_resume_one_lwp_throw): Assert that the LWP's
3802 waitstatus is TARGET_WAITKIND_IGNORE.
3803 * remote-utils.c (prepare_resume_reply): Handle
3804 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3805 * server.c (report_thread_events): New global.
3806 (handle_general_set): Handle QThreadEvents.
3807 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3808 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3809 TARGET_WAITKIND_THREAD_EXITED.
3810 * server.h (report_thread_events): Declare.
3811
3812 2015-11-30 Pedro Alves <palves@redhat.com>
3813
3814 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3815 the thread's last_resume_kind was resume_stop.
3816
3817 2015-11-30 Pedro Alves <palves@redhat.com>
3818
3819 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3820 before returning.
3821
3822 2015-11-30 Pedro Alves <palves@redhat.com>
3823
3824 * server.c (handle_v_requests): Handle vCtrlC.
3825
3826 2015-11-30 Pedro Alves <palves@redhat.com>
3827
3828 * gdbthread.h (find_any_thread_of_pid): Declare.
3829 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3830 functions.
3831 * server.c (handle_query): If current_thread is NULL, look for
3832 another thread of the selected process.
3833
3834 2015-11-26 Daniel Colascione <dancol@dancol.org>
3835 Simon Marchi <simon.marchi@ericsson.com>
3836
3837 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3838 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3839 name in reply.
3840 * target.h (struct target_ops) <thread_name>: New field.
3841 (target_thread_name): New macro.
3842
3843 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3844
3845 * regcache.h (regcache_invalidate_pid): Add declaration.
3846 * regcache.c (regcache_invalidate_pid): New function, extracted
3847 from regcache_invalidate.
3848 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3849 Add trivial documentation comment.
3850 * lynx-low.c: Use regcache_invalidate_pid instead of
3851 regcache_invalidate.
3852
3853 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3854
3855 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3856 and Elf64_auxv_t if the target is Android.
3857
3858 2015-11-22 Doug Evans <xdje42@gmail.com>
3859
3860 * target.h: #include <sys/types.h>.
3861
3862 2015-11-19 Pedro Alves <palves@redhat.com>
3863
3864 * linux-low.c (linux_process_qsupported): Change prototype.
3865 Adjust.
3866 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3867 Change prototype.
3868 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3869 and adjust to loop over all features.
3870 * server.c (handle_query) <qSupported>: Adjust to call
3871 target_process_qsupported once, passing it a vector of unprocessed
3872 features.
3873 * target.h (struct target_ops) <process_qsupported>: Change
3874 prototype.
3875 (target_process_qsupported): Adjust.
3876
3877 2015-11-19 Pedro Alves <palves@redhat.com>
3878
3879 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3880 mode.
3881 * configure: Regenerate.
3882
3883 2015-11-19 Pedro Alves <palves@redhat.com>
3884
3885 * configure: Regenerate.
3886
3887 2015-11-19 Yao Qi <yao.qi@linaro.org>
3888
3889 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3890 type to uint32_t.
3891
3892 2015-11-19 Yao Qi <yao.qi@linaro.org>
3893
3894 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3895 (struct aarch64_operand): Move enum out.
3896
3897 2015-11-19 Yao Qi <yao.qi@linaro.org>
3898
3899 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3900 struct user_fpsimd_state *.
3901 (aarch64_store_fpregset): Likewise.
3902
3903 2015-11-19 Yao Qi <yao.qi@linaro.org>
3904
3905 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3906 struct user_pt_regs *.
3907 (aarch64_store_gregset): Likewise.
3908
3909 2015-11-18 Pedro Alves <palves@redhat.com>
3910
3911 * Makefile.in (all_object_files): Add $IPA_OBJS.
3912
3913 2015-11-17 Pedro Alves <palves@redhat.com>
3914
3915 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3916 GDB_SIGNAL_0 and gdb_signal_to_string.
3917
3918 2015-11-17 Pedro Alves <palves@redhat.com>
3919
3920 * win32-low.c (handle_output_debug_string): Remove parameter.
3921 (win32_kill): Remove our_status local and adjust call to
3922 handle_output_debug_string.
3923 (get_child_debug_event): Adjust call to
3924 handle_output_debug_string.
3925
3926 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3927
3928 * linux-mips-low.c (mips_fill_gregset): Add cast.
3929 (mips_store_gregset): Likewise.
3930 (mips_fill_fpregset): Likewise.
3931 (mips_store_fpregset): Likewise.
3932
3933 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3934
3935 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3936 priv.
3937
3938 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3939
3940 * linux-mips-low.c (mips_linux_new_thread): Change type of
3941 watch_type to enum target_hw_bp_type.
3942
3943 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3944
3945 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3946 Change return type to arm_hwbp_type.
3947
3948 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3949
3950 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3951 (arm_store_gregset): Likewise.
3952 * linux-arm-low.c (arm_get_hwcap): Likewise.
3953 (arm_read_description): Likewise.
3954
3955 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3956
3957 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3958
3959 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3960
3961 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3962 (ppc_fill_vsxregset): Likewise.
3963 (ppc_store_vsxregset): Likewise.
3964 (ppc_fill_vrregset): Likewise.
3965 (ppc_store_vrregset): Likewise.
3966 (ppc_fill_evrregset): Likewise.
3967 (ppc_store_evrregset): Likewise.
3968
3969 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3970
3971 * linux-ppc-low.c (ppc_usrregs_info): Remove
3972 forward-declaration.
3973 (ppc_arch_setup): Move lower in file.
3974
3975 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3976
3977 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3978 (ps_pdwrite): Likewise.
3979
3980 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3981
3982 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3983 to after assert checks.
3984
3985 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3986
3987 * proc-service.c (ps_pdread): Add/adjust casts.
3988 (ps_pdwrite): Add/adjust casts.
3989
3990 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3991
3992 * server.c (handle_search_memory_1): Cast return value of
3993 memmem.
3994
3995 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3996
3997 * server.c (write_qxfer_response): Change type of data to
3998 gdb_byte *.
3999
4000 2015-10-29 Pedro Alves <palves@redhat.com>
4001
4002 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4003
4004 2015-10-29 Pedro Alves <palves@redhat.com>
4005
4006 * tracepoint.c (clear_installed_tracepoints): Add casts.
4007
4008 2015-10-29 Pedro Alves <palves@redhat.com>
4009
4010 * server.c (handle_v_cont, process_serial_event): Add enum
4011 gdb_signal casts to signal parsing code.
4012
4013 2015-10-29 Pedro Alves <palves@redhat.com>
4014
4015 * linux-low.h (NULL_REGSET): Define.
4016 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4017 * linux-arm-low.c (arm_regsets): Likewise.
4018 * linux-crisv32-low.c (cris_regsets): Likewise.
4019 * linux-m68k-low.c (m68k_regsets): Likewise.
4020 * linux-mips-low.c (mips_regsets): Likewise.
4021 * linux-nios2-low.c (nios2_regsets): Likewise.
4022 * linux-ppc-low.c (ppc_regsets): Likewise.
4023 * linux-s390-low.c (s390_regsets): Likewise.
4024 * linux-sh-low.c (sh_regsets): Likewise.
4025 * linux-sparc-low.c (sparc_regsets): Likewise.
4026 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4027 * linux-tile-low.c (tile_regsets): Likewise.
4028 * linux-x86-low.c (x86_regsets): Likewise.
4029 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4030
4031 2015-10-29 Pedro Alves <palves@redhat.com>
4032
4033 * linux-low.h (NULL_REGSET): Define.
4034 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4035 * linux-arm-low.c (arm_regsets): Likewise.
4036 * linux-crisv32-low.c (cris_regsets): Likewise.
4037 * linux-m68k-low.c (m68k_regsets): Likewise.
4038 * linux-mips-low.c (mips_regsets): Likewise.
4039 * linux-nios2-low.c (nios2_regsets): Likewise.
4040 * linux-ppc-low.c (ppc_regsets): Likewise.
4041 * linux-s390-low.c (s390_regsets): Likewise.
4042 * linux-sh-low.c (sh_regsets): Likewise.
4043 * linux-sparc-low.c (sparc_regsets): Likewise.
4044 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4045 * linux-tile-low.c (tile_regsets): Likewise.
4046 * linux-x86-low.c (x86_regsets): Likewise.
4047 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4048
4049 2015-10-26 Doug Evans <dje@google.com>
4050
4051 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4052
4053 2015-10-26 Doug Evans <dje@google.com>
4054
4055 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4056
4057 2015-10-26 Doug Evans <dje@google.com>
4058
4059 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4060 for debug_printf.
4061 (attach_thread, find_new_threads_callback): Ditto.
4062
4063 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4064
4065 * mem-break.h (set_breakpoint_data): Remove.
4066
4067 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4068
4069 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4070 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4071 (initialize_low): Remove set_breakpoint_data call.
4072 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4073 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4074 (initialize_low): Remove set_breakpoint_data call.
4075 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4076 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4077 (initialize_low): Remove set_breakpoint_data call.
4078
4079 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4080
4081 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4082 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4083 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4084 * target.h (target_breakpoint_kind_from_pc): New macro.
4085
4086 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4087
4088 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4089 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4090 the default breakpoint kind.
4091
4092 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4093
4094 * linux-arm-low.c (arm_supports_z_point_type): Add software
4095 breakpoint support.
4096
4097 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4098
4099 * linux-arm-low.c: Refactor breakpoint definitions.
4100 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4101 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4102
4103 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4104
4105 * Makefile.in: Add arm.c/o.
4106 * configure.srv: Likewise.
4107 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4108 (arm_breakpoint_kind_from_pc): New function.
4109 (arm_sw_breakpoint_from_kind): Return proper kind.
4110 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4111
4112 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4113
4114 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4115 removal.
4116 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4117 (struct raw_breakpoint) <size>: Remove.
4118 (struct raw_breakpoint) <kind>: Add.
4119 (bp_size): New function.
4120 (bp_opcode): Likewise.
4121 (find_raw_breakpoint_at): Adjust for kind.
4122 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4123 (remove_memory_breakpoint): Adjust for kind call bp_size.
4124 (set_raw_breakpoint_at): Adjust for kind.
4125 (set_breakpoint): Likewise.
4126 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4127 (delete_raw_breakpoint): Adjust for kind.
4128 (delete_breakpoint): Likewise.
4129 (find_gdb_breakpoint): Likewise.
4130 (set_gdb_breakpoint_1): Likewise.
4131 (set_gdb_breakpoint): Likewise.
4132 (delete_gdb_breakpoint_1): Likewise.
4133 (delete_gdb_breakpoint): Likewise.
4134 (uninsert_raw_breakpoint): Likewise.
4135 (reinsert_raw_breakpoint): Likewise.
4136 (set_breakpoint_data): Remove.
4137 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4138 (check_mem_read): Adjust for kind call bp_size.
4139 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4140 (clone_one_breakpoint): Adjust for kind.
4141 * mem-break.h (set_gdb_breakpoint): Likewise.
4142 (delete_gdb_breakpoint): Likewise.
4143 * server.c (process_serial_event): Likewise.
4144
4145 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4146
4147 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4148 (struct linux_target_ops) <breakpoint>: Remove.
4149 (struct linux_target_ops) <breakpoint_len>: Remove.
4150 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4151 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4152 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4153 (arm_sw_breakpoint_from_kind): New function.
4154 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4155 (struct linux_target_ops) <breakpoint>: Remove.
4156 (struct linux_target_ops) <breakpoint_len>: Remove.
4157 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4158 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4159 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4160 (struct linux_target_ops) <breakpoint>: Remove.
4161 (struct linux_target_ops) <breakpoint_len>: Remove.
4162 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4163 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4164 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4165 (struct linux_target_ops) <breakpoint>: Remove.
4166 (struct linux_target_ops) <breakpoint_len>: Remove.
4167 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4168 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4169 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4170 and sw_breakpoint_from_kind to increment the pc.
4171 (linux_breakpoint_kind_from_pc): New function.
4172 (linux_sw_breakpoint_from_kind): New function.
4173 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4174 (initialize_low): Call breakpoint_kind_from_pc and
4175 sw_breakpoint_from_kind to replace breakpoint_data/len.
4176 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4177 New field.
4178 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4179 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4180 (struct linux_target_ops) <breakpoint>: Remove.
4181 (struct linux_target_ops) <breakpoint_len>: Remove.
4182 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4183 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4184 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4185 (struct linux_target_ops) <breakpoint>: Remove.
4186 (struct linux_target_ops) <breakpoint_len>: Remove.
4187 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4188 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4189 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4190 (struct linux_target_ops) <breakpoint>: Remove.
4191 (struct linux_target_ops) <breakpoint_len>: Remove.
4192 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4193 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4194 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4195 (struct linux_target_ops) <breakpoint>: Remove.
4196 (struct linux_target_ops) <breakpoint_len>: Remove.
4197 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4198 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4199 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4200 (struct linux_target_ops) <breakpoint>: Remove.
4201 (struct linux_target_ops) <breakpoint_len>: Remove.
4202 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4203 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4204 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4205 (struct linux_target_ops) <breakpoint>: Remove.
4206 (struct linux_target_ops) <breakpoint_len>: Remove.
4207 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4208 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4209 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4210 (struct linux_target_ops) <breakpoint>: Remove.
4211 (struct linux_target_ops) <breakpoint_len>: Remove.
4212 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4213 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4214 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4215 (struct linux_target_ops) <breakpoint>: Remove.
4216 (struct linux_target_ops) <breakpoint_len>: Remove.
4217 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4218 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4219 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4220 (struct linux_target_ops) <breakpoint>: Remove.
4221 (struct linux_target_ops) <breakpoint_len>: Remove.
4222 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4223 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4224 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4225 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4226 (struct linux_target_ops) <breakpoint>: Remove.
4227 (struct linux_target_ops) <breakpoint_len>: Remove.
4228 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4229 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4230 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4231 (struct linux_target_ops) <breakpoint>: Remove.
4232 (struct linux_target_ops) <breakpoint_len>: Remove.
4233 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4234 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4235
4236 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4237
4238 * linux-cris-low.c (cris_get_pc): Remove void arg.
4239
4240 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4241
4242 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4243 variable name.
4244
4245 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4246
4247 * inferiors.c (thread_pid_matches_callback): New function.
4248 (find_thread_process): New function.
4249 (remove_thread): Reset current_thread.
4250 (remove_process): Assert threads have been removed first.
4251
4252 2015-10-15 Yao Qi <yao.qi@linaro.org>
4253
4254 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4255 if it is 3.
4256 (aarch64_remove_point): Likewise.
4257 * regcache.c (regcache_register_size): New function.
4258
4259 2015-10-12 Yao Qi <yao.qi@linaro.org>
4260
4261 * linux-aarch64-low.c: Update all callers as emit_load_store
4262 is renamed to aarch64_emit_load_store.
4263
4264 2015-10-12 Yao Qi <yao.qi@linaro.org>
4265
4266 * linux-aarch64-low.c: Update all callers of function renaming
4267 from emit_insn to aarch64_emit_insn.
4268
4269 2015-10-12 Yao Qi <yao.qi@linaro.org>
4270
4271 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4272 arch/aarch64-insn.h.
4273 (struct aarch64_memory_operand): Likewise.
4274 (ENCODE): Likewise.
4275 (emit_insn): Move to arch/aarch64-insn.c.
4276 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4277 (emit_load_store): Move to arch/aarch64-insn.c.
4278 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4279 (can_encode_int32): Remove.
4280
4281 2015-10-12 Yao Qi <yao.qi@linaro.org>
4282
4283 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4284 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4285 (aarch64_relocate_instruction): Likewise.
4286 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4287 (struct aarch64_insn_visitor): Likewise.
4288
4289 2015-10-12 Yao Qi <yao.qi@linaro.org>
4290
4291 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4292 (struct aarch64_insn_visitor): New.
4293 (struct aarch64_insn_relocation_data): New.
4294 (aarch64_ftrace_insn_reloc_b): New function.
4295 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4296 (aarch64_ftrace_insn_reloc_cb): Likewise.
4297 (aarch64_ftrace_insn_reloc_tb): Likewise.
4298 (aarch64_ftrace_insn_reloc_adr): Likewise.
4299 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4300 (aarch64_ftrace_insn_reloc_others): Likewise.
4301 (visitor): New.
4302 (aarch64_relocate_instruction): Use visitor.
4303
4304 2015-10-12 Yao Qi <yao.qi@linaro.org>
4305
4306 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4307 int. Add argument buf.
4308 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4309 aarch64_relocate_instruction.
4310
4311 2015-10-12 Yao Qi <yao.qi@linaro.org>
4312
4313 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4314 argument insn. Remove local variable insn. Don't call
4315 target_read_uint32.
4316 (aarch64_install_fast_tracepoint_jump_pad): Call
4317 target_read_uint32.
4318
4319 2015-09-30 Yao Qi <yao.qi@linaro.org>
4320
4321 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4322 (emit_load_store_pair): Likewise.
4323
4324 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4325
4326 * dll.c (match_dll): Add cast(s).
4327 (unloaded_dll): Likewise.
4328 * linux-low.c (second_thread_of_pid_p): Likewise.
4329 (delete_lwp_callback): Likewise.
4330 (count_events_callback): Likewise.
4331 (select_event_lwp_callback): Likewise.
4332 (linux_set_resume_request): Likewise.
4333 * server.c (accumulate_file_name_length): Likewise.
4334 (emit_dll_description): Likewise.
4335 (handle_qxfer_threads_worker): Likewise.
4336 (visit_actioned_threads): Likewise.
4337 * thread-db.c (any_thread_of): Likewise.
4338 * tracepoint.c (same_process_p): Likewise.
4339 (match_blocktype): Likewise.
4340 (build_traceframe_info_xml): Likewise.
4341
4342 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4343
4344 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4345 assignment.
4346 (gdb_unparse_agent_expr): Likewise.
4347 * hostio.c (require_data): Likewise.
4348 (handle_pread): Likewise.
4349 * linux-low.c (disable_regset): Likewise.
4350 (fetch_register): Likewise.
4351 (store_register): Likewise.
4352 (get_dynamic): Likewise.
4353 (linux_qxfer_libraries_svr4): Likewise.
4354 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4355 (set_fast_tracepoint_jump): Likewise.
4356 (uninsert_fast_tracepoint_jumps_at): Likewise.
4357 (reinsert_fast_tracepoint_jumps_at): Likewise.
4358 (validate_inserted_breakpoint): Likewise.
4359 (clone_agent_expr): Likewise.
4360 * regcache.c (init_register_cache): Likewise.
4361 * remote-utils.c (putpkt_binary_1): Likewise.
4362 (decode_M_packet): Likewise.
4363 (decode_X_packet): Likewise.
4364 (look_up_one_symbol): Likewise.
4365 (relocate_instruction): Likewise.
4366 (monitor_output): Likewise.
4367 * server.c (handle_search_memory): Likewise.
4368 (handle_qxfer_exec_file): Likewise.
4369 (handle_qxfer_libraries): Likewise.
4370 (handle_qxfer): Likewise.
4371 (handle_query): Likewise.
4372 (handle_v_cont): Likewise.
4373 (handle_v_run): Likewise.
4374 (captured_main): Likewise.
4375 * target.c (write_inferior_memory): Likewise.
4376 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4377 * tracepoint.c (init_trace_buffer): Likewise.
4378 (add_tracepoint_action): Likewise.
4379 (add_traceframe): Likewise.
4380 (add_traceframe_block): Likewise.
4381 (cmd_qtdpsrc): Likewise.
4382 (cmd_qtdv): Likewise.
4383 (cmd_qtstatus): Likewise.
4384 (response_source): Likewise.
4385 (response_tsv): Likewise.
4386 (cmd_qtnotes): Likewise.
4387 (gdb_collect): Likewise.
4388 (initialize_tracepoint): Likewise.
4389
4390 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4391
4392 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4393 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4394 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4395 <NOP>: New.
4396 (enum aarch64_condition_codes): New enum.
4397 (w0): New static global.
4398 (fp): Likewise.
4399 (lr): Likewise.
4400 (struct aarch64_memory_operand) <type>: New
4401 MEMORY_OPERAND_POSTINDEX type.
4402 (postindex_memory_operand): New helper function.
4403 (emit_ret): New function.
4404 (emit_load_store_pair): New function, factored out of emit_stp
4405 with support for MEMORY_OPERAND_POSTINDEX.
4406 (emit_stp): Rewrite using emit_load_store_pair.
4407 (emit_ldp): New function.
4408 (emit_load_store): Likewise.
4409 (emit_ldr): Mention post-index instruction in comment.
4410 (emit_ldrh): New function.
4411 (emit_ldrb): New function.
4412 (emit_ldrsw): Mention post-index instruction in comment.
4413 (emit_str): Likewise.
4414 (emit_subs): New function.
4415 (emit_cmp): Likewise.
4416 (emit_and): Likewise.
4417 (emit_orr): Likewise.
4418 (emit_orn): Likewise.
4419 (emit_eor): Likewise.
4420 (emit_mvn): Likewise.
4421 (emit_lslv): Likewise.
4422 (emit_lsrv): Likewise.
4423 (emit_asrv): Likewise.
4424 (emit_mul): Likewise.
4425 (emit_sbfm): Likewise.
4426 (emit_sbfx): Likewise.
4427 (emit_ubfm): Likewise.
4428 (emit_ubfx): Likewise.
4429 (emit_csinc): Likewise.
4430 (emit_cset): Likewise.
4431 (emit_nop): Likewise.
4432 (emit_ops_insns): New helper function.
4433 (emit_pop): Likewise.
4434 (emit_push): Likewise.
4435 (aarch64_emit_prologue): New function.
4436 (aarch64_emit_epilogue): Likewise.
4437 (aarch64_emit_add): Likewise.
4438 (aarch64_emit_sub): Likewise.
4439 (aarch64_emit_mul): Likewise.
4440 (aarch64_emit_lsh): Likewise.
4441 (aarch64_emit_rsh_signed): Likewise.
4442 (aarch64_emit_rsh_unsigned): Likewise.
4443 (aarch64_emit_ext): Likewise.
4444 (aarch64_emit_log_not): Likewise.
4445 (aarch64_emit_bit_and): Likewise.
4446 (aarch64_emit_bit_or): Likewise.
4447 (aarch64_emit_bit_xor): Likewise.
4448 (aarch64_emit_bit_not): Likewise.
4449 (aarch64_emit_equal): Likewise.
4450 (aarch64_emit_less_signed): Likewise.
4451 (aarch64_emit_less_unsigned): Likewise.
4452 (aarch64_emit_ref): Likewise.
4453 (aarch64_emit_if_goto): Likewise.
4454 (aarch64_emit_goto): Likewise.
4455 (aarch64_write_goto_address): Likewise.
4456 (aarch64_emit_const): Likewise.
4457 (aarch64_emit_call): Likewise.
4458 (aarch64_emit_reg): Likewise.
4459 (aarch64_emit_pop): Likewise.
4460 (aarch64_emit_stack_flush): Likewise.
4461 (aarch64_emit_zero_ext): Likewise.
4462 (aarch64_emit_swap): Likewise.
4463 (aarch64_emit_stack_adjust): Likewise.
4464 (aarch64_emit_int_call_1): Likewise.
4465 (aarch64_emit_void_call_2): Likewise.
4466 (aarch64_emit_eq_goto): Likewise.
4467 (aarch64_emit_ne_goto): Likewise.
4468 (aarch64_emit_lt_goto): Likewise.
4469 (aarch64_emit_le_goto): Likewise.
4470 (aarch64_emit_gt_goto): Likewise.
4471 (aarch64_emit_ge_got): Likewise.
4472 (aarch64_emit_ops_impl): New static global variable.
4473 (aarch64_emit_ops): New target function, return
4474 &aarch64_emit_ops_impl.
4475 (struct linux_target_ops): Install it.
4476
4477 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4478
4479 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4480 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4481 aarch64-ipa.o.
4482 * linux-aarch64-ipa.c: New file.
4483 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4484 and endian.h.
4485 (aarch64_get_thread_area): New target method.
4486 (extract_signed_bitfield): New helper function.
4487 (aarch64_decode_ldr_literal): New function.
4488 (enum aarch64_opcodes): New enum.
4489 (struct aarch64_register): New struct.
4490 (struct aarch64_operand): New struct.
4491 (x0): New static global.
4492 (x1): Likewise.
4493 (x2): Likewise.
4494 (x3): Likewise.
4495 (x4): Likewise.
4496 (w2): Likewise.
4497 (ip0): Likewise.
4498 (sp): Likewise.
4499 (xzr): Likewise.
4500 (aarch64_register): New helper function.
4501 (register_operand): Likewise.
4502 (immediate_operand): Likewise.
4503 (struct aarch64_memory_operand): New struct.
4504 (offset_memory_operand): New helper function.
4505 (preindex_memory_operand): Likewise.
4506 (enum aarch64_system_control_registers): New enum.
4507 (ENCODE): New macro.
4508 (emit_insn): New helper function.
4509 (emit_b): New function.
4510 (emit_bcond): Likewise.
4511 (emit_cb): Likewise.
4512 (emit_tb): Likewise.
4513 (emit_blr): Likewise.
4514 (emit_stp): Likewise.
4515 (emit_ldp_q_offset): Likewise.
4516 (emit_stp_q_offset): Likewise.
4517 (emit_load_store): Likewise.
4518 (emit_ldr): Likewise.
4519 (emit_ldrsw): Likewise.
4520 (emit_str): Likewise.
4521 (emit_ldaxr): Likewise.
4522 (emit_stxr): Likewise.
4523 (emit_stlr): Likewise.
4524 (emit_data_processing_reg): Likewise.
4525 (emit_data_processing): Likewise.
4526 (emit_add): Likewise.
4527 (emit_sub): Likewise.
4528 (emit_mov): Likewise.
4529 (emit_movk): Likewise.
4530 (emit_mov_addr): Likewise.
4531 (emit_mrs): Likewise.
4532 (emit_msr): Likewise.
4533 (emit_sevl): Likewise.
4534 (emit_wfe): Likewise.
4535 (append_insns): Likewise.
4536 (can_encode_int32_in): New helper function.
4537 (aarch64_relocate_instruction): New function.
4538 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4539 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4540 (struct linux_target_ops): Install aarch64_get_thread_area,
4541 aarch64_install_fast_tracepoint_jump_pad and
4542 aarch64_get_min_fast_tracepoint_insn_len.
4543
4544 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4545
4546 * Makefile.in (aarch64-insn.o): New rule.
4547 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4548
4549 2015-09-21 Yao Qi <yao.qi@linaro.org>
4550
4551 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4552
4553 2015-09-21 Yao Qi <yao.qi@linaro.org>
4554
4555 * tracepoint.c (max_jump_pad_size): Remove.
4556
4557 2015-09-18 Yao Qi <yao.qi@linaro.org>
4558
4559 * linux-aarch64-low.c: Don't include sys/uio.h.
4560 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4561
4562 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4563
4564 * tracepoint.c (eval_result_type): Change prototype.
4565 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4566
4567 2015-09-15 Pedro Alves <palves@redhat.com>
4568
4569 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4570 Check whether to report exec events instead of checking whether
4571 multiprocess is enabled.
4572
4573 2015-09-15 Pedro Alves <palves@redhat.com>
4574
4575 PR remote/18965
4576 * remote-utils.c (prepare_resume_reply): Merge
4577 TARGET_WAITKIND_VFORK_DONE switch case with the
4578 TARGET_WAITKIND_FORKED case.
4579
4580 2015-09-15 Yao Qi <yao.qi@linaro.org>
4581
4582 * server.c (handle_query): Check string comparison using
4583 "else if" instead of "if".
4584
4585 2015-09-15 Yao Qi <yao.qi@linaro.org>
4586
4587 * server.c (vCont_supported): New global variable.
4588 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4589 matches. Append ";vContSupported+" to own_buf.
4590 (handle_v_requests): Append ";s;S" to own_buf if target supports
4591 hardware single step or vCont_supported is false.
4592 (capture_main): Set vCont_supported to zero.
4593
4594 2015-09-15 Yao Qi <yao.qi@linaro.org>
4595
4596 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4597 it to ...
4598 (linux_supports_hardware_single_step): ... New function.
4599 (linux_target_ops): Update.
4600 * lynx-low.c (lynx_target_ops): Set field
4601 supports_hardware_single_step to target_can_do_hardware_single_step.
4602 * nto-low.c (nto_target_ops): Likewise.
4603 * spu-low.c (spu_target_ops): Likewise.
4604 * win32-low.c (win32_target_ops): Likewise.
4605 * target.c (target_can_do_hardware_single_step): New function.
4606 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4607 Remove. <supports_hardware_single_step>: New field.
4608 (target_supports_conditional_breakpoints): Remove.
4609 (target_supports_hardware_single_step): New macro.
4610 (target_can_do_hardware_single_step): Declare.
4611 * server.c (handle_query): Use target_supports_hardware_single_step
4612 instead of target_supports_conditional_breakpoints.
4613
4614 2015-09-15 Yao Qi <yao.qi@linaro.org>
4615
4616 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4617 function.
4618 (struct linux_target_ops the_low_target): Install
4619 aarch64_linux_siginfo_fixup.
4620
4621 2015-09-11 Don Breazeal <donb@codesourcery.com>
4622 Luis Machado <lgustavo@codesourcery.com>
4623
4624 * linux-low.c (linux_mourn): Static declaration.
4625 (linux_arch_setup): Move in front of
4626 handle_extended_wait.
4627 (linux_arch_setup_thread): New function.
4628 (handle_extended_wait): Handle exec events. Call
4629 linux_arch_setup_thread. Make event_lwp argument a
4630 pointer-to-a-pointer.
4631 (check_zombie_leaders): Do not check stopped threads.
4632 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4633 (linux_low_filter_event): Add lwp and thread for exec'ing
4634 non-leader thread if leader thread has been deleted.
4635 Refactor code into linux_arch_setup_thread and call it.
4636 Pass child lwp pointer by reference to handle_extended_wait.
4637 (linux_wait_for_event_filtered): Update comment.
4638 (linux_wait_1): Prevent clobbering exec event status.
4639 (linux_supports_exec_events): New function.
4640 (linux_target_ops) <supports_exec_events>: Initialize new member.
4641 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4642 new member.
4643 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4644 * server.c (report_exec_events): New global variable.
4645 (handle_query): Handle qSupported query for exec-events feature.
4646 (captured_main): Initialize report_exec_events.
4647 * server.h (report_exec_events): Declare new global variable.
4648 * target.h (struct target_ops) <supports_exec_events>: New
4649 member.
4650 (target_supports_exec_events): New macro.
4651 * win32-low.c (win32_target_ops) <supports_exec_events>:
4652 Initialize new member.
4653
4654 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4655
4656 * linux-low.c (linux_low_enable_btrace): Remove.
4657 (linux_target_ops): Replace linux_low_enable_btrace with
4658 linux_enable_btrace.
4659
4660 2015-09-03 Yao Qi <yao.qi@linaro.org>
4661
4662 * linux-aarch64-low.c (aarch64_insert_point): Call
4663 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4664 returns true.
4665
4666 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4667
4668 * linux-low.c (check_stopped_by_breakpoint): Use
4669 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4670
4671 2015-08-27 Pedro Alves <palves@redhat.com>
4672
4673 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4674
4675 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4676
4677 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4678 the XNEW-family equivalent.
4679 (compile_bytecodes): Likewise.
4680 * dll.c (loaded_dll): Likewise.
4681 * event-loop.c (append_callback_event): Likewise.
4682 (create_file_handler): Likewise.
4683 (create_file_event): Likewise.
4684 * hostio.c (handle_open): Likewise.
4685 * inferiors.c (add_thread): Likewise.
4686 (add_process): Likewise.
4687 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4688 * linux-arm-low.c (arm_new_process): Likewise.
4689 (arm_new_thread): Likewise.
4690 * linux-low.c (add_to_pid_list): Likewise.
4691 (linux_add_process): Likewise.
4692 (handle_extended_wait): Likewise.
4693 (add_lwp): Likewise.
4694 (enqueue_one_deferred_signal): Likewise.
4695 (enqueue_pending_signal): Likewise.
4696 (linux_resume_one_lwp_throw): Likewise.
4697 (linux_resume_one_thread): Likewise.
4698 (linux_read_memory): Likewise.
4699 (linux_write_memory): Likewise.
4700 * linux-mips-low.c (mips_linux_new_process): Likewise.
4701 (mips_linux_new_thread): Likewise.
4702 (mips_add_watchpoint): Likewise.
4703 * linux-x86-low.c (initialize_low_arch): Likewise.
4704 * lynx-low.c (lynx_add_process): Likewise.
4705 * mem-break.c (set_raw_breakpoint_at): Likewise.
4706 (set_breakpoint): Likewise.
4707 (add_condition_to_breakpoint): Likewise.
4708 (add_commands_to_breakpoint): Likewise.
4709 (clone_agent_expr): Likewise.
4710 (clone_one_breakpoint): Likewise.
4711 * regcache.c (new_register_cache): Likewise.
4712 * remote-utils.c (look_up_one_symbol): Likewise.
4713 * server.c (queue_stop_reply): Likewise.
4714 (start_inferior): Likewise.
4715 (queue_stop_reply_callback): Likewise.
4716 (handle_target_event): Likewise.
4717 * spu-low.c (fetch_ppc_memory): Likewise.
4718 (store_ppc_memory): Likewise.
4719 * target.c (set_target_ops): Likewise.
4720 * thread-db.c (thread_db_load_search): Likewise.
4721 (try_thread_db_load_1): Likewise.
4722 * tracepoint.c (add_tracepoint): Likewise.
4723 (add_tracepoint_action): Likewise.
4724 (create_trace_state_variable): Likewise.
4725 (cmd_qtdpsrc): Likewise.
4726 (cmd_qtro): Likewise.
4727 (add_while_stepping_state): Likewise.
4728 * win32-low.c (child_add_thread): Likewise.
4729 (get_image_name): Likewise.
4730
4731 2015-08-25 Yao Qi <yao.qi@linaro.org>
4732
4733 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4734
4735 2015-08-25 Yao Qi <yao.qi@linaro.org>
4736
4737 * Makefile.in (aarch64-linux.o): New rule.
4738 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4739 srv_tgtobj.
4740 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4741 (aarch64_init_debug_reg_state): Make it extern.
4742 (aarch64_linux_prepare_to_resume): Remove.
4743
4744 2015-08-25 Yao Qi <yao.qi@linaro.org>
4745
4746 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4747 lwp_arch_private_info and ptid_of_lwp.
4748
4749 2015-08-25 Yao Qi <yao.qi@linaro.org>
4750
4751 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4752 Find proc_info by find_process_pid. All callers updated.
4753
4754 2015-08-25 Yao Qi <yao.qi@linaro.org>
4755
4756 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4757 Remove.
4758 (debug_reg_change_callback): Remove.
4759 (aarch64_notify_debug_reg_change): Remove.
4760
4761 2015-08-25 Yao Qi <yao.qi@linaro.org>
4762
4763 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4764 Call current_lwp_ptid.
4765
4766 2015-08-25 Yao Qi <yao.qi@linaro.org>
4767
4768 * linux-aarch64-low.c (debug_reg_change_callback): Use
4769 debug_printf.
4770
4771 2015-08-25 Yao Qi <yao.qi@linaro.org>
4772
4773 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4774
4775 2015-08-25 Yao Qi <yao.qi@linaro.org>
4776
4777 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4778
4779 2015-08-25 Yao Qi <yao.qi@linaro.org>
4780
4781 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4782 the code.
4783
4784 2015-08-25 Yao Qi <yao.qi@linaro.org>
4785
4786 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4787 Remove.
4788 (debug_reg_change_callback): Remove argument entry and add argument
4789 lwp. Remove local variable thread. Don't print thread id in the
4790 debugging output. Don't check whether pid of thread equals to pid.
4791 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4792 iterate_over_lwps instead find_inferior.
4793
4794 2015-08-24 Pedro Alves <palves@redhat.com>
4795
4796 * inferiors.c (get_first_process): New function.
4797 * inferiors.h (get_first_process): New declaration.
4798 * remote-utils.c (read_ptid): Default to the first process in the
4799 list, instead of to the current thread's process.
4800
4801 2015-08-24 Pedro Alves <palves@redhat.com>
4802
4803 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4804 * event-loop.c: Likewise.
4805 * remote-utils.c: Likewise.
4806 * tracepoint.c: Likewise.
4807
4808 2015-08-24 Pedro Alves <palves@redhat.com>
4809
4810 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4811 ptid_get_lwp.
4812
4813 2015-08-21 Pedro Alves <palves@redhat.com>
4814
4815 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4816 instead of literal 1.
4817
4818 2015-08-21 Pedro Alves <palves@redhat.com>
4819
4820 * tdesc.c (default_description): Explicitly zero-initialize.
4821
4822 2015-08-21 Pedro Alves <palves@redhat.com>
4823
4824 PR gdb/18749
4825 * inferiors.c (remove_thread): Discard any pending stop reply for
4826 this thread.
4827 * server.c (remove_all_on_match_pid): Rename to ...
4828 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4829 instead of a pid.
4830 (discard_queued_stop_replies): Change parameter to a ptid. Now
4831 extern.
4832 (handle_v_kill, kill_inferior_callback, captured_main)
4833 (process_serial_event): Adjust.
4834 * server.h (discard_queued_stop_replies): Declare.
4835
4836 2015-08-21 Pedro Alves <palves@redhat.com>
4837
4838 * linux-low.c (wait_for_sigstop): Always switch to no thread
4839 selected if the previously current thread dies.
4840 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4841 process instead of the current thread's.
4842 * remote-utils.c (input_interrupt): Don't check if there's no
4843 current thread.
4844 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4845 current thread to the general thread fails, error out.
4846 (handle_qxfer_auxv, handle_qxfer_libraries)
4847 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4848 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4849 (handle_query): Check if there's a thread selected instead of
4850 checking whether there's any thread in the thread list.
4851 (handle_qxfer_threads, handle_qxfer_btrace)
4852 (handle_qxfer_btrace_conf): Don't error out early if there's no
4853 thread in the thread list.
4854 (handle_v_cont, myresume): Don't set the current thread to the
4855 continue thread.
4856 (process_serial_event) <Hg handling>: Also set thread_id if the
4857 previous general thread is still alive.
4858 (process_serial_event) <g/G handling>: If setting the current
4859 thread to the general thread fails, error out.
4860 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4861 thread's lwp instead of the current thread's.
4862 * target.c (set_desired_thread): If the desired thread was not
4863 found, leave the current thread pointing to NULL. Return an int
4864 (boolean) indicating success.
4865 * target.h (set_desired_thread): Change return type to int.
4866
4867 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4868
4869 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4870 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4871 #includes.
4872 (ps_get_thread_area): New function.
4873
4874 2015-08-19 Gary Benson <gbenson@redhat.com>
4875
4876 * hostio.c (handle_pread): Do not attempt to read more data
4877 than hostio_reply_with_data can fit in a packet.
4878
4879 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4880
4881 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4882
4883 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4884
4885 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4886
4887 2015-08-06 Pedro Alves <palves@redhat.com>
4888
4889 * tracepoint.c (expr_eval_result): Now an int.
4890
4891 2015-08-06 Pedro Alves <palves@redhat.com>
4892
4893 * gdbthread.h (struct regcache): Forward declare.
4894 (struct thread_info) <regcache_data>: Now a struct regcache
4895 pointer.
4896 * inferiors.c (inferior_regcache_data)
4897 (set_inferior_regcache_data): Now work with struct regcache
4898 pointers.
4899 * inferiors.h (struct regcache): Forward declare.
4900 (inferior_regcache_data, set_inferior_regcache_data): Now work
4901 with struct regcache pointers.
4902 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4903 (free_register_cache_thread): Remove struct regcache pointer
4904 casts.
4905
4906 2015-08-06 Pedro Alves <palves@redhat.com>
4907
4908 * server.c (captured_main): On error, print the exception message
4909 to stderr, and if run_once is set, throw a quit.
4910
4911 2015-08-06 Pedro Alves <palves@redhat.com>
4912
4913 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4914 the current thread.
4915
4916 2015-08-06 Pedro Alves <palves@redhat.com>
4917
4918 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4919 reading beyond the passed in buffer length.
4920
4921 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4922
4923 * tracepoint.c (symbol_list) <required>: Remove.
4924
4925 2015-08-06 Pedro Alves <palves@redhat.com>
4926
4927 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4928 count if stopping and suspending threads.
4929 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4930 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4931 (linux_detach): Complete an ongoing step-over.
4932 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4933 throughout.
4934 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4935 (linux_wait_1): If passing a signal to the inferior after
4936 finishing a step-over, unsuspend and re-resume all lwps. If we
4937 see a single-step event but the thread should be continuing, don't
4938 pass the trap to gdb.
4939 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4940 internal_error instead of gdb_assert.
4941 (enqueue_pending_signal): New function.
4942 (check_ptrace_stopped_lwp_gone): Add debug output.
4943 (start_step_over): Use internal_error instead of gdb_assert.
4944 (complete_ongoing_step_over): New function.
4945 (linux_resume_one_thread): Don't resume a suspended thread.
4946 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4947 it stepping.
4948
4949 2015-08-06 Pedro Alves <palves@redhat.com>
4950
4951 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4952 (linux_thread_alive): Use lwp_is_marked_dead.
4953 (extended_event_reported): Delete.
4954 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4955 instead of extended_event_reported.
4956 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4957 as well.
4958 (lwp_is_marked_dead): New function.
4959 (lwp_running): Use lwp_is_marked_dead.
4960 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4961 comment.
4962
4963 2015-08-06 Pedro Alves <palves@redhat.com>
4964
4965 * linux-low.c (linux_wait_1): Move fork event output out of the
4966 !report_to_gdb check. Pass event_child->waitstatus to
4967 target_waitstatus_to_string instead of ourstatus.
4968
4969 2015-08-04 Yao Qi <yao.qi@linaro.org>
4970
4971 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4972 if current_thread is 32 bit.
4973
4974 2015-08-04 Yao Qi <yao.qi@linaro.org>
4975
4976 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4977 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4978 * server.c (extended_protocol): Remove "static".
4979 * server.h (extended_protocol): Declare it.
4980
4981 2015-08-04 Yao Qi <yao.qi@linaro.org>
4982
4983 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4984 both aarch64 and aarch32.
4985 (aarch64_set_pc): Likewise.
4986
4987 2015-08-04 Yao Qi <yao.qi@linaro.org>
4988
4989 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4990 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4991 arm-with-neon.xml to srv_xmlfiles.
4992 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4993 (is_64bit_tdesc): New function.
4994 (aarch64_linux_read_description): New function.
4995 (aarch64_arch_setup): Call aarch64_linux_read_description.
4996 (regs_info): Rename to regs_info_aarch64.
4997 (aarch64_regs_info): Return right regs_info.
4998 (initialize_low_arch): Call initialize_low_arch_aarch32.
4999
5000 2015-08-04 Yao Qi <yao.qi@linaro.org>
5001
5002 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5003 * linux-aarch32-low.c: New file.
5004 * linux-aarch32-low.h: New file.
5005 * linux-arm-low.c (arm_fill_gregset): Move it to
5006 linux-aarch32-low.c.
5007 (arm_store_gregset): Likewise.
5008 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5009 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5010 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5011 (regs_info): Rename to regs_info_arm.
5012 (arm_regs_info): Return regs_info_aarch32 if
5013 have_ptrace_getregset is 1 and target description is
5014 arm_with_neon or arm_with_vfpv3.
5015 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5016 Call initialize_low_arch_aarch32 instead.
5017
5018 2015-08-04 Yao Qi <yao.qi@linaro.org>
5019
5020 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5021 * linux-low.c: ... here.
5022 * linux-low.h (have_ptrace_getregset): Declare it.
5023
5024 2015-08-04 Pedro Alves <palves@redhat.com>
5025
5026 * thread-db.c (struct thread_db): Use new typedefs.
5027 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5028 CHK calls.
5029 (disable_thread_event_reporting): Cast result of dlsym to
5030 destination function pointer type.
5031 (thread_db_mourn): Use td_ta_delete_ftype.
5032
5033 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5034
5035 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5036 arch variant.
5037 (CDX_BREAKPOINT): Define for R2.
5038 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5039 (the_low_target): Add comments.
5040
5041 2015-07-30 Yao Qi <yao.qi@linaro.org>
5042
5043 * linux-arm-low.c (arm_hwcap): Remove it.
5044 (arm_read_description): New local variable arm_hwcap. Don't
5045 set arm_hwcap to zero.
5046
5047 2015-07-30 Yao Qi <yao.qi@linaro.org>
5048
5049 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5050 Use regcache->tdesc instead.
5051 (arm_store_wmmxregset): Likewise.
5052 (arm_fill_vfpregset): Likewise.
5053 (arm_store_vfpregset): Likewise.
5054
5055 2015-07-30 Yao Qi <yao.qi@linaro.org>
5056
5057 * linux-arm-low.c: Include arch/arm.h.
5058 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5059 (arm_store_gregset): Likewise.
5060
5061 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5062
5063 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5064 ptrace's 4th parameter.
5065
5066 2015-07-27 Yao Qi <yao.qi@linaro.org>
5067
5068 * configure.srv (case aarch64*-*-linux*): Don't set
5069 srv_linux_usrregs.
5070
5071 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5072
5073 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5074 sys/ptrace.h.
5075 * linux-arm-low.c: Likewise.
5076 * linux-cris-low.c: Likewise.
5077 * linux-crisv32-low.c: Likewise.
5078 * linux-low.c: Likewise.
5079 * linux-m68k-low.c: Likewise.
5080 * linux-mips-low.c: Likewise.
5081 * linux-nios2-low.c: Likewise.
5082 * linux-s390-low.c: Likewise.
5083 * linux-sparc-low.c: Likewise.
5084 * linux-tic6x-low.c: Likewise.
5085 * linux-tile-low.c: Likewise.
5086 * linux-x86-low.c: Likewise.
5087
5088 2015-07-24 Pedro Alves <palves@redhat.com>
5089
5090 * config.in: Regenerate.
5091 * configure: Regenerate.
5092
5093 2015-07-24 Pedro Alves <palves@redhat.com>
5094
5095 * acinclude.m4: Include ../ptrace.m4.
5096 * configure.ac: Call GDB_AC_PTRACE.
5097 * config.in, configure: Regenerate.
5098
5099 2015-07-24 Yao Qi <yao.qi@linaro.org>
5100
5101 * linux-low.c (linux_create_inferior): Remove setting to
5102 proc->priv->new_inferior.
5103 (linux_attach): Likewise.
5104 (linux_low_filter_event): Likewise.
5105 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5106
5107 2015-07-24 Yao Qi <yao.qi@linaro.org>
5108
5109 * linux-low.c (linux_arch_setup): New function.
5110 (linux_low_filter_event): If proc->tdesc is NULL and
5111 proc->attached is true, call the_low_target.arch_setup.
5112 Otherwise, keep status pending, and return.
5113 (linux_resume_one_lwp_throw): Don't call get_pc if
5114 thread->while_stepping isn't NULL. Don't call
5115 get_thread_regcache if proc->tdesc is NULL.
5116 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5117 (linux_target_ops): Install arch_setup.
5118 * server.c (start_inferior): Call the_target->arch_setup.
5119 * target.h (struct target_ops) <arch_setup>: New field.
5120 (target_arch_setup): New marco.
5121 * lynx-low.c (lynx_target_ops): Update.
5122 * nto-low.c (nto_target_ops): Update.
5123 * spu-low.c (spu_target_ops): Update.
5124 * win32-low.c (win32_target_ops): Update.
5125
5126 2015-07-24 Yao Qi <yao.qi@linaro.org>
5127
5128 * linux-low.c (linux_add_process): Don't set
5129 proc->priv->new_inferior.
5130 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5131 (linux_attach): Likewise.
5132
5133 2015-07-24 Yao Qi <yao.qi@linaro.org>
5134
5135 * server.c (start_inferior): Code refactor.
5136
5137 2015-07-24 Yao Qi <yao.qi@linaro.org>
5138
5139 * server.c (process_serial_event): Set general_thread.
5140
5141 2015-07-21 Yao Qi <yao.qi@linaro.org>
5142
5143 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5144 aarch64_linux_get_debug_reg_capacity.
5145
5146 2015-07-17 Yao Qi <yao.qi@linaro.org>
5147
5148 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5149 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5150 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5151 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5152 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5153 (AARCH64_HWP_ALIGNMENT): Likewise.
5154 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5155 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5156 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5157 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5158 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5159 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5160 (struct aarch64_debug_reg_state): Likewise.
5161 (struct arch_lwp_info): Likewise.
5162 (aarch64_align_watchpoint): Likewise.
5163 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5164 (aarch64_watchpoint_length): Likewise.
5165 (aarch64_point_encode_ctrl_reg): Likewise
5166 (aarch64_point_is_aligned): Likewise.
5167 (aarch64_align_watchpoint): Likewise.
5168 (aarch64_linux_set_debug_regs):
5169 (aarch64_dr_state_insert_one_point): Likewise.
5170 (aarch64_dr_state_remove_one_point): Likewise.
5171 (aarch64_handle_breakpoint): Likewise.
5172 (aarch64_handle_aligned_watchpoint): Likewise.
5173 (aarch64_handle_unaligned_watchpoint): Likewise.
5174 (aarch64_handle_watchpoint): Likewise.
5175
5176 2015-07-17 Yao Qi <yao.qi@linaro.org>
5177
5178 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5179 and don't aarch64_get_debug_reg_state. All callers update.
5180 (aarch64_handle_aligned_watchpoint): Likewise.
5181 (aarch64_handle_unaligned_watchpoint): Likewise.
5182 (aarch64_handle_watchpoint): Likewise.
5183 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5184 (aarch64_remove_point): Likewise.
5185
5186 2015-07-17 Yao Qi <yao.qi@linaro.org>
5187
5188 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5189 debug_printf.
5190 (aarch64_handle_unaligned_watchpoint): Likewise.
5191
5192 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5193
5194 Revert the previous 3 commits:
5195 Move gdb_regex* to common/
5196 Move linux_find_memory_regions_full & co.
5197 gdbserver build-id attribute generator
5198
5199 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5200 Jan Kratochvil <jan.kratochvil@redhat.com>
5201
5202 gdbserver build-id attribute generator.
5203 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5204 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5205 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5206 (find_phdr): New.
5207 (get_dynamic): Use find_pdhr to traverse program headers.
5208 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5209 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5210 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5211 (get_hex_build_id): New.
5212 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5213 to reply XML document.
5214
5215 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5216 Jan Kratochvil <jan.kratochvil@redhat.com>
5217
5218 * target.c: Include target/target-utils.h and fcntl.h.
5219 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5220 (target_fileio_read_stralloc): New functions.
5221
5222 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5223
5224 * Makefile.in (OBS): Add gdb_regex.o.
5225 (gdb_regex.o): New.
5226 * config.in: Rebuilt.
5227 * configure: Rebuilt.
5228
5229 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5230 Jan Kratochvil <jan.kratochvil@redhat.com>
5231
5232 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5233 * Makefile.in (OBS): Add target-utils.o.
5234 (linux-maps.o, target-utils.o): New.
5235 * configure.srv (srv_linux_obj): Add linux-maps.o.
5236
5237 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5238
5239 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5240 function, return 1.
5241 (the_low_target): Install it.
5242
5243 2015-07-14 Pedro Alves <palves@redhat.com>
5244
5245 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5246 Instead, ignore ECHILD, and throw an error for other errnos.
5247
5248 2015-07-10 Pedro Alves <palves@redhat.com>
5249
5250 * event-loop.c (struct callback_event) <data>: Change type to
5251 gdb_client_data instance instead of gdb_client_data pointer.
5252 (append_callback_event): Adjust.
5253
5254 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5255
5256 * linux-aarch64-low.c: Add comments for each linux_target_ops
5257 method. Remove comments already covered in target_ops and
5258 linux_target_ops definitions.
5259 (the_low_target): Add comments for each unimplemented method.
5260
5261 2015-07-09 Yao Qi <yao.qi@linaro.org>
5262
5263 * linux-aarch64-low.c (aarch64_regmap): Remove.
5264 (aarch64_usrregs_info): Remove.
5265 (regs_info): Set field usrregs to NULL.
5266
5267 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5268
5269 * linux-low.c: Include "rsp-low.h"
5270 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5271 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5272 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5273 (handle_btrace_enable_pt): New.
5274 (handle_btrace_general_set): Support "pt".
5275 (handle_btrace_conf_general_set): Support "pt:size".
5276
5277 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5278
5279 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5280 Z_PACKET_SW_BP.
5281
5282 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5283
5284 * linux-aarch64-low.c: Remove comment about endianness.
5285 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5286 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5287 memcmp.
5288
5289 2015-06-24 Gary Benson <gbenson@redhat.com>
5290
5291 * linux-i386-ipa.c (stdint.h): Do not include.
5292 * lynx-i386-low.c (stdint.h): Likewise.
5293 * lynx-ppc-low.c (stdint.h): Likewise.
5294 * mem-break.c (stdint.h): Likewise.
5295 * thread-db.c (stdint.h): Likewise.
5296 * tracepoint.c (stdint.h): Likewise.
5297 * win32-low.c (stdint.h): Likewise.
5298
5299 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5300
5301 * server.c (write_qxfer_response): Update call to
5302 remote_escape_output.
5303
5304 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5305 Jan Kratochvil <jan.kratochvil@redhat.com>
5306
5307 Merge multiple hex conversions.
5308 * gdbreplay.c (tohex): Rename to 'fromhex'.
5309 (logchar): Use fromhex.
5310
5311 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5312
5313 * server.c (handle_qxfer_libraries): Set `version' attribute for
5314 <library-list>.
5315
5316 2015-06-10 Gary Benson <gbenson@redhat.com>
5317
5318 * target.h (struct target_ops) <multifs_open>: New field.
5319 <multifs_unlink>: Likewise.
5320 <multifs_readlink>: Likewise.
5321 * linux-low.c (nat/linux-namespaces.h): New include.
5322 (linux_target_ops): Initialize the_target->multifs_open,
5323 the_target->multifs_unlink and the_target->multifs_readlink.
5324 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5325 * hostio.c (hostio_fs_pid): New static variable.
5326 (hostio_handle_new_gdb_connection): New function.
5327 (handle_setfs): Likewise.
5328 (handle_open): Use the_target->multifs_open as appropriate.
5329 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5330 (handle_readlink): Use the_target->multifs_readlink as
5331 appropriate.
5332 (handle_vFile): Handle vFile:setfs packets.
5333 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5334 after target_handle_new_gdb_connection.
5335
5336 2015-06-10 Gary Benson <gbenson@redhat.com>
5337
5338 * configure.ac (AC_CHECK_FUNCS): Add setns.
5339 * config.in: Regenerate.
5340 * configure: Likewise.
5341 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5342 (linux-namespaces.o): New rule.
5343 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5344
5345 2015-06-09 Gary Benson <gbenson@redhat.com>
5346
5347 * hostio.c (handle_open): Process mode argument with
5348 fileio_to_host_mode.
5349
5350 2015-06-01 Yao Qi <yao.qi@linaro.org>
5351
5352 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5353 * linux-x86-low.c: Likewise.
5354
5355 2015-05-28 Don Breazeal <donb@codesourcery.com>
5356
5357 * linux-low.c (handle_extended_wait): Initialize
5358 thread_info.last_resume_kind for new fork children.
5359
5360 2015-05-15 Pedro Alves <palves@redhat.com>
5361
5362 * target.h (target_handle_new_gdb_connection): Rewrite using if
5363 wrapped in do/while.
5364
5365 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5366
5367 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5368 * configure, config.in: Regenerate.
5369 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5370 Declare typedef.
5371
5372 2015-05-12 Don Breazeal <donb@codesourcery.com>
5373
5374 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5375 PTRACE_EVENT_VFORK_DONE.
5376 (linux_low_ptrace_options, extended_event_reported): Add vfork
5377 events.
5378 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5379 and "vforkdone" for RSP 'T' Stop Reply Packet.
5380 * server.h (report_vfork_events): Declare
5381 global variable.
5382
5383 2015-05-12 Don Breazeal <donb@codesourcery.com>
5384
5385 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5386 (the_low_target) <new_fork>: Initialize new member.
5387 * linux-arm-low.c (arm_new_fork): New function.
5388 (the_low_target) <new_fork>: Initialize new member.
5389 * linux-low.c (handle_extended_wait): Call new target function
5390 new_fork.
5391 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5392 * linux-mips-low.c (mips_add_watchpoint): New function
5393 extracted from mips_insert_point.
5394 (the_low_target) <new_fork>: Initialize new member.
5395 (mips_linux_new_fork): New function.
5396 (mips_insert_point): Call mips_add_watchpoint.
5397 * linux-x86-low.c (x86_linux_new_fork): New function.
5398 (the_low_target) <new_fork>: Initialize new member.
5399
5400 2015-05-12 Don Breazeal <donb@codesourcery.com>
5401
5402 * linux-low.c (handle_extended_wait): Implement return value,
5403 rename argument 'event_child' to 'event_lwp', handle
5404 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5405 (linux_low_ptrace_options): New function.
5406 (linux_low_filter_event): Call linux_low_ptrace_options,
5407 use different argument fo linux_enable_event_reporting,
5408 use return value from handle_extended_wait.
5409 (extended_event_reported): New function.
5410 (linux_wait_1): Call extended_event_reported and set
5411 status to report fork events.
5412 (linux_write_memory): Add pid to debug message.
5413 (reset_lwp_ptrace_options_callback): New function.
5414 (linux_handle_new_gdb_connection): New function.
5415 (linux_target_ops): Initialize new structure member.
5416 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5417 * lynx-low.c: Initialize new structure member.
5418 * remote-utils.c (prepare_resume_reply): Implement stop reason
5419 "fork" for "T" stop message.
5420 * server.c (handle_query): Call handle_new_gdb_connection.
5421 * server.h (report_fork_events): Declare global flag.
5422 * target.h (struct target_ops) <handle_new_gdb_connection>:
5423 New member.
5424 (target_handle_new_gdb_connection): New macro.
5425 * win32-low.c: Initialize new structure member.
5426
5427 2015-05-12 Don Breazeal <donb@codesourcery.com>
5428
5429 * mem-break.c (APPEND_TO_LIST): Define macro.
5430 (clone_agent_expr): New function.
5431 (clone_one_breakpoint): New function.
5432 (clone_all_breakpoints): New function.
5433 * mem-break.h: Declare new functions.
5434
5435 2015-05-12 Don Breazeal <donb@codesourcery.com>
5436
5437 * linux-low.c (linux_supports_fork_events): New function.
5438 (linux_supports_vfork_events): New function.
5439 (linux_target_ops): Initialize new structure members.
5440 (initialize_low): Call linux_check_ptrace_features.
5441 * lynx-low.c (lynx_target_ops): Initialize new structure
5442 members.
5443 * server.c (report_fork_events, report_vfork_events):
5444 New global flags.
5445 (handle_query): Add new features to qSupported packet and
5446 response.
5447 (captured_main): Initialize new global variables.
5448 * target.h (struct target_ops) <supports_fork_events>:
5449 New member.
5450 <supports_vfork_events>: New member.
5451 (target_supports_fork_events): New macro.
5452 (target_supports_vfork_events): New macro.
5453 * win32-low.c (win32_target_ops): Initialize new structure
5454 members.
5455
5456 2015-05-12 Gary Benson <gbenson@redhat.com>
5457
5458 * server.c (handle_qxfer_exec_file): Use current process
5459 if annex is empty.
5460
5461 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5462
5463 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5464 Remove HAVE_PTRACE_GETREGS conditionals.
5465 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5466 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5467
5468 2015-05-08 Yao Qi <yao.qi@linaro.org>
5469
5470 * linux-low.c (linux_supports_conditional_breakpoints): New
5471 function.
5472 (linux_target_ops): Install new target method.
5473 * lynx-low.c (lynx_target_ops): Install NULL hook for
5474 supports_conditional_breakpoints.
5475 * nto-low.c (nto_target_ops): Likewise.
5476 * spu-low.c (spu_target_ops): Likewise.
5477 * win32-low.c (win32_target_ops): Likewise.
5478 * server.c (handle_query): Check
5479 target_supports_conditional_breakpoints.
5480 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5481 New field.
5482 (target_supports_conditional_breakpoints): New macro.
5483
5484 2015-05-06 Pedro Alves <palves@redhat.com>
5485
5486 PR server/18081
5487 * server.c (start_inferior): If the process exits, mourn it.
5488
5489 2015-04-21 Gary Benson <gbenson@redhat.com>
5490
5491 * hostio.c (fileio_open_flags_to_host): Factored out to
5492 fileio_to_host_openflags in common/fileio.c. Single use
5493 updated.
5494
5495 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5496
5497 * linux-xtensa-low.c (xtensa_fill_gregset)
5498 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5499 XCHAL_HAVE_LOOP.
5500
5501 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5502
5503 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5504 (regs_info): Replace usrregs pointer with NULL.
5505
5506 2015-04-17 Gary Benson <gbenson@redhat.com>
5507
5508 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5509 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5510 * server.c (handle_qxfer_exec_file): New function.
5511 (qxfer_packets): Add exec-file entry.
5512 (handle_query): Report qXfer:exec-file:read as supported packet.
5513
5514 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5515
5516 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5517
5518 2015-04-09 Gary Benson <gbenson@redhat.com>
5519
5520 * hostio-errno.c (errno_to_fileio_error): Remove function.
5521 Update caller to use remote_fileio_to_fio_error.
5522
5523 2015-04-09 Yao Qi <yao.qi@linaro.org>
5524
5525 * linux-low.c (linux_insert_point): Call
5526 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5527 (linux_remove_point): Call remove_memory_breakpoint if type is
5528 raw_bkpt_type_sw.
5529 * linux-x86-low.c (x86_insert_point): Don't call
5530 insert_memory_breakpoint.
5531 (x86_remove_point): Don't call remove_memory_breakpoint.
5532
5533 2015-04-01 Pedro Alves <palves@redhat.com>
5534 Cleber Rosa <crosa@redhat.com>
5535
5536 * server.c (gdbserver_usage): Reorganize and extend the usage
5537 message.
5538
5539 2015-03-24 Pedro Alves <palves@redhat.com>
5540
5541 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5542 output. Also dump TRAP_TRACE.
5543 (linux_low_filter_event): In debug output, distinguish a
5544 resume_stop SIGSTOP from a delayed SIGSTOP.
5545
5546 2015-03-24 Gary Benson <gbenson@redhat.com>
5547
5548 * linux-x86-low.c (x86_linux_new_thread): Moved to
5549 nat/x86-linux.c.
5550 (x86_linux_prepare_to_resume): Likewise.
5551
5552 2015-03-24 Gary Benson <gbenson@redhat.com>
5553
5554 * Makefile.in (x86-linux-dregs.o): New rule.
5555 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5556 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5557 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5558 (x86_linux_dr_get): Likewise.
5559 (x86_linux_dr_set): Likewise.
5560 (update_debug_registers_callback): Likewise.
5561 (x86_linux_dr_set_addr): Likewise.
5562 (x86_linux_dr_get_addr): Likewise.
5563 (x86_linux_dr_set_control): Likewise.
5564 (x86_linux_dr_get_control): Likewise.
5565 (x86_linux_dr_get_status): Likewise.
5566 (x86_linux_update_debug_registers): Likewise.
5567
5568 2015-03-24 Gary Benson <gbenson@redhat.com>
5569
5570 * linux-x86-low.c (x86_linux_update_debug_registers):
5571 New function, factored out from...
5572 (x86_linux_prepare_to_resume): ...this.
5573
5574 2015-03-24 Gary Benson <gbenson@redhat.com>
5575
5576 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5577 (x86_linux_dr_set): Likewise.
5578 (update_debug_registers_callback): Likewise.
5579 (x86_linux_dr_set_addr): Likewise.
5580 (x86_linux_dr_get_addr): Likewise.
5581 (x86_linux_dr_set_control): Likewise.
5582 (x86_linux_dr_get_control): Likewise.
5583 (x86_linux_dr_get_status): Likewise.
5584 (x86_linux_prepare_to_resume): Likewise.
5585
5586 2015-03-24 Gary Benson <gbenson@redhat.com>
5587
5588 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5589 Use perror_with_name. Pass string through gettext.
5590 (x86_linux_dr_set): Likewise.
5591
5592 2015-03-24 Gary Benson <gbenson@redhat.com>
5593
5594 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5595 (x86_linux_dr_set_addr): ...this.
5596 (x86_dr_low_get_addr): Rename to...
5597 (x86_linux_dr_get_addr): ...this.
5598 (x86_dr_low_set_control): Rename to...
5599 (x86_linux_dr_set_control): ...this.
5600 (x86_dr_low_get_control): Rename to...
5601 (x86_linux_dr_get_control): ...this.
5602 (x86_dr_low_get_status): Rename to...
5603 (x86_linux_dr_get_status): ...this.
5604 (x86_dr_low): Update with new function names.
5605
5606 2015-03-24 Gary Benson <gbenson@redhat.com>
5607
5608 * Makefile.in (x86-linux.o): New rule.
5609 * configure.srv: Add x86-linux.o to relevant targets.
5610 * linux-low.c (lwp_set_arch_private_info): New function.
5611 (lwp_arch_private_info): Likewise.
5612 * linux-x86-low.c: Include nat/x86-linux.h.
5613 (arch_lwp_info): Removed structure.
5614 (update_debug_registers_callback):
5615 Use lwp_set_debug_registers_changed.
5616 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5617 and lwp_set_debug_registers_changed.
5618 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5619
5620 2015-03-24 Gary Benson <gbenson@redhat.com>
5621
5622 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5623 * linux-arm-low.c (arm_new_thread): Likewise.
5624 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5625 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5626 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5627 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5628
5629 2015-03-24 Gary Benson <gbenson@redhat.com>
5630
5631 * linux-low.c (ptid_of_lwp): New function.
5632 (lwp_is_stopped): Likewise.
5633 (lwp_stop_reason): Likewise.
5634 * linux-x86-low.c (update_debug_registers_callback):
5635 Use lwp_is_stopped.
5636 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5637 lwp_stop_reason.
5638
5639 2015-03-24 Gary Benson <gbenson@redhat.com>
5640
5641 * linux-low.h (linux_stop_lwp): Remove declaration.
5642
5643 2015-03-24 Gary Benson <gbenson@redhat.com>
5644
5645 * linux-low.h: Include nat/linux-nat.h.
5646 * linux-low.c (iterate_over_lwps_args): New structure.
5647 (iterate_over_lwps_filter): New function.
5648 (iterate_over_lwps): Likewise.
5649 * linux-x86-low.c (update_debug_registers_callback):
5650 Update signature to what iterate_over_lwps expects.
5651 Remove PID check that iterate_over_lwps now performs.
5652 (x86_dr_low_set_addr): Use iterate_over_lwps.
5653 (x86_dr_low_set_control): Likewise.
5654
5655 2015-03-24 Gary Benson <gbenson@redhat.com>
5656
5657 * linux-x86-low.c (x86_debug_reg_state): New function.
5658 (x86_linux_prepare_to_resume): Use the above.
5659
5660 2015-03-24 Gary Benson <gbenson@redhat.com>
5661
5662 * linux-low.c (current_lwp_ptid): New function.
5663 * linux-x86-low.c: Include nat/linux-nat.h.
5664 (x86_dr_low_get_addr): Use current_lwp_ptid.
5665 (x86_dr_low_get_control): Likewise.
5666 (x86_dr_low_get_status): Likewise.
5667
5668 2015-03-20 Pedro Alves <palves@redhat.com>
5669
5670 * tracepoint.c (cmd_qtstatus): Make "str" const.
5671
5672 2015-03-20 Pedro Alves <palves@redhat.com>
5673
5674 * server.c (handle_general_set): Make "req_str" const.
5675
5676 2015-03-19 Pedro Alves <palves@redhat.com>
5677
5678 * linux-low.c (linux_resume_one_lwp): Rename to ...
5679 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5680 instead call perror_with_name.
5681 (check_ptrace_stopped_lwp_gone): New function.
5682 (linux_resume_one_lwp): Reimplement as wrapper around
5683 linux_resume_one_lwp_throw that swallows errors if the LWP is
5684 gone.
5685
5686 2015-03-19 Pedro Alves <palves@redhat.com>
5687
5688 * linux-low.c (count_events_callback, select_event_lwp_callback):
5689 No longer check whether the thread has resume_stop as last resume
5690 kind.
5691
5692 2015-03-19 Pedro Alves <palves@redhat.com>
5693
5694 * linux-low.c (count_events_callback, select_event_lwp_callback):
5695 Use the lwp's status_pending_p field, not the thread's.
5696
5697 2015-03-19 Pedro Alves <palves@redhat.com>
5698
5699 * linux-low.c (select_event_lwp_callback): Update comments to
5700 no longer mention SIGTRAP.
5701
5702 2015-03-18 Gary Benson <gbenson@redhat.com>
5703
5704 * server.c (handle_query): Do not report vFile:fstat as supported.
5705
5706 2015-03-11 Gary Benson <gbenson@redhat.com>
5707
5708 * hostio.c (sys/types.h): New include.
5709 (sys/stat.h): Likewise.
5710 (common-remote-fileio.h): Likewise.
5711 (handle_fstat): New function.
5712 (handle_vFile): Handle vFile:fstat packets.
5713
5714 2015-03-11 Gary Benson <gbenson@redhat.com>
5715
5716 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5717 struct stat.st_blocks and struct stat.st_blksize.
5718 * configure: Regenerate.
5719 * config.in: Likewise.
5720 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5721 (OBS): Add common-remote-fileio.o.
5722 (common-remote-fileio.o): New rule.
5723
5724 2015-03-09 Pedro Alves <palves@redhat.com>
5725
5726 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5727 'struct sockaddr' pointer in 'accept' call.
5728
5729 2015-03-09 Pedro Alves <palves@redhat.com>
5730
5731 Revert:
5732 2015-03-07 Pedro Alves <palves@redhat.com>
5733 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5734 or <winsock2.h> here. Instead include "gdb_socket.h".
5735 (remote_open): Use union gdb_sockaddr_u.
5736 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5737 or <winsock2.h> here. Instead include "gdb_socket.h".
5738 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5739 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5740 or <sys/un.h>.
5741 (init_named_socket, gdb_agent_helper_thread): Use union
5742 gdb_sockaddr_u.
5743
5744 2015-03-07 Pedro Alves <palves@redhat.com>
5745
5746 * configure.ac (build_warnings): Move
5747 -Wdeclaration-after-statement to the C-specific set.
5748 * configure: Regenerate.
5749
5750 2015-03-07 Pedro Alves <palves@redhat.com>
5751
5752 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5753 or <winsock2.h> here. Instead include "gdb_socket.h".
5754 (remote_open): Use union gdb_sockaddr_u.
5755 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5756 or <winsock2.h> here. Instead include "gdb_socket.h".
5757 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5758 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5759 or <sys/un.h>.
5760 (init_named_socket, gdb_agent_helper_thread): Use union
5761 gdb_sockaddr_u.
5762
5763 2015-03-07 Pedro Alves <palves@redhat.com>
5764
5765 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5766 instead.
5767
5768 2015-03-06 Yao Qi <yao.qi@linaro.org>
5769
5770 * linux-aarch64-low.c (aarch64_insert_point): Use
5771 show_debug_regs as a boolean.
5772 (aarch64_remove_point): Likewise.
5773
5774 2015-03-05 Pedro Alves <palves@redhat.com>
5775
5776 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5777 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5778 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5779 * nto-low.c (nto_target_ops): Likewise.
5780 * spu-low.c (spu_target_ops): Likewise.
5781 * win32-low.c (win32_target_ops): Likewise.
5782
5783 2015-03-04 Pedro Alves <palves@redhat.com>
5784
5785 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5786 Decide whether a breakpoint triggered based on the SIGTRAP's
5787 siginfo.si_code.
5788 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5789 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5790 (linux_low_filter_event): Check for breakpoints before checking
5791 watchpoints.
5792 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5793 siginfo.si_code.
5794 (linux_stopped_by_sw_breakpoint)
5795 (linux_supports_stopped_by_sw_breakpoint)
5796 (linux_stopped_by_hw_breakpoint)
5797 (linux_supports_stopped_by_hw_breakpoint): New functions.
5798 (linux_target_ops): Install new target methods.
5799
5800 2015-03-04 Pedro Alves <palves@redhat.com>
5801
5802 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5803 * server.c (swbreak_feature, hwbreak_feature): New globals.
5804 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5805 (captured_main): Clear swbreak_feature and hwbreak_feature.
5806 * server.h (swbreak_feature, hwbreak_feature): Declare.
5807 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5808 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5809 supports_stopped_by_hw_breakpoint>: New fields.
5810 (target_supports_stopped_by_sw_breakpoint)
5811 (target_stopped_by_sw_breakpoint)
5812 (target_supports_stopped_by_hw_breakpoint)
5813 (target_stopped_by_hw_breakpoint): Declare.
5814
5815 2015-03-04 Pedro Alves <palves@redhat.com>
5816
5817 enum lwp_stop_reason -> enum target_stop_reason
5818 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5819 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5820 (linux_wait_1, stuck_in_jump_pad_callback)
5821 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5822 (linux_stopped_by_watchpoint):
5823 * linux-low.h (enum lwp_stop_reason): Delete.
5824 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5825 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5826
5827 2015-03-04 Yao Qi <yao.qi@linaro.org>
5828
5829 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5830
5831 2015-03-03 Gary Benson <gbenson@redhat.com>
5832
5833 * hostio.c (handle_vFile): Fix prefix lengths.
5834
5835 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5836
5837 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5838 ptr_bits.
5839
5840 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5841
5842 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5843 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5844 (clean): Add "rm -f" for above C files.
5845 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5846 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5847 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5848 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5849 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5850 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5851 (init_registers_s390x_vx_linux64)
5852 (init_registers_s390x_tevx_linux64)
5853 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5854 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5855 declarations.
5856 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5857 (s390_store_vxrs_high): New functions.
5858 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5859 NT_S390_VXRS_HIGH.
5860 (s390_arch_setup): Add logic for selecting one of the new target
5861 descriptions. Activate the new vector regsets if applicable.
5862 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5863 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5864 and init_registers_s390x_tevx_linux64.
5865
5866 2015-03-01 Pedro Alves <palves@redhat.com>
5867
5868 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5869 parameter.
5870
5871 2015-02-27 Pedro Alves <palves@redhat.com>
5872
5873 * linux-x86-low.c (u_debugreg_offset): New function.
5874 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5875
5876 2015-02-27 Pedro Alves <palves@redhat.com>
5877
5878 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5879 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5880 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5881 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5882 (ps_lsetfpregs, ps_getpid)
5883 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5884 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5885 (ps_lsetxregs, ps_plog): Declare.
5886
5887 2015-02-27 Pedro Alves <palves@redhat.com>
5888
5889 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5890 IP_AGENT_EXPORT_FUNC.
5891 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5892 IP_AGENT_EXPORT_FUNC.
5893 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5894 (IP_AGENT_EXPORT): Delete.
5895 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5896 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5897 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5898 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5899 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5900 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5901 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5902 (traceframe_read_count, traceframe_write_count)
5903 (traceframes_created, trace_state_variables, get_raw_reg)
5904 (get_trace_state_variable_value, set_trace_state_variable_value)
5905 (ust_loaded, helper_thread_id, cmd_buf): Use
5906 IPA_SYM_EXPORTED_NAME.
5907 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5908 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5909 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5910 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5911 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5912 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5913 EXTERN_C_PUSH/EXTERN_C_POP.
5914 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5915 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5916 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5917 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5918 (traceframe_write_count, traceframe_read_count)
5919 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5920 (about_to_request_buffer_space, get_trace_state_variable_value)
5921 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5922 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5923 EXTERN_C_PUSH/EXTERN_C_POP.
5924 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5925 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5926 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5927 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5928 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5929 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5930 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5931 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5932 Define.
5933 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5934 (IP_AGENT_EXPORT_VAR_DECL): Define.
5935 (tracing): Declare.
5936 (gdb_agent_get_raw_reg): Declare.
5937
5938 2015-02-27 Tom Tromey <tromey@redhat.com>
5939 Pedro Alves <palves@redhat.com>
5940
5941 Rename symbols whose names are reserved C++ keywords throughout.
5942
5943 2015-02-27 Pedro Alves <palves@redhat.com>
5944
5945 * Makefile.in (COMPILER): New, get it from autoconf.
5946 (CXX): Get from autoconf instead.
5947 (COMPILE.pre): Use COMPILER.
5948 (CC-LD): Rename to ...
5949 (CC_LD): ... this. Use COMPILER.
5950 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5951 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5952 * acinclude.m4: Include build-with-cxx.m4.
5953 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5954 Disable -Werror by default if building in C++ mode.
5955 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5956 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5957 the C++ compiler. Save/restore CXXFLAGS too.
5958 * configure: Regenerate.
5959
5960 2015-02-27 Pedro Alves <palves@redhat.com>
5961
5962 * acinclude.m4: Include libiberty.m4.
5963 * configure.ac: Call libiberty_INIT.
5964 * config.in, configure: Regenerate.
5965
5966 2015-02-26 Pedro Alves <palves@redhat.com>
5967
5968 * linux-low.c (linux_wait_1): When incrementing the PC past a
5969 program breakpoint always use the_low_target.breakpoint_len as
5970 increment, rather than the maximum between that and
5971 the_low_target.decr_pc_after_break.
5972
5973 2015-02-23 Pedro Alves <palves@redhat.com>
5974
5975 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5976 thread was doing a step-over; always adjust the PC if
5977 we stepped over a permanent breakpoint.
5978 (linux_wait_1): If we stepped over breakpoint that was on top of a
5979 permanent breakpoint, manually advance the PC past it.
5980
5981 2015-02-23 Pedro Alves <palves@redhat.com>
5982
5983 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5984 modes.
5985 (x86_fill_gregset, x86_store_gregset): Use it when handling
5986 $orig_eax.
5987
5988 2015-02-20 Pedro Alves <palves@redhat.com>
5989
5990 * thread-db.c: Include "nat/linux-procfs.h".
5991 (thread_db_init): Skip listing new threads if the kernel supports
5992 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5993
5994 2015-02-20 Pedro Alves <palves@redhat.com>
5995
5996 * linux-low.c (status_pending_p_callback): Use ptid_match.
5997
5998 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5999
6000 PR breakpoints/16812
6001 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6002 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6003 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6004
6005 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6006
6007 PR breakpoints/15956
6008 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6009
6010 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6011
6012 * linux-low.c (linux_low_btrace_conf): Print size.
6013 * server.c (handle_btrace_conf_general_set): New.
6014 (hanle_general_set): Call handle_btrace_conf_general_set.
6015 (handle_query): Report Qbtrace-conf:bts:size as supported.
6016
6017 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6018
6019 * linux-low.c (linux_low_enable_btrace): Update parameters.
6020 (linux_low_btrace_conf): New.
6021 (linux_target_ops)<to_btrace_conf>: Initialize.
6022 * server.c (current_btrace_conf): New.
6023 (handle_btrace_enable): Rename to ...
6024 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6025 to target_enable_btrace. Update comment. Update users.
6026 (handle_qxfer_btrace_conf): New.
6027 (qxfer_packets): Add btrace-conf entry.
6028 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6029 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6030 (target_ops)<read_btrace_conf>: New.
6031 (target_enable_btrace): Update parameters.
6032 (target_read_btrace_conf): New.
6033
6034 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6035
6036 * server.c (handle_btrace_general_set): Remove call to
6037 target_supports_btrace.
6038 (supported_btrace_packets): New.
6039 (handle_query): Call supported_btrace_packets.
6040 * target.h: include btrace-common.h.
6041 (btrace_target_info): Removed.
6042 (supports_btrace, target_supports_btrace): Update parameters.
6043
6044 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6045
6046 * Makefile.in (SFILES): Add common/btrace-common.c.
6047 (OBS): Add common/btrace-common.o.
6048 (btrace-common.o): Add build rules.
6049 * linux-low: Include btrace-common.h.
6050 (linux_low_read_btrace): Use struct btrace_data. Call
6051 btrace_data_init and btrace_data_fini.
6052
6053 2015-02-06 Pedro Alves <palves@redhat.com>
6054
6055 * thread-db.c (find_new_threads_callback): Add debug output.
6056
6057 2015-02-04 Pedro Alves <palves@redhat.com>
6058
6059 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6060 (resume_stopped_resumed_lwps): New function.
6061 (linux_wait_for_event_filtered): Use it.
6062
6063 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6064
6065 * Makefile.in (SFILES): Add linux-personality.c.
6066 (linux-personality.o): New rule.
6067 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6068 list of objects to be built.
6069 * linux-low.c: Include nat/linux-personality.h.
6070 (linux_create_inferior): Remove code to disable address space
6071 randomization (moved to ../nat/linux-personality.c). Create
6072 cleanup to disable address space randomization.
6073
6074 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6075
6076 * Makefile.in (posix-strerror.o): New rule.
6077 (mingw-strerror.o): Likewise.
6078 * configure: Regenerated.
6079 * configure.ac: Source file ../common/common.host. Initialize new
6080 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6081
6082 2015-01-14 Yao Qi <yao@codesourcery.com>
6083
6084 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6085 (ppc-linux.o): New rule.
6086 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6087 * configure.ac: AC_CHECK_FUNCS(getauxval).
6088 * config.in: Re-generated.
6089 * configure: Re-generated.
6090 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6091 ppc64_64bit_inferior_p
6092
6093 2015-01-14 Yao Qi <yao@codesourcery.com>
6094
6095 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6096 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6097 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6098 (PT_ORIG_R3, PT_TRAP): Likewise.
6099 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6100 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6101 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6102
6103 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6104
6105 * i387-fp.c (i387_cache_to_xsave): In look over
6106 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6107 zmmh_low_space field by use of zmmh_high_space.
6108
6109 2015-01-09 Pedro Alves <palves@redhat.com>
6110
6111 * linux-low.c (step_over_bkpt): Move higher up in the file.
6112 (handle_extended_wait): Don't store the stop_pc here.
6113 (get_stop_pc): Adjust comments and rename to ...
6114 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6115 stopped for a software breakpoint or hardware breakpoint.
6116 (thread_still_has_status_pending_p): New function.
6117 (status_pending_p_callback): Use
6118 thread_still_has_status_pending_p. If the event is no longer
6119 interesting, resume the LWP.
6120 (handle_tracepoints): Add assert.
6121 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6122 (wstatus_maybe_breakpoint): New function.
6123 (cancel_breakpoint): Delete function.
6124 (check_stopped_by_watchpoint): New function, factored out from
6125 linux_low_filter_event.
6126 (lp_status_maybe_breakpoint): Delete function.
6127 (linux_low_filter_event): Remove filter_ptid argument.
6128 Leave thread group exits pending here. Store the LWP's stop PC.
6129 Always leave events pending.
6130 (linux_wait_for_event_filtered): Pull all events out of the
6131 kernel, and leave them all pending.
6132 (count_events_callback, select_event_lwp_callback): Consider all
6133 events.
6134 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6135 (select_event_lwp): Only give preference to the stepping LWP in
6136 all-stop mode. Adjust comments.
6137 (ignore_event): New function.
6138 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6139 references to cancel_breakpoints. Adjust to renames. Also give
6140 equal priority to all LWPs that have had events in non-stop mode.
6141 If reporting a software breakpoint event, unadjust the LWP's PC.
6142 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6143 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6144 Adjust.
6145 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6146 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6147 (linux_stopped_by_watchpoint): Adjust.
6148 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6149 * linux-low.h (enum lwp_stop_reason): New.
6150 (struct lwp_info) <stop_pc>: Adjust comment.
6151 <stopped_by_watchpoint>: Delete field.
6152 <stop_reason>: New field.
6153 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6154 * mem-break.c (software_breakpoint_inserted_here)
6155 (hardware_breakpoint_inserted_here): New function.
6156 * mem-break.h (software_breakpoint_inserted_here)
6157 (hardware_breakpoint_inserted_here): Declare.
6158 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6159 (cancel_breakpoints): Delete.
6160 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6161 (upload_fast_traceframes): Remove references to
6162 cancel_breakpoints.
6163
6164 2015-01-09 Pedro Alves <palves@redhat.com>
6165
6166 * thread-db.c (find_new_threads_callback): Ignore thread if the
6167 kernel thread ID is -1.
6168
6169 2015-01-09 Pedro Alves <palves@redhat.com>
6170
6171 * linux-low.c (linux_attach_fail_reason_string): Move to
6172 nat/linux-ptrace.c, and rename.
6173 (linux_attach_lwp): Update comment.
6174 (attach_proc_task_lwp_callback): New function.
6175 (linux_attach): Adjust to rename and use
6176 linux_proc_attach_tgid_threads.
6177 (linux_attach_fail_reason_string): Delete declaration.
6178
6179 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6180
6181 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6182 * server.c (gdbserver_version): Likewise.
6183
6184 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6185
6186 * remote-utils.c: Include ctype.h.
6187 (input_interrupt): Explicitly handle the case when the char
6188 received is the NUL byte. Improve the printing of non-ASCII
6189 characters.
6190
6191 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6192
6193 * linux-low.c (linux_low_filter_event): Update call to
6194 linux_enable_event_reporting following the addition of
6195 a new parameter to that function.
6196
6197 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6198
6199 PR server/17457
6200 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6201 (AARCH64_FPCR_REGNO): Likewise.
6202 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6203 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6204 (aarch64_store_fpregset): Likewise.
6205
6206 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6207
6208 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6209 Remove FIXME comment about assumption about N.
6210
6211 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6212
6213 * configure.ac: If large-file support is disabled in GDBserver,
6214 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6215 * configure: Regenerate.
6216
6217 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6218
6219 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6220 warning upon ENODATA from ptrace.
6221 * linux-s390-low.c (s390_store_tdb): New.
6222 (s390_regsets): Add regset for NT_S390_TDB.
6223
6224 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6225
6226 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6227 without a fill_function.
6228 * linux-s390-low.c (s390_fill_last_break): Remove.
6229 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6230 (s390_arch_setup): Use regset's size instead of fill_function for
6231 loop end condition.
6232
6233 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6234
6235 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6236 the regset's store function when ptrace returned an error.
6237 * regcache.c (get_thread_regcache): Invalidate register cache
6238 before fetching inferior's registers.
6239
6240 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6241
6242 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6243 while-loop as for-loop.
6244 (regsets_store_inferior_registers): Likewise.
6245
6246 2014-11-28 Yao Qi <yao@codesourcery.com>
6247
6248 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6249 * config.in, configure: Re-generate.
6250 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6251 is defined.
6252
6253 2014-11-21 Yao Qi <yao@codesourcery.com>
6254
6255 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6256 (AC_CHECK_HEADERS): Remove malloc.h.
6257 * configure: Re-generated.
6258 * config.in: Re-generated.
6259 * server.h: Don't include alloca.h and malloc.h.
6260 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6261 Don't include malloc.h.
6262
6263 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6264
6265 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6266 corresponding ERRNO check in same block.
6267
6268 2014-11-12 Pedro Alves <palves@redhat.com>
6269
6270 * server.c (cont_thread): Update comment.
6271 (start_inferior, attach_inferior): No longer clear cont_thread.
6272 (handle_v_cont): No longer set cont_thread.
6273 (captured_main): Clear cont_thread each time a GDB connects.
6274
6275 2014-11-12 Pedro Alves <palves@redhat.com>
6276
6277 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6278 thread, and don't resume all threads if the Hc thread has exited.
6279
6280 2014-11-12 Pedro Alves <palves@redhat.com>
6281
6282 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6283 the process group instead of to a specific LWP.
6284
6285 2014-10-15 Pedro Alves <palves@redhat.com>
6286
6287 PR server/17487
6288 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6289 parameter.
6290 (arm_set_thread_context): Delete.
6291 (the_low_target): Adjust.
6292 * win32-i386-low.c (debug_registers_changed)
6293 (debug_registers_used): Delete.
6294 (update_debug_registers_callback): New function.
6295 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6296 needing to update their debug registers.
6297 (win32_get_current_dr): New function.
6298 (x86_dr_low_get_addr, x86_dr_low_get_control)
6299 (x86_dr_low_get_status): Fetch the debug register from the thread
6300 record's context.
6301 (i386_initial_stuff): Adjust.
6302 (i386_get_thread_context): Remove current_event parameter. Don't
6303 clear debug_registers_changed nor copy DR values to
6304 debug_reg_state.
6305 (i386_set_thread_context): Delete.
6306 (i386_prepare_to_resume): New function.
6307 (i386_thread_added): Mark the thread as needing to update irs
6308 debug registers.
6309 (the_low_target): Remove i386_set_thread_context and install
6310 i386_prepare_to_resume.
6311 * win32-low.c (win32_get_thread_context): Adjust.
6312 (win32_set_thread_context): Use SetThreadContext
6313 directly.
6314 (win32_prepare_to_resume): New function.
6315 (win32_require_context): New function, factored out from ...
6316 (thread_rec): ... this.
6317 (continue_one_thread): Call win32_prepare_to_resume on each thread
6318 we're about to continue.
6319 (win32_resume): Call win32_prepare_to_resume on the event thread.
6320 * win32-low.h (struct win32_thread_info)
6321 <debug_registers_changed>: New field.
6322 (struct win32_target_ops): Change prototype of set_thread_context,
6323 delete set_thread_context and add prepare_to_resume.
6324 (win32_require_context): New declaration.
6325
6326 2014-10-08 Gary Benson <gbenson@redhat.com>
6327
6328 * server.h: Do not include common-exceptions.h.
6329
6330 2014-10-08 Gary Benson <gbenson@redhat.com>
6331
6332 * server.h: Do not include cleanups.h.
6333
6334 2014-09-30 James Hogan <james.hogan@imgtec.com>
6335
6336 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6337 mips64-dsp-linux.c.
6338
6339 2014-09-23 Yao Qi <yao@codesourcery.com>
6340
6341 * linux-low.c (lp_status_maybe_breakpoint): New function.
6342 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6343 (count_events_callback): Likewise.
6344 (select_event_lwp_callback): Likewise.
6345 (cancel_breakpoints_callback): Likewise.
6346
6347 2014-09-19 Don Breazeal <donb@codesourcery.com>
6348
6349 * linux-low.c (handle_extended_wait): Call
6350 linux_ptrace_get_extended_event.
6351 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6352 linux_is_extended_waitstatus.
6353
6354 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6355
6356 * Makefile.in (CPPFLAGS): Define.
6357 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6358 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6359
6360 2014-09-16 Gary Benson <gbenson@redhat.com>
6361
6362 * inferiors.h (current_inferior): Renamed as...
6363 (current_thread): New variable. All uses updated.
6364 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6365 (maybe_move_out_of_jump_pad): Likewise.
6366 (cancel_breakpoint): Likewise.
6367 (linux_low_filter_event): Likewise.
6368 (wait_for_sigstop): Likewise.
6369 (linux_resume_one_lwp): Likewise.
6370 (need_step_over_p): Likewise.
6371 (start_step_over): Likewise.
6372 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6373 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6374 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6375 and save_inferior as saved_thread.
6376 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6377 saved_thread.
6378 (regcache_invalidate_thread): Likewise.
6379 * remote-utils.c (prepare_resume_reply): Likewise.
6380 * thread-db.c (thread_db_get_tls_address): Likewise.
6381 (disable_thread_event_reporting): Likewise.
6382 (remove_thread_event_breakpoints): Likewise.
6383 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6384 as saved_thread.
6385 * target.h (set_desired_inferior): Renamed as...
6386 (set_desired_thread): New declaration. All uses updated.
6387 * server.c (myresume): Updated comment to reference thread instead
6388 of inferior.
6389 (handle_serial_event): Likewise.
6390 (handle_target_event): Likewise.
6391
6392 2014-09-12 Tom Tromey <tromey@redhat.com>
6393 Gary Benson <gbenson@redhat.com>
6394
6395 * regcache.h: Include common-regcache.h.
6396 (regcache_read_pc): Don't declare.
6397 * regcache.c (get_thread_regcache_for_ptid): New function.
6398
6399 2014-09-11 Tom Tromey <tromey@redhat.com>
6400 Gary Benson <gbenson@redhat.com>
6401
6402 * symbol.c: New file.
6403 * Makefile.in (SFILES): Add symbol.c.
6404 (OBS): Add symbol.o.
6405
6406 2014-09-11 Gary Benson <gbenson@redhat.com>
6407
6408 * target.c (target_stop_ptid, target_continue_ptid): New
6409 functions.
6410
6411 2014-09-11 Tom Tromey <tromey@redhat.com>
6412 Gary Benson <gbenson@redhat.com>
6413
6414 * target.h: Include target/target.h.
6415 * target.c (target_read_memory, target_read_uint32)
6416 (target_write_memory): New functions.
6417
6418 2014-09-11 Gary Benson <gbenson@redhat.com>
6419
6420 * server.h (debug_hw_points): Don't declare.
6421 * server.c (debug_hw_points): Don't define. Replace all uses
6422 with show_debug_regs.
6423 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6424 all uses with show_debug_regs.
6425
6426 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6427
6428 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6429 endianness into account.
6430 (ppc_supply_ptrace_register): Likewise.
6431
6432 2014-09-03 James Hogan <james.hogan@imgtec.com>
6433
6434 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6435 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6436
6437 2014-09-03 Gary Benson <gbenson@redhat.com>
6438
6439 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6440 ALL_DEBUG_ADDRESS_REGISTERS.
6441
6442 2014-09-02 Gary Benson <gbenson@redhat.com>
6443
6444 * i386-low.h: Renamed as...
6445 * x86-low.h: New file. All type, function and variable name
6446 prefixes changed from "i386_" to "x86_". All references updated.
6447 * i386-low.c: Renamed as...
6448 * x86-low.c: New file. All type, function and variable name
6449 prefixes changed from "i386_" to "x86_". All references updated.
6450
6451 2014-09-02 Gary Benson <gbenson@redhat.com>
6452
6453 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6454 (x86_linux_new_thread): Likewise.
6455
6456 2014-08-29 Gary Benson <gbenson@redhat.com>
6457
6458 * server.h (setjmp.h): Do not include.
6459 (toplevel): Do not declare.
6460 (common-exceptions.h): Include.
6461 (cleanups.h): Likewise.
6462 * server.c (toplevel): Do not define.
6463 (exit_code): New static global.
6464 (detach_or_kill_for_exit_cleanup): New function.
6465 (main): New function. Original main renamed to...
6466 (captured_main): New function.
6467 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6468
6469 2014-08-29 Gary Benson <gbenson@redhat.com>
6470
6471 * Makefile.in (SFILES): Add common/common-exceptions.c.
6472 (OBS): Add common-exceptions.o.
6473 (common-exceptions.o): New rule.
6474 * utils.c (prepare_to_throw_exception): New function.
6475
6476 2014-08-29 Gary Benson <gbenson@redhat.com>
6477
6478 * config.in: Regenerate.
6479 * configure: Likewise.
6480
6481 2014-08-29 Gary Benson <gbenson@redhat.com>
6482
6483 * Makefile.in (SFILES): Add common/cleanups.c.
6484 (OBS): cleanups.o.
6485 (cleanups.o): New rule.
6486
6487 2014-08-29 Gary Benson <gbenson@redhat.com>
6488
6489 * utils.c (internal_vwarning): New function.
6490
6491 2014-08-28 Gary Benson <gbenson@redhat.com>
6492
6493 * utils.h (fatal): Remove declaration.
6494 * utils.c (fatal): Remove function.
6495
6496 2014-08-28 Gary Benson <gbenson@redhat.com>
6497
6498 * tracepoint.c (gdb_agent_init): Replace fatal with
6499 perror_with_name.
6500 (initialize_tracepoint): Likewise.
6501
6502 2014-08-28 Gary Benson <gbenson@redhat.com>
6503
6504 * remote-utils.c (remote_prepare): Replace fatal with error.
6505
6506 2014-08-28 Gary Benson <gbenson@redhat.com>
6507
6508 * linux-low.c (linux_async): Replace fatal with warning.
6509 Tidy up and return.
6510 (linux_start_non_stop): Return -1 if linux_async failed.
6511
6512 2014-08-28 Gary Benson <gbenson@redhat.com>
6513
6514 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6515 gdb_assert.
6516 (i386_dr_low_get_addr): Remove vague comment.
6517 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6518 gdb_assert.
6519
6520 2014-08-28 Gary Benson <gbenson@redhat.com>
6521
6522 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6523 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6524 internal_error.
6525 (linux_resume_one_lwp): Likewise.
6526 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6527 gdb_assert.
6528 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6529 with internal_error.
6530 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6531 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6532 (find_register_by_name): Replace fatal with internal_error.
6533 (find_regno): Likewise.
6534 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6535 * thread-db.c (thread_db_create_event): Likewise.
6536 (thread_db_load_search): Likewise.
6537 (try_thread_db_load_1): Likewise.
6538 * tracepoint.c (get_jump_space_head): Replace fatal with
6539 internal_error.
6540 (claim_trampoline_space): Likewise.
6541 (have_fast_tracepoint_trampoline_buffer): Likewise.
6542 (cmd_qtstart): Likewise.
6543 (stop_tracing): Likewise.
6544 (fast_tracepoint_collecting): Likewise.
6545 (target_malloc): Likewise.
6546 (download_tracepoint): Likewise.
6547 (download_trace_state_variables): Replace check with gdb_assert.
6548 (upload_fast_traceframes): Replace fatal with internal_error.
6549
6550 2014-08-19 Tom Tromey <tromey@redhat.com>
6551 Gary Benson <gbenson@redhat.com>
6552
6553 * Makefile.in (SFILES): Add common/common-debug.c.
6554 (OBS): Add common-debug.o.
6555 (common-debug.o): New rule.
6556 * debug.h (debug_printf): Don't declare.
6557 * debug.c (debug_printf): Renamed and rewritten as...
6558 (debug_vprintf): New function.
6559
6560 2014-08-19 Gary Benson <gbenson@redhat.com>
6561
6562 * utils.h: Do not include print-utils.h.
6563
6564 2014-08-19 Tom Tromey <tromey@redhat.com>
6565 Gary Benson <gbenson@redhat.com>
6566
6567 * server.h: Add static assertion.
6568 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6569
6570 2014-08-19 Tom Tromey <tromey@redhat.com>
6571 Gary Benson <gbenson@redhat.com>
6572
6573 * Makefile.in (SFILES): Add common/errors.c.
6574 (OBS): Add errors.o.
6575 (IPA_OBS): Add errors-ipa.o.
6576 (errors.o): New rule.
6577 (errors-ipa.o): Likewise.
6578 * utils.h (perror_with_name, error, warning): Don't declare.
6579 * utils.c (warning): Renamed and rewritten as...
6580 (vwarning): New function.
6581 (error): Renamed and rewritten as...
6582 (verror): New function.
6583 (internal_error): Renamed and rewritten as...
6584 (internal_verror): New function.
6585
6586 2014-08-07 Gary Benson <gbenson@redhat.com>
6587
6588 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6589 * configure: Regenerate.
6590 * config.in: Likewise.
6591 * server.h: Do not include errno.h.
6592 * event-loop.c: Likewise.
6593 * hostio-errno.c: Likewise.
6594 * linux-low.c: Likewise.
6595 * remote-utils.c: Likewise.
6596 * spu-low.c: Likewise.
6597 * utils.c: Likewise.
6598 * gdbreplay.c: Unconditionally include errno.h.
6599
6600 2014-08-07 Gary Benson <gbenson@redhat.com>
6601
6602 * server.h: Do not include string.h.
6603 * event-loop.c: Likewise.
6604 * linux-low.c: Likewise.
6605 * regcache.c: Likewise.
6606 * remote-utils.c: Likewise.
6607 * spu-low.c: Likewise.
6608 * utils.c: Likewise.
6609
6610 2014-08-07 Gary Benson <gbenson@redhat.com>
6611
6612 * server.h: Do not include gdb_assert.h.
6613
6614 2014-08-07 Gary Benson <gbenson@redhat.com>
6615
6616 * server.h: Do not include common-utils.h.
6617
6618 2014-08-07 Gary Benson <gbenson@redhat.com>
6619
6620 * server.h: Do not include ptid.h.
6621 * notif.h: Likewise.
6622
6623 2014-08-07 Gary Benson <gbenson@redhat.com>
6624
6625 * server.h: Do not include gdb_locale.h.
6626
6627 2014-08-07 Gary Benson <gbenson@redhat.com>
6628
6629 * server.h: Do not include gdb/signals.h.
6630 * win32-low.c: Likewise.
6631
6632 2014-08-07 Gary Benson <gbenson@redhat.com>
6633
6634 * server.h: Do not include pathmax.h.
6635
6636 2014-08-07 Gary Benson <gbenson@redhat.com>
6637
6638 * server.h: Do not include libiberty.h.
6639 * linux-bfin-low.c: Likewise.
6640
6641 2014-08-07 Gary Benson <gbenson@redhat.com>
6642
6643 * server.h: Do not include ansidecl.h.
6644
6645 2014-08-07 Gary Benson <gbenson@redhat.com>
6646
6647 * linux-x86-low.c: Do not include stddef.h.
6648 * lynx-ppc-low.c: Likewise.
6649 * tracepoint.c: Likewise.
6650
6651 2014-08-07 Gary Benson <gbenson@redhat.com>
6652
6653 * server.h: Do not include stdarg.h.
6654 * nto-low.c: Likewise.
6655
6656 2014-08-07 Gary Benson <gbenson@redhat.com>
6657
6658 * server.h: Do not include stdlib.h.
6659 * inferiors.c: Likewise.
6660 * linux-low.c: Likewise.
6661 * regcache.c: Likewise.
6662 * spu-low.c: Likewise.
6663 * tracepoint.c: Likewise.
6664 * utils.c: Likewise.
6665
6666 2014-08-07 Gary Benson <gbenson@redhat.com>
6667
6668 * server.h: Do not include stdio.h.
6669 * linux-low.c: Likewise.
6670 * remote-utils.c: Likewise.
6671 * spu-low.c: Likewise.
6672 * utils.c: Likewise.
6673 * wincecompat.c: Likewise.
6674
6675 2014-08-06 Gary Benson <gbenson@redhat.com>
6676
6677 * regcache.c (init_register_cache): Move conditionals inside if.
6678
6679 2014-08-06 Gary Benson <gbenson@redhat.com>
6680
6681 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6682
6683 2014-07-31 Gary Benson <gbenson@redhat.com>
6684
6685 * ax.h: Do not include server.h.
6686 * gdbthread.h: Likewise.
6687 * lynx-low.h: Likewise.
6688 * notif.h: Likewise.
6689
6690 2014-07-30 Gary Benson <gbenson@redhat.com>
6691
6692 * server.h: Include common-defs.h.
6693 Do not include config.h or build-gnulib-gdbserver/config.h.
6694
6695 2014-07-30 Gary Benson <gbenson@redhat.com>
6696
6697 * hostio-errno.c: Move server.h to top of includes list.
6698 * inferiors.c: Likewise.
6699 * linux-x86-low.c: Likewise.
6700 * notif.c: Include server.h.
6701
6702 2014-07-24 Tom Tromey <tromey@redhat.com>
6703 Gary Benson <gbenson@redhat.com>
6704
6705 * server.h (CORE_ADDR): Now unsigned.
6706
6707 2014-07-16 Pedro Alves <palves@redhat.com>
6708
6709 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6710
6711 2014-07-15 Pedro Alves <palves@redhat.com>
6712
6713 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6714 copy.
6715
6716 2014-07-11 Pedro Alves <palves@redhat.com>
6717
6718 * linux-low.c (kill_wait_lwp): New function, based on
6719 kill_one_lwp_callback, but use my_waitpid directly.
6720 (kill_one_lwp_callback, linux_kill): Use it.
6721
6722 2014-06-23 Pedro Alves <palves@redhat.com>
6723
6724 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6725 before setting DR0..DR3.
6726
6727 2014-06-20 Gary Benson <gbenson@redhat.com>
6728
6729 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6730 * configure: Regenerated.
6731 * config.in: Likewise.
6732
6733 2014-06-20 Gary Benson <gbenson@redhat.com>
6734
6735 * Makefile.in (SFILES): Update locations for files moved
6736 from common to nat.
6737 (object file files): Reordered.
6738
6739 2014-06-20 Gary Benson <gbenson@redhat.com>
6740
6741 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6742 (i386_dr_low_set_addr): Likewise.
6743 (i386_dr_low_get_addr): Likewise.
6744 (i386_dr_low_can_set_control): Likewise.
6745 (i386_dr_low_set_control): Likewise.
6746 (i386_dr_low_get_control): Likewise.
6747 (i386_dr_low_get_status): Likewise.
6748 (i386_get_debug_register_length): Likewise.
6749 * linux-x86-low.c (i386_dr_low_set_addr):
6750 Changed signature. Made static.
6751 (i386_dr_low_get_addr): Likewise.
6752 (i386_dr_low_set_control): Likewise.
6753 (i386_dr_low_get_control): Likewise.
6754 (i386_dr_low_get_status): Likewise.
6755 (i386_dr_low): New global variable.
6756 * win32-i386-low.c (i386_dr_low_set_addr):
6757 Changed signature. Made static.
6758 (i386_dr_low_get_addr): Likewise.
6759 (i386_dr_low_set_control): Likewise.
6760 (i386_dr_low_get_control): Likewise.
6761 (i386_dr_low_get_status): Likewise.
6762 (i386_dr_low): New global variable.
6763
6764 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6765
6766 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6767 * Makefile.in (AR, AR_FLAGS): Define.
6768 * configure: Regenerate.
6769
6770 2014-06-19 Gary Benson <gbenson@redhat.com>
6771
6772 * Makefile.in (i386-dregs.o): New rule.
6773 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6774 * i386-low.c (target.h): Remove include.
6775 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6776 (DR_CONTROL_SHIFT): Likewise.
6777 (DR_CONTROL_SIZE): Likewise.
6778 (DR_RW_EXECUTE): Likewise.
6779 (DR_RW_WRITE): Likewise.
6780 (DR_RW_READ): Likewise.
6781 (DR_RW_IORW): Likewise.
6782 (DR_LEN_1): Likewise.
6783 (DR_LEN_2): Likewise.
6784 (DR_LEN_4): Likewise.
6785 (DR_LEN_8): Likewise.
6786 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6787 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6788 (DR_ENABLE_SIZE): Likewise.
6789 (DR_LOCAL_SLOWDOWN): Likewise.
6790 (DR_GLOBAL_SLOWDOWN): Likewise.
6791 (DR_CONTROL_RESERVED): Likewise.
6792 (I386_DR_CONTROL_MASK): Likewise.
6793 (I386_DR_VACANT): Likewise.
6794 (I386_DR_LOCAL_ENABLE): Likewise.
6795 (I386_DR_GLOBAL_ENABLE): Likewise.
6796 (I386_DR_DISABLE): Likewise.
6797 (I386_DR_SET_RW_LEN): Likewise.
6798 (I386_DR_GET_RW_LEN): Likewise.
6799 (I386_DR_WATCH_HIT): Likewise.
6800 (i386_wp_op_t): Likewise.
6801 (i386_show_dr): Likewise.
6802 (i386_length_and_rw_bits): Likewise.
6803 (i386_insert_aligned_watchpoint): Likewise.
6804 (i386_remove_aligned_watchpoint): Likewise.
6805 (i386_handle_nonaligned_watchpoint): Likewise.
6806 i386_update_inferior_debug_regs(): Likewise.
6807 (i386_dr_insert_watchpoint): Likewise.
6808 (i386_dr_remove_watchpoint): Likewise.
6809 (i386_dr_region_ok_for_watchpoint): Likewise.
6810 (i386_dr_stopped_data_address): Likewise.
6811 (i386_dr_stopped_by_watchpoint): Likewise.
6812
6813 2014-06-19 Gary Benson <gbenson@redhat.com>
6814
6815 * i386-low.c (i386_dr_show): Renamed to
6816 i386_show_dr and made static. All uses updated.
6817 (i386_dr_length_and_rw_bits): Renamed to
6818 i386_length_and_rw_bits and made static.
6819 All uses updated.
6820 (i386_dr_insert_aligned_watchpoint): Renamed to
6821 i386_insert_aligned_watchpoint and made static.
6822 All uses updated.
6823 (i386_dr_remove_aligned_watchpoint): Renamed to
6824 i386_remove_aligned_watchpoint and made static.
6825 All uses updated.
6826 (i386_dr_update_inferior_debug_regs): Renamed to
6827 i386_update_inferior_debug_regs and made static.
6828 All uses updated.
6829
6830 2014-06-18 Gary Benson <gbenson@redhat.com>
6831
6832 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6833 (i386_dr_low_can_set_control): Likewise.
6834 (i386_get_debug_register_length): Likewise.
6835 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6836 (i386_dr_low_can_set_control): Likewise.
6837 (i386_get_debug_register_length): Likewise.
6838
6839 2014-06-17 Gary Benson <gbenson@redhat.com>
6840
6841 * i386-low.h (i386-dregs.h): New include.
6842 (DR_FIRSTADDR): Now in i386-dregs.h.
6843 (DR_LASTADDR): Likewise.
6844 (DR_NADDR): Likewise.
6845 (DR_STATUS): Likewise.
6846 (DR_CONTROL): Likewise.
6847 (i386_debug_reg_state): Likewise.
6848 (i386_dr_insert_watchpoint): Likewise.
6849 (i386_dr_remove_watchpoint): Likewise.
6850 (i386_dr_region_ok_for_watchpoint): Likewise.
6851 (i386_dr_stopped_data_address): Likewise.
6852 (i386_dr_stopped_by_watchpoint): Likewise.
6853 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6854
6855 2014-06-18 Gary Benson <gbenson@redhat.com>
6856
6857 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6858 i386_dr_insert_watchpoint.
6859 (i386_low_remove_watchpoint): Renamed to
6860 i386_dr_remove_watchpoint.
6861 (i386_low_region_ok_for_watchpoint): Renamed to
6862 i386_dr_region_ok_for_watchpoint.
6863 (i386_low_stopped_data_address): Renamed to
6864 i386_dr_stopped_data_address.
6865 (i386_low_stopped_by_watchpoint): Renamed to
6866 i386_dr_stopped_by_watchpoint.
6867 * i386-low.c (i386_show_dr): Renamed to
6868 i386_dr_show and made nonstatic. All uses updated.
6869 (i386_length_and_rw_bits): Renamed to
6870 i386_dr_length_and_rw_bits and made nonstatic.
6871 All uses updated.
6872 (i386_insert_aligned_watchpoint): Renamed to
6873 i386_dr_insert_aligned_watchpoint and made nonstatic.
6874 All uses updated.
6875 (i386_remove_aligned_watchpoint): Renamed to
6876 i386_dr_remove_aligned_watchpoint and made nonstatic.
6877 All uses updated.
6878 (i386_update_inferior_debug_regs): Renamed to
6879 i386_dr_update_inferior_debug_regs and made nonstatic.
6880 All uses updated.
6881 (i386_low_insert_watchpoint): Renamed to
6882 i386_dr_insert_watchpoint. All uses updated.
6883 (i386_low_remove_watchpoint): Renamed to
6884 i386_dr_remove_watchpoint. All uses updated.
6885 (i386_low_region_ok_for_watchpoint): Renamed to
6886 i386_dr_region_ok_for_watchpoint. All uses updated.
6887 (i386_low_stopped_data_address): Renamed to
6888 i386_dr_stopped_data_address. All uses updated.
6889 (i386_low_stopped_by_watchpoint): Renamed to
6890 i386_dr_stopped_by_watchpoint. All uses updated.
6891
6892 2014-06-18 Gary Benson <gbenson@redhat.com>
6893
6894 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6895 (i386_dr_low_can_set_control): Likewise.
6896 (i386_insert_aligned_watchpoint): New check.
6897
6898 2014-06-18 Gary Benson <gbenson@redhat.com>
6899
6900 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6901 Renamed to state.
6902
6903 2014-06-18 Gary Benson <gbenson@redhat.com>
6904
6905 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6906 instead of fatal and error.
6907 (i386_handle_nonaligned_watchpoint): Likewise.
6908
6909 2014-06-18 Gary Benson <gbenson@redhat.com>
6910
6911 * i386-low.c (i386_get_debug_register_length): New macro.
6912 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6913 (i386_show_dr): Use debug_printf instead of fprintf. Use
6914 phex to format values.
6915
6916 2014-06-18 Gary Benson <gbenson@redhat.com>
6917
6918 * i386-low.h: Comment changes.
6919 * i386-low.c: Likewise.
6920
6921 2014-06-18 Gary Benson <gbenson@redhat.com>
6922
6923 * i386-low.c: Whitespace changes.
6924
6925 2014-06-12 Tom Tromey <tromey@redhat.com>
6926
6927 * utils.c (freeargv): Remove.
6928
6929 2014-06-12 Tom Tromey <tromey@redhat.com>
6930
6931 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6932 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6933 (parse_debug_format_options): Likewise.
6934 (gdbserver_usage): Likewise.
6935 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6936 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6937 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6938 against libiberty.
6939 ($(LIBGNU)): Depend on libiberty.
6940 (all-lib): Recurse into all subdirs.
6941 (install-only): Invoke "install" target in subdirs.
6942 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6943 targets.
6944 * configure: Rebuild.
6945 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6946 for vasprintf, vsnprintf, or gettimeofday.
6947 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6948 srv_tgtobj.
6949
6950 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6951
6952 * development.sh: Delete.
6953 * Makefile.in (config.status): Adjust dependency on development.sh.
6954 * configure.ac: Adjust development.sh source call.
6955 * configure: Regenerate.
6956
6957 2014-06-02 Pedro Alves <palves@redhat.com>
6958
6959 * ax.c (gdb_free_agent_expr): New function.
6960 * ax.h (gdb_free_agent_expr): New declaration.
6961 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6962 list.
6963 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6964 static.
6965 (clear_breakpoint_conditions_and_commands): New function.
6966 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6967 (clear_breakpoint_conditions_and_commands): New declaration.
6968
6969 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6970
6971 * linux-aarch64-low.c (asm/ptrace.h): Include.
6972
6973 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6974
6975 Fix TLS access for -static -pthread.
6976 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6977 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6978 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6979
6980 2014-05-20 Pedro Alves <palves@redhat.com>
6981
6982 * linux-aarch64-low.c (aarch64_insert_point)
6983 (aarch64_remove_point): No longer check whether the type is
6984 supported here. Adjust to new interface.
6985 (the_low_target): Install aarch64_supports_z_point_type as
6986 supports_z_point_type method.
6987 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6988 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6989 instead of a Z packet char. Adjust.
6990 (arm_supports_z_point_type): New function.
6991 (arm_insert_point, arm_remove_point): Adjust to new interface.
6992 (the_low_target): Install arm_supports_z_point_type.
6993 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6994 (cris_insert_point, cris_remove_point): Adjust to new interface.
6995 Don't check whether the type is supported here.
6996 (the_low_target): Install cris_supports_z_point_type.
6997 * linux-low.c (linux_supports_z_point_type): New function.
6998 (linux_insert_point, linux_remove_point): Adjust to new interface.
6999 * linux-low.h (struct linux_target_ops) <insert_point,
7000 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7001 raw_breakpoint pointer parameter.
7002 <supports_z_point_type>: New method.
7003 * linux-mips-low.c (mips_supports_z_point_type): New function.
7004 (mips_insert_point, mips_remove_point): Adjust to new interface.
7005 Use mips_supports_z_point_type.
7006 (the_low_target): Install mips_supports_z_point_type.
7007 * linux-ppc-low.c (the_low_target): Install NULL as
7008 supports_z_point_type method.
7009 * linux-s390-low.c (the_low_target): Install NULL as
7010 supports_z_point_type method.
7011 * linux-sparc-low.c (the_low_target): Install NULL as
7012 supports_z_point_type method.
7013 * linux-x86-low.c (x86_supports_z_point_type): New function.
7014 (x86_insert_point): Adjust to new insert_point interface. Use
7015 insert_memory_breakpoint. Adjust to new
7016 i386_low_insert_watchpoint interface.
7017 (x86_remove_point): Adjust to remove_point interface. Use
7018 remove_memory_breakpoint. Adjust to new
7019 i386_low_remove_watchpoint interface.
7020 (the_low_target): Install x86_supports_z_point_type.
7021 * lynx-low.c (lynx_target_ops): Install NULL as
7022 supports_z_point_type callback.
7023 * nto-low.c (nto_supports_z_point_type): New.
7024 (nto_insert_point, nto_remove_point): Adjust to new interface.
7025 (nto_target_ops): Install nto_supports_z_point_type.
7026 * mem-break.c: Adjust intro comment.
7027 (struct raw_breakpoint) <raw_type, size>: New fields.
7028 <inserted>: Update comment.
7029 <shlib_disabled>: Delete field.
7030 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7031 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7032 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7033 (raw_bkpt_type_to_target_hw_bp_type): New function.
7034 (find_enabled_raw_code_breakpoint_at): New function.
7035 (find_raw_breakpoint_at): New type and size parameters. Use them.
7036 (insert_memory_breakpoint): New function, based off
7037 set_raw_breakpoint_at.
7038 (remove_memory_breakpoint): New function.
7039 (set_raw_breakpoint_at): Reimplement.
7040 (set_breakpoint): New, based on set_breakpoint_at.
7041 (set_breakpoint_at): Reimplement.
7042 (delete_raw_breakpoint): Go through the_target->remove_point
7043 instead of assuming memory breakpoints.
7044 (find_gdb_breakpoint_at): Delete.
7045 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7046 (find_gdb_breakpoint): New function.
7047 (set_gdb_breakpoint_at): Delete.
7048 (z_type_supported): New function.
7049 (set_gdb_breakpoint_1): New function, loosely based off
7050 set_gdb_breakpoint_at.
7051 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7052 (delete_gdb_breakpoint_at): Delete.
7053 (delete_gdb_breakpoint_1): New function, loosely based off
7054 delete_gdb_breakpoint_at.
7055 (delete_gdb_breakpoint): New function.
7056 (clear_gdb_breakpoint_conditions): Rename to ...
7057 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7058 breakpoint.
7059 (add_condition_to_breakpoint): Make static.
7060 (add_breakpoint_condition): Take a struct breakpoint pointer
7061 instead of an address. Adjust.
7062 (gdb_condition_true_at_breakpoint): Rename to ...
7063 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7064 z_type parameter.
7065 (gdb_condition_true_at_breakpoint): Reimplement.
7066 (add_breakpoint_commands): Take a struct breakpoint pointer
7067 instead of an address. Adjust.
7068 (gdb_no_commands_at_breakpoint): Rename to ...
7069 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7070 parameter. Return true if no breakpoint was found. Change debug
7071 output.
7072 (gdb_no_commands_at_breakpoint): Reimplement.
7073 (run_breakpoint_commands): Rename to ...
7074 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7075 and change return type to boolean.
7076 (run_breakpoint_commands): New function.
7077 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7078 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7079 breakpoint. Go through the_target->remove_point instead of
7080 assuming memory breakpoint.
7081 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7082 software and hardware breakpoints.
7083 (reinsert_raw_breakpoint): Go through the_target->insert_point
7084 instead of assuming memory breakpoint.
7085 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7086 software and hardware breakpoints.
7087 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7088 Check both software and hardware breakpoints.
7089 (validate_inserted_breakpoint): Assert the breakpoint is a
7090 software breakpoint. Set the inserted flag to -1 instead of
7091 setting shlib_disabled.
7092 (delete_disabled_breakpoints): Adjust.
7093 (validate_breakpoints): Only validate software breakpoints.
7094 Adjust to inserted flag change.
7095 (check_mem_read, check_mem_write): Skip breakpoint types other
7096 than software breakpoints. Adjust to inserted flag change.
7097 * mem-break.h (enum raw_bkpt_type): New enum.
7098 (raw_breakpoint, struct process_info): Forward declare.
7099 (Z_packet_to_target_hw_bp_type): Delete declaration.
7100 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7101 (set_gdb_breakpoint, delete_gdb_breakpoint)
7102 (clear_breakpoint_conditions): New declarations.
7103 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7104 (breakpoint_inserted_here): Update comment.
7105 (add_breakpoint_condition, add_breakpoint_commands): Replace
7106 address parameter with a breakpoint pointer parameter.
7107 (gdb_breakpoint_here): Update comment.
7108 (delete_gdb_breakpoint_at): Delete.
7109 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7110 * server.c (process_point_options): Take a struct breakpoint
7111 pointer instead of an address. Adjust.
7112 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7113 delete_gdb_breakpoint.
7114 * spu-low.c (spu_target_ops): Install NULL as
7115 supports_z_point_type method.
7116 * target.h: Include mem-break.h.
7117 (struct target_ops) <prepare_to_access_memory>: Update comment.
7118 <supports_z_point_type>: New field.
7119 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7120 instead of a char. Also take a raw breakpoint pointer.
7121 * win32-arm-low.c (the_low_target): Install NULL as
7122 supports_z_point_type.
7123 * win32-i386-low.c (i386_supports_z_point_type): New function.
7124 (i386_insert_point, i386_remove_point): Adjust to new interface.
7125 (the_low_target): Install i386_supports_z_point_type.
7126 * win32-low.c (win32_supports_z_point_type): New function.
7127 (win32_insert_point, win32_remove_point): Adjust to new interface.
7128 (win32_target_ops): Install win32_supports_z_point_type.
7129 * win32-low.h (struct win32_target_ops):
7130 <supports_z_point_type>: New method.
7131 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7132 instead of a char. Also take a raw breakpoint pointer.
7133
7134 2014-05-20 Pedro Alves <palves@redhat.com>
7135
7136 * mem-break.h: Include break-common.h.
7137 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7138 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7139 (Z_packet_to_target_hw_bp_type): New declaration.
7140 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7141 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7142 (Z_PACKET_ACCESS_WP): Delete macros.
7143 (Z_packet_to_hw_type): Delete function.
7144 * i386-low.h: Don't include break-common.h here.
7145 (Z_packet_to_hw_type): Delete declaration.
7146 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7147 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7148 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7149 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7150 * linux-aarch64-low.c: Don't include break-common.h here.
7151 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7152 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7153 (Z_packet_to_target_hw_bp_type): Delete function.
7154 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7155 function.
7156 (mips_insert_point, mips_remove_point): Use
7157 Z_packet_to_target_hw_bp_type.
7158
7159 2014-05-20 Pedro Alves <palves@redhat.com>
7160
7161 * linux-aarch64-low.c: Include break-common.h.
7162 (enum target_point_type): Delete.
7163 (Z_packet_to_point_type): Rename to ...
7164 (Z_packet_to_target_hw_bp_type): ... this, and return a
7165 target_hw_bp_type instead.
7166 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7167 instead of an enum target_point_type.
7168 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7169 breakpoint type.
7170 (aarch64_dr_state_insert_one_point)
7171 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7172 (aarch64_handle_aligned_watchpoint)
7173 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7174 Take an enum target_hw_bp_type instead of an enum
7175 target_point_type.
7176 (aarch64_supports_z_point_type): New function.
7177 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7178 use Z_packet_to_target_hw_bp_type.
7179
7180 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7181
7182 * configure.ac: Only use -Werror by default when DEVELOPMENT
7183 is true.
7184 * configure: Regenerate.
7185
7186 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7187
7188 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7189 * linux-x86-low.c (X86_64_USER_REGS): New.
7190 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7191
7192 2014-04-28 Yao Qi <yao@codesourcery.com>
7193
7194 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7195 name.
7196
7197 2014-04-25 Pedro Alves <palves@redhat.com>
7198
7199 PR server/16255
7200 * linux-low.c (linux_attach_fail_reason_string): New function.
7201 (linux_attach_lwp): Delete.
7202 (linux_attach_lwp_1): Rename to ...
7203 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7204 argument. Remove "initial" parameter. Return int instead of
7205 void. Don't error or warn here.
7206 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7207 failure to attach to the tgid. Call warning when failing to
7208 attach to an lwp.
7209 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7210 argument. Remove "initial" parameter. Return int instead of
7211 void. Don't error or warn here.
7212 (linux_attach_fail_reason_string): New declaration.
7213 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7214 interface change. Use linux_attach_fail_reason_string.
7215
7216 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7217 Walfred Tedeschi <walfred.tedeschi@intel.com>
7218
7219 * Makefile.in: Added rules to handle new files
7220 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7221 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7222 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7223 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7224 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7225 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7226 x32-avx512-linux.o.
7227 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7228 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7229 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7230 i386/x32-avx512.xml.
7231 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7232 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7233 i386/x32-avx512-linux.xml.
7234 * i387-fp.c (num_avx512_k_registers): New constant for number
7235 of K registers.
7236 (num_avx512_zmmh_low_registers): New constant for number of
7237 lower ZMM registers (0-15).
7238 (num_avx512_zmmh_high_registers): New constant for number of
7239 higher ZMM registers (16-31).
7240 (num_avx512_ymmh_registers): New contant for number of higher
7241 YMM registers (ymm16-31 added by avx521 on x86_64).
7242 (num_avx512_xmm_registers): New constant for number of higher
7243 XMM registers (xmm16-31 added by AVX512 on x86_64).
7244 (struct i387_xsave): Add space for AVX512 registers.
7245 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7246 Add code to handle AVX512 registers.
7247 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7248 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7249 prototypei from generated file.
7250 (tdesc_amd64_avx512_linux): Likewise.
7251 (init_registers_x32_avx512_linux): Likewise.
7252 (tdesc_x32_avx512_linux): Likewise.
7253 (init_registers_i386_avx512_linux): Likewise.
7254 (tdesc_i386_avx512_linux): Likewise.
7255 (x86_64_regmap): Add AVX512 registers.
7256 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7257 mask.
7258 (initialize_low_arch): Add code to initialize AVX512 registers.
7259
7260 2014-04-23 Pedro Alves <palves@redhat.com>
7261
7262 * mem-break.c (find_gdb_breakpoint_at): Make static.
7263 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7264
7265 2014-04-23 Pedro Alves <palves@redhat.com>
7266
7267 * i386-low.c: Don't include break-common.h here.
7268 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7269 prototype to take target_hw_bp_type as argument instead of a Z
7270 packet char.
7271 * i386-low.h: Include break-common.h here.
7272 (Z_packet_to_hw_type): Declare.
7273 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7274 prototypes.
7275 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7276 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7277 (x86_remove_point): Convert the packet number to a
7278 target_hw_bp_type before calling i386_low_remove_watchpoint.
7279 * win32-i386-low.c (i386_insert_point): Convert the packet number
7280 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7281 (i386_remove_point): Convert the packet number to a
7282 target_hw_bp_type before calling i386_low_remove_watchpoint.
7283
7284 2014-04-23 Pedro Alves <palves@redhat.com>
7285
7286 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7287
7288 2014-04-10 Pedro Alves <palves@redhat.com>
7289
7290 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7291 Check if the condition or command is NULL before checking if the
7292 breakpoint is known. On success, return true.
7293 * mem-break.h (add_breakpoint_condition): Document return.
7294 (add_breakpoint_commands): Add describing comment.
7295 * server.c (skip_to_semicolon): New function.
7296 (process_point_options): Use it.
7297
7298 2014-04-09 Pedro Alves <palves@redhat.com>
7299
7300 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7301 to lwpid_of.
7302
7303 2014-02-27 Pedro Alves <palves@redhat.com>
7304
7305 PR 12702
7306 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7307 macros.
7308 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7309 output.
7310 (last_thread_of_process_p): Take a PID argument instead of a
7311 thread pointer.
7312 (linux_wait_for_lwp): Delete.
7313 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7314 functions.
7315 (linux_low_filter_event): New function, party factored out from
7316 linux_wait_for_event.
7317 (linux_wait_for_event): Rename to ...
7318 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7319 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7320 sigsuspend. Check for zombie leaders.
7321 (linux_wait_for_event): Reimplement as wrapper around
7322 linux_wait_for_event_filtered.
7323 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7324 a normal or signal exit is seen, it's the whole process exiting.
7325 (wait_for_sigstop): No longer a for_each_inferior callback.
7326 Rewrite on top of linux_wait_for_event_filtered.
7327 (stop_all_lwps): Call wait_for_sigstop directly.
7328 * server.c (resume, handle_target_event): Handle
7329 TARGET_WAITKIND_NO_RESUMED.
7330
7331 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7332
7333 * win32-low.c (psapi_get_dll_name,
7334 * win32_CreateToolhelp32Snapshot): Delete.
7335 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7336 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7337 Delete.
7338 (handle_load_dll): Add function description.
7339 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7340
7341 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7342
7343 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7344 Add comment.
7345 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7346 base address when calling win32_add_one_solib.
7347 (handle_load_dll): Delete local variable load_addr.
7348 Remove 0x1000 offset applied to DLL base address when calling
7349 win32_add_one_solib.
7350 (handle_unload_dll): Add comment.
7351
7352 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7353
7354 * win32-low.c (win32_add_all_dlls): Renames
7355 win32_ensure_ntdll_loaded. Rewrite function documentation.
7356 Adjust implementation to always load all DLLs.
7357 Add 0x1000 offset to DLL base address when calling
7358 win32_add_one_solib.
7359 (child_initialization_done): New static global.
7360 (do_initial_child_stuff): Set child_initialization_done to
7361 zero during child initialization, and 1 after. Replace call
7362 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7363 Add comment.
7364 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7365 (handle_unload_dll): Add function documentation.
7366 (get_child_debug_event): Ignore load and unload DLL events
7367 during child initialization.
7368
7369 2014-02-20 Doug Evans <dje@google.com>
7370
7371 Remove global all_lwps.
7372 * inferiors.h (ptid_of): Move here from linux-low.h.
7373 (pid_of, lwpid_of): Ditto.
7374 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7375 parameter is a struct thread_info * now.
7376 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7377 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7378 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7379 directly.
7380 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7381 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7382 * linux-arm-low.c (update_registers_callback): Update, "entry"
7383 parameter is a struct thread_info * now.
7384 Fetch lwpid from current_inferior directly.
7385 (arm_insert_point): Pass &all_threads to find_inferior instead of
7386 &all_lwps.
7387 (arm_remove_point): Ditto.
7388 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7389 (arm_prepare_to_resume): Fetch pid from thread.
7390 (arm_read_description): Fetch lwpid from current_inferior directly.
7391 * linux-low.c (all_lwps): Delete.
7392 (delete_lwp): Delete call to remove_inferior.
7393 (handle_extended_wait): Fetch lwpid from thread.
7394 (add_lwp): Don't set lwp->entry.id. Remove call to
7395 add_inferior_to_list.
7396 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7397 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7398 (kill_one_lwp_callback): Ditto.
7399 (linux_kill): Don't dereference NULL pointer.
7400 Fetch ptid,lwpid from thread.
7401 (get_detach_signal): Fetch ptid from thread.
7402 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7403 Simplify call to regcache_invalidate_thread.
7404 (delete_lwp_callback): Update, "entry" parameter is a
7405 struct thread_info * now. Fetch pid from thread.
7406 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7407 (status_pending_p_callback): Update, "entry" parameter is a
7408 struct thread_info * now. Fetch ptid from thread.
7409 (find_lwp_pid): Update, "entry" parameter is a
7410 struct thread_info * now.
7411 (linux_wait_for_lwp): Fetch pid from thread.
7412 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7413 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7414 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7415 (dequeue_one_deferred_signal): Ditto.
7416 (cancel_breakpoint): Fetch ptid from current_inferior.
7417 (linux_wait_for_event): Pass &all_threads to find_inferior,
7418 not &all_lwps. Fetch ptid, lwpid from thread.
7419 (count_events_callback): Update, "entry" parameter is a
7420 struct thread_info * now.
7421 (select_singlestep_lwp_callback): Ditto.
7422 (select_event_lwp_callback): Ditto.
7423 (cancel_breakpoints_callback): Ditto.
7424 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7425 not &all_lwps.
7426 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7427 (unsuspend_one_lwp): Update, "entry" parameter is a
7428 struct thread_info * now.
7429 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7430 not &all_lwps.
7431 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7432 Fetch lwpid from thread, not lwp.
7433 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7434 Pass &all_threads to find_inferior, not &all_lwps.
7435 (send_sigstop): Fetch lwpid from thread, not lwp.
7436 (send_sigstop_callback): Update, "entry" parameter is a
7437 struct thread_info * now.
7438 (suspend_and_send_sigstop_callback): Ditto.
7439 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7440 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7441 struct thread_info * now.
7442 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7443 from thread, lwp.
7444 (lwp_running): Update, "entry" parameter is a
7445 struct thread_info * now.
7446 (stop_all_lwps): Fetch ptid from thread.
7447 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7448 (linux_resume_one_lwp): Fetch lwpid from thread.
7449 (linux_set_resume_request): Update, "entry" parameter is a
7450 struct thread_info * now. Fetch pid, lwpid from thread.
7451 (resume_status_pending_p): Update, "entry" parameter is a
7452 struct thread_info * now.
7453 (need_step_over_p): Ditto. Fetch lwpid from thread.
7454 (start_step_over): Fetch lwpid from thread.
7455 (linux_resume_one_thread): Update, "entry" parameter is a
7456 struct thread_info * now. Fetch lwpid from thread.
7457 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7458 (proceed_one_lwp): Update, "entry" parameter is a
7459 struct thread_info * now. Fetch lwpid from thread.
7460 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7461 struct thread_info * now.
7462 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7463 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7464 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7465 directly.
7466 (regsets_store_inferior_registers): Ditto.
7467 (fetch_register, store_register): Ditto.
7468 (linux_read_memory, linux_write_memory): Ditto.
7469 (linux_request_interrupt): Ditto.
7470 (linux_read_auxv): Ditto.
7471 (linux_xfer_siginfo): Ditto.
7472 (linux_qxfer_spu): Ditto.
7473 (linux_qxfer_libraries_svr4): Ditto.
7474 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7475 moved to inferiors.h.
7476 (get_lwp): Delete.
7477 (get_thread_lwp): Update.
7478 (struct lwp_info): Delete member "entry". Simplify comment for
7479 member "thread".
7480 (all_lwps): Delete.
7481 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7482 current_inferior directly.
7483 (update_watch_registers_callback): Update, "entry" parameter is a
7484 struct thread_info * now. Fetch pid from thread.
7485 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7486 (mips_insert_point): Fetch lwpid from current_inferior.
7487 Pass &all_threads to find_inferior, not &all_lwps.
7488 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7489 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7490 directly.
7491 (mips_stopped_data_address): Ditto.
7492 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7493 directly.
7494 * linux-tile-low.c (tile_arch_setup): Ditto.
7495 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7496 (update_debug_registers_callback): Update, "entry" parameter is a
7497 struct thread_info * now. Fetch pid from thread.
7498 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7499 Pass &all_threads to find_inferior, not &all_lwps.
7500 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7501 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7502 Pass &all_threads to find_inferior, not &all_lwps.
7503 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7504 (i386_dr_low_get_status): Ditto.
7505 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7506 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7507 (x86_linux_read_description): Ditto.
7508 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7509
7510 2014-02-20 Doug Evans <dje@google.com>
7511
7512 * inferiors.c (get_first_inferior): Fix buglet.
7513
7514 2014-02-19 Doug Evans <dje@google.com>
7515
7516 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7517 * inferiors.c (add_thread): Change result type to struct thread_info *.
7518 All callers updated.
7519 (add_lwp): Call add_thread here instead of in callers.
7520 All callers updated.
7521 * linux-low.h (get_lwp_thread): Rewrite.
7522 (struct lwp_info): New member "thread".
7523
7524 2014-02-19 Doug Evans <dje@google.com>
7525
7526 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7527 All callers updated.
7528
7529 2014-02-19 Doug Evans <dje@google.com>
7530
7531 * inferiors.c (add_thread): Fix whitespace.
7532
7533 2014-02-19 Doug Evans <dje@google.com>
7534
7535 * dll.c (clear_dlls): Replace accessing list implemention details
7536 with API function.
7537 * gdbthread.h (get_first_thread): Declare.
7538 * inferiors.c (for_each_inferior_with_data): New function.
7539 (get_first_thread): New function.
7540 (find_thread_ptid): Simplify.
7541 (get_first_inferior): New function.
7542 (clear_list): Delete.
7543 (one_inferior_p): New function.
7544 (clear_inferior_list): New function.
7545 (clear_inferiors): Update.
7546 * inferiors.h (for_each_inferior_with_data): Declare.
7547 (clear_inferior_list): Declare.
7548 (one_inferior_p): Declare.
7549 (get_first_inferior): Declare.
7550 * linux-low.c (linux_wait_for_event): Replace accessing list
7551 implemention details with API function.
7552 * server.c (target_running): Ditto.
7553 (accumulate_file_name_length): New function.
7554 (emit_dll_description): New function.
7555 (handle_qxfer_libraries): Replace accessing list implemention
7556 details with API function.
7557 (handle_qxfer_threads_worker): New function.
7558 (handle_qxfer_threads_proper): Replace accessing list implemention
7559 details with API function.
7560 (handle_query): Ditto.
7561 (visit_actioned_threads_callback_ftype): New typedef.
7562 (visit_actioned_threads_data): New struct.
7563 (visit_actioned_threads): Rewrite to be find_inferior callback.
7564 (resume): Call find_inferior.
7565 (handle_status): Replace accessing list implemention
7566 details with API function.
7567 (process_serial_event): Replace accessing list implemention details
7568 with API function.
7569 * target.c (set_desired_inferior): Replace accessing list implemention
7570 details with API function.
7571 * tracepoint.c (same_process_p): New function.
7572 (gdb_agent_about_to_close): Replace accessing list implemention
7573 details with API function.
7574 * win32-low.c (child_delete_thread): Replace accessing list
7575 implemention details with API function.
7576 (match_dll_by_basename): New function.
7577 (dll_is_loaded_by_basename): New function.
7578 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7579 details call to dll_is_loaded_by_basename.
7580
7581 2014-02-19 Doug Evans <dje@google.com>
7582
7583 * dll.h (struct dll_info): Add comment.
7584 * gdbthread.h (struct thread_info): Add comment.
7585 (current_ptid): Simplify.
7586 * inferiors.c (add_process): Update.
7587 (remove_process): Update.
7588 * inferiors.h (struct process_info): Rename member "head" to "entry".
7589 * linux-low.c (delete_lwp): Update.
7590 (add_lwp): Update.
7591 (last_thread_of_process_p): Update.
7592 (kill_one_lwp_callback, linux_kill): Update.
7593 (status_pending_p_callback): Update.
7594 (wait_for_sigstop): Update. Simplify read of ptid.
7595 (start_step_over): Update.
7596 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7597 (get_lwp_thread): Update.
7598 (struct lwp_info): Rename member "head" to "entry".
7599 * regcache.h (inferior_list_entry): Delete.
7600 * server.c (kill_inferior_callback): Update.
7601 (detach_or_kill_inferior_callback): Update.
7602 (print_started_pid): Update.
7603 (print_attached_pid): Update.
7604 (process_serial_event): Simplify read of ptid.
7605 * thread-db.c (thread_db_create_event): Update.
7606 (thread_db_get_tls_address): Update.
7607 * win32-low.c (current_inferior_ptid): Simplify.
7608
7609 2014-02-19 Tom Tromey <tromey@redhat.com>
7610
7611 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7612 argument.
7613 (target_supports_btrace): Update.
7614
7615 2014-02-14 Yao Qi <yao@codesourcery.com>
7616
7617 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7618 (rsp-low-ipa.o): New target.
7619
7620 2014-02-12 Tom Tromey <tromey@redhat.com>
7621
7622 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7623 convert_ascii_to_int.
7624 * regcache.c (registers_to_string): Likewise.
7625 * remote-utils.c (decode_M_packet): Likewise.
7626 * server.c (process_serial_event): Likewise.
7627
7628 2014-02-12 Tom Tromey <tromey@redhat.com>
7629
7630 * server.c (handle_query, handle_v_run): Use hex2bin, not
7631 unhexify.
7632 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7633
7634 2014-02-12 Tom Tromey <tromey@redhat.com>
7635
7636 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7637 convert_int_to_ascii.
7638 * regcache.c (registers_to_string, collect_register_as_string):
7639 Likewise.
7640 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7641 Likewise.
7642 * server.c (process_serial_event): Likewise.
7643 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7644 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7645
7646 2014-02-12 Tom Tromey <tromey@redhat.com>
7647
7648 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7649 bin2hex, not hexify.
7650 * tracepoint.c (cmd_qtstatus): Likewise.
7651
7652 2014-02-12 Tom Tromey <tromey@redhat.com>
7653
7654 * remote-utils.c (monitor_output): Pass explicit length to
7655 hexify.
7656
7657 2014-02-12 Tom Tromey <tromey@redhat.com>
7658
7659 * tracepoint.c: Include rsp-low.h.
7660 * server.c: Include rsp-low.h.
7661 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7662 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7663 declare.
7664 * remote-utils.c: Include rsp-low.h.
7665 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7666 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7667 (convert_int_to_ascii, convert_ascii_to_int): Move to
7668 common/rsp-low.c.
7669 * regcache.c: Include rsp-low.h.
7670 * ax.c: Include rsp-low.h.
7671 * Makefile.in (SFILES): Add common/rsp-low.c.
7672 (OBS): Add rsp-low.o.
7673 (rsp-low.o): New target.
7674
7675 2014-02-12 Tom Tromey <tromey@redhat.com>
7676
7677 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7678 Include print-utils.h.
7679 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7680 (plongest, thirty_two, phex_nz): Remove.
7681 * Makefile.in (SFILES): Add common/print-utils.c.
7682 (OBS): Add print-utils.o.
7683 (print-utils-ipa.o): New target.
7684 (print-utils.o): New target.
7685 (IPA_OBJS): Add print-utils-ipa.o.
7686
7687 2014-02-06 Tom Tromey <tromey@redhat.com>
7688
7689 * Makefile.in (SFILES): Fix indentation.
7690
7691 2014-02-05 Doug Evans <dje@google.com>
7692
7693 * linux-low.c (linux_wait_for_event): Improve comment.
7694 (linux_wait_1): Keep current_inferior in sync with event_child.
7695
7696 2014-01-22 Doug Evans <dje@google.com>
7697
7698 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7699
7700 2014-01-22 Doug Evans <dje@google.com>
7701
7702 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7703 * configure: Regenerate.
7704 * config.in: Regenerate.
7705 * Makefile.in (SFILES): Add debug.c.
7706 (OBS): Add debug.o.
7707 * debug.c: New file.
7708 * debug.h: New file.
7709 * linux-aarch64-low.c (*): Update all debugging printfs to use
7710 debug_printf instead of fprintf.
7711 * linux-arm-low.c (*): Ditto.
7712 * linux-cris-low.c (*): Ditto.
7713 * linux-crisv32-low.c (*): Ditto.
7714 * linux-m32r-low.c (*): Ditto.
7715 * linux-sparc-low.c (*): Ditto.
7716 * linux-x86.c (*): Ditto.
7717 * linux-low.c (*): Ditto.
7718 (linux_wait_1): Add calls to debug_enter, debug_exit.
7719 (linux_wait): Remove redundant debugging printf.
7720 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7721 (linux_resume, unstop_all_lwps): Ditto.
7722 * mem-break.c (*): Update all debugging printfs to use
7723 debug_printf instead of fprintf.
7724 * remote-utils.c (*): Ditto.
7725 * thread-db.c (*): Ditto.
7726 * server.c #include <ctype.h>, "gdb_vecs.h".
7727 (debug_threads): Moved to debug.c.
7728 (*): Update all debugging printfs to use debug_printf instead of
7729 fprintf.
7730 (start_inferior): Replace call to fflush with call to debug_flush.
7731 (monitor_show_help): Mention set debug-format.
7732 (parse_debug_format_options): New function.
7733 (handle_monitor_command): Handle "monitor set debug-format".
7734 (gdbserver_usage): Mention --debug-format.
7735 (main): Parse --debug-format.
7736 * server.h (debug_threads): Declaration moved to debug.h.
7737 #include "debug.h".
7738 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7739 trace_debug_1 that uses debug_printf.
7740 (tracepoint_look_up_symbols): Update all debugging printfs to use
7741 debug_printf instead of fprintf.
7742
7743 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7744
7745 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7746 sys/ptrace.h.
7747
7748 2014-01-17 Pedro Alves <palves@redhat.com>
7749
7750 PR build/16445
7751 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7752 defined after including gdb_proc_service.h.
7753
7754 2014-01-16 Doug Evans <dje@google.com>
7755
7756 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7757 (match_dll): Use it.
7758
7759 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7760
7761 * target.h (target_ops) <read_btrace>: Change parameters and
7762 return type to allow error reporting.
7763 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7764 trace reading errors on.
7765 * linux-low.c (linux_low_read_btrace): Pass trace reading
7766 errors on.
7767 (linux_low_disable_btrace): New.
7768
7769 2014-01-15 Doug Evans <dje@google.com>
7770
7771 * inferiors.c (thread_id_to_gdb_id): Delete.
7772 * inferiors.h (thread_id_to_gdb_id): Delete.
7773
7774 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7775
7776 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7777 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7778 versions.
7779
7780 2014-01-08 Pedro Alves <palves@redhat.com>
7781
7782 * server.c (handle_status): Don't discard previous queued stop
7783 replies or thread's pending status here.
7784 (main) <disconnection>: Do it here instead.
7785
7786 2014-01-08 Pedro Alves <palves@redhat.com>
7787
7788 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7789 * server.c (visit_actioned_threads, handle_pending_status): New
7790 function.
7791 (handle_v_cont): Factor out parts to ...
7792 (resume): ... this new function. If in all-stop, and a thread
7793 being resumed has a pending status, report it without actually
7794 resuming.
7795 (myresume): Adjust to use the new 'resume' function.
7796 (clear_pending_status_callback, set_pending_status_callback)
7797 (find_status_pending_thread_callback): New functions.
7798 (handle_status): Handle the case of multiple threads having
7799 interesting statuses to report. Report threads' real last signal
7800 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7801 with an interesting thread to report the status for, instead of
7802 always reporting the status of the first thread.
7803
7804 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7805
7806 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7807 * gdbreplay.c (gdbreplay_version): Likewise.
7808
7809 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7810
7811 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7812 iov.iov_len with the real length in use.
7813
7814 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7815
7816 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7817 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7818 for all targets that use win32-low.c.
7819 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7820 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7821
7822 2013-12-13 Pedro Alves <palves@redhat.com>
7823
7824 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7825 if equal to TARGET_WAITKIND_LOADED.
7826 * win32-low.c (cached_status): New static global.
7827 (win32_wait): Add declaration.
7828 (do_initial_child_stuff): Flush all initial pending debug events
7829 up to the initial breakpoint.
7830 (win32_wait): If CACHED_STATUS was set, return that instead
7831 of doing a real wait. Remove the code resuming the execution
7832 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7833 during the initial phase. Also remove the code changing
7834 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7835 TARGET_WAITKIND_STOPPED.
7836
7837 2013-12-11 Yao Qi <yao@codesourcery.com>
7838
7839 * notif.c (handle_notif_ack): Return 0 if no notification
7840 matches.
7841
7842 2013-11-20 Doug Evans <dje@google.com>
7843
7844 * linux-low.c (linux_set_resume_request): Fix comment.
7845
7846 2013-11-20 Doug Evans <dje@google.com>
7847
7848 * linux-low.c (resume_status_pending_p): Tweak comment.
7849
7850 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7851
7852 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7853 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7854 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7855 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7856 (srv_amd64_regobj): Add amd64-mpx.o.
7857 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7858 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7859 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7860 * i387-fp.c (num_pl_bnd_register) Added constant.
7861 (num_pl_bnd_cfg_registers) Added constant.
7862 (struct i387_xsave) Added reserved area and MPX fields.
7863 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7864 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7865 function.
7866 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7867 (init_registers_amd64_mpx_linux): Declare new function.
7868 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7869 (x86_64_regmap): Add MPX registers.
7870 (x86_linux_read_description): Add MPX case.
7871 (initialize_low_arch): Initialize MPX targets.
7872
7873 2013-11-18 Tom Tromey <tromey@redhat.com>
7874
7875 * configure: Rebuild.
7876 * configure.ac: Don't check for stdlib.h.
7877 * gdbreplay.c: Unconditionally include stdlib.h.
7878
7879 2013-11-18 Tom Tromey <tromey@redhat.com>
7880
7881 * config.in: Rebuild.
7882 * configure: Rebuild.
7883 * configure.ac: Don't use AC_HEADER_DIRENT.
7884
7885 2013-11-18 Tom Tromey <tromey@redhat.com>
7886
7887 * server.h: Don't check HAVE_STRING_H.
7888 * gdbreplay.c: Don't check HAVE_STRING_H.
7889 * configure: Rebuild.
7890
7891 2013-11-18 Tom Tromey <tromey@redhat.com>
7892
7893 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7894 LIBGNU.
7895
7896 2013-11-08 Tom Tromey <tromey@redhat.com>
7897
7898 * configure, config.in: Rebuild.
7899 * configure.ac: Remove unused configury.
7900
7901 2013-11-08 Tom Tromey <tromey@redhat.com>
7902
7903 * acinclude.m4: Include common.m4, codeset.m4.
7904 * configure, config.in: Rebuild.
7905 * configure.ac: Use GDB_AC_COMMON.
7906
7907 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7908
7909 * linux-s390-low.c (HWCAP_S390_TE): New define.
7910 (s390_arch_setup): Consider the TE field in the HWCAP for
7911 determining 'have_regset_tdb'.
7912
7913 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7914
7915 PR gdb/16014
7916 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7917 call to sizeof.
7918
7919 2013-10-02 Pedro Alves <palves@redhat.com>
7920
7921 * server.c (process_serial_event): Don't output "GDBserver
7922 exiting" if GDB is connected through stdio.
7923 * target.c (mywait): Likewise, be silent if GDB is connected
7924 through stdio.
7925
7926 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7927
7928 * lynx-low.c (lynx_add_threads_after_attach): New function.
7929 (lynx_attach): Remove call to add_thread. Add call to
7930 lynx_add_threads_after_attach instead.
7931
7932 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7933
7934 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7935 * config.in, configure: Regenerated.
7936
7937 2013-09-18 Yao Qi <yao@codesourcery.com>
7938
7939 PR server/15959
7940 * server.c (start_inferior): Clear 'resume_info'.
7941
7942 2013-09-16 Jiong Wang <jiwang@tilera.com>
7943
7944 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7945 for each register.
7946
7947 2013-09-16 Jiong Wang <jiwang@tilera.com>
7948
7949 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7950 linux-tile-low.o to srv_tgtobj.
7951
7952 2013-09-16 Will Newton <will.newton@linaro.org>
7953
7954 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7955 out regs.
7956
7957 2013-09-06 Pedro Alves <palves@redhat.com>
7958
7959 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7960 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7961 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7962 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7963 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7964 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7965
7966 2013-09-06 Pedro Alves <palves@redhat.com>
7967
7968 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7969 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7970
7971 2013-09-06 Pedro Alves <palves@redhat.com>
7972
7973 * linux-amd64-ipa.c: Include tracepoint.h.
7974 * linux-i386-ipa.c: Include tracepoint.h.
7975
7976 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7977
7978 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7979 (ps_get_thread_area): New function.
7980
7981 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7982
7983 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7984 (initialize_low_arch): Call init_registers_crisv32 rather than
7985 init_register_crisv32.
7986
7987 2013-09-05 Pedro Alves <palves@redhat.com>
7988
7989 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7990 to ...
7991 * hostio.h: ... this new file.
7992 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7993 win32-low.c: Include hostio.h.
7994
7995 2013-09-05 Pedro Alves <palves@redhat.com>
7996
7997 * server.h (gdb_client_data, handler_func, callback_handler_func)
7998 (delete_file_handler, add_file_handler, append_callback_event)
7999 (delete_callback_event, start_event_loop, initialize_event_loop):
8000 Move to event-loop.h and include it.
8001 * event-loop.h: New file.
8002
8003 2013-09-05 Pedro Alves <palves@redhat.com>
8004
8005 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8006 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8007 (loaded_dll, unloaded_dll): Move to ...
8008 * dll.h: ... this new file.
8009 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8010
8011 2013-09-05 Pedro Alves <palves@redhat.com>
8012
8013 * server.h (current_process, get_thread_process, all_processes)
8014 (add_inferior_to_list, for_each_inferior, current_inferior)
8015 (remove_inferior, add_process, remove_process, find_process_pid)
8016 (have_started_inferiors_p, have_attached_inferiors_p)
8017 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8018 (clear_inferiors, find_inferior, find_inferior_id)
8019 (inferior_target_data, set_inferior_target_data)
8020 (inferior_regcache_data, set_inferior_regcache_data): Move to
8021 inferiors.h, and include it.
8022 * inferiors.h: New file.
8023
8024 2013-09-05 Pedro Alves <palves@redhat.com>
8025
8026 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8027 Move ...
8028 * ax.h: ... here.
8029
8030 2013-09-05 Pedro Alves <palves@redhat.com>
8031
8032 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8033 tracepoint.h.
8034 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8035 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8036 (handle_tracepoint_general_set, handle_tracepoint_query)
8037 (tracepoint_finished_step, tracepoint_was_hit)
8038 (release_while_stepping_state_list, current_traceframe)
8039 (in_readonly_region, traceframe_read_mem)
8040 (fetch_traceframe_registers, traceframe_read_sdata)
8041 (traceframe_read_info, struct fast_tpoint_collect_status)
8042 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8043 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8044 (supply_fast_tracepoint_registers)
8045 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8046 (ipa_tdesc, claim_trampoline_space)
8047 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8048 (agent_mem_read, agent_get_trace_state_variable_value)
8049 (agent_set_trace_state_variable_value, agent_tsv_read)
8050 (agent_mem_read_string, get_raw_reg_func_addr)
8051 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8052 * tracepoint.h: ... this new file.
8053
8054 2013-09-05 Pedro Alves <palves@redhat.com>
8055
8056 * server.h (perror_with_name, error, fatal, warning, paddress)
8057 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8058 include it.
8059 * utils.h: New file.
8060
8061 2013-09-05 Pedro Alves <palves@redhat.com>
8062
8063 * server.h (remote_debug, noack_mode, transport_is_reliable)
8064 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8065 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8066 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8067 (write_enn, initialize_async_io, enable_async_io)
8068 (disable_async_io, check_remote_input_interrupt_request)
8069 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8070 (dead_thread_notify, prepare_resume_reply)
8071 (decode_address_to_semicolon, decode_address, decode_m_packet)
8072 (decode_M_packet, decode_X_packet, decode_xfer_write)
8073 (decode_search_memory_packet, unhexify, hexify)
8074 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8075 (look_up_one_symbol, relocate_instruction)
8076 (monitor_output): Move to remote-utils.h, and include it.
8077 * remote-utils.h: New file.
8078
8079 2013-09-05 Pedro Alves <palves@redhat.com>
8080
8081 * server.h (_): Delete.
8082
8083 2013-09-02 Pedro Alves <palves@redhat.com>
8084
8085 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8086 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8087 allocated.
8088 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8089
8090 2013-09-02 Pierre Muller <muller@sourceware.org>
8091
8092 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8093 or WriteProcessMemory complete successfully and handle
8094 ERROR_PARTIAL_COPY error.
8095
8096 2013-09-02 Pedro Alves <palves@redhat.com>
8097
8098 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8099 error instead of EIO.
8100
8101 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8102
8103 PR server/15604
8104 * linux-low.c: Include filestuff.h.
8105 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8106 * lynx-low.c: Include filestuff.h.
8107 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8108 * server.c: Include filestuff.h.
8109 (main): Call notice_open_fds.
8110 * spu-low.c: Include filestuff.h.
8111 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8112
8113 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8114
8115 * Makefile.in: Explain why ../target and ../nat are not
8116 listed as include file search paths.
8117 (linux-waitpid.o): New object file rule.
8118 * configure.srv (srv_native_linux_obj): New variable.
8119 Replace all occurrences of linux native object files with
8120 $srv_native_linux_obj.
8121 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8122 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8123 (linux_enable_event_reporting): Remove declaration.
8124 (my_waitpid): Moved to common/linux-waitpid.c.
8125 (linux_wait_for_event): Pass ptid when calling
8126 linux_enable_event_reporting.
8127 (linux_supports_tracefork_flag): Remove.
8128 (linux_enable_event_reporting): Likewise.
8129 (linux_tracefork_grandchild): Remove.
8130 (STACK_SIZE): Moved to common/linux-ptrace.c.
8131 (linux_tracefork_child): Remove.
8132 (linux_test_for_tracefork): Remove.
8133 (linux_look_up_symbols): Call linux_supports_traceclone.
8134 (initialize_low): Remove call to linux_test_for_tracefork.
8135 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8136 common/linux-ptrace.h.
8137 (PTRACE_TYPE_ARG4): Likewise.
8138 Include linux-ptrace.h.
8139
8140 2013-08-21 Pedro Alves <palves@redhat.com>
8141
8142 * config.in: Renegerate.
8143
8144 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8145
8146 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8147 (SFILES): Remove $(srcdir)/common/target-common.c and
8148 add $(srcdir)/target/waitstatus.c.
8149 (OBS): Remove target-common.o and add waitstatus.o.
8150 (server_h): Remove $(srcdir)/../common/target-common.h and
8151 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8152 and $(srcdir)/../target/waitstatus.h.
8153 (target-common.o): Remove.
8154 (waitstatus.o): New target object file.
8155 * target.h: Do not include target-common.h and
8156 include target/resume.h, target/wait.h and
8157 target/waitstatus.h.
8158
8159 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8160
8161 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8162 to PTRACE_TYPE_ARG3.
8163 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8164 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8165 PTRACE_TYPE_ARG4.
8166 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8167 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8168
8169 2013-07-27 Jie Zhang <jie@codesourcery.com>
8170 Daniel Jacobowitz <dan@codesourcery.com>
8171 Yao Qi <yao@codesourcery.com>
8172
8173 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8174 (mips-linux-watch.o): New rule.
8175 (mips_linux_watch_h): New variable.
8176 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8177 srv_tgtobj.
8178 * linux-mips-low.c: Include mips-linux-watch.h.
8179 (struct arch_process_info, struct arch_lwp_info): New.
8180 (update_watch_registers_callback): New function.
8181 (mips_linux_new_process, mips_linux_new_thread) New functions.
8182 (mips_linux_prepare_to_resume, mips_insert_point): New
8183 functions.
8184 (mips_remove_point, mips_stopped_by_watchpoint): New
8185 functions.
8186 (rsp_bp_type_to_target_hw_bp_type): New function.
8187 (mips_stopped_data_address): New function.
8188 (the_low_target): Add watchpoint support functions.
8189
8190 2013-07-27 Yao Qi <yao@codesourcery.com>
8191
8192 * i386-low.c: Include break-common.h.
8193 (enum target_hw_bp_type): Remove.
8194
8195 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8196
8197 * Makefile.in (SFILES): /common/target-common.c.
8198 (OBS): Add target-common.o.
8199 (server_h): Add $(srcdir)/../common/target-common.h.
8200 (target-common.o): New target.
8201 * server.c (queue_stop_reply_callback): Free
8202 status string after use.
8203 * target.c (target_waitstatus_to_string): Remove.
8204 * target.h: Include target-common.h.
8205 (resume_kind): Likewise.
8206 (target_waitkind): Likewise.
8207 (target_waitstatus): Likewise.
8208 (TARGET_WNOHANG): Likewise.
8209
8210 2013-07-04 Yao Qi <yao@codesourcery.com>
8211
8212 * Makefile.in (host_alias): Use @host_noncanonical@.
8213 (target_alias): Use @target_noncanonical@.
8214 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8215 ACX_NONCANONICAL_HOST.
8216 * configure: Regenerated.
8217
8218 Revert:
8219 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8220
8221 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8222 * configure: Rebuild.
8223 * Makefile.in (version_host, version_target): Get from configure.
8224 (version.c): Use $(version_host) and $(version_target).
8225
8226 2013-07-03 Pedro Alves <palves@redhat.com>
8227
8228 * Makefile.in (config.status): Depend on development.sh.
8229 * acinclude.m4: Include libmcheck.m4.
8230 * configure: Regenerate.
8231
8232 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8233
8234 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8235 attribute inside the parentheses.
8236 (winapi_DebugSetProcessKillOnExit): Ditto.
8237 (winapi_DebugBreakProcess): Ditto.
8238 (winapi_GenerateConsoleCtrlEvent): Ditto.
8239
8240 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8241
8242 * notif.h (notif_event): Add a dummy member to avoid compiler
8243 errors.
8244
8245 2013-07-01 Pedro Alves <palves@redhat.com>
8246
8247 * hostio.c (HOSTIO_PATH_MAX): Define.
8248 (require_filename, handle_open, handle_unlink, handle_readlink):
8249 Use it.
8250
8251 2013-07-01 Pedro Alves <palves@redhat.com>
8252
8253 * server.h: Include "pathmax.h".
8254 * linux-low.c: Don't include sys/param.h.
8255 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8256 MAXPATHLEN.
8257 * win32-low.c: Don't include sys/param.h.
8258 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8259
8260 2013-07-01 Pedro Alves <palves@redhat.com>
8261
8262 * event-loop.c: Don't check HAVE_UNISTD_H before including
8263 <unistd.h>.
8264 * gdbreplay.c: Likewise.
8265 * remote-utils.c: Likewise.
8266 * server.c: Likewise.
8267 * configure.ac: Don't check for unistd.h.
8268 * configure: Regenerate.
8269
8270 2013-06-28 Tom Tromey <tromey@redhat.com>
8271
8272 * Makefile.in (version.c): Use version.in, not
8273 common/version.in.
8274
8275 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8276
8277 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8278 * configure: Rebuild.
8279 * Makefile.in (version_host, version_target): Get from configure.
8280 (version.c): Use $(version_host) and $(version_target).
8281
8282 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8283
8284 Fix trace-status to output user name without trailing colon.
8285 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8286
8287 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8288
8289 Fix trace-status to output proper start-time and stop-time.
8290 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8291 output start time and stop time in hex as gdb expects.
8292
8293 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8294
8295 * tracepoint.c (build_traceframe_info_xml): Output trace state
8296 variables present in the trace buffer.
8297
8298 2013-06-24 Tom Tromey <tromey@redhat.com>
8299
8300 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8301 create-version.sh.
8302 (version.o): Remove.
8303 * gdbreplay.c: Include version.h.
8304 (version, host_name): Don't declare.
8305 * server.h: Include version.h.
8306 (version, host_name): Don't declare.
8307
8308 2013-06-12 Pedro Alves <palves@redhat.com>
8309
8310 * linux-x86-low.c (linux_is_elf64): Delete global.
8311 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8312 with local linux_pid_exe_is_elf_64_file use.
8313
8314 2013-06-11 Pedro Alves <palves@redhat.com>
8315
8316 * linux-low.c (regset_disabled, disable_regset): New functions.
8317 (regsets_fetch_inferior_registers)
8318 (regsets_store_inferior_registers): Use them.
8319 (initialize_regsets_info); Don't allocate the disabled_regsets
8320 array here.
8321 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8322 comment.
8323
8324 2013-06-11 Pedro Alves <palves@redhat.com>
8325
8326 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8327 xmalloc.
8328
8329 2013-06-11 Pedro Alves <palves@redhat.com>
8330
8331 * linux-x86-low.c (initialize_low_arch): Call
8332 init_registers_x32_avx_linux.
8333
8334 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8335
8336 Fix compatibility with Android Bionic.
8337 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8338 it is not empty.
8339
8340 2013-06-07 Pedro Alves <palves@redhat.com>
8341
8342 PR server/14823
8343 * Makefile.in (OBS): Add tdesc.o.
8344 (IPA_OBJS): Add tdesc-ipa.o.
8345 (tdesc-ipa.o): New rule.
8346 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8347 interface.
8348 * linux-low.c (new_inferior): Delete.
8349 (disabled_regsets, num_regsets): Delete.
8350 (linux_add_process): Adjust to set the new per-process
8351 new_inferior flag.
8352 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8353 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8354 was a stop. When calling arch_setup, switch the current inferior
8355 to the thread that got an event.
8356 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8357 (regsets_fetch_inferior_registers)
8358 (regsets_store_inferior_registers): New regsets_info parameter.
8359 Adjust to use it.
8360 (linux_register_in_regsets): New regs_info parameter. Adjust to
8361 use it.
8362 (register_addr, fetch_register, store_register): New usrregs_info
8363 parameter. Adjust to use it.
8364 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8365 parameter regs_info. Adjust to use it.
8366 (linux_fetch_registers): Get the current inferior's regs_info, and
8367 adjust to use it.
8368 (linux_store_registers): Ditto.
8369 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8370 (initialize_low): Don't initialize the target_regsets here. Call
8371 initialize_low_arch.
8372 * linux-low.h (target_regsets): Delete declaration.
8373 (struct regsets_info): New.
8374 (struct usrregs_info): New.
8375 (struct regs_info): New.
8376 (struct process_info_private) <new_inferior>: New field.
8377 (struct linux_target_ops): Delete the num_regs, regmap, and
8378 regset_bitmap fields. New field regs_info.
8379 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8380 * i387-fp.c (num_xmm_registers): Delete.
8381 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8382 calls to new interface.
8383 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8384 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8385 Infer the number of xmm registers from the regcache's target
8386 description.
8387 * i387-fp.h (num_xmm_registers): Delete.
8388 * inferiors.c (add_thread): Don't install the thread's regcache
8389 here.
8390 * proc-service.c (gregset_info): Fetch the current inferior's
8391 regs_info. Adjust to use it.
8392 * regcache.c: Include tdesc.h.
8393 (register_bytes, reg_defs, num_registers)
8394 (gdbserver_expedite_regs): Delete.
8395 (get_thread_regcache): If the thread doesn't have a regcache yet,
8396 create one, instead of aborting gdbserver.
8397 (regcache_invalidate_one): Rename to ...
8398 (regcache_invalidate_thread): ... this.
8399 (regcache_invalidate_one): New.
8400 (regcache_invalidate): Only invalidate registers of the current
8401 process.
8402 (init_register_cache): Add target_desc parameter, and use it.
8403 (new_register_cache): Ditto. Assert the target description has a
8404 non zero registers_size.
8405 (regcache_cpy): Add assertions. Adjust.
8406 (realloc_register_cache, set_register_cache): Delete.
8407 (registers_to_string, registers_from_string): Adjust.
8408 (find_register_by_name, find_regno, find_register_by_number)
8409 (register_cache_size): Add target_desc parameter, and use it.
8410 (free_register_cache_thread, free_register_cache_thread_one)
8411 (regcache_release, register_cache_size): New.
8412 (register_size): Add target_desc parameter, and use it.
8413 (register_data, supply_register, supply_register_zeroed)
8414 (supply_regblock, supply_register_by_name, collect_register)
8415 (collect_register_as_string, collect_register_by_name): Adjust.
8416 * regcache.h (struct target_desc): Forward declare.
8417 (struct regcache) <tdesc>: New field.
8418 (init_register_cache, new_register_cache): Add target_desc
8419 parameter.
8420 (regcache_invalidate_thread): Declare.
8421 (regcache_invalidate_one): Delete declaration.
8422 (regcache_release): Declare.
8423 (find_register_by_number, register_cache_size, register_size)
8424 (find_regno): Add target_desc parameter.
8425 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8426 declarations.
8427 * remote-utils.c: Include tdesc.h.
8428 (outreg, prepare_resume_reply): Adjust.
8429 * server.c: Include tdesc.h.
8430 (gdbserver_xmltarget): Delete declaration.
8431 (get_features_xml, process_serial_event): Adjust.
8432 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8433 declare.
8434 (struct process_info) <tdesc>: New field.
8435 (ipa_tdesc): Declare.
8436 * tdesc.c: New file.
8437 * tdesc.h: New file.
8438 * tracepoint.c: Include tdesc.h.
8439 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8440 (get_context_regcache): Adjust to pass ipa_tdesc down.
8441 (do_action_at_tracepoint): Adjust to get the register cache size
8442 from the context regcache's description.
8443 (traceframe_walk_blocks): Adjust to get the register cache size
8444 from the current trace frame's description.
8445 (traceframe_get_pc): Adjust to get current trace frame's
8446 description and pass it down.
8447 (gdb_collect): Adjust to get the register cache size from the
8448 IPA's description.
8449 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8450 (gdbserver_xmltarget): Delete.
8451 (initialize_low_tracepoint): Set the ipa's target description.
8452 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8453 (initialize_low_tracepoint): Set the ipa's target description.
8454 * linux-x86-low.c: Include tdesc.h.
8455 [__x86_64__] (is_64bit_tdesc): New.
8456 (ps_get_thread_area, x86_get_thread_area): Use it.
8457 (i386_cannot_store_register): Rename to ...
8458 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8459 (i386_cannot_fetch_register): Rename to ...
8460 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8461 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8462 to new interface.
8463 (target_regsets): Rename to ...
8464 (x86_regsets): ... this.
8465 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8466 interface.
8467 (x86_siginfo_fixup): Use is_64bit_tdesc.
8468 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8469 (tdesc_x32_avx_linux, tdesc_x32_linux)
8470 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8471 Declare.
8472 (x86_linux_update_xmltarget): Delete.
8473 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8474 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8475 (AMD64_LINUX_USER64_CS): New.
8476 (x86_linux_read_description): New, based on
8477 x86_linux_update_xmltarget.
8478 (same_process_callback): New.
8479 (x86_arch_setup_process_callback): New.
8480 (x86_linux_update_xmltarget): New.
8481 (x86_regsets_info): New.
8482 (amd64_linux_regs_info): New.
8483 (i386_linux_usrregs_info): New.
8484 (i386_linux_regs_info): New.
8485 (x86_linux_regs_info): New.
8486 (x86_arch_setup): Reimplement.
8487 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8488 (x86_emit_ops): Ditto.
8489 (the_low_target): Adjust. Install x86_linux_regs_info,
8490 x86_cannot_fetch_register, and x86_cannot_store_register.
8491 (initialize_low_arch): New.
8492 * linux-ia64-low.c (tdesc_ia64): Declare.
8493 (ia64_fetch_register): Adjust.
8494 (ia64_usrregs_info, regs_info): New globals.
8495 (ia64_regs_info): New function.
8496 (the_low_target): Adjust.
8497 (initialize_low_arch): New function.
8498 * linux-sparc-low.c (tdesc_sparc64): Declare.
8499 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8500 Adjust.
8501 (sparc_arch_setup): New function.
8502 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8503 (the_low_target): Adjust.
8504 (initialize_low_arch): New function.
8505 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8506 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8507 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8508 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8509 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8510 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8511 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8512 (tdesc_powerpc_isa205_vsx64l): Declare.
8513 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8514 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8515 (ppc_set_pc, ppc_get_hwcap): Adjust.
8516 (ppc_usrregs_info): Forward declare.
8517 (!__powerpc64__) ppc_regmap_adjusted: New global.
8518 (ppc_arch_setup): Adjust to the current process'es target
8519 description.
8520 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8521 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8522 (ppc_store_evrregset): Adjust.
8523 (target_regsets): Rename to ...
8524 (ppc_regsets): ... this, and make static.
8525 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8526 (ppc_regs_info): New function.
8527 (the_low_target): Adjust.
8528 (initialize_low_arch): New function.
8529 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8530 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8531 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8532 (tdesc_s390x_linux64v2): Declare.
8533 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8534 (s390_fill_gregset, s390_store_last_break): Adjust.
8535 (target_regsets): Rename to ...
8536 (s390_regsets): ... this, and make static.
8537 (s390_get_pc, s390_set_pc): Adjust.
8538 (s390_get_hwcap): New target_desc parameter, and use it.
8539 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8540 (s390_arch_setup): Adjust to set the current process'es target
8541 description. Don't adjust the regmap.
8542 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8543 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8544 (regs_info_3264): New globals.
8545 (s390_regs_info): New function.
8546 (the_low_target): Adjust.
8547 (initialize_low_arch): New function.
8548 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8549 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8550 [__mips64] (init_registers_mips_linux)
8551 (init_registers_mips_dsp_linux): Delete defines.
8552 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8553 (have_dsp): New global.
8554 (mips_read_description): New, based on mips_arch_setup.
8555 (mips_arch_setup): Reimplement.
8556 (get_usrregs_info): New function.
8557 (mips_cannot_fetch_register, mips_cannot_store_register)
8558 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8559 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8560 (target_regsets): Rename to ...
8561 (mips_regsets): ... this, and make static.
8562 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8563 (dsp_regs_info, regs_info): New globals.
8564 (mips_regs_info): New function.
8565 (the_low_target): Adjust.
8566 (initialize_low_arch): New function.
8567 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8568 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8569 Declare.
8570 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8571 (arm_read_description): New, with bits factored from
8572 arm_arch_setup.
8573 (arm_arch_setup): Reimplement.
8574 (target_regsets): Rename to ...
8575 (arm_regsets): ... this, and make static.
8576 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8577 (arm_regs_info): New function.
8578 (the_low_target): Adjust.
8579 (initialize_low_arch): New function.
8580 * linux-m68k-low.c (tdesc_m68k): Declare.
8581 (target_regsets): Rename to ...
8582 (m68k_regsets): ... this, and make static.
8583 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8584 (m68k_regs_info): New function.
8585 (m68k_arch_setup): New function.
8586 (the_low_target): Adjust.
8587 (initialize_low_arch): New function.
8588 * linux-sh-low.c (tdesc_sharch): Declare.
8589 (target_regsets): Rename to ...
8590 (sh_regsets): ... this, and make static.
8591 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8592 (sh_regs_info, sh_arch_setup): New functions.
8593 (the_low_target): Adjust.
8594 (initialize_low_arch): New function.
8595 * linux-bfin-low.c (tdesc_bfin): Declare.
8596 (bfin_arch_setup): New function.
8597 (bfin_usrregs_info, regs_info): New globals.
8598 (bfin_regs_info): New function.
8599 (the_low_target): Adjust.
8600 (initialize_low_arch): New function.
8601 * linux-cris-low.c (tdesc_cris): Declare.
8602 (cris_arch_setup): New function.
8603 (cris_usrregs_info, regs_info): New globals.
8604 (cris_regs_info): New function.
8605 (the_low_target): Adjust.
8606 (initialize_low_arch): New function.
8607 * linux-cris-low.c (tdesc_crisv32): Declare.
8608 (cris_arch_setup): New function.
8609 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8610 (cris_regs_info): New function.
8611 (the_low_target): Adjust.
8612 (initialize_low_arch): New function.
8613 * linux-m32r-low.c (tdesc_m32r): Declare.
8614 (m32r_arch_setup): New function.
8615 (m32r_usrregs_info, regs_info): New globals.
8616 (m32r_regs_info): Adjust.
8617 (initialize_low_arch): New function.
8618 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8619 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8620 (tic6x_usrregs_info): Forward declare.
8621 (tic6x_read_description): New function, based on ...
8622 (tic6x_arch_setup): ... this. Reimplement.
8623 (target_regsets): Rename to ...
8624 (tic6x_regsets): ... this, and make static.
8625 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8626 (tic6x_regs_info): New function.
8627 (the_low_target): Adjust.
8628 (initialize_low_arch): New function.
8629 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8630 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8631 (target_regsets): Rename to ...
8632 (xtensa_regsets): ... this, and make static.
8633 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8634 globals.
8635 (xtensa_arch_setup, xtensa_regs_info): New functions.
8636 (the_low_target): Adjust.
8637 (initialize_low_arch): New function.
8638 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8639 (nios2_arch_setup): Set the current process'es tdesc.
8640 (target_regsets): Rename to ...
8641 (nios2_regsets): ... this.
8642 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8643 (nios2_regs_info): New function.
8644 (the_low_target): Adjust.
8645 (initialize_low_arch): New function.
8646 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8647 (aarch64_arch_setup): Set the current process'es tdesc.
8648 (target_regsets): Rename to ...
8649 (aarch64_regsets): ... this.
8650 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8651 (aarch64_regs_info): New function.
8652 (the_low_target): Adjust.
8653 (initialize_low_arch): New function.
8654 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8655 globals.
8656 (target_regsets): Rename to ...
8657 (tile_regsets): ... this.
8658 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8659 (tile_regs_info): New function.
8660 (tile_arch_setup): Set the current process'es tdesc.
8661 (the_low_target): Adjust.
8662 (initialize_low_arch): New function.
8663 * spu-low.c (tdesc_spu): Declare.
8664 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8665 * win32-arm-low.c (tdesc_arm): Declare.
8666 (arm_arch_setup): New function.
8667 (the_low_target): Install arm_arch_setup instead of
8668 init_registers_arm.
8669 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8670 (init_windows_x86): Rename to ...
8671 (i386_arch_setup): ... this. Set `win32_tdesc'.
8672 (the_low_target): Adjust.
8673 * win32-low.c (win32_tdesc): New global.
8674 (child_add_thread): Don't create the thread cache here.
8675 (do_initial_child_stuff): Set the new process'es tdesc.
8676 * win32-low.h (struct target_desc): Forward declare.
8677 (win32_tdesc): Declare.
8678 * lynx-i386-low.c (tdesc_i386): Declare global.
8679 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8680 * lynx-low.c (lynx_tdesc): New global.
8681 (lynx_add_process): Set the new process'es tdesc.
8682 * lynx-low.h (struct target_desc): Forward declare.
8683 (lynx_tdesc): Declare global.
8684 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8685 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8686 * nto-low.c (nto_tdesc): New global.
8687 (do_attach): Set the new process'es tdesc.
8688 * nto-low.h (struct target_desc): Forward declare.
8689 (nto_tdesc): Declare.
8690 * nto-x86-low.c (tdesc_i386): Declare.
8691 (nto_x86_arch_setup): Set `nto_tdesc'.
8692
8693 2013-06-04 Gary Benson <gbenson@redhat.com>
8694
8695 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8696 to qSupported response when appropriate.
8697 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8698 with nonzero-length annex.
8699 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8700 arguments supplied in annex.
8701
8702 2013-05-31 Doug Evans <dje@google.com>
8703
8704 PR server/15594
8705 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8706 64 bits in 64-cross-32 environment.
8707
8708 2013-05-28 Pedro Alves <palves@redhat.com>
8709
8710 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8711 (aarch64-without-fpu.c): Delete rule.
8712 * configure.srv (aarch64*-*-linux*): Remove references to
8713 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8714 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8715 declaration.
8716
8717 2013-05-24 Pedro Alves <palves@redhat.com>
8718
8719 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8720 instead of strchr/decode_address. Error if the range isn't split
8721 with a ','. Don't assume there's be a ':' in the action.
8722
8723 2013-05-23 Yao Qi <yao@codesourcery.com>
8724 Pedro Alves <palves@redhat.com>
8725
8726 * linux-low.c (lwp_in_step_range): New function.
8727 (linux_wait_1): If the thread was range stepping and stopped
8728 outside the stepping range, report the stop to GDB. Otherwise,
8729 continue stepping. Add range stepping debug output.
8730 (linux_set_resume_request): Copy the step range from the resume
8731 request to the lwp.
8732 (linux_supports_range_stepping): New.
8733 (linux_target_ops) <supports_range_stepping>: Set to
8734 linux_supports_range_stepping.
8735 * linux-low.h (struct linux_target_ops)
8736 <supports_range_stepping>: New field.
8737 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8738 * linux-x86-low.c (x86_supports_range_stepping): New.
8739 (the_low_target) <supports_range_stepping>: Set to
8740 x86_supports_range_stepping.
8741 * server.c (handle_v_cont): Handle 'r' action.
8742 (handle_v_requests): Append ";r" if the target supports range
8743 stepping.
8744 * target.h (struct thread_resume) <step_range_start,
8745 step_range_end>: New fields.
8746 (struct target_ops) <supports_range_stepping>:
8747 New field.
8748 (target_supports_range_stepping): New macro.
8749
8750 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8751
8752 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8753 confusion in comment.
8754
8755 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8756
8757 * lynx-low.c (struct process_info_private): New type.
8758 (lynx_add_process): New function.
8759 (lynx_create_inferior, lynx_attach): Replace calls to
8760 add_process by calls to lynx_add_process.
8761 (lynx_resume): If PTID is null, then try using
8762 current_process()->private->last_wait_event_ptid.
8763 Add comments.
8764 (lynx_clear_inferiors): Delete. The contents of that function
8765 has been inlined in lynx_mourn;
8766 (lynx_wait_1): Save the ptid in the process's private data.
8767 (lynx_mourn): Free the process' private data. Replace call
8768 to lynx_clear_inferiors by call to clear_inferiors.
8769
8770 2013-05-17 Yao Qi <yao@codesourcery.com>
8771
8772 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8773 the right place.
8774
8775 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8776
8777 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8778 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8779 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8780 PT_TEXT_END_ADDR guards. Update comments.
8781 (linux_target_op) <read_offsets>: Conditionally define to
8782 linux_read_offsets if the target is UCLIBC and if it defines
8783 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8784
8785 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8786 Andrew Jenner <andrew@codesourcery.com>
8787
8788 * Makefile.in (SFILES): Add linux-nios2-low.c.
8789 (clean): Add action to delete nios2-linux.c.
8790 (nios2-linux.c): New rule.
8791 * configure.srv: Add nios2*-*-linux*.
8792 * linux-nios2-low.c: New.
8793
8794 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8795
8796 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8797
8798 2013-04-25 Hui Zhu <hui@codesourcery.com>
8799
8800 PR gdb/15186
8801 * ax.c (ax_printf): Add fflush.
8802
8803 2013-04-22 Tom Tromey <tromey@redhat.com>
8804
8805 * Makefile.in (SFILES): Add filestuff.c.
8806 (OBS): Add filestuff.o.
8807 (filestuff.o): New target.
8808 * config.in, configure: Rebuild.
8809 * configure.ac: Check for fdwalk, pipe2.
8810
8811 2013-04-17 Pedro Alves <palves@redhat.com>
8812
8813 * configure.ac (USE_THREAD_DB): Delete variable.
8814 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8815 Don't AC_SUBST USE_THREAD_DB.
8816 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8817 * config.in, configure: Regenerate.
8818
8819 2013-04-16 Pedro Alves <palves@redhat.com>
8820
8821 * linux-low.h (struct lwp_info) <thread_known>: Move under
8822 the USE_THREAD_DB #ifdef.
8823
8824 2013-04-16 Pedro Alves <palves@redhat.com>
8825
8826 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8827 (linux-low.o): Delete rule.
8828 * linux-low.h: Always include "gdb_thread_db.h" instead of
8829 conditionally including thread_db.h.
8830 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8831 HAVE_THREAD_DB_H.
8832
8833 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8834
8835 * Makefile.in (install-only): Fix make install regression.
8836
8837 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8838
8839 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8840 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8841 installation.
8842 * gdbserver.1: Remove.
8843
8844 2013-03-22 Pedro Alves <palves@redhat.com>
8845
8846 * linux-low.c (handle_extended_wait): Don't call
8847 linux_enable_event_reporting.
8848
8849 2013-03-15 Tony Theodore <tonyt@logyst.com>
8850
8851 PR build/9098:
8852 * Makefile.in (SHELL): Use @SHELL@.
8853
8854 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8855
8856 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8857 compiler warning.
8858
8859 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8860
8861 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8862 Remove extraneous NULL element.
8863
8864 2013-03-13 Yao Qi <yao@codesourcery.com>
8865
8866 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8867 'V' block in trace frame.
8868
8869 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8870
8871 * target.h (struct target_ops): Add btrace ops.
8872 (target_supports_btrace): New macro.
8873 (target_enable_btrace): New macro.
8874 (target_disable_btrace): New macro.
8875 (target_read_btrace): New macro.
8876 * gdbthread.h (struct thread_info): Add btrace field.
8877 * server.c: Include btrace-common.h.
8878 (handle_btrace_general_set): New function.
8879 (handle_btrace_enable): New function.
8880 (handle_btrace_disable): New function.
8881 (handle_general_set): Call handle_btrace_general_set.
8882 (handle_qxfer_btrace): New function.
8883 (struct qxfer qxfer_packets[]): Add btrace entry.
8884 * inferiors.c (remove_thread): Disable btrace.
8885 * linux-low: Include linux-btrace.h.
8886 (linux_low_enable_btrace): New function.
8887 (linux_low_read_btrace): New function.
8888 (linux_target_ops): Add btrace ops.
8889 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8890 Add srv_linux_btrace=yes.
8891 (x86_64-*-linux*): Add linux-btrace.o.
8892 Add srv_linux_btrace=yes.
8893 * configure.ac: Define HAVE_LINUX_BTRACE.
8894 * config.in: Regenerated.
8895 * configure: Regenerated.
8896
8897 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8898
8899 * server.c (handle_qxfer): Preserve error message if -3 is
8900 returned.
8901 (qxfer): Document the -3 return value.
8902
8903 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8904
8905 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8906 (linux_btrace_h): New variable.
8907 (linux-btrace.o): New rule.
8908
8909 2013-03-08 Stan Shebs <stan@codesourcery.com>
8910 Hafiz Abid Qadeer <abidh@codesourcery.com>
8911
8912 * tracepoint.c (trace_buffer_size): New global.
8913 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8914 (init_trace_buffer): Change to one-argument function. Allocate
8915 trace buffer memory.
8916 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8917 handle QTBuffer:size packet.
8918 (cmd_bigqtbuffer_size): New function.
8919 (initialize_tracepoint): Call init_trace_buffer with
8920 DEFAULT_TRACE_BUFFER_SIZE.
8921 * server.c (handle_query): Add QTBuffer:size in the
8922 supported packets.
8923
8924 2013-03-07 Yao Qi <yao@codesourcery.com>
8925
8926 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8927 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8928 of -1.
8929 (cmd_qtsp): Adjust condition. Do post increment.
8930 Set cur_action and cur_step_action back to 0.
8931
8932 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8933
8934 PR server/15236
8935 * linux-low.c (linux_write_memory): Return early success if LEN is
8936 zero.
8937
8938 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8939
8940 * configure.srv: Add x86_64-*-cygwin* as target.
8941
8942 2013-02-28 Tom Tromey <tromey@redhat.com>
8943
8944 * configure.ac: Invoke AC_SYS_LARGEFILE.
8945 * configure, config.in: Rebuild.
8946
8947 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8948
8949 * win32-low.c: Throughout, fix format strings and casts of
8950 printf-like functions to avoid type related warnings on all
8951 platforms.
8952 (get_child_debug_event): Print dwDebugEventCode as hex since
8953 that's how it's usually documented.
8954
8955 2013-02-28 Yao Qi <yao@codesourcery.com>
8956
8957 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8958 pulongest.
8959
8960 2013-02-27 Jiong Wang <jiwang@tilera.com>
8961
8962 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8963 (reg-tilegx32.c): New rule.
8964 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8965 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8966 different register info initializer according to elf class.
8967 (init_registers_tilgx32): New function. The tilegx32 register info
8968 initializer.
8969 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8970 (tile_store_gregset): Likewise.
8971
8972 2013-02-27 Yao Qi <yao@codesourcery.com>
8973
8974 * server.c (process_point_options): Print debug message when
8975 debug_threads is true.
8976
8977 2013-02-26 Yao Qi <yao@codesourcery.com>
8978
8979 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8980
8981 2013-02-19 Pedro Alves <palves@redhat.com>
8982 Kai Tietz <ktietz@redhat.com>
8983
8984 PR gdb/15161
8985
8986 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8987 instead of strtoul to extract address from packet.
8988 (process_serial_event) <'z'>: Likewise.
8989
8990 2013-02-18 Yao Qi <yao@codesourcery.com>
8991
8992 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8993
8994 2013-02-14 Pedro Alves <palves@redhat.com>
8995
8996 Plug memory leak.
8997
8998 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8999 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9000
9001 2013-02-14 Pedro Alves <palves@redhat.com>
9002
9003 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9004
9005 2013-02-14 Pedro Alves <palves@redhat.com>
9006
9007 * tracepoint.c (save_string): Delete.
9008 (add_tracepoint_action): Use savestring instead of save_string.
9009
9010 2013-02-12 Pedro Alves <palves@redhat.com>
9011
9012 * linux-xtensa-low.c: Ditto.
9013 * xtensa-xtregs.c: Ditto.
9014
9015 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9016
9017 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9018 thread_db.
9019
9020 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9021
9022 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9023 aarch64_num_wp_regs and aarch64_num_bp_regs to
9024 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9025
9026 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9027
9028 * linux-aarch64-low.c (ps_get_thread_area): Replace
9029 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9030
9031 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9032 Marcus Shawcroft <marcus.shawcroft@arm.com>
9033 Nigel Stephens <nigel.stephens@arm.com>
9034 Yufeng Zhang <yufeng.zhang@arm.com>
9035
9036 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9037 (aarch64.c, aarch64-without-fpu.c): New targets.
9038 * configure.srv (aarch64*-*-linux*): New.
9039 * linux-aarch64-low.c: New file.
9040
9041 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9042
9043 * linux-low.c (handle_extended_wait, linux_create_inferior)
9044 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9045 (dequeue_one_deferred_signal, linux_resume_one_thread)
9046 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9047 (linux_tracefork_grandchild, linux_test_for_tracefork)
9048 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9049 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9050 where the argument is 0.
9051
9052 2013-01-25 Yao Qi <yao@codesourcery.com>
9053
9054 * event-loop.c: Include "queue.h".
9055 (gdb_event_p): New typedef.
9056 (struct gdb_event) <next_event>: Remove.
9057 (event_queue): Change to QUEUE(gdb_event_p).
9058 (async_queue_event): Remove.
9059 (gdb_event_xfree): New.
9060 (initialize_event_loop): New.
9061 (process_event): Use API from QUEUE.
9062 (wait_for_event): Likewise.
9063 * server.c (main): Call initialize_event_loop.
9064 * server.h (initialize_event_loop): Declare.
9065
9066 2013-01-18 Yao Qi <yao@codesourcery.com>
9067
9068 * ax.h (struct eval_agent_expr_context): New.
9069 (gdb_eval_agent_expr): Update declaration.
9070 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9071 TFRAME. Add new argument CTX.
9072 * server.h (struct eval_agent_expr_context): Declare.
9073 (agent_mem_read, agent_tsv_read): Update declaration.
9074 (agent_mem_read_string): Likewise.
9075 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9076 (add_traceframe_block): Add new argument TPOINT.
9077 Increase TPOINT->traceframe_usage.
9078 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9079 eval_tracepoint_agent_expr.
9080 (condition_true_at_tracepoint): Likewise.
9081 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9082 (agent_mem_read_string, agent_tsv_read): Likewise.
9083
9084 2013-01-16 Yao Qi <yao@codesourcery.com>
9085
9086 * linux-low.c (linux_resume_one_lwp): Don't check
9087 'lwp->bp_reinsert != 0'.
9088
9089 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9090 Pedro Alves <palves@redhat.com>
9091
9092 * lynx-low.c (ptrace_request_to_str): Define a temporary
9093 macro and use it to simplify this function's implementation.
9094
9095 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9096
9097 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9098 sets errno.
9099
9100 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9101
9102 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9103
9104 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9105
9106 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9107
9108 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9109
9110 * lynx-low.c (lynx_resume): Use the resume_info parameter
9111 to determine the ptid for the lynx_ptrace call, unless
9112 it is equal to minus_one_ptid, in which case we use the
9113 ptid of the current_inferior.
9114 (lynx_wait_1): After having received a thread create/exit
9115 event, resume the inferior's execution using the signaling
9116 thread's ptid, rather than the old ptid.
9117
9118 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9119
9120 * lynx-low.c (lynx_resume): Delete variable ret.
9121
9122 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9123
9124 * gdbreplay.c (gdbreplay_version): Update copyright year.
9125 * server.c (gdbserver_version): Likewise.
9126
9127 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9128
9129 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9130 new thread.
9131
9132 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9133
9134 * lynx-low.c (ptrace_request_to_str): Add handling for
9135 PTRACE_GETTRACESIG.
9136
9137 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9138
9139 * lynx-low.c (lynx_attach): Delete variable new_process.
9140
9141 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9142
9143 * lynx-low.c (lynx_create_inferior): Delete variable
9144 new_process.
9145
9146 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9147
9148 * lynx-low.c (ptrace_request_to_str): Do not handle
9149 PTRACE_GETTHREADLIST if this macro does not exist.
9150
9151 2012-12-15 Yao Qi <yao@codesourcery.com>
9152
9153 * Makefile.in (OBS): Add notif.o.
9154 * notif.c, notif.h: New.
9155 * server.c: Include "notif.h".
9156 (struct vstop_notif) <next>: Remove.
9157 <base>: New field.
9158 (queue_stop_reply): Update.
9159 (push_event, send_next_stop_reply): Remove.
9160 (discard_queued_stop_replies): Update.
9161 (notif_stop): New variable.
9162 (handle_v_stopped): Remove.
9163 (handle_v_requests): Don't call handle_v_stopped. Call
9164 handle_ack_notif instead.
9165 (queue_stop_reply_callback): Call notif_event_enque instead
9166 of queue_stop_reply.
9167 (handle_status): Don't call send_next_stop_reply, call
9168 notif_write_event instead.
9169 (kill_inferior_callback): Likewise.
9170 (detach_or_kill_inferior_callback): Likewise.
9171 (main): Call initialize_notif.
9172 (process_serial_event): Call QUEUE_is_empty.
9173 (handle_target_event): Call notif_push instead of push event.
9174 * server.h (push_event): Remove declaration.
9175
9176 2012-12-10 Tom Tromey <tromey@redhat.com>
9177
9178 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9179 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9180 macros.
9181 (.c.o): Rewrite.
9182 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9183 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9184 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9185 (amd64-linux-ipa.o, ax.o): Rewrite.
9186 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9187 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9188 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9189 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9190 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9191 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9192 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9193 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9194 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9195 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9196 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9197 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9198 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9199 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9200 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9201 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9202 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9203 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9204 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9205 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9206 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9207 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9208 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9209 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9210 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9211 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9212 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9213 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9214 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9215 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9216 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9217 (reg-tilegx.o): Remove.
9218 (all_object_files): New macro.
9219 Include .deps files.
9220 * aclocal.m4, configure: Rebuild.
9221 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9222 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9223 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9224
9225 2012-12-05 Tom Tromey <tromey@redhat.com>
9226
9227 PR gdb/14917:
9228 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9229
9230 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9231
9232 * configure.ac: Check for linux/perf_event.h.
9233 * config.in: Regenerated.
9234 * configure: Regenerated.
9235
9236 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9237
9238 * hostio.c (handle_readlink): Decrease buffer size
9239 parameter passed to readlink by one byte.
9240
9241 2012-11-26 Yao Qi <yao@codesourcery.com>
9242
9243 * configure.ac (build_warnings): Append '-Wempty-body'.
9244 * configure: Regenerated.
9245 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9246 body.
9247
9248 2012-11-15 Pierre Muller <muller@sourceware.org>
9249
9250 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9251 * config.in: Regenerate.
9252 * configure: Regenerate.
9253 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9254 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9255 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9256 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9257 header.
9258 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9259 instead of <sys/wait.h> header.
9260 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9261
9262 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9263
9264 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9265 (various make rules): Remove -DGDBSERVER
9266
9267 2012-11-09 Yao Qi <yao@codesourcery.com>
9268
9269 * spu-low.c (current_ptid): Move it to ..
9270 * gdbthread.h: ... here. New.
9271 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9272 * server.c (myresume, process_serial_event): Likewise.
9273 * thread-db.c (thread_db_find_new_threads): Likewise.
9274 * tracepoint.c (run_inferior_command): Likewise.
9275
9276 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9277
9278 * server.c (handle_search_memory_1): Include access length in
9279 warning message.
9280
9281 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9282
9283 * linux-crisv32-low.c: Fix compile errors.
9284
9285 2012-09-04 Yao Qi <yao@codesourcery.com>
9286
9287 * tracepoint.c (cmd_qtsv): Adjust debug message.
9288 Don't check CUR_TPOINT.
9289
9290 2012-08-28 Yao Qi <yao@codesourcery.com>
9291
9292 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9293 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9294 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9295 Remove declarations of xmalloc, xreallloc, xstrdup and
9296 freeargv.
9297 * Makefile.in (libiberty_h): New.
9298 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9299 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9300
9301 2012-08-23 Yao Qi <yao@codesourcery.com>
9302
9303 * server.h: Remove declaration of 'xsnprintf'.
9304
9305 2012-08-22 Keith Seitz <keiths@redhat.com>
9306
9307 * server.h: Include build-gnulib-gbserver/config.h.
9308 * gdbreplay.c: Likewise.
9309
9310 2012-08-08 Doug Evans <dje@google.com>
9311
9312 * Makefile.in (SFILES): Add gdb_vecs.c.
9313 (OBS): Add gdb_vecs.o.
9314 (gdb_vecs_h, host_defs_h): New variables.
9315 (thread-db.o): Add $(gdb_vecs_h) dependency.
9316 (gdb_vecs.o): New rule.
9317 * thread-db.c: #include "gdb_vecs.h".
9318 (thread_db_load_search): Use a vector to iterate over path elements.
9319 Handle text appearing after "$pdir".
9320
9321 * configure.ac: Add check for strstr.
9322 * config.in: Regenerate.
9323 * configure: Regenerate.
9324
9325 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9326
9327 * hostio.c (handle_pread): If pread fails, fall back to attempting
9328 lseek/read.
9329 (handle_pwrite): Likewise for pwrite.
9330
9331 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9332
9333 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9334 between unsupported TYPE and unimplementable ADDR/LEN combination.
9335 (arm_insert_point): Act on new return value.
9336
9337 2012-07-31 Pedro Alves <palves@redhat.com>
9338
9339 * server.c (process_point_options): Only skip tokens if we find
9340 one that is unrecognized. Don't treat 'X' specially while
9341 skipping unrecognized tokens.
9342
9343 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9344
9345 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9346 to 4-byte-align HW breakpoint addresses for Thumb.
9347
9348 2012-07-27 Yao Qi <yao@codesourcery.com>
9349
9350 PR remote/14161.
9351
9352 * server.h: Declare gdb_agent_about_to_close.
9353 * target.c (kill_inferior): Include "agent.h".
9354 New. Send command 'kill'.
9355 * target.h (kill_inferior): Removed macro.
9356 * tracepoint.c (gdb_agent_about_to_close): New.
9357 (gdb_agent_helper_thread): Handle command 'close'.
9358 Wait endlessly until the inferior stops.
9359 Install gdb_agent_remove_socket to atexit hook.
9360 (agent_socket_name): New static variable.
9361 (gdb_agent_socket_init): Replace local variable 'name' with
9362 'agent_socket_name'.
9363 (gdb_agent_remove_socket): New.
9364
9365 2012-07-27 Yao Qi <yao@codesourcery.com>
9366
9367 * server.c (process_point_options): Stop at 'X' when parsing.
9368
9369 2012-07-19 Michael Eager <eager@eagercon.com>
9370
9371 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9372 to hw_execute.
9373 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9374 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9375 hardware breakpoint.
9376
9377 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9378
9379 * gdbserver/linux-low.c (initialize_low): Call
9380 linux_ptrace_init_warnings.
9381
9382 2012-07-02 Doug Evans <dje@google.com>
9383
9384 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9385 pointer to int.
9386
9387 2012-07-02 Stan Shebs <stan@codesourcery.com>
9388
9389 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9390 (ax.o): Add it to build rule.
9391 (ax-ipa.o): Ditto.
9392 (OBS): Add format.o.
9393 (IPA_OBS): Add format.o.
9394 * server.c (handle_query): Claim support for breakpoint commands.
9395 (process_point_options): Add command case.
9396 (process_serial_event): Leave running if there are printfs in
9397 effect.
9398 * mem-break.h (any_persistent_commands): Declare.
9399 (add_breakpoint_commands): Declare.
9400 (gdb_no_commands_at_breakpoint): Declare.
9401 (run_breakpoint_commands): Declare.
9402 * mem-break.c (struct point_command_list): New struct.
9403 (struct breakpoint): New field command_list.
9404 (any_persistent_commands): New function.
9405 (add_commands_to_breakpoint): New function.
9406 (add_breakpoint_commands): New function.
9407 (gdb_no_commands_at_breakpoint): New function.
9408 (run_breakpoint_commands): New function.
9409 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9410 locally.
9411 * ax.c: Include format.h.
9412 (ax_printf): New function.
9413 (gdb_eval_agent_expr): Add printf opcode.
9414
9415 2012-06-13 Yao Qi <yao@codesourcery.com>
9416
9417 * server.c (start_inferior): Remove duplicated writes to fields
9418 'last_resume_kind' and 'last_status' of 'current_inferior'.
9419
9420 2012-06-12 Yao Qi <yao@codesourcery.com>
9421 Pedro Alves <palves@redhat.com>
9422
9423 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9424 comment.
9425 * server.c (handle_v_cont): Extend comment.
9426
9427 2012-06-11 Yao Qi <yao@codesourcery.com>
9428
9429 * linux-low.c (linux_attach): Add 'static'.
9430
9431 2012-06-06 Yao Qi <yao@codesourcery.com>
9432
9433 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9434
9435 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9436
9437 Fix gcc -flto compilation warning.
9438 * server.c (main): Make variable multi_mode and attach volatile.
9439
9440 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9441
9442 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9443 if the platform doesn't know about it.
9444
9445 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9446
9447 * Makefile.in (SFILES): Add linux-tile-low.c.
9448 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9449 * configure.srv: Handle tilegx-*-linux*.
9450 * linux-tile-low.c: New file.
9451
9452 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9453
9454 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9455
9456 2012-05-24 Pedro Alves <palves@redhat.com>
9457
9458 PR gdb/7205
9459
9460 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9461
9462 2012-05-24 Pedro Alves <palves@redhat.com>
9463
9464 PR gdb/7205
9465
9466 Replace target_signal with gdb_signal throughout.
9467
9468 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9469
9470 * linux-low.c (linux_store_registers): Avoid the copying sequence
9471 when no data has been retrieved by ptrace.
9472
9473 2012-05-22 Will Deacon <will.deacon@arm.com>
9474
9475 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9476 Include asm/ptrace.h.
9477 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9478 already defined.
9479
9480 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9481
9482 * linux-low.c (linux_store_registers): Don't re-retrieve data
9483 with ptrace that has already been obtained from /proc. Always
9484 copy any data retrieved with ptrace to the buffer supplied.
9485
9486 2012-05-11 Yao Qi <yao@codesourcery.com>
9487 Pedro Alves <palves@redhat.com>
9488
9489 * linux-low.c (enum stopping_threads_kind): New.
9490 (stopping_threads): Change type to `enum stopping_threads_kind'.
9491 (handle_extended_wait): If stopping and suspending threads, leave
9492 the new_lwp suspended too.
9493 (linux_wait_for_event): Adjust.
9494 (stop_all_lwps): Set `stopping_threads' to
9495 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9496 whether we're suspending threads or just stopping them. Assert no
9497 recursion happens.
9498
9499 2012-04-29 Yao Qi <yao@codesourcery.com>
9500
9501 * server.h: Move some code to ...
9502 * gdbthread.h: ... here. New.
9503 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9504 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9505 (nto-low.o, win32-low.o): Likewise.
9506 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9507 * regcache.c, remote-utils.c, server.c: Likewise.
9508 * target.c, tracepoint.c, win32-low.c: Likewise.
9509
9510 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9511
9512 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9513 (PTRACE_ARG4_TYPE): Likewise.
9514 (PTRACE_XFER_TYPE): Likewise.
9515 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9516 ptrace to PTRACE_ARG3_TYPE.
9517 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9518 (PTRACE_ARG4_TYPE): Likewise.
9519 (PTRACE_XFER_TYPE): Likewise.
9520 (linux_detach_one_lwp): Cast fourth argument of
9521 ptrace to long then PTRACE_ARG4_TYPE.
9522 (regsets_fetch_inferior_registers): Cast third argument of
9523 ptrace to long then PTRACE_ARG3_TYPE.
9524 (regsets_store_inferior_registers): Likewise.
9525
9526 2012-04-20 Pedro Alves <palves@redhat.com>
9527
9528 * configure: Regenerate.
9529
9530 2012-04-19 Pedro Alves <palves@redhat.com>
9531
9532 * Makefile.in (GNULIB_BUILDDIR): New.
9533 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9534 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9535 (all, install-only, uninstall, clean-info, all-lib, clean): No
9536 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9537 (maintainer-clean realclean distclean): Use subdir_do.
9538 (subdir_do): New.
9539 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9540 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9541 * acinclude.m4: Include acx_configure_dir.m4.
9542 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9543 calls. Call AC_PROG_RANLIB. Configure gnulib using
9544 ACX_CONFIGURE_DIR.
9545 (GNULIB): New.
9546 (GNULIB_STDINT_H): Adjust.
9547 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9548 * gdbreplay.c: Include build-gnulib/config.h.
9549 * server.h: Likewise.
9550 * aclocal.m4: Regenerate.
9551 * config.in: Regenerate.
9552 * configure: Regenerate.
9553
9554 2012-04-19 Pedro Alves <palves@redhat.com>
9555
9556 * Makefile.in (LIBGNU, INCGNU): Adjust.
9557 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9558 (all, install-only, uninstall, clean-info, all-lib, clean)
9559 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9560 * configure.ac: Adjust AC_OUTPUT output.
9561 * aclocal.m4: Regenerate.
9562 * configure: Regenerate.
9563
9564 2012-04-19 Pedro Alves <palves@redhat.com>
9565
9566 * Makefile.in (generated_files): New.
9567 (server_h): Remove the explicit dependency on config.h, and depend
9568 on $generated_files.
9569
9570 2012-04-19 Pedro Alves <palves@redhat.com>
9571
9572 * Makefile.in (INCGNU): Add -Ignulib.
9573
9574 2012-04-19 Pedro Alves <palves@redhat.com>
9575
9576 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9577 (INCGNU): ... this, and spell out -I here.
9578 (GNULIB_LIB): Rename to ...
9579 (LIBGNU): ... this.
9580 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9581
9582 2012-04-19 Pedro Alves <palves@redhat.com>
9583
9584 * config.in: Regenerate.
9585
9586 2012-04-19 Pedro Alves <palves@redhat.com>
9587
9588 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9589 * server.h (memmem): Remove declaration.
9590 * config.in: Regenerate.
9591 * configure: Regenerate.
9592
9593 2012-04-19 Yao Qi <yao@codesourcery.com>
9594
9595 * Makefile.in (SFILES): Add common/vec.c.
9596 (OBS): Add vec.o.
9597 (vec.o): New rule.
9598
9599 2012-04-19 Yao Qi <yao@codesourcery.com>
9600
9601 * remote-utils.c (prepare_resume_reply): Replace with macro
9602 target_core_of_thread.
9603 * server.c (handle_qxfer_threads_proper): Likewise.
9604 * target.h (traget_core_of_thread): New macro.
9605
9606 2012-04-18 Pedro Alves <palves@redhat.com>
9607
9608 * aclocal.m4: Regenerate.
9609 * configure: Regenerate.
9610
9611 2012-04-16 Yao Qi <yao@codesourcery.com>
9612
9613 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9614 duplicated on address.
9615
9616 2012-04-16 Yao Qi <yao@codesourcery.com>
9617
9618 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9619 (struct tracepoint_action_ops) <send>: New field.
9620 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9621 (agent_expr_send, x_tracepoint_action_send): New.
9622 (l_tracepoint_action_send): New.
9623 (cmd_qtdp): Download and install tracepoint
9624 according to `use_agent'.
9625 (run_inferior_command): Add one more parameter `len'.
9626 Update callers.
9627 (tracepoint_send_agent): New.
9628 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9629
9630 2012-04-16 Yao Qi <yao@codesourcery.com>
9631
9632 * tracepoint.c (download_tracepoints): Moved to ...
9633 (cmd_qtstart): ... here.
9634
9635 2012-04-14 Yao Qi <yao@codesourcery.com>
9636
9637 * tracepoint.c: Include inttypes.h.
9638 (struct collect_memory_action): Use sized types.
9639 (struct tracepoint): Likewise.
9640 (cmd_qtdp, stop_tracing): Update print specifiers.
9641 (cmd_qtp, response_tracepoint): Likewise.
9642 (collect_data_at_tracepoint): Likewise.
9643 (collect_data_at_step): Likewise.
9644
9645 2012-04-14 Yao Qi <yao@codesourcery.com>
9646
9647 Import gnulib module inttypes.
9648 * aclocal.m4, config.in, configure: Regenerated.
9649
9650 2012-04-14 Yao Qi <yao@codesourcery.com>
9651
9652 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9653 Makefile and config.status at last.
9654
9655 2012-04-13 Yao Qi <yao@codesourcery.com>
9656
9657 * tracepoint.c: Include stdint.h unconditionally.
9658
9659 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9660
9661 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9662 on BFD_HAVE_SYS_PROCFS_TYPE.
9663 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9664 * configure: Regenerate.
9665 * config.in: Likewise.
9666
9667 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9668
9669 * Makefile.in (clean): Also remove x32.c x32-linux.c
9670 x32-avx.c x32-avx-linux.c.
9671 (x32.o): New target.
9672 (x32.c): Likewise.
9673 (x32-linux.o): Likewise.
9674 (x32-linux.c): Likewise.
9675 (x32-avx.o): Likewise.
9676 (x32-avx.c): Likewise.
9677 (x32-avx-linux.o): Likewise.
9678 (x32-avx-linux.c): Likewise.
9679
9680 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9681 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9682 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9683 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9684 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9685 i386/x32-avx-linux.xml.
9686
9687 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9688 (init_registers_x32_avx_linux): Likwise.
9689 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9690 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9691
9692 2012-04-13 Pedro Alves <palves@redhat.com>
9693
9694 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9695 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9696 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9697 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9698 the sub-make.
9699
9700 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9701
9702 * linux-x86-low.c (compat_x32_clock_t): New.
9703 (compat_x32_siginfo_t): Likewise.
9704 (compat_x32_siginfo_from_siginfo): Likewise.
9705 (siginfo_from_compat_x32_siginfo): Likewise.
9706 (linux_is_elf64): Likewise.
9707 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9708 and siginfo_from_compat_x32_siginfo for x32.
9709 (x86_arch_setup): Set linux_is_elf64.
9710
9711 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9712
9713 PR gdb/13969
9714 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9715 e_machine field.
9716 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9717 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9718 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9719 compatible with process.
9720
9721 2012-04-12 Yao Qi <yao@codesourcery.com>
9722
9723 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9724 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9725 (install-only, install-info, clean): Handle sub dir gnulib.
9726 (all-lib, am--refresh): New targets.
9727 (memmem.o): Remove target.
9728 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9729 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9730 (AC_REPLACE_FUNCS): Remove memmem.
9731 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9732 (AC_OUTPUT): Generate Makefile in gnulib/.
9733 * aclocal.m4, config.in, configure: Regenerated.
9734
9735 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9736
9737 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9738
9739 2012-04-05 Pedro Alves <palves@redhat.com>
9740
9741 -Werror=strict-aliasing
9742
9743 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9744 pointer.
9745
9746 2012-04-04 Pedro Alves <palves@redhat.com>
9747
9748 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9749 (sparc_store_gregset_from_stack, sparc_store_gregset)
9750 (sparc_breakpoint_at): Fix formatting.
9751
9752 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9753
9754 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9755 are available.
9756 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9757 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9758 * config.in: Regenerate.
9759 * configure: Likewise.
9760
9761 2012-03-29 Pedro Alves <palves@redhat.com>
9762
9763 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9764 Correct ptrace arguments.
9765
9766 2012-03-28 Pedro Alves <palves@redhat.com>
9767
9768 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9769 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9770 (IA64_FR1_REGNUM): New defines.
9771 (ia64_fetch_register): New.
9772 (the_low_target): Install it.
9773 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9774 field.
9775 * linux-low.c (linux_fetch_registers): Try the
9776 the_low_target.fetch_register hook first.
9777
9778 * linux-arm-low.c (the_low_target): Adjust.
9779 * linux-bfin-low.c (the_low_target): Adjust.
9780 * linux-cris-low.c (the_low_target): Adjust.
9781 * linux-crisv32-low.c (the_low_target): Adjust.
9782 * linux-m32r-low.c (the_low_target): Adjust.
9783 * linux-m68k-low.c (the_low_target): Adjust.
9784 * linux-mips-low.c (the_low_target): Adjust.
9785 * linux-ppc-low.c (the_low_target): Adjust.
9786 * linux-s390-low.c (the_low_target): Adjust.
9787 * linux-sh-low.c (the_low_target): Adjust.
9788 * linux-sparc-low.c (the_low_target): Adjust.
9789 * linux-tic6x-low.c (the_low_target): Adjust.
9790 * linux-x86-low.c (the_low_target): Adjust.
9791 * linux-xtensa-low.c (the_low_target): Adjust.
9792
9793 2012-03-26 Pedro Alves <palves@redhat.com>
9794
9795 * server.c (handle_qxfer_libraries): Don't bail early if
9796 the_target->qxfer_libraries_svr4 is not NULL.
9797
9798 2012-03-26 Pedro Alves <palves@redhat.com>
9799
9800 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9801
9802 2012-03-23 Pedro Alves <palves@redhat.com>
9803
9804 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9805 "library-list-svr4" element's start tag when the the DSO list is
9806 empty.
9807
9808 2012-03-23 Pedro Alves <palves@redhat.com>
9809
9810 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9811 a variable whose type size is the same as the inferior's pointer
9812 size.
9813
9814 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9815
9816 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9817 struct siginfo.
9818 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9819 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9820 * linux-low.h: Include <signal.h>.
9821 (struct siginfo): Remove forward declaration.
9822 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9823 struct siginfo.
9824
9825 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9826
9827 * .gitignore: Ignore more files.
9828
9829 2012-03-19 Pedro Alves <palves@redhat.com>
9830 Jan Kratochvil <jan.kratochvil@redhat.com>
9831
9832 * server.c (cont_thread, general_thread): Add describing comments.
9833 (start_inferior): Clear `cont_thread'.
9834 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9835 of a process.
9836
9837 2012-03-15 Yao Qi <yao@codesourcery.com>
9838
9839 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9840 handling to ...
9841 (cmd_qtdp): ... here.
9842
9843 2012-03-15 Yao Qi <yao@codesourcery.com>
9844
9845 * tracepoint.c (struct tracepoint_action_ops): New.
9846 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9847 (m_tracepoint_action_download): New.
9848 (r_tracepoint_action_download): New.
9849 (x_tracepoint_action_download): New.
9850 (l_tracepoint_action_download): New.
9851 (add_tracepoint_action): Install `action->ops' according type.
9852 (download_tracepoint_1): Move code `download' function pointer
9853 of various tracepoint_action_ops.
9854
9855 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9856
9857 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9858 linux_ptrace_attach_warnings.
9859
9860 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9861
9862 * Makefile.in (linux-ptrace.o): New.
9863 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9864 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9865 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9866 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9867 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9868 of these targets.
9869 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9870
9871 2012-03-08 Yao Qi <yao@codesourcery.com>
9872 Pedro Alves <palves@redhat.com>
9873
9874 Fix PR server/13392.
9875 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9876 offset of JMP insn.
9877 * tracepoint.c (remove_tracepoint): New.
9878 (cmd_qtdp): Call remove_tracepoint when failed to install.
9879
9880 2012-03-07 Pedro Alves <palves@redhat.com>
9881
9882 * linux-low.c (get_detach_signal): New.
9883 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9884 Pass on pending signals to PTRACE_DETACH. Check the result of the
9885 ptrace call.
9886 * server.c (program_signals, program_signals_p): New.
9887 (handle_general_set): Handle QProgramSignals.
9888 * server.h (program_signals, program_signals_p): Declare.
9889
9890 2012-03-05 Pedro Alves <palves@redhat.com>
9891 Jan Kratochvil <jan.kratochvil@redhat.com>
9892
9893 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9894 New comment why.
9895
9896 2012-03-03 Yao Qi <yao@codesourcery.com>
9897
9898 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9899 agent_look_up_symbols.
9900
9901 2012-03-03 Yao Qi <yao@codesourcery.com>
9902
9903 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9904 (linux-x86-low.o): Likewise.
9905 * server.h: Remove in_process_agent_loaded.
9906 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9907 common/agent.c.
9908 Update callers.
9909
9910 2012-03-03 Yao Qi <yao@codesourcery.com>
9911
9912 * tracepoint.c (gdb_agent_capability): New global.
9913 (in_process_agent_loaded_ust): Renamed to
9914 `in_process_agent_supports_ust'.
9915 Update callers.
9916 (in_process_agent_supports_ust): Call agent_capability_check.
9917 (clear_installed_tracepoints): Assert that agent supports
9918 agent.
9919
9920 2012-03-03 Yao Qi <yao@codesourcery.com>
9921
9922 * linux-low.c (linux_supports_agent): New.
9923 (linux_target_ops): Initialize field `supports_agent' with
9924 linux_supports_agent.
9925 * target.h (struct target_ops) <supports_agent>: New.
9926 (target_supports_agent): New macro.
9927 * server.c (handle_general_set): Handle packet 'QAgent'.
9928 (handle_query): Send `QAgent+'.
9929 * Makefile.in (server.o): Depends on agent.h.
9930
9931 2012-03-03 Yao Qi <yao@codesourcery.com>
9932
9933 * Makefile.in (OBS): Add agent.o.
9934 Add new rule for agent.o.
9935 Track dependence of tracepoint.c on agent.h.
9936 * tracepoint.c (run_inferior_command_1):
9937 (run_inferior_command): Call agent_run_command.
9938 (gdb_ust_connect_sync_socket): Deleted. Move it to
9939 common/agent.c.
9940 (resume_thread, stop_thread): Likewise.
9941 (gdb_ust_socket_init): Renamed to ...
9942 (gdb_agent_socket_init): ... New.
9943 (gdb_ust_thread): Renamed to ...
9944 (gdb_agent_helper_thread): ... New.
9945 (gdb_ust_init): Move some code to ...
9946 (gdb_agent_init): ... here. New.
9947 [HAVE_UST]: Call gdb_ust_init.
9948 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9949 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9950 * config.in, configure: Regenerated.
9951
9952 2012-03-02 Pedro Alves <palves@redhat.com>
9953
9954 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9955 * linux-low.c (struct simple_pid_list): New.
9956 (stopped_pids): New a struct simple_pid_list pointer.
9957 (add_to_pid_list, pull_pid_from_list): New.
9958 (handle_extended_wait): Don't assume the first signal new children
9959 report is SIGSTOP. Adjust call to pull_pid_from_list.
9960 (linux_wait_for_lwp): Adjust.
9961
9962 2012-03-02 Yao Qi <yao@codesourcery.com>
9963
9964 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9965 debug log.
9966
9967 2012-03-02 Yao Qi <yao@codesourcery.com>
9968
9969 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9970 `stop_pc' and `tpoint'. Update caller.
9971
9972 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9973
9974 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9975 * linux-low.c (use_linux_regsets): New macro.
9976 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9977 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9978 (linux_register_in_regsets): New function.
9979 (usr_fetch_inferior_registers): Skip registers covered by
9980 regsets.
9981 (usr_store_inferior_registers): Likewise.
9982 (usr_fetch_inferior_registers): New macro.
9983 (usr_store_inferior_registers): Likewise.
9984 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9985 (linux_store_registers): Likewise.
9986 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9987 prototype.
9988 (init_registers_mips64_dsp_linux): Likewise.
9989 (init_registers_mips_linux): New macro.
9990 (init_registers_mips_dsp_linux): Likewise.
9991 (mips_dsp_num_regs): Likewise.
9992 (DSP_BASE, DSP_CONTROL): New fallback macros.
9993 (mips_base_regs): New macro.
9994 (mips_regmap): Use it. Fix the size.
9995 (mips_dsp_regmap): New variable.
9996 (mips_dsp_regset_bitmap): Likewise.
9997 (mips_arch_setup): New function.
9998 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9999 than mips_regmap.
10000 (mips_cannot_store_register): Likewise.
10001 (the_low_target): Update .arch_setup, .num_regs and .regmap
10002 initializers. Add .regset_bitmap initializer.
10003 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10004 initializer.
10005 * linux-bfin-low.c (the_low_target): Likewise.
10006 * linux-cris-low.c (the_low_target): Likewise.
10007 * linux-crisv32-low.c (the_low_target): Likewise.
10008 * linux-ia64-low.c (the_low_target): Likewise.
10009 * linux-m32r-low.c (the_low_target): Likewise.
10010 * linux-m68k-low.c (the_low_target): Likewise.
10011 * linux-ppc-low.c (the_low_target): Likewise.
10012 * linux-s390-low.c (the_low_target): Likewise.
10013 * linux-sh-low.c (the_low_target): Likewise.
10014 * linux-sparc-low.c (the_low_target): Likewise.
10015 * linux-tic6x-low.c (the_low_target): Likewise.
10016 * linux-x86-low.c (the_low_target): Likewise.
10017 * linux-xtensa-low.c (the_low_target): Likewise.
10018 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10019 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10020 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10021 srv_xmlfiles.
10022 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10023 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10024
10025 2012-02-29 Yao Qi <yao@codesourcery.com>
10026 Pedro Alves <palves@redhat.com>
10027
10028 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10029 `step_over_finished' is true.
10030
10031 2012-02-27 Pedro Alves <palves@redhat.com>
10032
10033 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10034 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10035
10036 2012-02-27 Pedro Alves <palves@redhat.com>
10037
10038 PR server/9684
10039 * linux-low.c (pid_is_stopped): New.
10040 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10041
10042 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10043
10044 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10045 of conditions.
10046
10047 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10048
10049 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10050
10051 2012-02-24 Luis Machado <lgustavo@codesourcery>
10052
10053 * server.c (handle_query): Advertise support for target-side
10054 breakpoint condition evaluation.
10055 (process_point_options): New function.
10056 (process_serial_event): When inserting a breakpoint, check for
10057 a target-side condition that should be evaluated.
10058
10059 * mem-break.c: Include regcache.h and ax.h.
10060 (point_cond_list_t): New data structure.
10061 (breakpoint) <cond_list>: New field.
10062 (find_gdb_breakpoint_at): Make non-static.
10063 (delete_gdb_breakpoint_at): Clear any target-side
10064 conditions.
10065 (clear_gdb_breakpoint_conditions): New function.
10066 (add_condition_to_breakpoint): Likewise.
10067 (add_breakpoint_condition): Likewise.
10068 (gdb_condition_true_at_breakpoint): Likewise.
10069 (gdb_breakpoint_here): Return result directly instead
10070 of going through a local variable.
10071
10072 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10073 (clear_gdb_breakpoint_conditions): Likewise.
10074 (add_breakpoint_condition): Likewise.
10075 (gdb_condition_true_at_breakpoint): Likewise.
10076
10077 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10078 (need_step_over_p): Take target-side breakpoint condition into
10079 consideration.
10080
10081 2012-02-24 Luis Machado <lgustavo@codesourcery>
10082
10083 * server.h: Include tracepoint.h.
10084 (agent_mem_read, agent_get_trace_state_variable_value,
10085 agent_set_trace_state_variable_value,
10086 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10087 get_set_tsv_func_addr): New prototypes.
10088
10089 * ax.h: New include file.
10090 * ax.c: New source file.
10091
10092 * tracepoint.c: Include ax.h.
10093 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10094 agent_expr, eval_result_type): Move to ax.h.
10095 (parse_agent_expr): Rename to ...
10096 (gdb_parse_agent_expr): ... this, make it non-static and move
10097 to ax.h.
10098 (unparse_agent_expr) Rename to ...
10099 (gdb_unparse_agent_expr): ... this, make it non-static and move
10100 to ax.h.
10101 (eval_agent_expr): Rename to ...
10102 (eval_tracepoint_agent_expr): ... this.
10103 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10104 forward declarations.
10105 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10106 (agent_get_trace_state_variable_value): New function.
10107 (agent_set_trace_state_variable_value): New function.
10108 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10109 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10110 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10111 (condition_true_at_tracepoint): Likewise.
10112 (parse_agent_expr): Rename to ...
10113 (gdb_parse_agent_expr): ... this and move to ax.c.
10114 (unparse_agent_expr): Rename to ...
10115 (gdb_unparse_agent_expr): ... this and move to ax.c.
10116 (gdb_agent_op_name): Move to ax.c.
10117 (eval_agent_expr): Rename to ...
10118 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10119 and move to ax.c.
10120 (eval_tracepoint_agent_expr): New function.
10121 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10122 non-static.
10123 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10124 ax.c.
10125 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10126 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10127 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10128 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10129 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10130 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10131 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10132 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10133 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10134 (compile_bytecodes): Remove forward declaration.
10135 (is_goto_target): Move to ax.c.
10136 (compile_bytecodes): Move to ax.c and call
10137 agent_get_trace_state_variable_value (...) and
10138 agent_set_trace_state_variable_value (...).
10139
10140 * Makefile.in: Update ax.c and IPA dependencies.
10141
10142 2012-02-24 Pedro Alves <palves@redhat.com>
10143
10144 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10145 (cmd_bigqtbuffer_circular): ... this. Only handle
10146 'QTBuffer:circular:'.
10147 (handle_tracepoint_general_set): Adjust.
10148
10149 2012-02-16 Yao Qi <yao@codesourcery.com>
10150
10151 * inferiors.c: Move code to ...
10152 * dll.c: .... here. New.
10153 * server.h: Declare clear_dlls.
10154 * Makefile.in (SFILES): Add dll.c.
10155 (OBS): Add dll.o
10156 (dll.o): New rule.
10157
10158 2012-02-11 Yao Qi <yao@codesourcery.com>
10159
10160 * server.c: (handle_monitor_command): Add a new parameter
10161 `own_buf'.
10162 (handle_query): Update caller.
10163
10164 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10165
10166 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10167 * configure, config.in: Regenerate.
10168 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10169 is not defined.
10170
10171 2012-02-02 Pedro Alves <palves@redhat.com>
10172
10173 Try SIGKILL first, then PTRACE_KILL.
10174 * linux-low.c (linux_kill_one_lwp): New.
10175 (linux_kill_one_lwp): Rename to ...
10176 (kill_one_lwp_callback): ... this. Use the new
10177 linux_kill_one_lwp.
10178
10179 2012-02-02 Pedro Alves <palves@redhat.com>
10180
10181 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10182 inferior.
10183
10184 2012-01-27 Pedro Alves <palves@redhat.com>
10185
10186 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10187 (elf_64_file_p): Make static.
10188 (linux_pid_exe_is_elf_64_file): New.
10189 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10190 Delete declarations.
10191 (linux_pid_exe_is_elf_64_file): Declare.
10192 * linux-x86-low.c (x86_arch_setup): Use
10193 linux_pid_exe_is_elf_64_file.
10194
10195 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10196
10197 * linux-low.c (linux_wait_for_event_1): Rename to ...
10198 (linux_wait_for_event): ... here and merge it with former
10199 linux_wait_for_event - new variable wait_ptid, use it.
10200 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10201
10202 2012-01-23 Pedro Alves <palves@redhat.com>
10203
10204 * server.c (main): Avoid yet another case of infinite loop while
10205 detaching/killing after a longjmp.
10206
10207 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10208
10209 Code cleanup.
10210 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10211
10212 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10213
10214 * hostio.c (handle_readlink): New function.
10215 (handle_vFile): Call it to handle "vFile:readlink" packets.
10216
10217 2012-01-20 Pedro Alves <palves@redhat.com>
10218 Ulrich Weigand <ulrich.weigand@linaro.org>
10219
10220 * server.c (handle_v_requests): Only support vAttach and vRun to
10221 start multiple processes when in extended protocol mode.
10222
10223 2012-01-17 Pedro Alves <palves@redhat.com>
10224
10225 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10226 memalign plus mprotect to allocate the scratch buffer.
10227
10228 2012-01-13 Pedro Alves <palves@redhat.com>
10229
10230 * server.c (attach_inferior): Clear `cont_thread'.
10231
10232 2012-01-13 Pedro Alves <palves@redhat.com>
10233
10234 * server.c (main): Avoid infinite loop while detaching/killing
10235 after a longjmp.
10236
10237 2012-01-09 Doug Evans <dje@google.com>
10238
10239 * server.c (start_inferior): Set last_ptid in --wrapper case.
10240
10241 2012-01-06 Yao Qi <yao@codesourcery.com>
10242
10243 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10244 defined.
10245 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10246
10247 2012-01-04 Yao Qi <yao@codesourcery.com>
10248
10249 * tracepoint.c (cmd_qtdp): Print debug message
10250 for static tracepoint.
10251
10252 2012-01-04 Yao Qi <yao@codesourcery.com>
10253
10254 * tracepoint.c (trace_vdebug): Differentiate debug message
10255 between gdbserver and IPA.
10256
10257 2012-01-03 Yao Qi <yao@codesourcery.com>
10258
10259 * tracepoint.c (tracepoint_was_hit): Don't collect for
10260 static tracepoint.
10261
10262 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10263
10264 * terminal.h: Reformat copyright header.
10265
10266 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10267
10268 * server.c (gdbserver_version): Update copyright year.
10269 * gdbreplay.c (gdbreplay_version): Likewise.
10270
10271 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10272
10273 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10274
10275 Revert:
10276 2011-12-18 Hui Zhu <teawater@gmail.com>
10277 * linux-low.c (linux_create_inferior): Save return value to ret.
10278
10279 2011-12-18 Hui Zhu <teawater@gmail.com>
10280
10281 * linux-low.c (linux_create_inferior): Save return value to ret.
10282
10283 2011-12-16 Doug Evans <dje@google.com>
10284
10285 * linux-low.c (linux_create_inferior): If stdio connection,
10286 redirect stdin from /dev/null, stdout to stderr.
10287 * remote-utils.c (remote_is_stdio): New static global.
10288 (remote_connection_is_stdio): New function.
10289 (remote_prepare): Handle stdio connection.
10290 (remote_open): Ditto.
10291 (remote_close): Don't close stdin for stdio connections.
10292 (read_prim,write_prim): New functions. Replace all calls to
10293 read/write to these.
10294 * server.c (main): Watch for "-" argument. Move call to
10295 remote_prepare before start_inferior.
10296 * server.h (STDIO_CONNECTION_NAME): New macro.
10297 (remote_connection_is_stdio): Declare.
10298
10299 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10300 in debugging output.
10301
10302 2011-12-15 Yao Qi <yao@codesourcery.com>
10303
10304 * tracepoint.c: Include sys/syscall.h.
10305 (gdb_ust_thread): Remove preprocessor conditional.
10306
10307 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10308
10309 * linux-low.c (linux_detach_one_lwp): Call
10310 the_low_target.prepare_to_resume before detaching.
10311
10312 2011-12-14 Yao Qi <yao@codesourcery.com>
10313
10314 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10315 of write.
10316
10317 2011-12-14 Yao Qi <yao@codesourcery.com>
10318
10319 * i386-low.c (i386_low_stopped_data_address): Initialize local
10320 variable `control'.
10321
10322 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10323
10324 PR remote/13492
10325
10326 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10327 DR_CONTROL unless necessary. Extend comments.
10328 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10329 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10330
10331 2011-12-13 Yao Qi <yao@codesourcery.com>
10332
10333 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10334 macros.
10335 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10336
10337 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10338
10339 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10340 Print new debug message for such case.
10341
10342 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10343
10344 Fix overlapping memcpy.
10345 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10346 the read_inferior_memory transfer.
10347 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10348 write_inferior_memory transfer.
10349 (set_fast_tracepoint_jump): New variable buf. Use it for the
10350 read_inferior_memory and write_inferior_memory transfers.
10351 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10352 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10353 Use it for the write_inferior_memory transfer.
10354 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10355 buffers.
10356
10357 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10358
10359 * linux-low.c (fetch_register, store_register): Make code
10360 consistent, fix formatting.
10361
10362 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10363
10364 * linux-low.c (usr_store_inferior_registers): Factor out code
10365 to handle individual registers into...
10366 (store_register): ... this new function.
10367
10368 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10369
10370 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10371 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10372 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10373 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10374 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10375 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10376 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10377 (srv_xmlfiles): Add new XML files.
10378
10379 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10380 and <sys/uio.h>.
10381 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10382 (init_registers_s390_linux32v1): Add prototype.
10383 (init_registers_s390_linux32v2): Likewise.
10384 (init_registers_s390_linux64v1): Likewise.
10385 (init_registers_s390_linux64v2): Likewise.
10386 (init_registers_s390x_linux64v1): Likewise.
10387 (init_registers_s390x_linux64v2): Likewise.
10388 (s390_num_regs): Increment to 52.
10389 (s390_regmap): Add orig_r2 register.
10390 (s390_num_regs_3264): Increment to 68.
10391 (s390_regmap_3264): Add orig_r2 register.
10392 (s390_collect_ptrace_register): Handle orig_r2 register.
10393 (s390_supply_ptrace_register): Likewise.
10394 (s390_fill_last_break): New function.
10395 (s390_store_last_break): Likewise.
10396 (s390_fill_system_call): New function.
10397 (s390_store_system_call): Likewise.
10398 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10399 register sets.
10400 (s390_check_regset): New function.
10401 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10402 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10403 Update target_regsets for available register sets.
10404
10405 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10406 Jan Kratochvil <jan.kratochvil@redhat.com>
10407
10408 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10409 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10410 New.
10411 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10412 * linux-low.h (struct process_info_private): New member r_debug.
10413 * server.c (handle_qxfer_libraries): Call
10414 the_target->qxfer_libraries_svr4.
10415 (handle_qxfer_libraries_svr4): New function.
10416 (qxfer_packets): New entry "libraries-svr4".
10417 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10418 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10419 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10420 PACKET_qXfer_libraries_svr4.
10421
10422 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10423
10424 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10425 PSW address/mask between 8-byte and 16-byte formats.
10426 (s390_supply_ptrace_register): Likewise.
10427 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10428 basic addressing mode bit.
10429
10430 2011-11-24 Stan Shebs <stan@codesourcery.com>
10431
10432 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10433
10434 2011-11-17 Stan Shebs <stan@codesourcery.com>
10435
10436 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10437 (tracing_start_time): New global.
10438 (tracing_stop_time): New global.
10439 (tracing_user_name): New global.
10440 (tracing_notes): New global.
10441 (tracing_stop_note): New global.
10442 (cmd_qtstart): Set traceframe_usage, start_time.
10443 (stop_tracing): Set stop_time.
10444 (cmd_qtstatus): Report additional status.
10445 (cmd_qtp): New function.
10446 (handle_tracepoint_query): Call it.
10447 (cmd_qtnotes): New function.
10448 (handle_tracepoint_general_set): Call it.
10449 (get_timestamp): Rename from tsv_get_timestamp.
10450
10451 2011-11-14 Stan Shebs <stan@codesourcery.com>
10452 Kwok Cheung Yeung <kcy@codesourcery.com>
10453
10454 * linux-x86-low.c (small_jump_insn): New.
10455 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10456 trampoline and error message, build a trampoline and issue a small
10457 jump instruction to it.
10458 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10459 trampoline and error message.
10460 (x86_get_min_fast_tracepoint_insn_len): New.
10461 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10462 * linux-low.h (struct linux_target_ops): Add arguments to
10463 install_fast_tracepoint_jump_pad operation, add new operation.
10464 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10465 arguments.
10466 (linux_get_min_fast_tracepoint_insn_len): New function.
10467 (linux_target_op): Add new operation.
10468 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10469 (gdb_trampoline_buffer_end): Ditto.
10470 (gdb_trampoline_buffer_error): Ditto.
10471 (struct ipa_sym_addresses): Add fields for new IPA variables.
10472 (symbol_list): Add entries for new IPA variables.
10473 (struct tracepoint): Add fields to hold the address range of the
10474 trampoline used by the tracepoint.
10475 (trampoline_buffer_head): New static variable.
10476 (trampoline_buffer_tail): Ditto.
10477 (claim_trampoline_space): New function.
10478 (have_fast_tracepoint_trampoline_buffer): New function.
10479 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10480 structure.
10481 (install_fast_tracepoint): Ditto, also add error buffer argument.
10482 (cmd_qtminftpilen): New function.
10483 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10484 (fast_tracepoint_from_trampoline_address): New function.
10485 (fast_tracepoint_collecting): Handle trampoline as part of jump
10486 pad space.
10487 (set_trampoline_buffer_space): New function.
10488 (initialize_tracepoint): Initialize new IPA variables.
10489 * target.h (struct target_ops): Add arguments to
10490 install_fast_tracepoint_jump_pad operation, add new
10491 get_min_fast_tracepoint_insn_len operation.
10492 (target_get_min_fast_tracepoint_insn_len): New.
10493 (install_fast_tracepoint_jump_pad): Add arguments.
10494 * server.h (IPA_BUFSIZ): Define.
10495 * linux-i386-ipa.c: Include extra header files.
10496 (initialize_fast_tracepoint_trampoline_buffer): New function.
10497 (initialize_low_tracepoint): Call it.
10498 * server.h (set_trampoline_buffer_space): Declare.
10499 (claim_trampoline_space): Ditto.
10500 (have_fast_tracepoint_trampoline_buffer): Ditto.
10501
10502 2011-11-14 Yao Qi <yao@codesourcery.com>
10503
10504 * server.c (handle_query): Handle InstallInTrace for qSupported.
10505 * tracepoint.c (add_tracepoint): Sort list.
10506 (install_tracepoint, download_tracepoint): New.
10507 (cmd_qtdp): Call them to install and download tracepoints.
10508 (sort_tracepoints): Removed.
10509 (cmd_qtstart): Update.
10510
10511 2011-11-14 Yao Qi <yao@codesourcery.com>
10512
10513 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10514 * mem-break.h: Declare.
10515 * tracepoint.c (cmd_qtstart): Move some code to ...
10516 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10517 New.
10518 (download_tracepoints): Move some code to ...
10519 (download_tracepoint_1): ... here. New.
10520
10521 2011-11-08 Yao Qi <yao@codesourcery.com>
10522
10523 * remote-utils.c (relocate_instruction): A comment fix.
10524
10525 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10526
10527 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10528 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10529 dr_status_mirror and dr_control_mirror from debug_reg_state.
10530 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10531 (i386_initial_stuff): Remove use of deleted globals.
10532 (i386_get_thread_context, i386_set_thread_context,
10533 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10534 from debug_reg_state.
10535
10536 2011-11-05 Yao Qi <yao@codesourcery.com>
10537
10538 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10539 address as TPOINT's.
10540
10541 2011-11-02 Stan Shebs <stan@codesourcery.com>
10542
10543 * tracepoint.c (agent_mem_read_string): New function.
10544 (eval_agent_expr): Call it for tracenz.
10545 * server.c (handle_query): Report support for tracenz.
10546
10547 2011-11-02 Yao Qi <yao@codesourcery.com>
10548
10549 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10550
10551 2011-11-02 Yao Qi <yao@codesourcery.com>
10552
10553 * target.h: Fix a typo in comment.
10554
10555 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10556
10557 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10558 clobber the breakpoints' shadows with fast tracepoint jumps.
10559 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10560 * target.c (write_inferior_memory): Also pass MYADDR down to
10561 check_mem_write.
10562
10563 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10564
10565 * configure.ac: Check support for personality routine.
10566 * configure: Regenerate.
10567 * config.in: Likewise.
10568 * linux-low.c: Include <sys/personality.h>.
10569 Define ADDR_NO_RANDOMIZE if necessary.
10570 (linux_create_inferior): Disable address space randomization when
10571 forking inferior, if requested.
10572 (linux_supports_disable_randomization): New function.
10573 (linux_target_ops): Install it.
10574 * server.h (disable_randomization): Declare.
10575 * server.c (disable_randomization): New global variable.
10576 (handle_general_set): Handle QDisableRandomization.
10577 (handle_query): Likewise for qSupported.
10578 (main): Support --disable-randomization and --no-disable-randomization
10579 command line arguments.
10580 * target.h (struct target_ops): Add supports_disable_randomization.
10581 (target_supports_disable_randomization): New macro.
10582
10583 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10584
10585 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10586 ifdef check.
10587 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10588 [!PT_GETDSBT] (target_loadmap): New definition.
10589 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10590 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10591 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10592 and PT_GETDSBT to LINUX_LOADMAP.
10593 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10594 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10595
10596 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10597
10598 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10599 (arm_linux_hwbp_cap): New static variable.
10600 (arm_linux_get_hwbp_cap): Replace by ...
10601 (arm_linux_init_hwbp_cap): ... this new function.
10602 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10603 (arm_linux_get_hw_watchpoint_count): Likewise.
10604 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10605 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10606 (arm_prepare_to_resume): Use perror_with_name instead of error.
10607
10608 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10609
10610 * linux-arm-low.c: Include <signal.h>.
10611 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10612 (struct arm_linux_hwbp_cap): New data type.
10613 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10614 (struct arm_linux_hw_breakpoint): New data type.
10615 (MAX_BPTS, MAX_WPTS): Define.
10616 (struct arch_process_info, struct arch_lwp_info): New data types.
10617 (arm_linux_get_hwbp_cap): New function.
10618 (arm_linux_get_hw_breakpoint_count): Likewise.
10619 (arm_linux_get_hw_watchpoint_count): Likewise.
10620 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10621 (arm_hwbp_control_initialize): Likewise.
10622 (arm_hwbp_control_is_enabled): Likewise.
10623 (arm_hwbp_control_is_initialized): Likewise.
10624 (arm_hwbp_control_disable): Likewise.
10625 (arm_linux_hw_breakpoint_equal): Likewise.
10626 (arm_linux_hw_point_initialize): Likewise.
10627 (struct update_registers_data): New data structure.
10628 (update_registers_callback: New function.
10629 (arm_insert_point): Likewise.
10630 (arm_remove_point): Likewise.
10631 (arm_stopped_by_watchpoint): Likewise.
10632 (arm_stopped_data_address): Likewise.
10633 (arm_new_process): Likewise.
10634 (arm_new_thread): Likewise.
10635 (arm_prepare_to_resume): Likewise.
10636 (the_low_target): Register arm_insert_point, arm_remove_point,
10637 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10638 arm_new_thread, and arm_prepare_to_resume.
10639
10640 2011-09-15 Stan Shebs <stan@codesourcery.com>
10641
10642 * server.h (struct emit_ops): Add compare-goto fields.
10643 * tracepoint.c (gdb_agent_op_sizes): New table.
10644 (emit_eq_goto): New function.
10645 (emit_ne_goto): New function.
10646 (emit_lt_goto): New function.
10647 (emit_le_goto): New function.
10648 (emit_gt_goto): New function.
10649 (emit_ge_goto): New function.
10650 (is_goto_target): New function.
10651 (compile_bytecodes): Recognize special cases of compare-goto
10652 combinations and call specialized emitters for them.
10653 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10654 (amd64_emit_ne_goto): New function.
10655 (amd64_emit_lt_goto): New function.
10656 (amd64_emit_le_goto): New function.
10657 (amd64_emit_gt_goto): New function.
10658 (amd64_emit_ge_goto): New function.
10659 (amd64_emit_ops): Add the new functions.
10660 (i386_emit_eq_goto): New function.
10661 (i386_emit_ne_goto): New function.
10662 (i386_emit_lt_goto): New function.
10663 (i386_emit_le_goto): New function.
10664 (i386_emit_gt_goto): New function.
10665 (i386_emit_ge_goto): New function.
10666 (i386_emit_ops): Add the new functions.
10667
10668 2011-09-08 Stan Shebs <stan@codesourcery.com>
10669
10670 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10671 (i386_emit_epilogue): Restore %ebx.
10672
10673 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10674
10675 * server.c (step_thread): Remove definition.
10676 (process_serial_event): Don't handle Hs.
10677 * server.h (step_thread): Remove declaration.
10678 * target.c (set_desired_inferior): Remove use of step_thread.
10679
10680 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10681
10682 * linux-low.c: Include linux-procfs.h.
10683 (linux_attach_lwp_1): Update comments.
10684 (linux_attach): Scan for existing threads when attaching to a
10685 process that is the tgid.
10686 * Makefile.in: Update dependencies.
10687
10688 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10689
10690 * configure.srv: Add linux-procfs.o dependencies.
10691
10692 2011-08-14 Yao Qi <yao@codesourcery.com>
10693
10694 * target.h (struct target_ops): Fix indent.
10695 * win32-low.c (win32_target_ops): Fix comment.
10696
10697 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10698 Yao Qi <yao@codesourcery.com>
10699
10700 * Makefile.in (clean): Remove tic6x-*.c files.
10701 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10702 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10703 (tic6x-c64xp-linux.c): Likewise.
10704 * configure.srv: Add support for tic6x-*-uclinux.
10705 * linux-tic6x-low.c: New.
10706 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10707
10708 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10709 Yao Qi <yao@codesourcery.com>
10710
10711 * target.h (struct target_ops): Add read_loadmap.
10712 * linux-low.c (struct target_loadseg): New type.
10713 (struct target_loadmap): New type.
10714 (linux_read_loadmap): New function.
10715 (linux_target_ops): Add linux_read_loadmap.
10716 * server.c (handle_query): Support qXfer:fdpic:read packet.
10717 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10718 to NULL.
10719
10720 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10721
10722 * win32-low.c: Include <stdint.h>.
10723
10724 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10725
10726 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10727 to the inferior here.
10728 (i386_remove_aligned_watchpoint): Ditto.
10729 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10730 fit part of the watchpoint in the debug registers.
10731 (i386_update_inferior_debug_regs): New.
10732 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10733 registers, and only update the inferior on success.
10734 (i386_low_remove_watchpoint): Ditto.
10735
10736 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10737
10738 * linux-low.c (compare_ints, unique, list_threads, show_process,
10739 linux_core_of_thread): Delete.
10740 (linux_target_ops): Change linux_core_of_thread to
10741 linux_common_core_of_thread.
10742 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10743 * utils.c (malloc_failure): Change type of argument.
10744 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10745 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10746 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10747 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10748 (IPA_OBJS): Add common-utils-ipa.o.
10749 (ptid_h, linux_osdata_h): New macros.
10750 (server_h): Add common/common-utils.h, common/xml-utils.h,
10751 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10752 common/ptid.h.
10753 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10754 ptid.o, buffer.o): New rules.
10755 (linux-low.o): Add common/linux-osdata.h as a dependency.
10756 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10757 * configure.ac: Add AC_HEADER_DIRENT check.
10758 * config.in: Regenerate.
10759 * configure: Regenerate.
10760 * remote-utils.c (xml_escape_text): Delete.
10761 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10762 buffer_xml_printf): Move to common/buffer.c.
10763 * server.c (main): Remove call to initialize_inferiors.
10764 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10765 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10766 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10767 internal_error, gdb_assert, gdb_assert_fail): Delete.
10768 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10769 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10770 common/buffer.h.
10771 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10772 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10773 initialize_inferiors): Delete.
10774
10775 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10776
10777 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10778 symbol error.
10779
10780 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10781
10782 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10783 assertion.
10784 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10785
10786 2011-05-26 Yao Qi <yao@codesourcery.com>
10787
10788 * Makefile.in (thread-db.o): Track dependence to
10789 common/gdb_thread_db.h.
10790 * thread-db.c: include gdb_thread_db.h from right place.
10791
10792 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10793
10794 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10795 __FILE__ and __LINE__ to internal_error.
10796
10797 2011-05-13 Doug Evans <dje@google.com>
10798
10799 * thread-db.c (try_thread_db_load_from_sdir): New function.
10800 (try_thread_db_load_from_dir): New function.
10801 (thread_db_load_search): Handle $sdir, ignore $pdir.
10802 Remove trying of system directories if search of
10803 libthread-db-search-path fails, that is now done via $sdir.
10804
10805 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10806
10807 * server.c (handle_query): Add EnableDisableTracepoints to the list
10808 of supported features.
10809 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10810 tracepoints.
10811 (cmd_qtenable_disable): New.
10812 (cmd_qtstart): Install tracepoints even if disabled.
10813 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10814 receiving a QTEnable or QTDisable packet.
10815 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10816 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10817 tracepoints.
10818 (gdb_probe): Skip data collection if static tracepoint is disabled.
10819
10820 2011-05-10 Doug Evans <dje@google.com>
10821
10822 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10823
10824 2011-05-04 Doug Evans <dje@google.com>
10825
10826 * linux-low.c (linux_join): Skip process lookup.
10827 * spu-low.c (spu_join): Ditto.
10828 * server.c (join_inferiors_callback): Delete.
10829 (process_serial_event): For 'D' packet (detach) call join_inferior
10830 directly.
10831
10832 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10833
10834 * README: Don't mention xscale*-*-linux*.
10835 * configure.srv (xscale*-*-linux*): Don't handle target.
10836
10837 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10838
10839 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10840 casting pointers.
10841 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10842 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10843 (i386_emit_void_call_2): Likewise.
10844
10845 2011-04-26 Yao Qi <yao@codesourcery.com>
10846
10847 * linux-low.c: Move common macros to linux-ptrace.h.
10848 Include linux-ptrace.h.
10849 * Makefile.in (linux_ptrace_h): New.
10850 (linux-low.o): Depends on linux-ptrace.h.
10851
10852 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10853
10854 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10855 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10856 (remote_prepare): New function with most of the TCP code from ...
10857 (remote_open): ... here. Detect PORT here unconditionally. Move also
10858 setting transport_is_reliable.
10859 * server.c (run_once): New variable.
10860 (gdbserver_usage): Document it.
10861 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10862 the first run if RUN_ONCE.
10863 * server.h (run_once, remote_prepare): New declarations.
10864
10865 2011-04-19 Tom Tromey <tromey@redhat.com>
10866
10867 * win32-low.c (handle_load_dll): Remove duplicate "the".
10868
10869 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10870
10871 Remove support for old Cygwin 1.5 versions.
10872 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10873 function to avoid warning.
10874 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10875 warning.
10876
10877 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10878
10879 * gdbserver/server.h (Macro _): Define it if not available.
10880
10881 2011-03-14 Michael Snyder <msnyder@vmware.com>
10882
10883 * hostio.c (handle_close): Remove unnecessary null test.
10884
10885 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10886
10887 * Makefile.in (maintainer-clean realclean distclean): Remove
10888 "make ... subdir_do" command.
10889
10890 2011-03-10 Michael Snyder <msnyder@vmware.com>
10891
10892 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10893
10894 * server.c (handle_v_run): Free alloced buffer on early return.
10895
10896 2011-03-09 Yao Qi <yao@codesourcery.com>
10897
10898 Revert:
10899 2011-03-04 Yao Qi <yao@codesourcery.com>
10900
10901 * Makefile.in: Remove GNU make feature --directory.
10902
10903 2011-03-05 Yao Qi <yao@codesourcery.com>
10904
10905 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10906 (subdir_do): New make target. Copied from gdb/Makefile.
10907 (maintainer-clean, realclean, distclean, clean): Call corresponding
10908 make targets in common/Makefile.
10909
10910 2011-02-11 Yao Qi <yao@codesourcery.com>
10911
10912 * configure.ac: Call AC_PROG_RANLIB.
10913 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10914 * configure: Regenerate.
10915
10916 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10917
10918 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10919
10920 2011-03-06 Yao Qi <yao@codesourcery.com>
10921
10922 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10923
10924 2011-03-05 Yao Qi <yao@codesourcery.com>
10925
10926 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10927 (subdir_do): New make target. Copied from gdb/Makefile.
10928 (maintainer-clean, realclean, distclean, clean): Call corresponding
10929 make targets in common/Makefile.
10930
10931 2011-03-04 Yao Qi <yao@codesourcery.com>
10932
10933 * Makefile.in: Remove GNU make feature --directory.
10934
10935 2011-03-04 Michael Snyder <msnyder@vmware.com>
10936
10937 * server.c (queue_stop_reply): Call xmalloc not malloc.
10938
10939 2011-03-02 Michael Snyder <msnyder@vmware.com>
10940
10941 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10942
10943 2011-02-28 Michael Snyder <msnyder@vmware.com>
10944
10945 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10946 (cmd_qtframe): Ditto.
10947 (cmd_qtbuffer): Ditto.
10948 (cmd_bigqtbuffer): Ditto.
10949
10950 * utils.c (decimal2str): Initialize 'width' to nine, then
10951 don't mess with it.
10952
10953 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10954
10955 * hostio.c (require_data): Free *data, not data.
10956
10957 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10958
10959 * hostio.c (require_data): Use free, not xfree.
10960
10961 2011-02-27 Michael Snyder <msnyder@vmware.com>
10962
10963 * server.c (handle_query): Discard unused value.
10964
10965 * hostio.c (require_data): Free malloc memory before returning
10966 error.
10967
10968 2011-02-26 Michael Snyder <msnyder@vmware.com>
10969
10970 * linux-low.c (list_threads): Call closedir for dirent.
10971
10972 2011-02-27 Michael Snyder <msnyder@vmware.com>
10973
10974 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10975 a case statement falls through.
10976
10977 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10978
10979 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10980 in comparison.
10981
10982 2011-02-26 Michael Snyder <msnyder@vmware.com>
10983
10984 * utils.c (decimal2str): Eliminate dead code and dead param.
10985 (pulongest): Drop dead param from call to decimal2str.
10986 (plongest): Ditto.
10987
10988 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10989
10990 Revert the following patch (not approved yet):
10991 2011-02-21 Hui Zhu <teawater@gmail.com>
10992 * tracepoint.c (tp_printf): New function.
10993 (eval_agent_expr): Handle gdb_agent_op_printf.
10994
10995 2011-02-21 Hui Zhu <teawater@gmail.com>
10996
10997 * tracepoint.c (tp_printf): New function.
10998 (eval_agent_expr): Handle gdb_agent_op_printf.
10999
11000 2011-02-18 Tom Tromey <tromey@redhat.com>
11001
11002 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11003 (tracepoint.o): Likewise.
11004 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11005 (gdb_agent_op_names): Likewise.
11006
11007 2011-02-18 Tom Tromey <tromey@redhat.com>
11008
11009 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11010 gdb_agent_op_rot>: New constants.
11011 (gdb_agent_op_names): Add pick and roll.
11012 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11013 cases.
11014
11015 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11016
11017 * aclocal.m4: Regenerated with aclocal-1.11.1.
11018
11019 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11020
11021 * server.c (handle_qxfer_traceframe_info): New.
11022 (qxfer_packets): Register "traceframe-info".
11023 (handle_query): Report support for qXfer:traceframe-info:read+.
11024 * tracepoint.c (match_blocktype): New.
11025 (traceframe_find_block_type): Rename to ...
11026 (traceframe_walk_blocks): ... this. Add callback filter argument,
11027 and use it.
11028 (traceframe_find_block_type): New, reimplemented on top of
11029 traceframe_walk_blocks.
11030 (build_traceframe_info_xml): New.
11031 (traceframe_read_info): New.
11032 * server.h (traceframe_read_info): Declare.
11033
11034 2011-02-11 Yao Qi <yao@codesourcery.com>
11035
11036 * configure.ac: Call AC_PROG_RANLIB.
11037 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11038 * configure: Regenerate.
11039
11040 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11041
11042 * server.c (gdb_read_memory): Change return semantics to allow
11043 partial transfers.
11044 (handle_search_memory_1): Adjust.
11045 (process_serial_event) <'m' packet>: Handle partial transfers.
11046 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11047
11048 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11049
11050 * regcache.c (init_register_cache): Initialize
11051 regcache->register_status.
11052 (free_register_cache): Release regcache->register_status.
11053 (regcache_cpy): Copy register_status.
11054 (registers_to_string): Print 'x's for unavailable registers.
11055 (supply_register): Mark the register's status valid or
11056 unavailable, depending on whether a buffer was passed in or not.
11057 (supply_register_zeroed): New.
11058 (supply_regblock): Mark the registers' status valid or
11059 unavailable, depending on whether a buffer was passed in or not.
11060 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11061 (struct regcache): New `register_status' field.
11062 (supply_register_zeroed): Declare.
11063 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11064 supply_register_zeroed, rather than passing a NULL buffer to
11065 supply_register.
11066 * tracepoint.c (fetch_traceframe_registers): Update comment.
11067
11068 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11069
11070 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11071 buffer explicit.
11072
11073 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11074
11075 * server.h (decode_xfer_write): Change prototype.
11076 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11077 and don't extract the annex here.
11078 * server.c (decode_xfer_read): Remove `annex' parameter,
11079 and don't extract the annex here.
11080 (decode_xfer): New.
11081 (struct qxfer): New.
11082 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11083 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11084 (handle_qxfer_statictrace): New functions, abstracted out from
11085 handle_query, and made to use the struct qxfer interface.
11086 (handle_threads_qxfer_proper): Rename to ...
11087 (handle_qxfer_threads_proper): ... this.
11088 (handle_threads_qxfer): Rename to ...
11089 (handle_qxfer_threads): ... this. Adjust.
11090 (qxfer_packets): New array.
11091 (handle_qxfer): New function.
11092 (handle_query): Use handle_qxfer.
11093
11094 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11095
11096 * gdbreplay.c: Shorten lines of >= 80 columns.
11097 * linux-low.c: Ditto.
11098 * linux-ppc-low.c: Ditto.
11099 * linux-s390-low.c: Ditto.
11100 * linux-sparc-low.c: Ditto.
11101 * linux-x86-low.c: Ditto.
11102 * linux-xtensa-low.c: Ditto.
11103 * mem-break.c: Ditto.
11104 * nto-low.c: Ditto.
11105 * regcache.h: Ditto.
11106 * remote-utils.c: Ditto.
11107 * server.c: Ditto.
11108 * server.h: Ditto.
11109 * thread-db.c: Ditto.
11110 * tracepoint.c: Ditto.
11111 * utils.c: Ditto.
11112 * win32-low.h: Ditto.
11113
11114 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11115
11116 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11117 update.
11118
11119 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11120
11121 * server.c (gdbserver_version): Update copyright year in version
11122 output.
11123 * gdbreplay.c (gdbreplay_version): Ditto.
11124
11125 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11126
11127 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11128 * linux-bfin-low.c: New file.
11129 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11130 PT_DATA_ADDR for BFIN targets.
11131 * Makefile.in (SFILES): Add linux-bfin-low.c.
11132 (clean): Remove reg-bfin.c.
11133 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11134 * README: Mention supported Blackfin targets.
11135
11136 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11137
11138 * .gitignore: New file.
11139
11140 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11141
11142 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11143
11144 2010-10-22 Jie Zhang <jie@codesourcery.com>
11145
11146 * Makefile.in: Add FLAGS_TO_PASS variable.
11147 (install): Remove dependency of install-only and recursively
11148 invoke make for install-only.
11149
11150 2010-10-04 Doug Evans <dje@google.com>
11151
11152 * Makefile.in (uninstall): Use $(DESTDIR).
11153
11154 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11155
11156 PR gdb/11842
11157
11158 * linux-x86-low.c (compat_siginfo_from_siginfo)
11159 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11160 si_code is < 0. Check for si_code == SI_TIMER before checking for
11161 si_code < 0.
11162
11163 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11164
11165 * lynx-i386-low.c: New file.
11166 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11167
11168 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11169
11170 * lynx-low.c (ptrace_request_to_str): Remove handling for
11171 request values that have been removed in LynxOS 5.x.
11172
11173 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11174
11175 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11176 <ptrace.h>
11177
11178 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11179
11180 * configure.ac: Add --enable-inprocess-agent option.
11181 * configure: Rebuilt.
11182
11183 2010-09-06 Yao Qi <yao@codesourcery.com>
11184
11185 * linux-low.c (linux_kill): Remove unused variable.
11186 (linux_stabilize_threads): Likewise.
11187 * server.c (start_inferior): Likewise.
11188 (queue_stop_reply_callback): Likewise.
11189 * tracepoint.c (do_action_at_tracepoint): Likewise.
11190
11191 2010-09-06 Yao Qi <yao@codesourcery.com>
11192
11193 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11194 on return.
11195
11196 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11197
11198 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11199
11200 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11201
11202 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11203 "$(IPA_DEPFILES)".
11204
11205 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11206
11207 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11208 gdbserver/lynx-ppc-low.c: New files.
11209 * Makefile.in (lynx_low_h): New variable.
11210 (lynx-low.o, lynx-ppc-low.o): New rules.
11211 * configure.ac: On LynxOS, link with -lnetinet.
11212 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11213 * configure: regenerate.
11214
11215 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11216
11217 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11218 * configure.ac: Add check for vasprintf and vsnprintf.
11219 * configure, config.in: Regenerate.
11220 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11221
11222 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11223
11224 * gdbreplay.c: Move include of alloca.h up, next to include of
11225 malloc.h.
11226 * server.h: Add include of malloc.h.
11227 * mem-break.c: Remove include of malloc.h.
11228 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11229
11230 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11231
11232 * Makefile.in (memmem.o): Build with -Wno-error.
11233
11234 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11235
11236 * utils.c (xsnprintf): Make non-static.
11237 * server.h: Add xsnprintf declaration.
11238 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11239 replace calls to snprintf by calls to xsnprintf throughout.
11240
11241 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11242
11243 * configure.ac: Add configure check for alloca.
11244 * configure, config.in: Regenerate.
11245 * server.h: Include alloca.h if it exists.
11246 * gdbreplay.c: Include alloca.h if it exists.
11247
11248 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11249
11250 * linux-low.c (__SIGRTMIN): Define if not already defined.
11251 (linux_create_inferior): Check for __ANDROID__ rather than
11252 __SIGRTMIN.
11253 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11254 are already deferred.
11255 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11256 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11257 stopped and already has a pending signal to report.
11258 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11259 a pending signal to report or is moving out of a jump pad.
11260 (linux_init_signals): Check for __ANDROID__ rather than
11261 __SIGRTMIN.
11262
11263 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11264
11265 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11266 debug_threads check. Avoid a linear search when not doing debug
11267 output.
11268
11269 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11270
11271 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11272 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11273 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11274 (process_event): Change local fd's type to gdb_fildes_t.
11275 (create_file_handler): Adjust prototype.
11276 (delete_file_handler): Adjust prototype.
11277 (handle_file_event): Adjust prototype. Use pfildes.
11278 (create_file_event): Adjsut prototype.
11279 * remote-utils.c (remote_desc, listen_desc): Change type to
11280 gdb_fildes_t.
11281 * server.h: New gdb_fildes_t typedef.
11282 [USE_WIN32API]: Include winsock2.h.
11283 (delete_file_handler, add_file_handler): Adjust prototypes.
11284 (pfildes): Declare.
11285 * utils.c (pfildes): New.
11286
11287 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11288
11289 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11290 * configure: Regenerate.
11291
11292 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11293
11294 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11295 (linux_done_accessing_memory): ... this.
11296 (linux_target_ops): Adjust.
11297 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11298 * nto-low.c (nto_target_ops): Adjust comment.
11299 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11300 * spu-low.c (spu_target_ops): Adjust comment.
11301 * target.h (target_ops): Rename unprepare_to_access_memory field
11302 to done_accessing_memory.
11303 (unprepare_to_access_memory): Rename to ...
11304 (done_accessing_memory): ... this.
11305
11306 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11307
11308 * linux-low.c (linux_prepare_to_access_memory): New.
11309 (linux_unprepare_to_access_memory): New.
11310 (linux_target_ops): Install them.
11311 * server.c (read_memory): Rename to ...
11312 (gdb_read_memory): ... this. Use
11313 prepare_to_access_memory/prepare_to_access_memory.
11314 (write_memory): Rename to ...
11315 (gdb_write_memory): ... this. Use
11316 prepare_to_access_memory/prepare_to_access_memory.
11317 (handle_search_memory_1): Adjust.
11318 (process_serial_event): Adjust.
11319 * target.h (struct target_ops): New fields
11320 prepare_to_access_memory and unprepare_to_access_memory.
11321 (prepare_to_access_memory, unprepare_to_access_memory): New.
11322 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11323 prepare_to_access_memory/prepare_to_access_memory.
11324 * nto-low.c (nto_target_ops): Adjust.
11325 * spu-low.c (spu_target_ops): Adjust.
11326 * win32-low.c (win32_target_ops): Adjust.
11327
11328 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11329
11330 * Makefile.in (WARN_CFLAGS): Get it from configure.
11331 (WERROR_CFLAGS): New.
11332 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11333 * configure.ac: Introduce --enable-werror, which adds -Werror to
11334 the compiler command line. Enabled by default. Disable with
11335 --disable-werror. Add -Wdeclaration-after-statement
11336 Wpointer-arith and -Wformat-nonliteral to warning flags.
11337 * configure: Regenerate.
11338
11339 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11340
11341 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11342
11343 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11344
11345 * gdbreplay.c (remote_error): New.
11346 (gdbchar): New.
11347 (expect): Use gdbchar. Check for error reading from GDB.
11348 Clarify sync error output.
11349 (play): Check for errors writing to GDB.
11350 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11351 * remote-utils.c (getpkt): Check for errors writing to the remote
11352 descriptor.
11353
11354 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11355
11356 * linux-low.c (linux_wait_1): Move non-debugging code out of
11357 `debug_threads' control.
11358
11359 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11360
11361 * linux-low.c (linux_wait_1): Don't set last_status here.
11362 * server.c (push_event, queue_stop_reply_callback): Assert we're
11363 not pushing a TARGET_WAITKIND_IGNORE event.
11364 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11365 (myresume, handle_target_event): Set the thread's last_resume_kind
11366 and last_status from the target returned status.
11367
11368 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11369
11370 PR threads/10729
11371
11372 * linux-x86-low.c (update_debug_registers_callback): New.
11373 (i386_dr_low_set_addr): Use it.
11374 (i386_dr_low_get_addr): New.
11375 (i386_dr_low_set_control): Use update_debug_registers_callback.
11376 (i386_dr_low_get_control): New.
11377 (i386_dr_low_get_status): Adjust.
11378 * linux-low.c (linux_stop_lwp): New.
11379 * linux-low.h (linux_stop_lwp): Declare.
11380
11381 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11382 argument instead of a i386_debug_reg_state.
11383 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11384 a i386_debug_reg_state.
11385 (i386_insert_aligned_watchpoint): Adjust.
11386 (i386_remove_aligned_watchpoint): Adjust.
11387 (i386_low_stopped_data_address): Read the debug registers from the
11388 inferior instead of from the mirrors.
11389 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11390 (i386_dr_low_get_addr): Declare.
11391 (i386_dr_low_get_control): Declare.
11392 (i386_dr_low_get_status): Change prototype.
11393
11394 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11395 (i386_dr_low_get_addr): New.
11396 (i386_dr_low_get_control): New.
11397 (i386_dr_low_get_status): Adjust prototype. Return
11398 dr_status_mirror.
11399 (i386_initial_stuff): Clear dr_status_mirror and
11400 dr_control_mirror.
11401 (i386_get_thread_context): Adjust.
11402 (i386_set_thread_context): Adjust.
11403 (i386_thread_added): Adjust.
11404
11405 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11406
11407 * linux-low.h (linux_thread_area): Delete declaration.
11408
11409 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11410
11411 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11412 after its termination.
11413
11414 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11415
11416 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11417 (gdb_wants_all_stopped): Delete.
11418 (linux_wait_1): Don't call them.
11419 * server.c (handle_v_cont): Tag all threads as want-stopped.
11420 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11421 stopped as "client-wants-stopped".
11422
11423 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11424
11425 * Makefile.in (signals_h): New.
11426 (server_h): Depend on it.
11427 (server.o): Don't depend on $(signals_def).
11428 (signals.o): Depend on $(signals_def).
11429
11430 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11431
11432 * Makefile.in (signals_def): New.
11433 (server_h): Append include/gdb/signals.h and signals_def.
11434 (server.o): Append signals_def.
11435
11436 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11437
11438 * server.c (handle_target_event): Use target_signal_to_host for
11439 resume_info.sig initialization.
11440 * target.h (struct thread_resume) <sig>: New comment.
11441
11442 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11443
11444 * server.c (handle_query): strcpy() the returned string from paddress()
11445 instead of sprintf().
11446 * utils.c (paddress): Return phex_nz().
11447
11448 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11449
11450 * server.c (handle_v_cont): Call mourn_inferior if process
11451 just exited.
11452 (myresume): Likewise.
11453
11454 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11455
11456 Static tracepoints, and integration with UST.
11457
11458 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11459 * mem-break.c (uninsert_all_breakpoints)
11460 (reinsert_all_breakpoints): New.
11461 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11462 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11463 (gdb_agent_ust_loaded, helper_thread_id)
11464 (gdb_agent_helper_thread_id): New macros.
11465 (struct ipa_sym_addresses): Add addr_ust_loaded,
11466 addr_helper_thread_id, addr_cmd_buf.
11467 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11468 (in_process_agent_loaded_ust): New.
11469 (write_e_ust_not_loaded): New.
11470 (maybe_write_ipa_ust_not_loaded): New.
11471 (struct collect_static_trace_data_action): New.
11472 (enum tracepoint_type) <static_tracepoint>: New.
11473 (struct tracepoint) <handle>: Mention static tracepoints.
11474 (struct static_tracepoint_ctx): New.
11475 (CMD_BUF_SIZE): New.
11476 (add_tracepoint_action): Handle static tracepoint actions.
11477 (unprobe_marker_at): New.
11478 (clear_installed_tracepoints): Handle static tracepoints.
11479 (cmd_qtdp): Handle static tracepoints.
11480 (probe_marker_at): New.
11481 (cmd_qtstart): Handle static tracepoints.
11482 (response_tracepoint): Handle static tracepoints.
11483 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11484 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11485 (get_context_regcache): Handle static tracepoints.
11486 (do_action_at_tracepoint): Handle static tracepoint actions.
11487 (traceframe_find_block_type): Handle static trace data blocks.
11488 (traceframe_read_sdata): New.
11489 (download_tracepoints): Download static tracepoint actions.
11490 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11491 (GDB_PROBE_NAME): New.
11492 (ust_ops): New.
11493 (GET_UST_SYM): New.
11494 (USTF): New.
11495 (dlsym_ust): New.
11496 (ust_marker_to_static_tracepoint): New.
11497 (gdb_probe): New.
11498 (collect_ust_data_at_tracepoint): New.
11499 (gdb_ust_probe): New.
11500 (UNIX_PATH_MAX, SOCK_DIR): New.
11501 (gdb_ust_connect_sync_socket): New.
11502 (resume_thread, stop_thread): New.
11503 (run_inferior_command): New.
11504 (init_named_socket): New.
11505 (gdb_ust_socket_init): New.
11506 (cstr_to_hexstr): New.
11507 (next_st): New.
11508 (first_marker, next_marker): New.
11509 (response_ust_marker): New.
11510 (cmd_qtfstm, cmd_qtsstm): New.
11511 (unprobe_marker_at, probe_marker_at): New.
11512 (cmd_qtstmat, gdb_ust_thread): New.
11513 (gdb_ust_init): New.
11514 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11515 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11516 (ST_REGENTRY): New.
11517 (x86_64_st_collect_regmap): New.
11518 (X86_64_NUM_ST_COLLECT_GREGS): New.
11519 (AMD64_RIP_REGNUM): New.
11520 (supply_static_tracepoint_registers): New.
11521 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11522 (ST_REGENTRY): New.
11523 (i386_st_collect_regmap): New.
11524 (i386_NUM_ST_COLLECT_GREGS): New.
11525 (supply_static_tracepoint_registers): New.
11526 * server.c (handle_query): Handle qXfer:statictrace:read.
11527 <qSupported>: Report support for StaticTracepoints, and
11528 qXfer:statictrace:read features.
11529 * server.h (traceframe_read_sdata)
11530 (supply_static_tracepoint_registers): Declare.
11531 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11532 (unpack_varlen_hex): Include in IPA build.
11533 * Makefile.in (ustlibs, ustinc): New.
11534 (IPA_OBJS): Add remote-utils-ipa.o.
11535 ($(IPA_LIB)): Link -ldl and -lpthread.
11536 (UST_CFLAGS): New.
11537 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11538 * config.in, configure: Regenerate.
11539
11540 2010-06-20 Ian Lance Taylor <iant@google.com>
11541 Pedro Alves <pedro@codesourcery.com>
11542
11543 * linux-x86-low.c (always_true): Delete.
11544 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11545 trying to fool the compiler with always_true.
11546
11547 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11548
11549 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11550 conditions in gdbserver.
11551
11552 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11553
11554 * spu-low.c (spu_read_memory): Wrap around local store limit.
11555 (spu_write_memory): Likewise.
11556
11557 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11558
11559 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11560 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11561 LONGEST uses.
11562 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11563 uses.
11564 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11565 uses with LONGEST uses.
11566
11567 2010-06-14 Stan Shebs <stan@codesourcery.com>
11568 Pedro Alves <pedro@codesourcery.com>
11569
11570 Bytecode compiler.
11571
11572 * linux-x86-low.c: Include limits.h.
11573 (add_insns): New.
11574 (always_true): New.
11575 (EMIT_ASM): New.
11576 (EMIT_ASM32): New.
11577 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11578 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11579 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11580 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11581 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11582 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11583 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11584 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11585 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11586 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11587 (amd64_emit_void_call_2): New.
11588 (amd64_emit_ops): New.
11589 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11590 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11591 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11592 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11593 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11594 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11595 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11596 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11597 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11598 (i386_emit_stack_adjust, i386_emit_int_call_1)
11599 (i386_emit_void_call_2): New.
11600 (i386_emit_ops): New.
11601 (x86_emit_ops): New.
11602 (the_low_target): Install x86_emit_ops.
11603 * server.h (struct emit_ops): New.
11604 (get_raw_reg_func_addr): Declare.
11605 (current_insn_ptr, emit_error): Declare.
11606 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11607 (set_trace_state_variable_value): New defines.
11608 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11609 addr_get_trace_state_variable_value and
11610 addr_set_trace_state_variable_value.
11611 (symbol_list): New fields for get_raw_reg,
11612 get_trace_state_variable_value and set_trace_state_variable_value.
11613 (condfn): New typedef.
11614 (struct tracepoint): New field `compiled_cond'.
11615 (do_action_at_tracepoint): Clear compiled_cond.
11616 (get_trace_state_variable_value, set_trace_state_variable_value):
11617 Export in the IPA.
11618 (condition_true_at_tracepoint): If there's a compiled condition,
11619 run that.
11620 (current_insn_ptr, emit_error): New globals.
11621 (struct bytecode_address): New.
11622 (get_raw_reg_func_addr): New.
11623 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11624 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11625 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11626 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11627 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11628 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11629 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11630 (compile_tracepoint_condition, compile_bytecodes): New.
11631 * target.h (emit_ops): Forward declare.
11632 (struct target_ops): New field emit_ops.
11633 (target_emit_ops): New.
11634 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11635 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11636 * linux-low.c (linux_emit_ops): New.
11637 (linux_target_ops): Install it.
11638 * linux-low.h (struct linux_target_ops): New field emit_ops.
11639
11640 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11641
11642 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11643 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11644
11645 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11646 Stan Shebs <stan@codesourcery.com>
11647
11648 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11649 (all): Depend on $(extra_libraries).
11650 (install-only): Install the IPA.
11651 (IPA_OBJS, IPA_LIB): New.
11652 (clean): Remove the IPA lib.
11653 (IPAGENT_CFLAGS): New.
11654 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11655 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11656 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11657 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11658 * configure.ac: Check for atomic builtins support in the compiler.
11659 (IPA_DEPFILES, extra_libraries): Define.
11660 * configure.srv (ipa_obj): Add description.
11661 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11662 (i[34567]86-*-linux*): Set ipa_obj.
11663 (x86_64-*-linux*): Set ipa_obj.
11664 * linux-low.c (stabilizing_threads): New.
11665 (supports_fast_tracepoints): New.
11666 (linux_detach): Stabilize threads before detaching.
11667 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11668 the lwp is either not stabilizing, or is moving out of a jump pad.
11669 (linux_fast_tracepoint_collecting): New.
11670 (maybe_move_out_of_jump_pad): New.
11671 (enqueue_one_deferred_signal): New.
11672 (dequeue_one_deferred_signal): New.
11673 (linux_wait_for_event_1): If moving out of a jump pad, defer
11674 pending signals to later.
11675 (linux_stabilize_threads): New.
11676 (linux_wait_1): Check if threads need moving out of jump pads, and
11677 do it if so.
11678 (stuck_in_jump_pad_callback): New.
11679 (move_out_of_jump_pad_callback): New.
11680 (lwp_running): New.
11681 (linux_resume_one_lwp): Handle moving out of jump pads.
11682 (linux_set_resume_request): Dequeue deferred signals.
11683 (need_step_over_p): Also step over fast tracepoint jumps.
11684 (start_step_over): Also uninsert fast tracepoint jumps.
11685 (finish_step_over): Also reinsert fast tracepoint jumps.
11686 (linux_install_fast_tracepoint_jump): New.
11687 (linux_target_ops): Install linux_stabilize_threads and
11688 linux_install_fast_tracepoint_jump_pad.
11689 * linux-low.h (linux_target_ops) <get_thread_area,
11690 install_fast_tracepoint_jump_pad>: New fields.
11691 (struct lwp_info) <collecting_fast_tracepoint,
11692 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11693 (linux_get_thread_area): Declare.
11694 * linux-x86-low.c (jump_insn): New.
11695 (x86_get_thread_area): New.
11696 (append_insns): New.
11697 (push_opcode): New.
11698 (amd64_install_fast_tracepoint_jump_pad): New.
11699 (i386_install_fast_tracepoint_jump_pad): New.
11700 (x86_install_fast_tracepoint_jump_pad): New.
11701 (the_low_target): Install x86_get_thread_area and
11702 x86_install_fast_tracepoint_jump_pad.
11703 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11704 (struct fast_tracepoint_jump): New.
11705 (fast_tracepoint_jump_insn): New.
11706 (fast_tracepoint_jump_shadow): New.
11707 (find_fast_tracepoint_jump_at): New.
11708 (fast_tracepoint_jump_here): New.
11709 (delete_fast_tracepoint_jump): New.
11710 (set_fast_tracepoint_jump): New.
11711 (uninsert_fast_tracepoint_jumps_at): New.
11712 (reinsert_fast_tracepoint_jumps_at): New.
11713 (set_breakpoint_at): Use write_inferior_memory.
11714 (uninsert_raw_breakpoint): Use write_inferior_memory.
11715 (check_mem_read): Mask out fast tracepoint jumps.
11716 (check_mem_write): Mask out fast tracepoint jumps.
11717 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11718 (set_fast_tracepoint_jump): Declare.
11719 (delete_fast_tracepoint_jump)
11720 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11721 (reinsert_fast_tracepoint_jumps_at): Declare.
11722 * regcache.c: Don't compile many functions when building the
11723 in-process agent library.
11724 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11725 the register buffer in the heap.
11726 (free_register_cache): If the register buffer isn't owned by the
11727 regcache, don't free it.
11728 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11729 pre-existing register caches.
11730 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11731 type.
11732 (convert_ascii_to_int): : Constify `from' parameter type.
11733 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11734 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11735 the needed buffer in-place.
11736 (relocate_instruction): New.
11737 * server.c (handle_query) <qSymbols>: If the target supports
11738 tracepoints, give it a chance of looking up symbols. Report
11739 support for fast tracepoints.
11740 (handle_status): Stabilize threads.
11741 (process_serial_event): Adjust.
11742 * server.h (struct fast_tracepoint_jump): Forward declare.
11743 (struct process_info) <fast_tracepoint_jumps>: New field.
11744 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11745 (decode_X_packet, decode_M_packet): Adjust.
11746 (relocate_instruction): Declare.
11747 (in_process_agent_loaded): Declare.
11748 (tracepoint_look_up_symbols): Declare.
11749 (struct fast_tpoint_collect_status): Declare.
11750 (fast_tracepoint_collecting): Declare.
11751 (force_unlock_trace_buffer): Declare.
11752 (handle_tracepoint_bkpts): Declare.
11753 (initialize_low_tracepoint)
11754 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11755 * target.h (struct target_ops) <stabilize_threads,
11756 install_fast_tracepoint_jump_pad>: New fields.
11757 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11758 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11759 [HAVE_STDINT_H]: Include stdint.h.
11760 (trace_debug_1): Rename to ...
11761 (trace_vdebug): ... this.
11762 (trace_debug): Rename to ...
11763 (trace_debug_1): ... this. Add `level' parameter.
11764 (trace_debug): New.
11765 (ATTR_USED, ATTR_NOINLINE): New.
11766 (IP_AGENT_EXPORT): New.
11767 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11768 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11769 (about_to_request_buffer_space, trace_buffer_is_full)
11770 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11771 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11772 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11773 (traceframe_write_count, traceframes_created)
11774 (trace_state_variables)
11775 New renaming defines.
11776 (struct ipa_sym_addresses): New.
11777 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11778 (symbol_list): New.
11779 (ipa_sym_addrs): New.
11780 (all_tracepoint_symbols_looked_up): New.
11781 (in_process_agent_loaded): New.
11782 (write_e_ipa_not_loaded): New.
11783 (maybe_write_ipa_not_loaded): New.
11784 (tracepoint_look_up_symbols): New.
11785 (debug_threads) [IN_PROCESS_AGENT]: New.
11786 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11787 (UNKNOWN_SIDE_EFFECTS): New.
11788 (stop_tracing): New.
11789 (flush_trace_buffer): New.
11790 (stop_tracing_bkpt): New.
11791 (flush_trace_buffer_bkpt): New.
11792 (read_inferior_integer): New.
11793 (read_inferior_uinteger): New.
11794 (read_inferior_data_pointer): New.
11795 (write_inferior_data_pointer): New.
11796 (write_inferior_integer): New.
11797 (write_inferior_uinteger): New.
11798 (struct collect_static_trace_data_action): Delete.
11799 (enum tracepoint_type): New.
11800 (struct tracepoint) <type>: New field `type'.
11801 <actions_str, step_actions, step_actions_str>: Only include in
11802 GDBserver.
11803 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11804 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11805 (tracepoints): Use IP_AGENT_EXPORT.
11806 (last_tracepoint): Don't include in the IPA.
11807 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11808 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11809 (alloced_trace_state_variables): New.
11810 (trace_state_variables): Use IP_AGENT_EXPORT.
11811 (traceframe_t): Delete unused variable.
11812 (circular_trace_buffer): Don't include in the IPA.
11813 (trace_buffer_start): Delete.
11814 (struct trace_buffer_control): New.
11815 (trace_buffer_free): Delete.
11816 (struct ipa_trace_buffer_control): New.
11817 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11818 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11819 New.
11820 (trace_buffer_ctrl): New.
11821 (TRACE_BUFFER_CTRL_CURR): New.
11822 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11823 Reimplement as macros.
11824 (trace_buffer_wrap): Delete.
11825 (traceframe_write_count, traceframe_read_count)
11826 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11827 (struct tracepoint_hit_ctx) <type>: New field.
11828 (struct fast_tracepoint_ctx): New.
11829 (memory_barrier): New.
11830 (cmpxchg): New.
11831 (record_tracepoint_error): Update atomically in the IPA.
11832 (clear_inferior_trace_buffer): New.
11833 (about_to_request_buffer_space): New.
11834 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11835 updating the same buffer.
11836 (add_tracepoint): Default the tracepoint's type to trap
11837 tracepoint, and orig_size to -1.
11838 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11839 internal variables.
11840 (create_trace_state_variable): New parameter `gdb'. Handle it.
11841 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11842 (cmd_qtdp): Handle fast tracepoints.
11843 (cmd_qtdv): Adjust.
11844 (max_jump_pad_size): New.
11845 (gdb_jump_pad_head): New.
11846 (get_jump_space_head): New.
11847 (claim_jump_space): New.
11848 (sort_tracepoints): New.
11849 (MAX_JUMP_SIZE): New.
11850 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11851 IPA.
11852 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11853 support. Upload fast traceframes, and delete internal IPA
11854 breakpoints.
11855 (stop_tracing_handler): New.
11856 (flush_trace_buffer_handler): New.
11857 (cmd_qtstop): Upload fast tracepoints.
11858 (response_tracepoint): Handle fast tracepoints.
11859 (tracepoint_finished_step): Upload fast traceframes. Set the
11860 tracepoint hit context's tracepoint type.
11861 (handle_tracepoint_bkpts): New.
11862 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11863 type. Add comment about fast tracepoints.
11864 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11865 non-existing action_str field.
11866 (get_context_regcache): Handle fast tracepoints.
11867 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11868 to the regcache.
11869 (fast_tracepoint_from_jump_pad_address): New.
11870 (fast_tracepoint_from_ipa_tpoint_address): New.
11871 (collecting_t): New.
11872 (force_unlock_trace_buffer): New.
11873 (fast_tracepoint_collecting): New.
11874 (collecting): New.
11875 (gdb_collect): New.
11876 (write_inferior_data_ptr): New.
11877 (target_tp_heap): New.
11878 (target_malloc): New.
11879 (download_agent_expr): New.
11880 (UALIGN): New.
11881 (download_tracepoints): New.
11882 (download_trace_state_variables): New.
11883 (upload_fast_traceframes): New.
11884 (IPA_FIRST_TRACEFRAME): New.
11885 (IPA_NEXT_TRACEFRAME_1): New.
11886 (IPA_NEXT_TRACEFRAME): New.
11887 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11888 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11889 (gdb_jump_pad_buffer_end): New.
11890 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11891 (initialize_tracepoint): Adjust.
11892 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11893 buffer. Initialize the low module.
11894 * utils.c (PREFIX, TOOLNAME): New.
11895 (malloc_failure): Use PREFIX.
11896 (error): In the IPA, an error causes an exit.
11897 (fatal, warning): Use PREFIX.
11898 (internal_error): Use TOOLNAME.
11899 (NUMCELLS): Increase to 10.
11900 * configure, config.in: Regenerate.
11901
11902 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11903
11904 * server.c (handle_query) <qSupported>: Do two passes over the
11905 qSupported string to avoid nesting strtok.
11906
11907 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11908
11909 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11910 (CDEPS): New.
11911 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11912 -Wl,--dynamic-list.
11913 * configure: Regenerate.
11914 * proc-service.list: New.
11915
11916 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11917
11918 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11919 New comment.
11920
11921 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11922
11923 * gdbreplay.c (remote_open): Check error return from socket() call by
11924 its equality to -1 not by it being negative.
11925 * remote-utils.c (remote_open): Likewise.
11926
11927 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11928
11929 * config.h: Regenerate.
11930
11931 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11932
11933 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11934 doesn't provide PTRACE_GET_THREAD_AREA.
11935
11936 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11937
11938 * linux-m68k-low.c: Include <asm/ptrace.h>
11939 (ps_get_thread_area): Implement.
11940
11941 2010-05-03 Doug Evans <dje@google.com>
11942
11943 * event-loop.c (struct callback_event): New struct.
11944 (callback_list): New global.
11945 (append_callback_event, delete_callback_event): New functions.
11946 (process_callback): New function.
11947 (start_event_loop): Call it.
11948 * remote-utils.c (NOT_SCHEDULED): Define.
11949 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11950 moved out of readchar.
11951 (readchar): Rewrite. Call reschedule before returning.
11952 (reset_readchar): New function.
11953 (remote_close): Call it.
11954 (process_remaining, reschedule): New functions.
11955 * server.h (callback_handler_func): New typedef.
11956 (append_callback_event, delete_callback_event): Declare.
11957
11958 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11959
11960 * proc-service.c (ps_pglobal_lookup): Use
11961 thread_db_look_up_one_symbol.
11962 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11963 parameter. Use it instead of all_symbols_looked_up.
11964 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11965 field.
11966 (all_symbols_looked_up): Don't declare.
11967 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11968 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11969 field.
11970 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11971 Set all_symbols_looked_up here.
11972 (thread_db_look_up_one_symbol): New.
11973 (thread_db_get_tls_address): Adjust.
11974 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11975 thread_db object on the heap, and tentatively set it in the
11976 process structure.
11977 (thread_db_init): Don't set all_symbols_looked_up here.
11978 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11979
11980 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11981
11982 * linux-low.c (linux_kill, linux_detach): Adjust.
11983 (status_pending_p_callback): Remove redundant statement. Check
11984 for !TARGET_WAITIKIND_IGNORE, instead of
11985 TARGET_WAITKIND_STOPPED.
11986 (handle_tracepoints): Make sure LWP is locked. Adjust.
11987 (linux_wait_for_event_1): Adjust.
11988 (linux_cancel_breakpoints): New.
11989 (unsuspend_one_lwp): New.
11990 (unsuspend_all_lwps): New.
11991 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11992 (send_sigstop_callback): Change return type to int, add new
11993 `except' parameter and handle it.
11994 (suspend_and_send_sigstop_callback): New.
11995 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11996 pass them down. If SUSPEND, also increment the lwp's suspend
11997 count.
11998 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11999 (need_step_over_p): Don't consider suspended LWPs.
12000 (start_step_over): Adjust.
12001 (proceed_one_lwp): Change return type to int, add new `except'
12002 parameter and handle it.
12003 (unsuspend_and_proceed_one_lwp): New.
12004 (proceed_all_lwps): Use find_inferior instead of
12005 for_each_inferior.
12006 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12007 also decrement the suspend count of LWPs. Pass `except' down,
12008 instead of hacking its suspend count.
12009 (linux_pause_all): Add `freeze' parameter. Adjust.
12010 (linux_unpause_all): New.
12011 (linux_target_ops): Install linux_unpause_all.
12012 * server.c (handle_status): Adjust.
12013 * target.h (struct target_ops): New fields `unpause_all' and
12014 `cancel_breakpoints'. Add new parameter to `pause_all'.
12015 (pause_all): Add new `freeze' parameter.
12016 (unpause_all): New.
12017 (cancel_breakpoints): New.
12018 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12019 cancel breakpoints.
12020 (cmd_qtstart): Pause threads.
12021 (stop_tracing): Pause threads, and cancel breakpoints.
12022 * win32-low.c (win32_target_ops): Adjust.
12023
12024 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12025
12026 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12027 the inferior right away from here...
12028 (linux_wait_1): ... to here, and adjust to check the thread's
12029 last_resume_kind instead of the lwp's step or stop_expected flags.
12030
12031 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12032
12033 * README: Use consistent `GDB' and `GDBserver' spellings.
12034
12035 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12036
12037 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12038 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12039 (linux_detach_one_lwp): Assume the lwp is stopped.
12040 (any_thread_of): Delete.
12041 (linux_detach): Stop all lwps here. Don't blindly delete all
12042 breakpoints.
12043 (delete_lwp_callback): New.
12044 (linux_mourn): Delete all lwps of the process that is gone.
12045 (linux_wait_1): Don't delete the last lwp of the process here.
12046 * mem-break.h (mark_breakpoints_out): Declare.
12047 * mem-break.c (mark_breakpoints_out): New.
12048 (free_all_breakpoints): Use it.
12049 * server.c (handle_target_event): If the process is gone, mark
12050 breakpoints out.
12051 * thread-db.c (struct thread_db) <create_bp>: New field.
12052 (thread_db_enable_reporting): Fix prototype. Store a thread event
12053 breakpoint reference in the thread_db struct.
12054 (thread_db_load_search): Clear the thread_db object.
12055 (try_thread_db_load_1): Ditto.
12056 (switch_to_process): New.
12057 (disable_thread_event_reporting): Use it.
12058 (remove_thread_event_breakpoints): New.
12059 (thread_db_detach, thread_db_mourn): Use it.
12060
12061 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12062
12063 * linux-low.c (linux_enable_event_reporting): New.
12064 (linux_wait_for_event_1, handle_extended_wait): Use it.
12065
12066 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12067
12068 * linux-low.c (linux_kill_one_lwp, linux_kill)
12069 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12070 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12071 SIGSTOP even if the LWP is stopped.
12072 (send_sigstop_callback): New.
12073 (stop_all_lwps): Use send_sigstop_callback instead.
12074 (linux_resume_one_thread): Adjust.
12075 (proceed_one_lwp): Still proceed an LWP that the client has
12076 requested to stop, if we haven't reported it as stopped yet. Make
12077 sure that LWPs the client want stopped, have a pending SIGSTOP.
12078
12079 2010-04-26 Doug Evans <dje@google.com>
12080
12081 * server.c (handle_general_set): Make static.
12082
12083 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12084 Print received char after testing for error/eof instead of before.
12085 (input_interrupt): Tweak comment.
12086
12087 2010-04-23 Doug Evans <dje@google.com>
12088
12089 * server.c (start_inferior): Print inferior argv if --debug.
12090
12091 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12092
12093 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12094 * nto-x86-low.c: Include server.h
12095
12096 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12097
12098 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12099 be consistent with other sources of this directory.
12100 (init_registers_amd64): Correct name of source file of this function
12101 in the comment.
12102
12103 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12104
12105 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12106 64-bit executables.
12107
12108 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12109
12110 * win32-i386-low.c: Add 64-bit support.
12111 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12112 (init_registers_amd64): Declare.
12113 (mappings): Add 64-bit version of array.
12114 (init_windows_x86): New function.
12115 (the_low_target): Change init_arch field to init_windows_x86.
12116
12117 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12118
12119 * win32-low.c: Adapt to support also 64-bit architecture.
12120 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12121 (get_image_name): Use SIZE_T type for local variable `done'.
12122 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12123 (toolhelp_get_dll_name): Idem.
12124 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12125 Use uintptr_t typecast to avoid warning.
12126 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12127 (handle_exception): Use phex_nz to avoid warning.
12128 (win32_wait): Remove unused local variable `process'.
12129
12130 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12131
12132 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12133 `amd64-avx.o'.
12134
12135 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12136
12137 * configure.ac: Use `ws2_32' library for srv_mingw.
12138 * configure: Regenerate.
12139 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12140 * remote-utils.c: Likewise.
12141
12142 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12143
12144 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12145 if __x86_64__ is defined.
12146
12147 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12148
12149 * configure: Regenerate.
12150
12151 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12152
12153 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12154 * target.h (target_ops): New get_tib_address field.
12155 * win32-low.h (win32_thread_info): Add thread_local_base field.
12156 * win32-low.c (child_add_thread): Add tlb argument.
12157 Set thread_local_base field to TLB.
12158 (get_child_debug_event): Adapt to child_add_thread change.
12159 (win32_get_tib_address): New function.
12160 (win32_target_ops): Set get_tib_address field to
12161 win32_get_tib_address.
12162 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12163
12164 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12165
12166 * linux-low.c (linux_mourn): Also remove the process.
12167 * server.c (handle_target_event): Don't remove the process here.
12168 * nto-low.c (nto_mourn): New.
12169 (nto_target_ops): Install it.
12170 * spu-low.c (spu_mourn): New.
12171 (spu_target_ops): Install it.
12172 * win32-low.c (win32_mourn): New.
12173 (win32_target_ops): Install it.
12174
12175 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12176
12177 * server.h (buffer_xml_printf): Remove redundant `;'.
12178
12179 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12180
12181 * regcache.c (set_register_cache): Invalidate regcaches before
12182 changing the register cache layout.
12183 (regcache_invalidate_one): Allow a NULL regcache.
12184 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12185 regcaches before changing the register cache layout or the target
12186 regsets.
12187
12188 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12189
12190 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12191 variable warning on Linux/x86-64.
12192
12193 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12194
12195 GDBserver disconnected tracing support.
12196
12197 * linux-low.c (linux_remove_process): Delete.
12198 (add_lwp): Don't set last_resume_kind here.
12199 (linux_kill): Use `mourn'.
12200 (linux_detach): Use `thread_db_detach', and `mourn'.
12201 (linux_mourn): New.
12202 (linux_attach_lwp_1): Adjust comment.
12203 (linux_attach): last_resume_kind moved the thread_info; adjust.
12204 (status_pending_p_callback): Adjust.
12205 (linux_wait_for_event_1): Adjust.
12206 (count_events_callback, select_singlestep_lwp_callback)
12207 (select_event_lwp_callback, cancel_breakpoints_callback)
12208 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12209 (proceed_one_lwp): Adjust.
12210 (linux_async): Add debug output.
12211 (linux_thread_stopped): New.
12212 (linux_pause_all): New.
12213 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12214 linux_pause_all.
12215 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12216 (thread_db_free): Delete declaration.
12217 (thread_db_detach, thread_db_mourn): Declare.
12218 * thread-db.c (thread_db_init): Use thread_db_mourn.
12219 (thread_db_free): Delete, split in two.
12220 (disable_thread_event_reporting): New.
12221 (thread_db_detach): New.
12222 (thread_db_mourn): New.
12223
12224 * server.h (struct thread_info) <last_resume_kind>: New field.
12225 <attached>: Add comment.
12226 <gdb_detached>: New field.
12227 (handler_func): Change return type to int.
12228 (handle_serial_event, handle_target_event): Ditto.
12229 (gdb_connected): Declare.
12230 (tracing): Delete.
12231 (disconnected_tracing): Declare.
12232 (stop_tracing): Declare.
12233
12234 * server.c (handle_query) <qSupported>: Report support for
12235 disconnected tracing.
12236 (queue_stop_reply_callback): Account for running threads.
12237 (gdb_wants_thread_stopped): New.
12238 (gdb_wants_all_threads_stopped): New.
12239 (gdb_reattached_process): New.
12240 (handle_status): Clear the `gdb_detached' flag of all processes.
12241 In all-stop, stop all threads.
12242 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12243 (process_serial_event): If the remote connection breaks, or if an
12244 exit was forced with "monitor exit", force an event loop exit.
12245 Handle disconnected tracing on detach.
12246 (handle_serial_event): Adjust.
12247 (handle_target_event): If GDB isn't connected, forward events back
12248 to the inferior, unless the last process exited, in which case,
12249 exit gdbserver. Adjust interface.
12250
12251 * remote-utils.c (remote_open): Don't block in accept. Instead
12252 register an event loop source on the listen socket file
12253 descriptor. Refactor bits into ...
12254 (listen_desc): ... this new global.
12255 (gdb_connected): ... this new function.
12256 (enable_async_notification): ... this new function.
12257 (handle_accept_event): ... this new function.
12258 (remote_close): Clear remote_desc.
12259
12260 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12261
12262 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12263 New fields.
12264 (mourn_inferior): Define.
12265 (target_process_qsupported): Avoid the dangling else problem.
12266 (thread_stopped): Define.
12267 (pause_all): Define.
12268 (target_waitstatus_to_string): Declare.
12269 * target.c (target_waitstatus_to_string): New.
12270
12271 * tracepoint.c (tracing): Make extern.
12272 (disconnected_tracing): New.
12273 (stop_tracing): Make extern. Handle tracing stops due to GDB
12274 disconnecting.
12275 (cmd_qtdisconnected): New.
12276 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12277 (handle_tracepoint_general_set): Handle QTDisconnected.
12278
12279 * event-loop.c (event_handler_func): Change return type to int.
12280 (process_event): Bail out if the event handler wants the event
12281 loop to stop.
12282 (handle_file_event): Ditto.
12283 (start_event_loop): Bail out if the event handler wants the event
12284 loop to stop.
12285
12286 * nto-low.c (nto_target_ops): Adjust.
12287 * spu-low.c (spu_wait): Don't remove the process here.
12288 (spu_target_ops): Adjust.
12289 * win32-low.c (win32_wait): Don't remove the process here.
12290 (win32_target_ops): Adjust.
12291
12292 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12293
12294 * regcache.c (realloc_register_cache): Invalidate inferior's
12295 regcache before recreating it.
12296
12297 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12298
12299 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12300
12301 2010-04-09 Stan Shebs <stan@codesourcery.com>
12302 Pedro Alves <pedro@codesourcery.com>
12303
12304 * server.h (LONGEST): New.
12305 (struct thread_info) <while_stepping>: New field.
12306 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12307 Declare.
12308 (initialize_tracepoint, handle_tracepoint_general_set)
12309 (handle_tracepoint_query, tracepoint_finished_step)
12310 (tracepoint_was_hit, release_while_stepping_state_list):
12311 (current_traceframe): Declare.
12312 * server.c (handle_general_set): Handle tracepoint packets.
12313 (read_memory): New.
12314 (write_memory): New.
12315 (handle_search_memory_1): Use read_memory.
12316 (handle_query): Report support for conditional tracepoints, trace
12317 state variables, and tracepoint sources. Handle tracepoint
12318 queries.
12319 (main): Initialize the tracepoints module.
12320 (process_serial_event): Handle traceframe reads/writes.
12321
12322 * linux-low.c (handle_tracepoints): New.
12323 (linux_wait_1): Call it.
12324 (linux_resume_one_lwp): Handle while-stepping.
12325 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12326 (linux_target_ops): Install them.
12327 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12328 New field.
12329 * linux-x86-low.c (x86_supports_tracepoints): New.
12330 (the_low_target). Install it.
12331
12332 * mem-break.h (delete_breakpoint): Declare.
12333 * mem-break.c (delete_breakpoint): Make external.
12334
12335 * target.h (struct target_ops): Add `supports_tracepoints',
12336 `read_pc', and `write_pc' fields.
12337 (target_supports_tracepoints): Define.
12338 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12339 (phex_nz): New.
12340
12341 * regcache.h (struct regcache) <registers_owned>: New field.
12342 (init_register_cache, regcache_cpy): Declare.
12343 (regcache_read_pc, regcache_write_pc): Declare.
12344 (register_cache_size): Declare.
12345 (supply_regblock): Declare.
12346 * regcache.c (init_register_cache): New.
12347 (new_register_cache): Use it.
12348 (regcache_cpy): New.
12349 (register_cache_size): New.
12350 (supply_regblock): New.
12351 (regcache_read_pc, regcache_write_pc): New.
12352
12353 * tracepoint.c: New.
12354
12355 * Makefile.in (OBS): Add tracepoint.o.
12356 (tracepoint.o): New rule.
12357
12358 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12359
12360 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12361 (i386-mmx.o): New.
12362 (i386-mmx.c): Likewise.
12363 (i386-mmx-linux.o): Likewise.
12364 (i386-mmx-linux.c): Likewise.
12365
12366 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12367 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12368 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12369 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12370
12371 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12372 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12373 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12374
12375 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12376
12377 * Makefile.in (clean): Updated.
12378 (i386-avx.o): New.
12379 (i386-avx.c): Likewise.
12380 (i386-avx-linux.o): Likewise.
12381 (i386-avx-linux.c): Likewise.
12382 (amd64-avx.o): Likewise.
12383 (amd64-avx.c): Likewise.
12384 (amd64-avx-linux.o): Likewise.
12385 (amd64-avx-linux.c): Likewise.
12386
12387 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12388 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12389 (srv_amd64_regobj): Add amd64-avx.o.
12390 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12391 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12392 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12393 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12394 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12395 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12396 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12397
12398 * i387-fp.c: Include "i386-xstate.h".
12399 (i387_xsave): New.
12400 (i387_cache_to_xsave): Likewise.
12401 (i387_xsave_to_cache): Likewise.
12402 (x86_xcr0): Likewise.
12403
12404 * i387-fp.h (i387_cache_to_xsave): Likewise.
12405 (i387_xsave_to_cache): Likewise.
12406 (x86_xcr0): Likewise.
12407
12408 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12409 * linux-crisv32-low.c (target_regsets): Likewise.
12410 * linux-m68k-low.c (target_regsets): Likewise.
12411 * linux-mips-low.c (target_regsets): Likewise.
12412 * linux-ppc-low.c (target_regsets): Likewise.
12413 * linux-s390-low.c (target_regsets): Likewise.
12414 * linux-sh-low.c (target_regsets): Likewise.
12415 * linux-sparc-low.c (target_regsets): Likewise.
12416 * linux-xtensa-low.c (target_regsets): Likewise.
12417
12418 * linux-low.c: Include <sys/uio.h>.
12419 (regsets_fetch_inferior_registers): Support nt_type.
12420 (regsets_store_inferior_registers): Likewise.
12421 (linux_process_qsupported): New.
12422 (linux_target_ops): Add linux_process_qsupported.
12423
12424 * linux-low.h (regset_info): Add nt_type.
12425 (linux_target_ops): Add process_qsupported.
12426
12427 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12428 and <sys/uio.h>.
12429 (init_registers_i386_avx_linux): New.
12430 (init_registers_amd64_avx_linux): Likewise.
12431 (xmltarget_i386_linux_no_xml): Likewise.
12432 (xmltarget_amd64_linux_no_xml): Likewise.
12433 (PTRACE_GETREGSET): Likewise.
12434 (PTRACE_SETREGSET): Likewise.
12435 (x86_fill_xstateregset): Likewise.
12436 (x86_store_xstateregset): Likewise.
12437 (use_xml): Likewise.
12438 (x86_linux_update_xmltarget): Likewise.
12439 (x86_linux_process_qsupported): Likewise.
12440 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12441 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12442 init_registers_i386_linux here. Call
12443 x86_linux_update_xmltarget.
12444 (the_low_target): Add x86_linux_process_qsupported.
12445
12446 * server.c (handle_query): Call target_process_qsupported.
12447
12448 * target.h (target_ops): Add process_qsupported.
12449 (target_process_qsupported): New.
12450
12451 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12452
12453 * inferiors.c (add_thread): Set last_status kind to
12454 TARGET_WAITKIND_IGNORE.
12455 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12456 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12457 (linux_wait_1): Move `thread' local definition to block that uses
12458 it. Don't NULL initialize `event_child'.
12459 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12460 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12461 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12462
12463 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12464
12465 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12466 an extended waitstatus, or by a watchpoint.
12467 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12468 thread was stepping or has been stopped by a watchpoint.
12469
12470 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12471
12472 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12473 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12474 of another, then delete the previous, and validate all
12475 breakpoints.
12476 (validate_inserted_breakpoint): New.
12477 (delete_disabled_breakpoints): New.
12478 (validate_breakpoints): New.
12479 (check_mem_read): Validate breakpoints before trusting their
12480 shadow. Delete disabled breakpoints.
12481 (check_mem_write): Validate breakpoints before trusting they
12482 should be inserted. Delete disabled breakpoints.
12483 * mem-break.h (validate_breakpoints):
12484 * server.c (handle_query): Validate breakpoints when we see a
12485 qSymbol query.
12486
12487 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12488
12489 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12490 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12491 if we could tell there's a GDB breakpoint at stop_pc.
12492 (need_step_over_p): Don't do a step over if we find a GDB
12493 breakpoint at the resume PC.
12494
12495 * mem-break.c (struct raw_breakpoint): New.
12496 (enum bkpt_type): New type `gdb_breakpoint'.
12497 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12498 fields. New field `raw'.
12499 (find_raw_breakpoint_at): New.
12500 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12501 breakpoint instead.
12502 (set_breakpoint_at): Adjust.
12503 (delete_raw_breakpoint): New.
12504 (release_breakpoint): New.
12505 (delete_breakpoint): Rename to...
12506 (delete_breakpoint_1): ... this. Add proc parameter. Use
12507 release_breakpoint. Return ENOENT.
12508 (delete_breakpoint): Reimplement.
12509 (find_breakpoint_at): Delete.
12510 (find_gdb_breakpoint_at): New.
12511 (delete_breakpoint_at): Delete.
12512 (set_gdb_breakpoint_at): New.
12513 (delete_gdb_breakpoint_at): New.
12514 (gdb_breakpoint_here): New.
12515 (set_reinsert_breakpoint): Use release_breakpoint.
12516 (uninsert_breakpoint): Rename to ...
12517 (uninsert_raw_breakpoint): ... this.
12518 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12519 (reinsert_raw_breakpoint): Change parameter type to
12520 raw_breakpoint.
12521 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12522 instead.
12523 (check_breakpoints): Adjust. Use release_breakpoint.
12524 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12525 (breakpoint_inserted_here): Ditto.
12526 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12527 Don't trust the breakpoint's shadow if it is not inserted.
12528 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12529 (delete_all_breakpoints): Adjust.
12530 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12531 use delete_breakpoint_1.
12532
12533 * mem-break.h (breakpoints_supported): Delete declaration.
12534 (set_gdb_breakpoint_at): Declare.
12535 (gdb_breakpoint_here): Declare.
12536 (delete_breakpoint_at): Delete.
12537 (delete_gdb_breakpoint_at): Declare.
12538
12539 * server.h (struct raw_breakpoint): Forward declare.
12540 (struct process_info): New field `raw_breakpoints'.
12541
12542 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12543 breakpoints.
12544
12545 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12546
12547 * linux-low.c (status_pending_p_callback): Fix comment.
12548 (linux_wait_for_event_1): Move most of the internal breakpoint
12549 handling from here...
12550 (linux_wait_1): ... to here.
12551 (count_events_callback): New.
12552 (select_singlestep_lwp_callback): New.
12553 (select_event_lwp_callback): New.
12554 (cancel_breakpoints_callback): New.
12555 (select_event_lwp): New.
12556 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12557 priority to all LWPs that have had events that should be reported
12558 to the client. Cancel breakpoints when about to reporting the
12559 event to the client, not while stopping lwps. No longer cancel
12560 finished single-steps here.
12561 (cancel_finished_single_step): Delete.
12562 (cancel_finished_single_steps): Delete.
12563
12564 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12565
12566 * mem-break.c (enum bkpt_type): New.
12567 (struct breakpoint): New field `type'.
12568 (set_breakpoint_at): Change return type to struct breakpoint
12569 pointer. Set type to `other_breakpoint' by default.
12570 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12571 in the breakpoint list.
12572 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12573 (reinsert_breakpoint): Rename to ...
12574 (reinsert_raw_breakpoint): ... this.
12575 (reinsert_breakpoints_at): Adjust.
12576 * mem-break.h (struct breakpoint): Declare.
12577 (set_breakpoint_at): Change return type to struct breakpoint
12578 pointer.
12579
12580 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12581
12582 * server.c (handle_query): Assign, not compare.
12583
12584 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12585
12586 Teach linux gdbserver to step-over-breakpoints.
12587
12588 * linux-low.c (can_hardware_single_step): New.
12589 (supports_breakpoints): New.
12590 (handle_extended_wait): If stopping threads, read the stop pc of
12591 the new cloned LWP.
12592 (get_pc): New.
12593 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12594 low target doesn't support retrieving the PC.
12595 (add_lwp): Set last_resume_kind to resume_continue.
12596 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12597 (linux_attach): Don't clear stop_expected. Set the lwp's
12598 last_resume_kind to resume_stop.
12599 (linux_detach_one_lwp): Don't check for removed breakpoints.
12600 (check_removed_breakpoint): Delete.
12601 (status_pending_p): Rename to ...
12602 (status_pending_p_callback): ... this. Don't check for removed
12603 breakpoints. Don't consider threads that are stopped from GDB's
12604 perspective.
12605 (linux_wait_for_lwp): Always read the stop_pc here.
12606 (cancel_breakpoint): New.
12607 (step_over_bkpt): New global.
12608 (linux_wait_for_event_1): Implement stepping over breakpoints.
12609 (gdb_wants_lwp_stopped): New.
12610 (gdb_wants_all_stopped): New.
12611 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12612 single-step traps here. Store the thread's last reported target
12613 wait status.
12614 (send_sigstop): Don't clear stop_expected. Always set it,
12615 instead.
12616 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12617 (cancel_finished_single_step): New.
12618 (cancel_finished_single_steps): New.
12619 (wait_for_sigstop): Don't cancel finished single-step traps here.
12620 (linux_resume_one_lwp): Don't check for removed breakpoints.
12621 Don't set `step' on non-hardware step archs.
12622 (linux_set_resume_request): Ignore resume_stop requests if already
12623 stopping or stopped. Set the lwp's last_resume_kind.
12624 (resume_status_pending_p): Don't check for removed breakpoints.
12625 (need_step_over_p): New.
12626 (start_step_over): New.
12627 (finish_step_over): New.
12628 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12629 requests. Clear the thread's last reported target waitstatus.
12630 Don't use the `suspended' flag. Don't consider pending breakpoints.
12631 (linux_resume): Start a step-over if necessary.
12632 (proceed_one_lwp): New.
12633 (proceed_all_lwps): New.
12634 (unstop_all_lwps): New.
12635 * linux-low.h (struct lwp_info): Rewrite comment for the
12636 `suspended' flag. Add the `stop_pc' field. Delete the
12637 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12638 Add `'last_resume_kind' and `need_step_over' fields.
12639 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12640 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12641 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12642 (set_raw_breakpoint_at): New.
12643 (set_breakpoint_at): Rewrite to use it.
12644 (reinsert_breakpoint_handler): Delete.
12645 (set_reinsert_breakpoint): New.
12646 (reinsert_breakpoint_by_bp): Delete.
12647 (delete_reinsert_breakpoints): New.
12648 (uninsert_breakpoint): Rewrite.
12649 (uninsert_breakpoints_at): New.
12650 (reinsert_breakpoint): Rewrite.
12651 (reinsert_breakpoints_at): New.
12652 (check_breakpoints): Rewrite.
12653 (breakpoint_here): New.
12654 (breakpoint_inserted_here): New.
12655 (check_mem_read): Adjust.
12656 * mem-break.h (breakpoints_supported, breakpoint_here)
12657 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12658 (reinsert_breakpoint_by_bp): Delete declaration.
12659 (delete_reinsert_breakpoints): Declare.
12660 (reinsert_breakpoint): Delete declaration.
12661 (reinsert_breakpoints_at): Declare.
12662 (uninsert_breakpoint): Delete declaration.
12663 (uninsert_breakpoints_at): Declare.
12664 (check_breakpoints): Adjust prototype.
12665 * server.h: Adjust include order.
12666 (struct thread_info): Declare here. Add a `last_status' field.
12667
12668 2010-03-23 Michael Snyder <msnyder@vmware.com>
12669
12670 * server.c (crc32): New function.
12671 (handle_query): Add handling for 'qCRC:' request.
12672
12673 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12674
12675 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12676 lwp had been stopped by a watchpoint.
12677
12678 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12679
12680 * server.h (internal_error): Declare.
12681 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12682 * utils.c (internal_error): New function.
12683
12684 2010-03-15 Andreas Schwab <schwab@redhat.com>
12685
12686 * configure.srv: Fix typo setting srv_regobj.
12687
12688 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12689
12690 * linux-low.c (fetch_register): Avoid passing a non string literal
12691 format to `error'.
12692 (usr_store_inferior_registers): Ditto.
12693
12694 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12695
12696 * linux-low.c (linux_write_memory): Bail out early if peeking
12697 memory failed.
12698
12699 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12700
12701 * linux-low.h (struct lwp_info): New fields
12702 `stopped_by_watchpoint' and `stopped_data_address'.
12703 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12704 here, and cache them in the lwp object.
12705 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12706 directly.
12707 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12708 field.
12709 (linux_stopped_by_watchpoint): Rewrite.
12710 (linux_stopped_data_address): Rewrite.
12711
12712 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12713
12714 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12715 switching the current inferior, not before.
12716
12717 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12718
12719 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12720 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12721 i386-linux.c and amd64-linux.c.
12722 (reg-i386.o): Removed.
12723 (reg-i386.c): Likewise.
12724 (reg-i386-linux.o): Likewise.
12725 (reg-i386-linux.c): Likewise.
12726 (reg-x86-64.o): Likewise.
12727 (reg-x86-64.c): Likewise.
12728 (reg-x86-64-linux.o): Likewise.
12729 (reg-x86-64-linux.c): Likewise.
12730 (i386.o): New.
12731 (i386.c): Likewise.
12732 (i386-linux.o): Likewise.
12733 (i386-linux.c): Likewise.
12734 (amd64.o): Likewise.
12735 (amd64.c): Likewise.
12736 (amd64-linux.o): Likewise.
12737 (amd64-linux.c): Likewise.
12738
12739 * configure.srv (srv_i386_regobj): New.
12740 (srv_i386_linux_regobj): Likewise.
12741 (srv_amd64_regobj): Likewise.
12742 (srv_amd64_linux_regobj): Likewise.
12743 (srv_i386_32bit_xmlfiles): Likewise.
12744 (srv_i386_64bit_xmlfiles): Likewise.
12745 (srv_i386_xmlfiles): Likewise.
12746 (srv_amd64_xmlfiles): Likewise.
12747 (srv_i386_linux_xmlfiles): Likewise.
12748 (srv_amd64_linux_xmlfiles): Likewise.
12749 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12750 srv_xmlfiles to $srv_i386_xmlfiles.
12751 (i[34567]86-*-mingw32ce*): Likewise.
12752 (i[34567]86-*-mingw*): Likewise.
12753 (i[34567]86-*-nto*): Likewise.
12754 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12755 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12756 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12757 (x86_64-*-linux*): Likewise.
12758
12759 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12760 (init_registers_amd64_linux): New.
12761 (x86_arch_setup): Replace init_registers_x86_64_linux with
12762 init_registers_amd64_linux.
12763
12764 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12765
12766 * configure.ac: Check for libdl. If it is not available link against
12767 static libthread_db.
12768 * configure: Regenerate.
12769
12770 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12771
12772 PR9605
12773
12774 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12775 handing a read watchpoint.
12776 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12777
12778 2010-02-12 Doug Evans <dje@google.com>
12779
12780 * linux-low.c (linux_supports_tracefork_flag): Document.
12781 (linux_look_up_symbols): Add comment.
12782
12783 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12784
12785 * regcache.c (supply_register): Clear regcache if buf is NULL.
12786
12787 2010-02-02 Nicolas Roche <roche@sourceware.org>
12788 Joel Brobecker <brobecker@adacore.com>
12789
12790 * inferiors.c (find_inferior): Add function documentation.
12791 (unloaded_dll): Handle the case where the unloaded dll has not
12792 been previously registered in the dll list.
12793
12794 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12795
12796 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12797 (thumb2_breakpoint): New.
12798 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12799
12800 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12801
12802 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12803 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12804 breakpoints.
12805
12806 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12807
12808 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12809
12810 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12811
12812 * linux-s390-low.c (s390_collect_ptrace_register)
12813 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12814
12815 2010-01-21 Doug Evans <dje@google.com>
12816
12817 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12818 (PTRACE_ARG4_TYPE): New macro.
12819 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12820 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12821 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12822 (usr_store_inferior_registers): Ditto.
12823 (linux_read_memory, linux_write_memory): Ditto.
12824 (linux_test_for_tracefork): Ditto.
12825
12826 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12827 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12828
12829 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12830
12831 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12832 target.
12833
12834 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12835
12836 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12837 prototype to take a regcache. Adjust.
12838
12839 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12840
12841 * regcache.h (struct thread_info): Forward declare.
12842 (struct regcache): New.
12843 (new_register_cache): Adjust prototype.
12844 (get_thread_regcache): Declare.
12845 (free_register_cache): Adjust prototype.
12846 (registers_to_string, registers_from_string): Ditto.
12847 (supply_register, supply_register_by_name, collect_register)
12848 (collect_register_as_string, collect_register_by_name): Ditto.
12849 * regcache.c (struct inferior_regcache_data): Delete.
12850 (get_regcache): Rename to ...
12851 (get_thread_regcache): ... this. Adjust. Switch inferior before
12852 fetching registers.
12853 (regcache_invalidate_one): Adjust.
12854 (regcache_invalidate): Fix prototype.
12855 (new_register_cache): Return the new register cache.
12856 (free_register_cache): Change prototype.
12857 (realloc_register_cache): Adjust.
12858 (registers_to_string): Change prototype to take a regcache. Adjust.
12859 (registers_from_string): Ditto.
12860 (register_data): Ditto.
12861 (supply_register): Ditto.
12862 (supply_register_by_name): Ditto.
12863 (collect_register): Ditto.
12864 (collect_register_as_string): Ditto.
12865 (collect_register_by_name): Ditto.
12866 * server.c (process_serial_event): Adjust.
12867 * linux-low.h (regset_fill_func, regset_store_func): Change
12868 prototype.
12869 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12870 Change prototype.
12871 * linux-low.c (get_stop_pc): Adjust.
12872 (check_removed_breakpoint): Adjust.
12873 (linux_wait_for_event): Adjust.
12874 (linux_resume_one_lwp): Adjust.
12875 (fetch_register): Add regcache parameter. Adjust.
12876 (usr_store_inferior_registers): Ditto.
12877 (regsets_fetch_inferior_registers): Ditto.
12878 (regsets_store_inferior_registers): Ditto.
12879 (linux_fetch_registers, linux_store_registers): Ditto.
12880 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12881 regcache. Adjust.
12882 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12883 Ditto.
12884 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12885 prototype to take a regcache.
12886 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12887 * remote-utils.c (convert_ascii_to_int, outreg)
12888 (prepare_resume_reply): Change prototype to take a regcache.
12889 Adjust.
12890 * target.h (struct target_ops) <fetch_registers, store_registers>:
12891 Change prototype to take a regcache.
12892 (fetch_inferior_registers, store_inferior_registers): Change
12893 prototype to take a regcache. Adjust.
12894 * proc-service.c (ps_lgetregs): Adjust.
12895 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12896 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12897 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12898 take a regcache. Adjust.
12899 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12900 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12901 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12902 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12903 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12904 (cris_cannot_fetch_register):
12905 (cris_breakpoint_at): Change prototype to take a regcache.
12906 Adjust.
12907 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12908 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12909 to take a regcache. Adjust.
12910 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12911 Adjust.
12912 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12913 take a regcache. Adjust.
12914 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12915 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12916 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12917 * linux-mips-low.c (mips_get_pc):
12918 (mips_set_pc): Change prototype to take a regcache. Adjust.
12919 (mips_reinsert_addr): Adjust.
12920 (mips_collect_register): Change prototype to take a regcache.
12921 Adjust.
12922 (mips_supply_register):
12923 (mips_collect_register_32bit, mips_supply_register_32bit)
12924 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12925 (mips_store_fpregset): Ditto.
12926 * linux-ppc-low.c (ppc_supply_ptrace_register)
12927 (ppc_supply_ptrace_register): Ditto.
12928 (parse_spufs_run): Adjust.
12929 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12930 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12931 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12932 take a regcache. Adjust.
12933 * linux-s390-low.c (s390_collect_ptrace_register)
12934 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12935 (s390_set_pc): Change prototype to take a regcache. Adjust.
12936 (s390_arch_setup): Adjust.
12937 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12938 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12939 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12940 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12941 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12942 regcache. Adjust.
12943 (sparc_breakpoint_at): Adjust.
12944 * linux-xtensa-low.c (xtensa_fill_gregset):
12945 (xtensa_store_gregset):
12946 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12947 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12948 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12949 prototype to take a regcache. Adjust.
12950 * win32-arm-low.c (arm_fetch_inferior_register)
12951 (arm_store_inferior_register): Change prototype to take a
12952 regcache. Adjust.
12953 * win32-i386-low.c (i386_fetch_inferior_register)
12954 (i386_store_inferior_register): Change prototype to take a
12955 regcache. Adjust.
12956 * win32-low.c (child_fetch_inferior_registers)
12957 (child_store_inferior_registers): Change prototype to take a
12958 regcache. Adjust.
12959 (win32_wait): Adjust.
12960 (win32_fetch_inferior_registers): Change prototype to take a
12961 regcache. Adjust.
12962 (win32_store_inferior_registers): Adjust.
12963 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12964 store_inferior_register>: Change prototype to take a regcache.
12965
12966 2010-01-20 Doug Evans <dje@google.com>
12967
12968 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12969 #ifdef.
12970 (linux_wait_for_event1, linux_init_signals): Ditto.
12971 (W_STOPCODE): Provide definition if missing.
12972
12973 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12974
12975 * linux-low.c (linux_core_of_thread): New.
12976 (compare_ints, show_process, list_threads): New.
12977 (linux_qxfer_osdata): Report threads and cores.
12978 (linux_target_op): Register linux_core_of_thread.
12979 * remote-utils.c (prepare_resume_reply): Report the core.
12980 (buffer_xml_printf): Support %d specifier.
12981 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12982 New.
12983 (handle_query): Handle qXfer:threads. Announce availability
12984 thereof.
12985 * target.h (struct target_ops): New field core_of_thread.
12986
12987 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12988
12989 * Makefile.in (clean): Remove new generated files.
12990 (reg-s390.o, reg-s390.c): Remove rules.
12991 (reg-s390x.o, reg-s390x.c): Likewise.
12992 (s390-linux32.o, s390-linux32.c): Add rules.
12993 (s390-linux64.o, s390-linux64.c): Likewise.
12994 (s390x-linux64.o, s390x-linux64.c): Likewise.
12995 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12996 * linux-s390-low.c: Include <elf.h>.
12997 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12998 (init_registers_s390): Remove prototype.
12999 (init_registers_s390x): Likewise.
13000 (init_registers_s390_linux32): Add prototype.
13001 (init_registers_s390_linux64): Likewise.
13002 (init_registers_s390x_linux64): Likewise.
13003 (s390_num_regs_3264): New define.
13004 (s390_regmap_3264): New global variable.
13005 (s390_cannot_fetch_register): Remove obsolete check.
13006 (s390_cannot_store_register): Likewise.
13007 (s390_collect_ptrace_register): Handle upper/lower register halves.
13008 (s390_supply_ptrace_register): Likewise.
13009 (s390_fill_gregset): Update to register number changes.
13010 (s390_get_hwcap): New routine.
13011 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13012 Install appropriate regmap and register set.
13013
13014 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13015
13016 * server.c (gdbserver_version): Update copyright year to 2010.
13017 * gdbreplay.c (gdbreplay_version): Likewise.
13018
13019 2009-12-28 Doug Evans <dje@google.com>
13020
13021 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13022 elf/external.h. Include <elf.h> instead but only if necessary.
13023
13024 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13025
13026 * linux-low.c (linux_remove_process): Remove `detaching'
13027 parameter. Don't release/detach from thread_db here.
13028 (linux_kill): Release/detach from thread_db here, ...
13029 (linux_detach): ... and here, before actually detaching.
13030 (linux_wait_1): ... and here, when a process exits.
13031 * thread-db.c (any_thread_of): New.
13032 (thread_db_free): Switch the current inferior to a thread of the
13033 passed in process.
13034
13035 2009-12-21 Doug Evans <dje@google.com>
13036
13037 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13038
13039 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13040 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13041 warning ifndef __NR_tkill. Move setting of errno there too.
13042 Delete unnecessary resetting of errno after syscall.
13043 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13044
13045 * configure.ac: Check for dladdr.
13046 * config.in: Regenerate.
13047 * configure: Regenerate.
13048 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13049 (try_thread_db_load): Update.
13050
13051 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13052
13053 2009-12-18 Doug Evans <dje@google.com>
13054
13055 * event-loop.c: Include unistd.h if it exists.
13056
13057 * linux-low.c (my_waitpid): Move definition away from being in
13058 between linux_tracefork_child/linux_test_for_tracefork.
13059
13060 * gdb_proc_service.h (psaddr_t): Fix type.
13061 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13062 signature to match glibc.
13063
13064 2009-12-16 Doug Evans <dje@google.com>
13065
13066 * linux-low.c (linux_read_memory): Fix argument to read.
13067
13068 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13069
13070 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13071 events, don't leave current_inferior pointing at null.
13072
13073 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13074
13075 * win32-low.c (LOG): Delete.
13076 (OUTMSG): Output to stderr.
13077 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13078 on compile time LOG macro.
13079 (win32_wait): Fix debug output.
13080
13081 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13082
13083 * win32-low.c (win32_add_one_solib): If the dll name is
13084 "ntdll.dll", prepend the system directory to the dll path.
13085
13086 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13087
13088 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13089
13090 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13091 Vladimir Prus <vladimir@codesourcery.com>
13092
13093 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13094 * configure.ac: Check for __mcoldfire__ and set
13095 gdb_cv_m68k_is_coldfire.
13096 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13097 reg-cf.o and reg-m68k.o.
13098 * configure: Regenerated.
13099
13100 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13101
13102 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13103 Pass it to thread_db_free.
13104 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13105 proper `detaching' argument to linux_remove_process.
13106 * linux-low.h (thread_db_free): Add `detaching' parameter.
13107 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13108 to thread_db_free.
13109 (thread_db_free): Add `detaching' parameter. Only
13110 call td_ta_clear_event if detaching from process.
13111
13112 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13113
13114 * thread-db.c (thread_db_free): Fix typo.
13115
13116 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13117
13118 PR gdb/10838
13119 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13120
13121 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13122
13123 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13124 with an i686 compiler.
13125 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13126 needed.
13127 * configure: Rebuilt.
13128
13129 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13130
13131 PR gdb/10783
13132
13133 * server.c (handle_search_memory_1): Correct read_addr initialization
13134 in loop for searching subsequent chunks.
13135
13136 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13137
13138 * configure.ac: New --with-libthread-db option.
13139 * thread-db.c: Allow direct dependence on libthread_db.
13140 (thread_db_free): Adjust.
13141 * config.in: Regenerate.
13142 * configure: Likewise.
13143
13144 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13145
13146 PR gdb/10757
13147 * thread-db.c (attach_thread): New function.
13148 (maybe_attach_thread): Return success/failure.
13149 (find_new_threads_callback): Adjust.
13150 (thread_db_find_new_threads): Loop until no new threads.
13151
13152 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13153
13154 * proc-service.c (ps_lgetregs): Formatting.
13155
13156 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13157
13158 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13159 * configure.ac: Adjust.
13160 * linux-low.h (struct process_info_private): Move members to struct
13161 thread_db.
13162 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13163 * linux-low.c (linux_remove_process): Adjust.
13164 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13165 * server.c (handle_query): Move code ...
13166 (handle_monitor_command): ... here. New function.
13167 * target.h (struct target_ops): New member.
13168 * thread-db.c (struct thread_db): New.
13169 (libthread_db_search_path): New variable.
13170 (thread_db_create_event, thread_db_enable_reporting)
13171 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13172 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13173 (try_thread_db_load_1, dladdr_to_soname): New functions.
13174 (try_thread_db_load, thread_db_load_search): New functions.
13175 (thread_db_init): Search for libthread_db.
13176 (thread_db_free): New function.
13177 (thread_db_handle_monitor_command): Likewise.
13178 * config.in: Regenerate.
13179 * configure: Regenerate.
13180
13181 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13182
13183 * spu-low.c (spu_kill): Wait for inferior to terminate.
13184 Call clear_inferiors.
13185 (spu_detach): Call clear_inferiors.
13186
13187 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13188
13189 * aclocal.m4: Regenerate.
13190 * config.in: Likewise.
13191 * configure: Likewise.
13192
13193 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13194
13195 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13196 (parse_spufs_run): New function.
13197 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13198 (ppc_breakpoint_at): Handle SPU breakpoints.
13199
13200 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13201
13202 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13203 (SPUFS_MAGIC): Define.
13204 (spu_enumerate_spu_ids): New function.
13205 (linux_qxfer_spu): New function.
13206 (linux_target_ops): Install linux_qxfer_spu.
13207
13208 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13209
13210 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13211 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13212 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13213 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13214 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13215 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13216 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13217 (init_registers_powerpc_cell32l): Add prototype.
13218 (init_registers_powerpc_cell64l): Likewise.
13219 (ppc_arch_setup): Detect Cell/B.E. architecture.
13220
13221 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13222
13223 * Makefile.in (datarootdir): New variable.
13224
13225 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13226
13227 * linux-low.c (linux_write_memory): Update debugging output.
13228 * Makefile.in (clean): Add new descriptions.
13229 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13230 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13231 * configure.srv: Add new files for arm*-*-linux*.
13232 * linux-arm-low.c: Add new declarations.
13233 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13234 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13235 (HWCAP_VFPv3D16): New.
13236 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13237 instead of __IWMMXT__.
13238 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13239 (arm_arch_setup): New.
13240 (target_regsets): Remove #ifdef. Add VFP regset.
13241 (the_low_target): Use arm_arch_setup.
13242
13243 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13244
13245 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13246 the main thread again.
13247
13248 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13249
13250 Adding Neutrino gdbserver.
13251 * configure: Regenerated.
13252 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13253 * configure.srv (i[34567]86-*-nto*): New target.
13254 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13255 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13256 (nto_comctrl) [__QNX__]: New function.
13257 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13258
13259 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13260
13261 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13262 srv_tgtobj.
13263
13264 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13265 Pedro Alves <pedro@codesourcery.com>
13266
13267 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13268 don't support CONTEXT_EXTENDED_REGISTERS.
13269 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13270 (the_low_target): Install them.
13271 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13272 failing with ERROR_PIPE_NOT_CONNECTED.
13273
13274 2009-06-30 Doug Evans <dje@google.com>
13275 Pierre Muller <muller@ics.u-strasbg.fr>
13276
13277 Add h/w watchpoint support to x86-linux, win32-i386.
13278 * Makefile.in (SFILES): Add i386-low.c
13279 (i386_low_h): Define.
13280 (i386-low.o): Add dependencies.
13281 (linux-x86-low.o): Add i386-low.h dependency.
13282 (win32-i386-low.o): Ditto.
13283 * i386-low.c: New file.
13284 * i386-low.h: New file.
13285 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13286 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13287 * linux-low.c (linux_add_process): Initialize arch_private.
13288 (linux_remove_process): Free arch_private.
13289 (add_lwp): Initialize arch_private.
13290 (delete_lwp): Free arch_private.
13291 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13292 provided.
13293 * linux-low.h (process_info_private): New member arch_private.
13294 (lwp_info): New member arch_private.
13295 (linux_target_ops): New members new_process, new_thread,
13296 prepare_to_resume.
13297 (ptid_of): New macro.
13298 * linux-x86-low.c: Include stddef.h, i386-low.h.
13299 (arch_process_info): New struct.
13300 (arch_lwp_info): New struct.
13301 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13302 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13303 (i386_dr_low_get_status): New function.
13304 (x86_insert_point, x86_remove_point): New functions.
13305 (x86_stopped_by_watchpoint): New function.
13306 (x86_stopped_data_address): New function.
13307 (x86_linux_new_process, x86_linux_new_thread): New functions.
13308 (x86_linux_prepare_to_resume): New function.
13309 (the_low_target): Add entries for insert_point, remove_point,
13310 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13311 prepare_to_resume.
13312 * server.c (debug_hw_points): New global.
13313 (monitor_show_help): Document set debug-hw-points.
13314 (handle_query): Process "set debug-hw-points".
13315 * server.h (debug_hw_points): Declare.
13316 (paddress): Declare.
13317 * utils.c (NUMCELLS, CELLSIZE): New macros.
13318 (get_sell, xsnprintf, paddress): New functions.
13319 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13320 remove_point, stopped_by_watchpoint, stopped_data_address.
13321 * win32-i386-low.c: Include i386-low.h.
13322 (debug_reg_state): Replaces dr.
13323 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13324 (i386_dr_low_get_status): New function.
13325 (i386_insert_point, i386_remove_point): New functions.
13326 (i386_stopped_by_watchpoint): New function.
13327 (i386_stopped_data_address): New function.
13328 (i386_initial_stuff): Update.
13329 (get_thread_context,set_thread_context,i386_thread_added): Update.
13330 (the_low_target): Add entries for insert_point,
13331 remove_point, stopped_by_watchpoint, stopped_data_address.
13332 * win32-low.c (win32_insert_watchpoint): New function.
13333 (win32_remove_watchpoint): New function.
13334 (win32_stopped_by_watchpoint): New function.
13335 (win32_stopped_data_address): New function.
13336 (win32_target_ops): Add entries for insert_watchpoint,
13337 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13338 * win32-low.h (win32_target_ops): New members insert_point,
13339 remove_point, stopped_by_watchpoint, stopped_data_address.
13340
13341 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13342
13343 * server.c (process_serial_event): Re-return unsupported, not
13344 error, if the type isn't recognized. Re-allow supporting only
13345 insert or remove packets. Also call require_running for
13346 breakpoints. Add missing break statement to default case. Tidy.
13347 * target.h (struct target_ops): Rename insert_watchpoint to
13348 insert_point, and remove_watchpoint to remove_point.
13349
13350 * linux-low.h (struct linux_target_ops): Likewise.
13351 * linux-low.c (linux_insert_watchpoint): Rename to ...
13352 (linux_insert_point): ... this. Adjust.
13353 (linux_remove_watchpoint): Rename to ...
13354 (linux_remove_point): ... this. Adjust.
13355 (linux_target_ops): Adjust.
13356 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13357 (cris_insert_point): ... this.
13358 (cris_remove_watchpoint): Rename to ...
13359 (cris_remove_point): ... this.
13360 (the_low_target): Adjust.
13361
13362 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13363
13364 * server.c (handle_v_kill): Pass signal_pid to
13365 kill_inferior if multi_process is zero.
13366
13367 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13368
13369 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13370 * target.h (target_ops): Comment for *_watchpoint to make it clear
13371 the functions can get types '0' and '1'.
13372
13373 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13374
13375 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13376 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13377 * regcache.c (get_regcache): Likewise.
13378 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13379 * win32-low.c (child_fetch_inferior_registers): Remove check for
13380 regno 0.
13381
13382 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13383 Pedro Alves <pedro@codesourcery.com>
13384
13385 * target.h (struct target_ops) <supports_multi_process>: New
13386 callback.
13387 (target_supports_multi_process): New.
13388 * server.c (handle_query): Even if GDB reports support, only
13389 enable multi-process if the target also supports it. Report
13390 multi-process support only if the target backend supports it.
13391 * linux-low.c (linux_supports_multi_process): New function.
13392 (linux_target_ops): Install it as target_supports_multi_process
13393 callback.
13394
13395 2009-05-24 Doug Evans <dje@google.com>
13396
13397 Global renaming of find_thread_pid to find_thread_ptid.
13398 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13399 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13400 All callers updated.
13401
13402 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13403 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13404 directly.
13405
13406 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13407 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13408 (linux_resume_one_lwp): Ditto.
13409
13410 2009-05-23 Doug Evans <dje@google.com>
13411
13412 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13413 from struct inferior_list_entry * to struct lwp_info *.
13414 All callers updated.
13415
13416 2009-05-13 Doug Evans <dje@google.com>
13417
13418 * linux-x86-low.c: Don't include assert.h.
13419 (x86_siginfo_fixup): Use fatal, not assert.
13420 (x86_arch_setup): Fix comment.
13421
13422 2009-05-12 Doug Evans <dje@google.com>
13423
13424 Biarch support for i386/amd64 gdbserver.
13425 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13426 Add linux-x86-low.c.
13427 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13428 (linux-x86-low.o): Add.
13429 * linux-x86-64-low.c: Delete.
13430 * linux-i386-low.c: Delete.
13431 * linux-x86-low.c: New file.
13432 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13433 linux-x86-low.o.
13434 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13435 linux-x86-low.o.
13436 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13437 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13438 (linux_child_pid_to_exec_file): New function.
13439 (elf_64_header_p, elf_64_file_p): New functions.
13440 (siginfo_fixup): New function.
13441 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13442 give target a chance to convert layout.
13443 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13444 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13445
13446 2009-05-07 Doug Evans <dje@google.com>
13447
13448 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13449 (regsets_store_inferior_registers): Ditto.
13450
13451 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13452
13453 PR server/10048
13454
13455 * linux-low.c (must_set_ptrace_flags): Delete.
13456 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13457 of the global.
13458 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13459 `lwp->must_set_ptrace_flags' instead.
13460 (linux_wait_for_event_1): Set ptrace options here.
13461 (linux_wait_1): ... not here.
13462
13463 2009-04-30 Doug Evans <dje@google.com>
13464
13465 * inferiors.c (started_inferior_callback): New function.
13466 (attached_inferior_callback): New function.
13467 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13468 * server.c (print_started_pid, print_attached_pid): New functions.
13469 (detach_or_kill_for_exit): New function.
13470 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13471 * server.h (have_started_inferiors_p): Declare.
13472 (have_attached_inferiors_p): Declare.
13473
13474 * inferiors.c (remove_process): Fix memory leak, free process.
13475 * linux-low.c (linux_remove_process): New function.
13476 (linux_kill): Call it instead of remove_process.
13477 (linux_detach, linux_wait_1): Ditto.
13478
13479 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13480
13481 * configure.srv: Add x86 Windows CE target.
13482
13483 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13484
13485 * inferiors.c (get_thread_process): Make global.
13486 * server.h (get_thread_process): Add prototype.
13487 * thread-db.c (find_one_thread): Use get_thread_process
13488 instead of current_process.
13489 (thread_db_get_tls_address): Do not crash if called when
13490 thread layer is not yet initialized.
13491
13492 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13493
13494 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13495 * spu-low.c (current_tid): Rename to ...
13496 (current_ptid): ... this.
13497 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13498 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13499 ptid_get_lwp (current_ptid) instead of current_tid.
13500 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13501 instead of current_tid. Use find_process_pid to verify pid
13502 argument is valid. Pass proper argument to remove_process.
13503 (spu_thread_alive): Compare current_ptid instead of current_tid.
13504 (spu_resume): Likewise.
13505
13506 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13507
13508 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13509 variable.
13510
13511 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13512
13513 Implement the multiprocess extensions, and add linux multiprocess
13514 support.
13515
13516 * server.h (ULONGEST): Declare.
13517 (struct ptid, ptid_t): New.
13518 (minus_one_ptid, null_ptid): Declare.
13519 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13520 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13521 (struct inferior_list_entry): Change `id' type from unsigned from
13522 to ptid_t.
13523 (struct sym_cache, struct breakpoint, struct
13524 process_info_private): Forward declare.
13525 (struct process_info): Declare.
13526 (current_process): Declare.
13527 (all_processes): Declare.
13528 (initialize_inferiors): Declare.
13529 (add_thread): Adjust to use ptid_t.
13530 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13531 (add_process, remove_process, find_thread_pid): Declare.
13532 (find_inferior_id): Adjust to use ptid_t.
13533 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13534 (multi_process): Declare.
13535 (push_event): Adjust to use ptid_t.
13536 (read_ptid, write_ptid): Declare.
13537 (prepare_resume_reply): Adjust to use ptid_t.
13538 (clear_symbol_cache): Declare.
13539 * inferiors.c (all_processes): New.
13540 (null_ptid, minus_one_ptid): New.
13541 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13542 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13543 (add_thread): Change unsigned long to ptid. Remove gdb_id
13544 parameter. Adjust.
13545 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13546 (gdb_id_to_thread): Rename to ...
13547 (find_thread_pid): ... this. Change unsigned long to ptid.
13548 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13549 (loaded_dll, pull_pid_from_list): Adjust.
13550 (add_process, remove_process, find_process_pid)
13551 (get_thread_process, current_process, initialize_inferiors): New.
13552 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13553 (struct target_waitstatus) <related_pid>: Ditto.
13554 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13555 return type to int.
13556 (struct target_ops) <join>: Add `pid' argument.
13557 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13558 (struct target_ops) <wait>: Add `ptid' field. Change return type
13559 to ptid.
13560 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13561 (mywait): Add `ptid' argument. Change return type to ptid_t.
13562 (target_pid_to_str): Declare.
13563 * target.c (set_desired_inferior): Adjust to use ptids.
13564 (mywait): Add new `ptid' argument. Adjust.
13565 (target_pid_to_str): New.
13566 * mem-break.h (free_all_breakpoints): Declare.
13567 * mem-break.c (breakpoints): Delelete.
13568 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13569 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13570 to use per-process breakpoint list.
13571 (free_all_breakpoints): New.
13572 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13573 (symbol_cache, all_symbols_looked_up): Delete.
13574 (hexchars): New.
13575 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13576 read_ptid): New.
13577 (prepare_resume_reply): Change ptid argument's type from unsigned
13578 long to ptid_t. Adjust. Implement W;process and X;process.
13579 (free_sym_cache, clear_symbol_cache): New.
13580 (look_up_one_symbol): Adjust to per-process symbol cache. *
13581 * server.c (cont_thread, general_thread, step_thread): Change type
13582 to ptid_t.
13583 (attached): Delete.
13584 (multi_process): New.
13585 (last_ptid): Change type to ptid_t.
13586 (struct vstop_notif) <ptid>: Change type to ptid_t.
13587 (queue_stop_reply, push_event): Change `ptid' argument's type to
13588 ptid_t.
13589 (discard_queued_stop_replies): Add `pid' argument.
13590 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13591 changes. Don't reference the `attached' global.
13592 (attach_inferior): Adjust to mywait interface changes.
13593 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13594 features. Handle and report "multiprocess+". Handle
13595 "qAttached:PID".
13596 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13597 changes.
13598 (handle_v_kill): New.
13599 (handle_v_stopped): Adjust to use target_pid_to_str.
13600 (handle_v_requests): Allow multiple attaches and runs when
13601 multiprocess extensions are in effect. Handle "vKill".
13602 (myresume): Adjust to use ptids.
13603 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13604 (handle_status): Adjust to discard_queued_stop_replies interface
13605 change.
13606 (first_thread_of, kill_inferior_callback)
13607 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13608 (main): Call initialize_inferiors. Adjust to use ptids, killing
13609 and detaching from all inferiors. Handle multiprocess packet
13610 variants.
13611 * linux-low.h: Include gdb_proc_service.h.
13612 (struct process_info_private): New.
13613 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13614 <lwpid_of>: Use ptid_get_lwp.
13615 (get_lwp_thread): Adjust.
13616 (struct lwp_info): Add `dead' member.
13617 (find_lwp_pid): Declare.
13618 * linux-low.c (thread_db_active): Delete.
13619 (new_inferior): Adjust comment.
13620 (inferior_pid): Delete.
13621 (linux_add_process): New.
13622 (handle_extended_wait): Adjust.
13623 (add_lwp): Change unsigned long to ptid.
13624 (linux_create_inferior): Add process to processes table. Adjust
13625 to use ptids. Don't set new_inferior here.
13626 (linux_attach_lwp): Rename to ...
13627 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13628 it. Adjust to use ptids.
13629 (linux_attach_lwp): New.
13630 (linux_attach): Add process to processes table. Don't set
13631 new_inferior here.
13632 (struct counter): New.
13633 (second_thread_of_pid_p, last_thread_of_process_p): New.
13634 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13635 multiple processes.
13636 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13637 processes. Remove process from process table.
13638 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13639 to multiple processes.
13640 (any_thread_of): New.
13641 (linux_detach): Add `pid' argument, and handle it. Remove process
13642 from processes table.
13643 (linux_join): Add `pid' argument. Handle it.
13644 (linux_thread_alive): Change unsighed long argument to ptid_t.
13645 Consider dead lwps as not being alive.
13646 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13647 threads we're not interested in.
13648 (same_lwp, find_lwp_pid): New.
13649 (linux_wait_for_lwp): Change `pid' argument's type from int to
13650 ptid_t. Adjust.
13651 (linux_wait_for_event): Rename to ...
13652 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13653 from int to ptid_t. Adjust.
13654 (linux_wait_for_event): New.
13655 (linux_wait_1): Add `ptid' argument. Change return type to
13656 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13657 that exit from the process table.
13658 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13659 Adjust.
13660 (mark_lwp_dead): New.
13661 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13662 stopping all threads, mark its main lwp as dead.
13663 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13664 ptids.
13665 (fetch_register, usr_store_inferior_registers)
13666 (regsets_fetch_inferior_registers)
13667 (regsets_store_inferior_registers, linux_read_memory)
13668 (linux_write_memory): Inline `inferior_pid'.
13669 (linux_look_up_symbols): Adjust to use per-process
13670 `thread_db_active'.
13671 (linux_request_interrupt): Adjust to use ptids.
13672 (linux_read_auxv): Inline `inferior_pid'.
13673 (initialize_low): Don't reference thread_db_active.
13674 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13675 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13676 (ps_getpid): Return the pid of the current inferior.
13677 * thread-db.c (proc_handle, thread_agent): Delete.
13678 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13679 per-process data.
13680 (find_one_thread): Change argument type to ptid_t. Adjust to
13681 per-process data.
13682 (maybe_attach_thread): Adjust to per-process data and ptids.
13683 (thread_db_find_new_threads): Ditto.
13684 (thread_db_init): Ditto.
13685 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13686 processes table. Adjust to use ptids.
13687 (spu_kill, spu_detach): Adjust interface. Remove process from
13688 processes table.
13689 (spu_join, spu_thread_alive): Adjust interface.
13690 (spu_wait): Adjust interface. Remove process from processes
13691 table. Adjust to use ptids.
13692 * win32-low.c (current_inferior_tid): Delete.
13693 (current_inferior_ptid): New.
13694 (debug_event_ptid): New.
13695 (thread_rec): Take a ptid. Adjust.
13696 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13697 (child_delete_thread): Ditto.
13698 (do_initial_child_stuff): Add `attached' argument. Add process to
13699 processes table.
13700 (child_fetch_inferior_registers, child_store_inferior_registers):
13701 Adjust.
13702 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13703 (win32_attach): Pass 1 to do_initial_child_stuff.
13704 (win32_kill): Adjust interface. Remove process from processes
13705 table.
13706 (win32_detach): Ditto.
13707 (win32_join): Adjust interface.
13708 (win32_thread_alive): Take a ptid.
13709 (win32_resume): Adjust to use ptids.
13710 (get_child_debug_event): Ditto.
13711 (win32_wait): Adjust interface. Remove exiting process from
13712 processes table.
13713
13714 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13715
13716 Non-stop mode support.
13717
13718 * server.h (non_stop): Declare.
13719 (gdb_client_data, handler_func): Declare.
13720 (delete_file_handler, add_file_handler, start_event_loop):
13721 Declare.
13722 (handle_serial_event, handle_target_event, push_event)
13723 (putpkt_notif): Declare.
13724 * target.h (enum resume_kind): New.
13725 (struct thread_resume): Replace `step' field by `kind' field.
13726 (TARGET_WNOHANG): Define.
13727 (struct target_ops) <wait>: Add `options' argument.
13728 <supports_non_stop, async, start_non_stop>: New fields.
13729 (target_supports_non_stop, target_async): New.
13730 (start_non_stop): Declare.
13731 (mywait): Add `options' argument.
13732 * target.c (mywait): Add `options' argument. Print child exit
13733 notifications here.
13734 (start_non_stop): New.
13735 * server.c (non_stop, own_buf, mem_buf): New globals.
13736 (struct vstop_notif): New.
13737 (notif_queue): New global.
13738 (queue_stop_reply, push_event, discard_queued_stop_replies)
13739 (send_next_stop_reply): New.
13740 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13741 interface changes.
13742 (attach_inferior): In non-stop mode, don't wait for the target
13743 here.
13744 (handle_general_set): Handle QNonStop.
13745 (handle_query): When handling qC, return the current general
13746 thread, instead of the first thread of the list.
13747 (handle_query): If the backend supports non-stop mode, include
13748 QNonStop+ in the qSupported query response.
13749 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13750 and non-stop mode.
13751 (handle_v_attach, handle_v_run): Handle non-stop mode.
13752 (handle_v_stopped): New.
13753 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13754 (myresume): Adjust to use resume_kind. Handle non-stop.
13755 (queue_stop_reply_callback): New.
13756 (handle_status): Handle non-stop mode.
13757 (main): Clear non_stop flag on reconnection. Use the event-loop.
13758 Refactor serial protocol handling from here ...
13759 (process_serial_event): ... to this new function. When GDB
13760 selects any thread, select one here. In non-stop mode, wait until
13761 GDB acks all pending events before exiting.
13762 (handle_serial_event, handle_target_event): New.
13763 * remote-utils.c (remote_open): Install remote_desc in the event
13764 loop.
13765 (remote_close): Remove remote_desc from the event loop.
13766 (putpkt_binary): Rename to...
13767 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13768 (putpkt_binary): New as wrapper around putpkt_binary_1.
13769 (putpkt_notif): New.
13770 (prepare_resume_reply): In non-stop mode, don't change the
13771 general_thread.
13772 * event-loop.c: New.
13773 * Makefile.in (OBJ): Add event-loop.o.
13774 (event-loop.o): New rule.
13775
13776 * linux-low.h (pid_of): Moved here.
13777 (lwpid_of): New.
13778 (get_lwp_thread): Use lwpid_of.
13779 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13780 * linux-low.c (pid_of): Delete.
13781 (inferior_pid): Use lwpid_of.
13782 (linux_event_pipe): New.
13783 (target_is_async_p): New.
13784 (delete_lwp): New.
13785 (handle_extended_wait): Use lwpid_of.
13786 (add_lwp): Don't set lwpid field.
13787 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13788 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13789 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13790 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13791 first. Adjust to linux_wait_for_event interface changes. Use
13792 lwpid_of.
13793 (linux_detach): Don't delete the main lwp here.
13794 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13795 (status_pending_p): Don't consider explicitly suspended lwps.
13796 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13797 pointer. Add OPTIONS argument. Change return type to int. Use
13798 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13799 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13800 pointer. Add status pointer argument. Return a pid instead of a
13801 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13802 changes. In non-stop mode, don't switch to a random thread.
13803 (linux_wait): Rename to...
13804 (linux_wait_1): ... this. Add target_options argument, and handle
13805 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13806 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13807 clean exit and signal exit code. Don't stop all threads in
13808 non-stop mode. In all-stop mode, only stop all threads when
13809 reporting a stop to GDB. Handle explicit thread stop requests.
13810 (async_file_flush, async_file_mark): New.
13811 (linux_wait): New.
13812 (send_sigstop): Use lwpid_of.
13813 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13814 interface changes. In non-stop mode, don't switch to a random
13815 thread.
13816 (linux_resume_one_lwp): Use lwpid_of.
13817 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13818 (linux_resume_one_thread): ... this. Handle resume_stop. In
13819 non-stop mode, don't look for pending flag in all threads.
13820 (resume_status_pending_p): Don't consider explicitly suspended
13821 threads.
13822 (my_waitpid): Reimplement. Emulate __WALL.
13823 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13824 Use lwpid_of.
13825 (sigchld_handler, linux_supports_non_stop, linux_async)
13826 (linux_start_non_stop): New.
13827 (linux_target_ops): Register linux_supports_non_stop, linux_async
13828 and linux_start_non_stop.
13829 (initialize_low): Install SIGCHLD handler.
13830 * thread-db.c (thread_db_create_event, find_one_thread)
13831 (thread_db_get_tls_address): Use lwpid_of.
13832 * win32-low.c (win32_detach): Adjust to use resume_kind.
13833 (win32_wait): Add `options' argument.
13834 * spu-low.c (spu_resume): Adjust to use resume_kind.
13835 (spu_wait): Add `options' argument.
13836
13837 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13838
13839 Decouple target code from remote protocol.
13840
13841 * target.h (enum target_waitkind): New.
13842 (struct target_waitstatus): New.
13843 (struct target_ops) <wait>: Return an unsigned long. Take a
13844 target_waitstatus pointer instead of a char pointer.
13845 (mywait): Likewise.
13846 * target.c (mywait): Change prototype to return an unsigned long.
13847 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13848 * server.h (thread_from_wait, old_thread_from_wait): Delete
13849 declarations.
13850 (prepare_resume_reply): Change prototype to take a
13851 target_waitstatus.
13852 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13853 (last_status, last_ptid): New.
13854 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13855 pid instead of a signal.
13856 (attach_inferior): Remove "status" and "signal" parameters.
13857 Adjust.
13858 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13859 not as an address.
13860 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13861 (handle_v_requests, myresume): Remove "status" and "signal"
13862 parameters. Adjust.
13863 (handle_status): New.
13864 (main): Delete local `status'. Adjust.
13865 * remote-utils.c: Include target.h.
13866 (prepare_resume_reply): Change prototype to take a
13867 target_waitstatus. Adjust.
13868
13869 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13870 interface.
13871 * spu-low.c (spu_wait): Adjust.
13872 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13873 Delete.
13874 (win32_wait): Adjust.
13875
13876 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13877
13878 * target.h (struct thread_resume): Delete leave_stopped member.
13879 (struct target_ops): Add a `n' argument to the `resume' callback.
13880 * server.c (start_inferior): Adjust.
13881 (handle_v_cont, myresume): Adjust.
13882 * linux-low.c (check_removed_breakpoint): Adjust to resume
13883 interface change, and to removed leave_stopped field.
13884 (resume_ptr): Delete.
13885 (struct thread_resume_array): New.
13886 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13887 resume interface change.
13888 (linux_continue_one_thread, linux_queue_one_thread)
13889 (resume_status_pending_p): Check if the resume field is NULL
13890 instead of checking the leave_stopped member.
13891 (linux_resume): Adjust to the target resume interface change.
13892 * spu-low.c (spu_resume): Adjust to the target resume interface
13893 change.
13894 * win32-low.c (win32_detach, win32_resume): Ditto.
13895
13896 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13897
13898 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13899 flag.
13900 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13901 pending.
13902 (linux_continue_one_thread): Only preserve the stepping flag if
13903 there's a pending breakpoint.
13904
13905 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13906
13907 * server.c (main): After the inferior having exited, call
13908 remote_close before exiting gdbserver.
13909
13910 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13911
13912 Fix size of FPSCR in Power 7 processors.
13913 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13914 (PPC_FEATURE_HAS_DFP): New #define.
13915 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13916 size of the FPSCR.
13917
13918 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13919
13920 * server.c (handle_query) Whitespace and formatting.
13921
13922 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13923
13924 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13925 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13926 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13927 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13928 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13929 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13930 Makefile.in, configure.ac: Fix whitespace throughout.
13931 * configure: Regenerate.
13932
13933 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13934
13935 * inferiors.c (find_inferior): Make it safe for the callback
13936 function to delete the currently iterated inferior.
13937
13938 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13939
13940 * Makefile.in (linuw_low_h): Move higher.
13941 (thread-db.o): Depend on $(linux_low_h).
13942
13943 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13944
13945 Rename "process" to "lwp" throughout.
13946
13947 * linux-low.c (all_processes): Rename to...
13948 (all_lwps): ... this.
13949 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13950 (add_process): Rename to ...
13951 (add_lwp): ... this. Adjust.
13952 (linux_create_inferior): Adjust.
13953 (linux_attach_lwp): Adjust.
13954 (linux_attach): Adjust.
13955 (linux_kill_one_process): Rename to ...
13956 (linux_kill_one_lwp): ... this. Adjust.
13957 (linux_kill): Adjust.
13958 (linux_detach_one_process): Rename to ...
13959 (linux_detach_one_lwp): ... this. Adjust.
13960 (linux_detach): Adjust.
13961 (check_removed_breakpoint): Adjust.
13962 (status_pending_p): Adjust.
13963 (linux_wait_for_process): Rename to ...
13964 (linux_wait_for_lwp): ... this. Adjust.
13965 (linux_wait_for_event): Adjust.
13966 (send_sigstop): Adjust.
13967 (wait_for_sigstop): Adjust.
13968 (stop_all_processes): Rename to ...
13969 (stop_all_lwps): ... this.
13970 (linux_resume_one_process): Rename to ...
13971 (linux_resume_one_lwp): ... this. Adjust.
13972 (linux_set_resume_request, linux_continue_one_thread)
13973 (linux_queue_one_thread, resume_status_pending_p)
13974 (usr_store_inferior_registers, regsets_store_inferior_registers)
13975 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13976 Adjust.
13977 * linux-low.h (get_process): Rename to ...
13978 (get_lwp): ... this. Adjust.
13979 (get_thread_process): Rename to ...
13980 (get_thread_lwp): ... this. Adjust.
13981 (get_process_thread): Rename to ...
13982 (get_lwp_thread): ... this. Adjust.
13983 (struct process_info): Rename to ...
13984 (struct lwp_info): ... this.
13985 (all_processes): Rename to ...
13986 (all_lwps): ... this.
13987 * proc-service.c (ps_lgetregs): Adjust.
13988 * thread-db.c (thread_db_create_event, find_one_thread)
13989 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13990
13991 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13992
13993 * server.c (handle_query): Handle "qAttached".
13994
13995 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13996
13997 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13998 GPLv3, update license URL.
13999
14000 2009-03-01 Doug Evans <dje@google.com>
14001
14002 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14003 (server_h): Add gdb_signals.h.
14004 (signals.o): Update.
14005 * server.h (target_signal_from_host,target_signal_to_host_p)
14006 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14007
14008 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14009
14010 * remote-utils.c (getpkt): Also generate remote-debug
14011 information if noack_mode is set.
14012
14013 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14014
14015 * server.c (handle_query): Report qXfer:siginfo:read and
14016 qXfer:siginfo:write as supported and handle them.
14017 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14018 * linux-low.c (linux_xfer_siginfo): New.
14019 (linux_target_ops): Set it.
14020
14021 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14022
14023 * server.c (gdbserver_usage): Mention --remote-debug.
14024 (main): Accept '--remote-debug' switch.
14025
14026 2009-01-18 Doug Evans <dje@google.com>
14027
14028 * regcache.c (new_register_cache): No need to check result of xcalloc.
14029 * server.c (handle_search_memory): Back out calls to xmalloc,
14030 result is checked and error is returned to user upon failure.
14031 (handle_query): Ditto. Add more checks for result of malloc.
14032 (handle_v_cont): Check result of malloc, report error back to
14033 user upon failure.
14034 (handle_v_run): Ditto. Call freeargv.
14035 * server.h (freeargv): Declare.
14036 * utils.c (freeargv): New fn.
14037
14038 2009-01-15 Doug Evans <dje@google.com>
14039
14040 * gdbreplay.c (perror_with_name): Make arg const char *.
14041 * server.h (target_signal_to_name): Make return type const char *.
14042 * thread-db.c (thread_db_err_str): Make return type const char *.
14043 * utils.c (perror_with_name): Make arg const char *.
14044
14045 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14046
14047 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14048 when handling a EXIT_PROCESS_DEBUG_EVENT.
14049
14050 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14051
14052 * gdbreplay.c (gdbreplay_version): Update copyright year.
14053 * server.c (gdbserver_version): Likewise.
14054
14055 2009-01-05 Doug Evans <dje@google.com>
14056
14057 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14058 (handle_extended_wait): Improve comment.
14059
14060 2008-12-13 Doug Evans <dje@google.com>
14061
14062 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14063 * server.h (ATTR_MALLOC): New macro.
14064 (xmalloc,xcalloc,xstrdup): Declare.
14065 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14066 * inferiors.c: Ditto.
14067 * linux-low.c: Ditto.
14068 * mem-break.c: Ditto.
14069 * regcache.c: Ditto.
14070 * remote-utils.c: Ditto.
14071 * server.c: Ditto.
14072 * target.c: Ditto.
14073 * win32-low.c: Ditto.
14074
14075 2008-12-12 Doug Evans <dje@google.com>
14076
14077 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14078 in debugging printf.
14079
14080 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14081
14082 2008-12-09 Doug Evans <dje@google.com>
14083
14084 * linux-low.h (struct process_info): Delete member tid, unused.
14085 * thread-db.c (find_one_thread): Update.
14086 (maybe_attach_thread): Update.
14087
14088 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14089
14090 * target.h (struct target_ops): Add qxfer_osdata member.
14091 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14092 and dirent.h.
14093 (linux_qxfer_osdata): New functions.
14094 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14095 callback.
14096 * server.c (handle_query): Handle "qXfer:osdata:read:".
14097 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14098 (buffer_xml_printf): New functions.
14099 * server.h (struct buffer): New.
14100 (buffer_grow_str, buffer_grow_str0): New macros.
14101 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14102 (buffer_xml_printf): Declare.
14103
14104 2008-11-24 Doug Evans <dje@google.com>
14105
14106 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14107
14108 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14109
14110 * server.c (handle_v_run): Always use the supplied argument list.
14111
14112 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14113
14114 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14115 (xtensa_regmap_table): Add entry for scompare1.
14116
14117 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14118
14119 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14120 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14121 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14122 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14123 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14124 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14125 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14126 XML target descriptions.
14127 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14128 when inferior is running on an ISA 2.05 or later processor. Add
14129 special case to return offset for full 64-bit slot of FPSCR when
14130 in 32-bits.
14131
14132 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14133
14134 * Makefile.in (SFILES, clean): Added sparc64 files.
14135 (reg-sparc64.o, reg-sparc64.c): New.
14136 * configure.srv (sparc*-*-linux*): New configuration.
14137 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14138 syscall arguments for SPARC.
14139 (regsets_store_inferior_registers): Likewise.
14140 * linux-sparc-low.c: New file.
14141
14142 2008-10-21 Doug Evans <dje@google.com>
14143
14144 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14145 (READLINE_DIR,READLINE_DEP): Delete.
14146 (INTERNAL_CFLAGS): Update.
14147 (LINTFLAGS): Update.
14148
14149 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14150
14151 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14152 whole argv from the last run, not just argv[0].
14153
14154 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14155
14156 * regcache.c (new_register_cache): Return NULL if the register
14157 cache size isn't known yet.
14158 (free_register_cache): Avoid dereferencing a NULL regcache.
14159
14160 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14161
14162 * configure.srv: Merge MIPS and MIPS64.
14163
14164 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14165
14166 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14167
14168 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14169
14170 * Makefile.in: Add required vsx dependencies.
14171
14172 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14173 Declare init_registers_powerpc_vsx32l.
14174 Declare init_registers_powerpc_vsx64l.
14175 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14176 (ppc_arch_setup): Check for VSX in hwcap.
14177 (ppc_fill_vsxregset): New function.
14178 (ppc_store_vsxregset): New function.
14179 Add new VSX entry in regset_info target_regsets.
14180
14181 * configure.srv: Add new VSX dependencies.
14182
14183 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14184
14185 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14186 (remote_open): Set or clear transport_is_reliable.
14187 (putpkt_binary): Don't expect acks in noack mode.
14188 (getpkt): Don't send ack/nac in noack mode.
14189 * server.c (handle_general_set): Handle QStartNoAckMode.
14190 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14191 qSupported.
14192 (main): Reset noack_mode on every connection.
14193 * server.h (noack_mode): Declare.
14194
14195 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14196
14197 * Makefile.in (GDBREPLAY_OBS): New variable.
14198 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14199
14200 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14201 Daniel Jacobowitz <dan@codesourcery.com>
14202
14203 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14204 (usr_store_inferior_registers): Likewise.
14205 (regsets_store_inferior_registers): Likewise.
14206
14207 2008-07-31 Rolf Jansen <rj@surtec.com>
14208 Pedro Alves <pedro@codesourcery.com>
14209
14210 * configure.ac: Check for memmem declaration.
14211 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14212 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14213 (disable_packet_qfThreadInfo): Unconditionally compile.
14214 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14215 * configure, config.in: Regenerate.
14216
14217 2008-07-28 Doug Kwan <dougkwan@google.com>
14218
14219 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14220 (linux_write_memory): Remove declaration of errno.
14221
14222 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14223
14224 * linux-low.c (handle_extended_wait): Do not use "status"
14225 variable uninitialized.
14226
14227 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14228
14229 * server.c (handle_v_attach): Inhibit reporting dll changes.
14230
14231 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14232
14233 * remote-utils.c (prepare_resume_reply): If requested, don't
14234 output "thread:TID" in the T stop reply.
14235
14236 * server.c (disable_packet_vCont, disable_packet_Tthread)
14237 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14238 (handle_query): If requested, disable support for qC, qfThreadInfo
14239 and qsThreadInfo.
14240 (handle_v_requests): If requested, disable support for vCont.
14241 (gdbserver_show_disableable): New.
14242 (main): Handle --disable-packet and --disable-packet=LIST.
14243
14244 * server.h (disable_packet_vCont, disable_packet_Tthread)
14245 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14246
14247 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14248
14249 * server.c (gdbserver_usage): Mention --version.
14250
14251 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14252
14253 * Makefile.in (gdbreplay.o): New rule.
14254
14255 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14256
14257 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14258 message, not gdbserver.
14259
14260 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14261 Nathan Sidwell <nathan@codesourcery.com>
14262 Joseph Myers <joseph@codesourcery.com>
14263
14264 * acinclude.m4: Include ../../config/acx.m4.
14265 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14266 * configure, config.in: Regenerate.
14267 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14268 * server.c (gdbserver_version): Print PKGVERSION.
14269 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14270 (main): Adjust gdbserver_usage calls.
14271 * gdbreplay.c (version, host_name): Add declarations.
14272 (gdbreplay_version, gdbreplay_usage): New.
14273 (main): Accept --version and --help options.
14274
14275 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14276
14277 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14278 (arm_breakpoint_at): Handle Thumb.
14279 (the_low_target): Add comment.
14280
14281 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14282
14283 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14284
14285 2008-05-09 Doug Evans <dje@google.com>
14286
14287 * server.h (decode_search_memory_packet): Declare.
14288 * remote-utils.c (decode_search_memory_packet): New fn.
14289 * server.c (handle_search_memory_1): New fn.
14290 (handle_search_memory): New fn.
14291 (handle_query): Process qSearch:memory packets.
14292
14293 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14294
14295 * regcache.c (registers_length): Remove.
14296 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14297 full register packet.
14298 * regcache.h (registers_length): Remove prototype.
14299 * server.h (PBUFSIZ): Define to 16384.
14300
14301 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14302
14303 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14304 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14305 powerpc-64l.o, and powerpc-altivec64l.o.
14306 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14307 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14308 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14309 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14310 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14311 to srv_xmlfiles.
14312
14313 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14314 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14315 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14316 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14317 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14318 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14319 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14320 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14321 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14322 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14323 (clean): Update.
14324
14325 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14326 (init_registers_powerpc_32l): ... this new prototype.
14327 (init_registers_powerpc_32): Remove, replace by ...
14328 (init_registers_powerpc_altivec32l): ... this new prototype.
14329 (init_registers_powerpc_e500): Remove, replace by ...
14330 (init_registers_powerpc_e500l): ... this new prototype.
14331 (init_registers_ppc64): Remove, replace by ...
14332 (init_registers_powerpc_64l): ... this new prototype.
14333 (init_registers_powerpc_64): Remove, replace by ...
14334 (init_registers_powerpc_altivec64l): ... this new prototype.
14335 (ppc_num_regs): Set to 73.
14336 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14337 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14338 (ppc_cannot_store_register): Handle orig_r3 and trap.
14339 (ppc_arch_setup): Update init_registers_... calls.
14340 (ppc_fill_gregset): Handle orig_r3 and trap.
14341
14342 * inferiors.c (clear_inferiors): Reset current_inferior.
14343
14344 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14345
14346 * acinclude.m4: Add override.m4.
14347 * configure: Regenerate.
14348
14349 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14350
14351 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14352 initial call to init_register_ppc64.
14353
14354 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14355
14356 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14357 single powerpc*-*-linux* case.
14358 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14359
14360 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14361
14362 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14363 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14364 from reg_xmlfiles.
14365 * linux-ppc-low.c: Include <elf.h>.
14366 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14367 (ppc_hwcap): New global variable.
14368 (ppc_regmap): Remove __SPE__ #ifdef sections.
14369 (ppc_regmap_e500): New global variable.
14370 (ppc_cannot_store_register): Update __SPE__ special case.
14371 (ppc_get_hwcap): New function.
14372 (ppc_arch_setup): Use it to determine whether inferior supports
14373 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14374 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14375 Do not access registers if target does not support AltiVec.
14376 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14377 Do not access registers if target does not support SPE.
14378 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14379
14380 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14381
14382 * linux-low.c (disabled_regsets, num_regsets): New.
14383 (use_regsets_p): Delete.
14384 (linux_wait_for_process): Clear disabled_regsets.
14385 (regsets_fetch_inferior_registers): Check and set it.
14386 (regsets_store_inferior_registers): Likewise.
14387 (linux_fetch_registers, linux_store_registers): Do not use
14388 use_regsets_p.
14389 (initialize_low): Allocate disabled_regsets.
14390
14391 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14392
14393 * Makefile.in (LIBOBJS): New.
14394 (OBS): Use LIBOBJS.
14395 (memmem.o): New rule.
14396 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14397 * configure: Regenerated.
14398
14399 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14400
14401 * server.c (handle_query): Never return "unsupported" for
14402 qXfer:features:read queries.
14403
14404 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14405
14406 * server.c (get_features_xml): Fix inverted condition.
14407 (handle_query): Always support qXfer:feature:read.
14408
14409 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14410
14411 * server.c (wrapper_argv): New.
14412 (start_inferior): Handle wrapper_argv. If set, expect an extra
14413 trap.
14414 (gdbserver_usage): Document --wrapper.
14415 (main): Parse --wrapper.
14416
14417 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14418
14419 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14420 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14421 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14422 (ppc_set_pc): Likewise.
14423 (ppc_arch_setup): New function.
14424 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14425 of collect_register.
14426 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14427
14428 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14429
14430 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14431 instead of linux-ppc64-low.o.
14432 * linux-ppc64-low.c: Remove file.
14433 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14434 (linux-ppc64-low.o): Remove rule.
14435
14436 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14437 (init_registers_powerpc_64): Likewise.
14438 (ppc_regmap): Conditionally define depending on __powerpc64__.
14439 (ppc_cannot_store_register): Do not special-case "fpscr" when
14440 compiled on __powerpc64__.
14441 (ppc_collect_ptrace_register): New function.
14442 (ppc_supply_ptrace_register): New function.
14443 (ppc_breakpoint): Change type to "unsigned int".
14444 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14445 (the_low_target): Conditionally provide initializers for the
14446 arch_setup member depending on __powerpc64__. Install
14447 collect_ptrace_register and supply_ptrace_register members.
14448
14449 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14450
14451 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14452 * server.c (gdbserver_xmltarget): Define.
14453 (get_features_xml): Use it to replace "target.xml" and arch_string.
14454
14455 * configure.srv: Remove srv_xmltarget. Add XML files that were
14456 mentioned there to srv_xmlfiles instead. Remove conditional tests
14457 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14458 srv_xmlfiles and srv_regobj to include all possible choices.
14459 * configure.ac (srv_xmltarget): Remove.
14460 (srv_xmlfiles): Do not add "target.xml".
14461 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14462 checks for supplementary target information.
14463 * configure: Regenerate.
14464 * Makefile.in (XML_TARGET): Remove.
14465 (target.xml): Remove rule.
14466 (clean): Do not clean up target.xml.
14467 (.PRECIOUS): Do not mention target.xml.
14468
14469 * target.h (struct target_ops): Remove arch_string member.
14470 * linux-low.c (linux_arch_string): Remove.
14471 (linux_target_ops): Remove arch_string initializer.
14472 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14473 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14474 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14475 * spu-low.c (spu_arch_string): Remove.
14476 (spu_target_ops): Remove arch_string initializer.
14477 * win32-low.c (win32_arch_string): Remove.
14478 (win32_target_ops): Remove arch_string initializer.
14479 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14480 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14481 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14482
14483 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14484
14485 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14486 by collect_ptrace_register and supply_ptrace_register hooks.
14487 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14488 instead of checking for the_low_target.left_pad_xfer.
14489 (usr_store_inferior_registers): Use collect_ptrace_register callback
14490 instead of checking for the_low_target.left_pad_xfer.
14491
14492 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14493 (s390_supply_ptrace_register): Likewise.
14494 (s390_fill_gregset): Call s390_collect_ptrace_register.
14495 (the_low_target): Update.
14496
14497 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14498 (ppc_supply_ptrace_register): Likewise.
14499 (the_low_target): Update.
14500
14501 * linux-i386-low.c (the_low_target): Update.
14502 * linux-x86-64-low.c (the_low_target): Update.
14503
14504 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14505
14506 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14507 reg-s390.o and reg-s390x.o.
14508
14509 * linux-low.c (new_inferior): New global variable.
14510 (linux_create_inferior, linux_attach): Set it.
14511 (linux_wait_for_process): Call the_low_target.arch_setup after the
14512 target has stopped for the first time.
14513 (initialize_low): Do not call the_low_target.arch_setup.
14514
14515 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14516 (s390_set_pc): Likewise.
14517 (s390_arch_setup): New function.
14518 (the_low_target): Use s390_arch_setup as arch_setup routine.
14519
14520 * regcache.c (realloc_register_cache): New function.
14521 (set_register_cache): Call it for each existing regcache.
14522
14523 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14524
14525 * server.h (init_registers): Remove prototype.
14526
14527 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14528 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14529 instead of init_registers ().
14530 * linux-arm-low.c (init_registers_arm): Add prototype.
14531 (init_registers_arm_with_iwmmxt): Likewise.
14532 (the_low_target): Add initializer for arch_setup field.
14533 * linux-cris-low.c (init_registers_cris): Add prototype.
14534 (the_low_target): Add initializer for arch_setup field.
14535 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14536 (the_low_target): Add initializer for arch_setup field.
14537 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14538 (the_low_target): Add initializer for arch_setup field.
14539 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14540 (the_low_target): Add initializer for arch_setup field.
14541 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14542 (the_low_target): Add initializer for arch_setup field.
14543 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14544 (the_low_target): Add initializer for arch_setup field.
14545 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14546 (init_registers_mips64_linux): Likewise.
14547 (the_low_target): Add initializer for arch_setup field.
14548 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14549 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14550 (the_low_target): Add initializer for arch_setup field.
14551 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14552 (init_registers_powerpc_64): Likewise.
14553 (the_low_target): Add initializer for arch_setup field.
14554 * linux-s390-low.c (init_registers_s390): Add prototype.
14555 (init_registers_s390x): Likewise.
14556 (the_low_target): Add initializer for arch_setup field.
14557 * linux-sh-low.c (init_registers_sh): Add prototype.
14558 (the_low_target): Add initializer for arch_setup field.
14559 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14560 (the_low_target): Add initializer for arch_setup field.
14561 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14562 (the_low_target): Add initializer for arch_setup field.
14563
14564 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14565 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14566 instead of init_registers ().
14567 * win32-arm-low.c (init_registers_arm): Add prototype.
14568 (the_low_target): Add initializer for arch_setup field.
14569 * win32-i386-low.c (init_registers_i386): Add prototype.
14570 (the_low_target): Add initializer for arch_setup field.
14571
14572 * spu-low.c (init_registers_spu): Add prototype.
14573 (initialize_low): Call initialie_registers_spu () instead of
14574 initialize_registers ().
14575
14576 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14577
14578 * server.c (handle_v_requests): When handling the vRun and vAttach
14579 packets, if already debugging a process, don't kill it. Return an
14580 error instead.
14581
14582 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14583
14584 * server.c (handle_query): Correct length check.
14585
14586 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14587
14588 * win32-low.c (do_initial_child_stuff): Add process handle
14589 parameter. Set current_process_handle and current_process_id from the
14590 parameters. Clear globals.
14591 (win32_create_inferior): Don't set current_process_handle and
14592 current_process_id here. Instead pass them on the call to
14593 do_initial_child_stuff.
14594 (win32_attach): Likewise.
14595 (win32_clear_inferiors): New.
14596 (win32_kill): Don't close the current process handle or the
14597 current thread handle here. Instead call win32_clear_inferiors.
14598 (win32_detach): Don't open a new handle to the process. Call
14599 win32_clear_inferiors.
14600 (win32_join): Don't rely on current_process_handle; open a new
14601 handle using the process id.
14602 (win32_wait): Call win32_clear_inferiors when the inferior process
14603 has exited.
14604
14605 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14606
14607 * server.c (monitor_show_help): Add "exit".
14608
14609 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14610
14611 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14612 (clean): Add reg-xtensa.c.
14613 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14614 * configure.srv (xtensa*-*-linux*) New target.
14615 * linux-xtensa-low.c: New.
14616 * xtensa-xtregs.c: New.
14617
14618 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14619
14620 * hostio.c: Don't include errno.h.
14621 (errno_to_fileio_errno): Move to hostio-errno.
14622 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14623 error number outputting to the target->hostio_last_error callback.
14624 (hostio_packet_error): Use FILEIO_EINVAL directly.
14625 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14626 calls to hostio_error.
14627 * hostio-errno.c: New.
14628 * server.h (hostio_last_error_from_errno): Declare.
14629 * target.h (target_ops): Add hostio_last_error member.
14630 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14631 as hostio_last_error handler.
14632 * spu-low.c (spu_target_ops): Likewise.
14633 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14634 (wince_hostio_last_error): New functions.
14635 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14636 as hostio_last_error handler.
14637 (win32_target_ops) [!_WIN32_WCE]: Register
14638 hostio_last_error_from_errno as hostio_last_error handler.
14639 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14640 (hostio-errno.o): New rule.
14641 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14642 * configure.srv (srv_hostio_err_objs): New variable. Default to
14643 hostio-errno.o.
14644 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14645 * configure: Regenerate.
14646
14647 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14648
14649 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14650 (linux_kill, linux_detach): Clean up the process list.
14651 * remote-utils.c (remote_open): Improve port number parsing.
14652 (putpkt_binary, input_interrupt): Only send interrupts if the target
14653 is running.
14654 * server.c (extended_protocol): Make static.
14655 (attached): Define earlier.
14656 (exit_requested, response_needed, program_argv): New variables.
14657 (target_running): New.
14658 (start_inferior): Clear attached here.
14659 (attach_inferior): Set attached here.
14660 (require_running): Define.
14661 (handle_query): Use require_running and target_running. Implement
14662 "monitor exit".
14663 (handle_v_attach, handle_v_run): New.
14664 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14665 (gdbserver_usage): Update.
14666 (main): Redo argument parsing. Handle --debug and --multi. Handle
14667 --attach along with other options or after the port. Save
14668 program_argv. Support no initial program. Resynchronize
14669 communication with GDB after an error. Handle "monitor exit".
14670 Use require_running and target_running. Always allow the extended
14671 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14672 restart in extended mode.
14673 * README: Refer to the GDB manual. Update --attach usage.
14674
14675 2007-12-20 Andreas Schwab <schwab@suse.de>
14676
14677 * linux-low.c (STACK_SIZE): Define.
14678 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14679 (linux_test_for_tracefork): Likewise.
14680
14681 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14682
14683 * linux-low.c (linux_wait_for_event): Update messages. Do not
14684 reinsert auto-delete breakpoints.
14685 * mem-break.c (struct breakpoint): Change return type of handler to
14686 int.
14687 (set_breakpoint_at): Update handler type.
14688 (reinsert_breakpoint_handler): Return 1 instead of calling
14689 delete_breakpoint.
14690 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14691 setting a new one.
14692 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14693 * mem-break.h (set_breakpoint_at): Update handler type.
14694 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14695 * win32-low.c (auto_delete_breakpoint): New.
14696 (get_child_debug_event): Use it.
14697
14698 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14699
14700 * configure.ac: Check for pread and pwrite.
14701 * hostio.c (handle_pread): Fall back to lseek and read.
14702 (handle_pwrite): Fall back to lseek and write.
14703 * config.in, configure: Regenerated.
14704
14705 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14706
14707 * server.c (myresume): Add own_buf argument.
14708 (main): Update calls.
14709
14710 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14711
14712 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14713 * remote-utils.c (remote_open): Do not call disable_async_io.
14714 (block_async_io): Delete.
14715 (unblock_async_io): Make static.
14716 (initialize_async_io): New.
14717 * server.c (handle_v_cont): Handle async I/O here.
14718 (myresume): Likewise. Move other common resume tasks here...
14719 (main): ... from here. Call initialize_async_io. Disable async
14720 I/O before the main loop.
14721 * server.h (initialize_async_io): Declare.
14722 (block_async_io, unblock_async_io): Delete prototypes.
14723 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14724
14725 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14726
14727 * remote-utils.c (readchar): Allow binary data in received messages.
14728
14729 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14730
14731 * win32-low.c (attaching): New global.
14732 (win32_create_inferior): Clear the `attaching' global.
14733 (win32_attach): Set the `attaching' global.
14734 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14735 attaching. Only set a breakpoint at the entry point if not
14736 attaching.
14737
14738 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14739
14740 * server.c (main): Don't report dll events on the initial
14741 connection on attaches.
14742
14743 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14744
14745 * server.c (main): Relax numerical bases supported for the pid of
14746 the --attach command line argument.
14747
14748 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14749
14750 * win32-low.c (win32_attach): Call OpenProcess before
14751 DebugActiveProcess, not after. Add last error output to error
14752 call.
14753
14754 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14755
14756 * win32-low.c (win32_get_thread_context)
14757 (win32_set_thread_context): New functions.
14758 (thread_rec): Use win32_get_thread_context.
14759 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14760 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14761 field.
14762
14763 2007-12-03 Leo Zayas
14764 Pedro Alves <pedro_alves@portugalmail.pt>
14765
14766 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14767 global variables.
14768 (child_add_thread): Minor cleanup.
14769 (child_continue): Resume artificially suspended threads before
14770 calling ContinueDebugEvent.
14771 (suspend_one_thread): New.
14772 (fake_breakpoint_event): New.
14773 (get_child_debug_event): Change return type to int. Check here if
14774 gdb sent an interrupt request. If a soft interrupt was requested,
14775 fake a breakpoint event. Return 0 if there is no event to handle,
14776 and 1 otherwise.
14777 (win32_wait): Don't check here if gdb sent an interrupt request.
14778 Ensure there is a valid event to handle.
14779 (win32_request_interrupt): Add soft interruption method as last
14780 resort.
14781
14782 2007-12-03 Leo Zayas
14783 Pedro Alves <pedro_alves@portugalmail.pt>
14784
14785 * win32-low.h (win32_thread_info): Add descriptions to the
14786 structure members. Replace `suspend_count' counter by a
14787 `suspended' flag.
14788 * win32-low.c (thread_rec): Update condition of when to get the
14789 context from the inferior. Rely on ContextFlags being set if it
14790 has already been retrieved. Only suspend the inferior thread if
14791 we haven't already. Warn if that fails.
14792 (continue_one_thread): s/suspend_count/suspended/. Only call
14793 ResumeThread once. Warn if that fails.
14794
14795 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14796
14797 * win32-low.c (win32_wait): Don't read from the inferior when it
14798 has already exited.
14799
14800 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14801
14802 * Makefile.in (win32_low_h): New variable.
14803 (win32-low.o): Add dependency on $(win32_low_h).
14804 (win32-arm-low.o, win32-i386-low.o): New rules.
14805
14806 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14807
14808 * hostio.c: Correct copyright year.
14809
14810 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14811
14812 * Makefile.in (OBS): Add hostio.o.
14813 (hostio.o): New rule.
14814 * server.h (handle_vFile): Declare.
14815 * hostio.c: New file.
14816 * server.c (handle_v_requests): Take packet_len and new_packet_len
14817 for binary packets. Call handle_vFile.
14818 (main): Update call to handle_v_requests.
14819
14820 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14821
14822 * linux-low.c: Include <sched.h>.
14823
14824 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14825
14826 * linux-low.c (linux_tracefork_grandchild): New.
14827 (linux_tracefork_child): Use clone.
14828 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14829
14830 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14831
14832 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14833
14834 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14835
14836 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14837
14838 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14839
14840 * inferiors.c (change_inferior_id): Delete.
14841 (add_pid_to_list, pull_pid_from_list): New.
14842 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14843 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14844 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14845 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14846 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14847 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14848 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14849 (using_threads): Always set to 1.
14850 (handle_extended_wait): New.
14851 (add_process): Do not set TID.
14852 (linux_create_inferior): Set must_set_ptrace_flags.
14853 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14854 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14855 (linux_thread_alive): Rename TID argument to LWPID.
14856 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14857 (linux_wait_for_event): Do not use TID or check using_threads. Update
14858 call to dead_thread_notify. Call handle_extended_wait.
14859 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14860 (send_sigstop): Delete sigstop_sent.
14861 (wait_for_sigstop): Avoid TID.
14862 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14863 (linux_test_for_tracefork): New.
14864 (linux_lookup_signals): Use thread_db_active and
14865 linux_supports_tracefork_flag.
14866 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14867 * linux-low.h (get_process_thread): Avoid TID.
14868 (struct process_ifo): Move thread_known and tid to the end. Remove
14869 sigstop_sent.
14870 (linux_attach_lwp, thread_db_init): Update prototypes.
14871 * server.h (change_inferior_id): Delete prototype.
14872 (add_pid_to_list, pull_pid_from_list): New prototypes.
14873 * thread-db.c (thread_db_use_events): New.
14874 (find_first_thread): Rename to...
14875 (find_one_thread): ...this. Update callers and messages. Do not
14876 call fatal. Check thread_db_use_events. Do not call
14877 change_inferior_id or new_thread_notify.
14878 (maybe_attach_thread): Update. Do not call new_thread_notify.
14879 (thread_db_init): Set thread_db_use_events. Check use_events.
14880 * utils.c (fatal, warning): Correct message prefix.
14881
14882 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14883
14884 * Makefile.in (clean): Remove new files.
14885 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14886 (powerpc-64.o, powerpc-64.c): New rules.
14887 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14888 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14889 with SPE.
14890 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14891 SPE targets.
14892 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14893 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14894 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14895 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14896 (target_regsets): Add AltiVec and SPE register sets.
14897 * configure.ac: Check for AltiVec and SPE.
14898 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14899 (ppc_fill_vrregset, ppc_store_vrregset): New.
14900 (target_regsets): Add AltiVec register set.
14901 * configure: Regenerated.
14902
14903 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14904
14905 * linux-low.c (O_LARGEFILE): Define.
14906 (linux_read_memory): Use /proc/PID/mem.
14907 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14908 * configure, config.in: Regenerated.
14909
14910 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14911
14912 * linux-low.c (linux_wait_for_event): Do not pass signals while
14913 single-stepping.
14914
14915 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14916
14917 * win32-low.c (create_process): New.
14918 (win32_create_inferior): Use create_process instead of
14919 CreateProcess. If create_process failed retry appending an ".exe"
14920 suffix. Store the GetLastError result immediatelly after
14921 create_process calls and use it on the call to error.
14922
14923 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14924
14925 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14926
14927 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14928
14929 * configure.ac: Switch license to GPLv3.
14930
14931 2007-08-01 Michael Snyder <msnyder@access-company.com>
14932
14933 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14934
14935 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14936
14937 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14938 typedef.
14939 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14940 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14941 CloseToolhelp32Snapshot.
14942 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14943 CloseToolhelp32Snapshot.
14944
14945 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14946
14947 * server.c (main): Check for inferior exit before main loop.
14948
14949 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14950
14951 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14952 instead of on tmp_desc.
14953
14954 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14955 Daniel Jacobowitz <dan@codesourcery.com>
14956
14957 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14958 (add_thread): Minor cleanups.
14959 (clear_inferiors): Move lower in the file. Clear the DLL
14960 list.
14961 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14962 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14963 (xml_escape_text): New.
14964 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14965 for qSupported.
14966 (handle_v_cont): Report errors.
14967 (gdbserver_version): Update.
14968 (main): Correct size of own_buf. Do not report initial DLL events.
14969 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14970 (unloaded_dll, xml_escape_text): New.
14971 * win32-low.c (enum target_waitkind): Update comments.
14972 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14973 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14974 (win32_EnumProcessModules, win32_GetModuleInformation)
14975 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14976 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14977 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14978 (win32_Module32First, win32_Module32Next, load_toolhelp)
14979 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14980 (get_child_debug_event): Handle DLL events.
14981 (win32_wait): Likewise.
14982
14983 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14984
14985 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14986 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14987
14988 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14989
14990 * win32-low.c (handle_output_debug_string): Ignore event if not
14991 waiting.
14992
14993 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14994
14995 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14996
14997 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14998
14999 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15000
15001 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15002
15003 * inferiors.c (change_inferior_id): Add comment.
15004 * linux-low.c (check_removed_breakpoint): Add an early
15005 prototype. Improve debug output.
15006 (linux_attach): Doc update.
15007 (linux_detach_one_process, linux_detach): Clean up before releasing
15008 each process.
15009 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15010 * linux-low.h (struct process_info): Doc improvement.
15011 * mem-break.c (delete_all_breakpoints): New.
15012 * mem-break.h (delete_all_breakpoints): New prototype.
15013 * thread-db.c (find_first_thread): New.
15014 (thread_db_create_event): Call it instead of
15015 thread_db_find_new_threads. Clean up unused variables.
15016 (maybe_attach_thread): Remove first thread handling.
15017 (thread_db_find_new_threads): Use find_first_thread.
15018 (thread_db_get_tls_address): Likewise.
15019
15020 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15021
15022 * thread-db.c (thread_db_find_new_threads): Add prototype.
15023 (thread_db_create_event): Check for the main thread before adding
15024 a new thread.
15025 (maybe_attach_thread): Only enable event reporting if TID == 0.
15026 (thread_db_get_tls_address): Check for new threads.
15027
15028 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15029
15030 * linux-low.c (linux_create_inferior): Try execv before execvp.
15031 * spu-low.c (spu_create_inferior): Likewise.
15032
15033 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15034
15035 * linux-low.c (linux_create_inferior): Change execv to execvp.
15036 * spu-low.c (spu_create_inferior): Likewies.
15037
15038 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15039
15040 * Makefile.in (clean): Clean new files instead of deleted ones.
15041 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15042 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15043 rules.
15044 * configure.srv: Specify XML files and new regformats for MIPS and
15045 MIPS64 GNU/Linux.
15046 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15047 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15048 an entry for the restart register.
15049 (mips_cannot_fetch_register, mips_cannot_store_register)
15050 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15051 register names to match the XML descriptions.
15052 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15053 restart register instead of $0.
15054
15055 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15056 Markus Deuling <deuling@de.ibm.com>
15057
15058 * remote-utils.c (decode_xfer_write): New function.
15059 * server.h (decode_xfer_write): Add prototype.
15060 * server.c (handle_query): Add PACKET_LEN argument. Support
15061 qXfer:spu:read and qXfer:spu:write packets.
15062 (main): Pass packet_len to handle_query.
15063 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15064 * target.h (target_ops): Add qxfer_spu.
15065
15066 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15067
15068 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15069 accessing non-seekable spufs files.
15070
15071 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15072
15073 * server.c (handle_query): Add reply for qC packet.
15074
15075 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15076 Leo Zayas <lerele@champenstudios@com>
15077
15078 * server.h (check_remote_input_interrupt_request): New function.
15079 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15080 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15081 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15082 (check_remote_input_interrupt_request): New function.
15083 * server.h (check_remote_input_interrupt_request): Declare.
15084 * win32-low.c (winapi_DebugBreakProcess,
15085 winapi_GenerateConsoleCtrlEvent): New typedefs.
15086 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15087 to 250 ms.
15088 (win32_wait): Check for remote interrupt request
15089 with check_remote_input_interrupt_request.
15090 (win32_request_interrupt): New function.
15091 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15092
15093 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15094
15095 * win32-low.c (debug_registers_changed,
15096 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15097 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15098 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15099 (thread_rec): Get context using the low target.
15100 (child_add_thread): Call thread_added on the low target,
15101 which does the same thing.
15102 (regptr): Delete.
15103 (do_initial_child_stuff): Remove debug registers references.
15104 Set context using the low target. Resume threads after
15105 setting the contexts.
15106 (child_continue): Remove dead variable. Remove debug
15107 registers references.
15108 (child_fetch_inferior_registers): Go through the low target.
15109 (do_child_store_inferior_registers): Remove.
15110 (child_store_inferior_registers): Go through the low target.
15111 (win32_resume): Remove debug registers references.
15112 Set context using the low target.
15113 (handle_exception): Change return type to void. Don't record
15114 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15115 first chance exception.
15116 (get_child_debug_event): Change return type to void. Remove
15117 goto loop. Always return after waiting for debug event.
15118 (win32_wait): Convert to switch statement. Handle spurious
15119 events.
15120
15121 * win32-i386-low.c (debug_registers_changed,
15122 debug_registers_used): New.
15123 (initial_stuff): Rename to ...
15124 (i386_initial_stuff): ... this. Clear debug registers
15125 state variables.
15126 (store_debug_registers): Delete.
15127 (i386_get_thread_context): New.
15128 (load_debug_registers): Delete.
15129 (i386_set_thread_context): New.
15130 (i386_thread_added): New.
15131 (single_step): Rename to ...
15132 (i386_single_step): ... this.
15133 (do_fetch_inferior_registers): Rename to ...
15134 (i386_fetch_inferior_register): ... this.
15135 (i386_store_inferior_register): New.
15136 (the_low_target): Adapt to new interface.
15137
15138 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15139 (arm_get_thread_context): New.
15140 (arm_set_thread_context): New.
15141 (regptr): New.
15142 (do_fetch_inferior_registers): Rename to ...
15143 (arm_fetch_inferior_register): ... this.
15144 (arm_store_inferior_register): New.
15145 (arm_wince_breakpoint): Reimplement as unsigned long.
15146 (arm_wince_breakpoint_len): Define.
15147 (the_low_target): Adapt to new interface.
15148
15149 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15150 load_debug_registers. Add get_thread_context, set_thread_context,
15151 thread_added and store_inferior_register. Rename
15152 fetch_inferior_registers to fetch_inferior_register.
15153 (regptr): Remove declaration.
15154
15155 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15156
15157 * linux-low.c (linux_detach): Change return type to int. Return 0.
15158 * spu-low.c (spu_detach): Likewise.
15159
15160 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15161
15162 * target.h (target_ops): Change return type of detach to int.
15163 Add join.
15164 (join_inferior): New.
15165 * server.c (main): Don't skip detach support on mingw32.
15166 If the inferior doesn't support detaching return error.
15167 Call join_inferior instead of using waitpid.
15168 * linux-low.c (linux_join): New.
15169 (linux_target_op): Add linux_join.
15170 * spu-low.c (spu_join): New.
15171 (spu_target_ops): Add spu_join.
15172 * win32-low.c (win32_detach): Adapt to new interface.
15173 Reopen current_process_handle before detaching. Issue a child
15174 resume before detaching.
15175 (win32_join): New.
15176 (win32_target_op): Add win32_join.
15177
15178 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15179
15180 * win32-low.c (win32-attach): Fix return value.
15181 * target.h (target_ops): Describe ATTACH return values.
15182
15183 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15184
15185 * win32-low.c (GETPROCADDRESS): Define.
15186 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15187 (winapi_DebugSetProcessKillOnExit): Likewise.
15188 (win32_create_inferior): Force usage of ansi CreateProcessA.
15189 (win32_attach): Use GETPROCADDRESS.
15190 (win32_detach): Likewise.
15191
15192 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15193
15194 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15195
15196 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15197
15198 * win32-low.c: Commit leftover changes from 2007-03-29.
15199
15200 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15201
15202 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15203 fields short instead of int. Add explicit padding.
15204 (i387_cache_to_fsave): Remove unnecessary casts.
15205 (i387_fsave_to_cache): Doc fix.
15206 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15207
15208 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15209
15210 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15211 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15212
15213 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15214
15215 * configure.srv (arm*-*-mingw32ce*): Move near the other
15216 arm targets.
15217
15218 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15219
15220 * configure.ac: Add errno checking.
15221 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15222 sys/file.h and malloc.h.
15223 (AC_CHECK_DECLS): Add perror.
15224 (srv_mingwce): Handle.
15225 * configure.srv (i[34567]86-*-cygwin*): Add
15226 win32-i386-low.o to srv_tgtobj.
15227 (i[34567]86-*-mingw*): Likewise.
15228 (arm*-*-mingw32ce*): Add case.
15229 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15230 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15231 [__MINGW32CE__] (strerror): New function.
15232 [__MINGW32CE__] (errno): Define to GetLastError.
15233 [__MINGW32CE__] (COUNTOF): New macro.
15234 (remote_open): Remove extra close call.
15235 * mem-break.c (delete_breakpoint_at): New function.
15236 * mem-break.h (delete_breakpoint_at): Declare.
15237 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15238 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15239 [USE_WIN32API] (read, write): Add char* casts.
15240 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15241 * server.h: Include wincecompat.h on Windows CE.
15242 [HAVE_ERRNO_H]: Check.
15243 (perror): Declare if not declared.
15244 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15245 (perror_with_name): Remove errno declaration.
15246 * wincecompat.h: New.
15247 * wincecompat.c: New.
15248 * win32-low.h: New.
15249 * win32-arm-low.c: New.
15250 * win32-i386-low.c: New.
15251 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15252 (OUTMSG2): Make it safe.
15253 (_T): New macro.
15254 (COUNTOF): New macro.
15255 (NUM_REGS): Get it from the low target.
15256 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15257 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15258 (thread_rec): Let low target handle debug registers.
15259 (child_add_thread): Likewise.
15260 (child_init_thread_list): Likewise.
15261 (continue_one_thread): Likewise.
15262 (regptr): New.
15263 (do_child_fetch_inferior_registers): Move to ...
15264 * win32-i386-low.c: ... here, and rename to ...
15265 (do_fetch_inferior_registers): ... this.
15266 * win32-low.c (child_fetch_inferior_registers):
15267 Go through the low target.
15268 (do_child_store_inferior_registers): Use regptr.
15269 (strwinerror): New function.
15270 (win32_create_inferior): Handle Windows CE.
15271 Use strwinerror instead of strerror on Windows error
15272 codes. Add program to the error output.
15273 Don't close the main thread handle on Windows CE.
15274 (win32_attach): Use coredll.dll on Windows CE.
15275 (win32_kill): Close current process and current
15276 thread handles.
15277 (win32_detach): Use coredll.dll on Windows CE.
15278 (win32_resume): Let low target handle debug registers, and
15279 step request.
15280 (handle_exception): Add/Remove initial breakpoint. Avoid
15281 non-existant WSTOPSIG on Windows CE.
15282 (win32_read_inferior_memory): Cast to remove warning.
15283 (win32_arch_string): Go through the low target.
15284 (initialize_low): Call set_breakpoint_data with the low
15285 target's breakpoint.
15286 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15287 FOP_REGNUM, mappings): Move to ...
15288 * win32-i386-low.c: ... here.
15289 * win32-low.c (win32_thread_info): Move to ...
15290 * win32-low.h: ... here.
15291 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15292 win32-arm-low.c and wincecompat.c.
15293 (all:): Add $EXEEXT.
15294 (install-only:): Likewise.
15295 (gdbserver:): Likewise.
15296 (gdbreplay:): Likewise.
15297 * config.in: Regenerate.
15298 * configure: Regenerate.
15299
15300 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15301
15302 * win32-low.c: Rename typedef thread_info to
15303 win32_thread_info throughout.
15304
15305 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15306
15307 * win32-i386-low.c: Rename to ...
15308 * win32-low.c: ... this.
15309 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15310 * Makefile.in: Likewise.
15311
15312 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15313
15314 * remote-utils.c (monitor_output): Constify msg parameter.
15315 * server.h (monitor_output): Likewise.
15316 * win32-i386-low.c (handle_output_debug_string): New.
15317 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15318 handle_output_debug_string.
15319 (get_child_debug_event): Likewise.
15320
15321 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15322
15323 * server.c (main): Correct strtoul check.
15324
15325 2007-03-27 Jon Ringle <jon@ringle.org>
15326
15327 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15328
15329 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15330
15331 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15332
15333 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15334
15335 * terminal.h: Check HAVE_SGTTY_H.
15336
15337 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15338
15339 * remote-utils.c (remote_open): Print out the assigned port number.
15340
15341 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15342
15343 * remote-utils.c (monitor_output): New function.
15344 * server.c (debug_threads): Define here.
15345 (monitor_show_help): New function.
15346 (handle_query): Handle qRcmd.
15347 (main): Do not handle 'd' packet.
15348 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15349 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15350 of debug_threads.
15351
15352 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15353
15354 * Makefile.in (EXEEXT): New.
15355 (clean): Use $(EXEEXT).
15356
15357 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15358
15359 * target.h (target_ops): Rename send_signal to request_interrupt,
15360 and remove enum target_signal parameter.
15361 * linux-low.c (linux_request_interrupt): Rename from
15362 linux_send_signal, and always send SIGINT.
15363 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15364 and always send SIGINT.
15365 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15366 of send_signal.
15367 (input_interrupt): Likewise.
15368
15369 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15370
15371 * server.c (get_features_xml): Check if target implemented
15372 arch_string.
15373 * win32-i386-low.c (win32_arch_string): New.
15374 (win32_target_ops): Add win32_arch_string as arch_string member.
15375
15376 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15377
15378 * spu-low.c (spu_arch_string): New.
15379 (spu_target_ops): Add spu_arch_string.
15380
15381 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15382
15383 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15384 * configure.ac: Do not check for terminal.h.
15385 * configure, config.in: Regenerated.
15386
15387 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15388
15389 * Makefile.in (OBS): Add $(XML_BUILTIN).
15390 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15391 (clean): Update.
15392 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15393 (arm-with-iwmmxt.c): New.
15394 * config.in, configure: Regenerate.
15395 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15396 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15397 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15398 (arm*-*-linux*): Add iWMMXt and regset support.
15399 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15400 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15401 (arm_store_wmmxregset, target_regsets): New.
15402 * server.c (get_features_xml): Take annex argument. Check builtin
15403 XML documents.
15404 (handle_query): Handle multiple annexes.
15405
15406 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15407
15408 * remote-utils.c [USE_WIN32API] (read, write): Define.
15409 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15410 write.
15411
15412 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15413
15414 * linux-i386-low.c (the_low_target): Set arch_string.
15415 * linux-x86-64-low.c (the_low_target): Likewise.
15416 * linux-low.c (linux_arch_string): New.
15417 (linux_target_ops): Add it.
15418 * linux-low.h (struct linux_target_ops): Add arch_string.
15419 * server.c (write_qxfer_response): Use const void * for DATA.
15420 (get_features_xml): New.
15421 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15422 * target.h (struct target_ops): Add arch_string method.
15423
15424 2007-01-03 Denis Pilat <denis.pilat@st.com>
15425 Daniel Jacobowitz <dan@codesourcery.com>
15426
15427 * linux-low.c (linux_kill): Handle being called with no threads.
15428 * win32-i386-low.c (win32_kill): Likewise.
15429 (get_child_debug_event): Clear current_process_handle.
15430
15431 2006-12-30 Denis PILAT <denis.pilat@st.com>
15432 Daniel Jacobowitz <dan@codesourcery.com>
15433
15434 * remote-utils.c (remote_open): Check the type of specified
15435 serial port devices before opening them.
15436 * server.c (main): Kill the inferior if an error occurs during
15437 the first remote_open.
15438
15439 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15440
15441 * README: Update supported targets.
15442
15443 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15444
15445 * Makefile.in (clean): Remove reg-mips64.c.
15446 (reg-mips64.c, reg-mips64.o): New rules.
15447 * configure.srv: Handle mips64. Include regset support for mips.
15448 * linux-mips-low.c (union mips_register): New.
15449 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15450 (mips_breakpoint, mips_breakpoint_at): Use int.
15451 (mips_collect_register, mips_supply_register)
15452 (mips_collect_register_32bit, mips_supply_register_32bit)
15453 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15454 (mips_store_fpregset, target_regsets): New.
15455 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15456
15457 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15458
15459 * configure.srv: Add target "spu*-*-*".
15460 * Makefile.in (clean): Remove reg-spu.c.
15461 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15462 * spu-low.c: New file.
15463
15464 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15465
15466 * configure.ac: Correct td_thr_tls_get_addr test.
15467 * configure: Regenerated.
15468
15469 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15470
15471 * linux-low.c (linux_wait_for_event): Reformat. Use the
15472 pass_signals array.
15473 * remote-utils.c (decode_address_to_semicolon): New.
15474 * server.c (pass_signals, handle_general_set): New.
15475 (handle_query): Mention QPassSignals for qSupported.
15476 (main): Call handle_general_set.
15477 * server.h (pass_signals, decode_address_to_semicolon): New.
15478
15479 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15480
15481 * server.c (handle_query): Correct error handling for read_auxv.
15482
15483 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15484
15485 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15486 and srv_linux_thread_db to yes.
15487 * linux-s390-low.c (s390_fill_gregset): New function.
15488 (target_regsets): Define data structure.
15489
15490 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15491
15492 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15493 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15494 * config.in, configure: Regenerated.
15495 * inferiors.c (gdb_id_to_thread): New function.
15496 (gdb_id_to_thread_id): Use it.
15497 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15498 * linux-low.h (struct process_info): Add th member.
15499 (thread_db_get_tls_address): New prototype.
15500 * remote-utils.c (decode_address): Make non-static.
15501 * server.c (handle_query): Handle qGetTLSAddr.
15502 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15503 * target.h (struct target_ops): Add get_tls_address.
15504 * thread-db.c (maybe_attach_thread): Save the thread handle.
15505 (thread_db_get_tls_address): New.
15506
15507 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15508
15509 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15510 (linux_resume_one_process): Take a siginfo_t *. Update all
15511 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15512 (struct pending_signals): Add a siginfo_t.
15513 (linux_wait_for_process): Always set last_status.
15514 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15515 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15516 * linux-low.h (struct process_info): Add last_status.
15517
15518 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15519
15520 * remote-utils.c (try_rle): New function.
15521 (putpkt_binary): Use it.
15522
15523 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15524
15525 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15526 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15527 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15528 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15529 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15530 point registers.
15531
15532 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15533
15534 * server.c (terminal_fd): New variable.
15535 (old_foreground_pgrp): Likewise.
15536 (restore_old_foreground_pgrp): New function.
15537 (start_inferior): Record the terminal file descriptor in terminal_fd
15538 and its original foreground group in old_foreground_pgrp. Register
15539 restore_old_foreground_pgrp with atexit().
15540
15541 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15542
15543 * server.c (handle_query): Correct qPart to qXfer.
15544
15545 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15546
15547 * configure.ac: Check for more headers which are missing on
15548 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15549 * configure.srv: Add Cygwin and mingw32.
15550 * remote-utils.c: Don't include headers unconditionally which
15551 are missing on mingw32. Include <winsock.h> for mingw32.
15552 (remote_open): Adjust for mingw32 support. Flush
15553 standard error after writing to it.
15554 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15555 (unblock_async_io, enable_async_io, disable_async_io)
15556 (readchar, getpkt): Update for Winsock support.
15557 (prepare_resume_reply): Expect a protocol signal number.
15558 * server.c: Disable <sys/wait.h> on mingw32.
15559 (start_inferior): Adjust for mingw32 support. Flush
15560 standard error after writing to it.
15561 (attach_inferior): Likewise. Use protocol signal
15562 numbers.
15563 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15564 and names.
15565 * win32-i386-low.c: New file.
15566 * Makefile.in (XM_CLIBS): Set.
15567 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15568 (win32-i386-low.o): New dependency rule.
15569 * linux-low.c (linux_wait): Use target signal numbers.
15570 * target.h (struct target_ops): Doc fix.
15571 * server.h (target_signal_to_name): New prototype.
15572 * gdbreplay.c: Don't include headers unconditionally which
15573 are missing on mingw32. Include <winsock.h> for mingw32.
15574 (remote_close, remote_open): Adjust for Winsock support.
15575 * configure, config.in: Regenerated.
15576
15577 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15578
15579 * server.c (decode_xfer_read, write_qxfer_response): New.
15580 (handle_query): Take a packet length argument. Handle
15581 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15582 the qSupported response.
15583 (main): Update call to handle_query.
15584
15585 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15586
15587 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15588 (putpkt_binary): Renamed from putpkt and adjusted for binary
15589 data.
15590 (putpkt): New wrapper for putpkt_binary.
15591 (readchar): Don't mask off the high bit.
15592 (decode_X_packet): New function.
15593 * server.c (main): Call putpkt_binary if a handler sets the packet
15594 length. Save the length of the incoming packet. Handle 'X'.
15595 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15596
15597 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15598
15599 * server.c (handle_query): Handle qSupported.
15600
15601 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15602
15603 * remote-utils.c (all_symbols_looked_up): New variable.
15604 (look_up_one_symbol): Check it.
15605 * server.h (look_up_one_symbol): New declaration.
15606 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15607
15608 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15609
15610 * Makefile.in (linux-arm-low.o): Update dependencies.
15611 * linux-arm-low.c: Include "gdb_proc_service.h".
15612 (PTRACE_GET_THREAD_AREA): Define.
15613 (ps_get_thread_area): New function.
15614
15615 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15616
15617 * configure.srv (m68k*-*-uclinux*): New target.
15618 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15619 (linux_resume_one_process): Remove extraneous cast.
15620 (linux_read_offsets): New.
15621 (linux_target_op): Add linux_read_offsets on mmuless systems.
15622 * server.c (handle_query): Add qOffsets logic.
15623 * target.h (struct target_ops): Add read_offsets.
15624
15625 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15626
15627 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15628 (PTRACE_GET_THREAD_AREA): Define.
15629 (ps_get_thread_area): New function.
15630 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15631 (linux-x86-64-low.o): Update.
15632
15633 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15634
15635 * configure.ac: Remove checks for prfpregset_t.
15636 * gdb_proc_service.h: New file.
15637 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15638 new "gdb_proc_service.h".
15639 * proc-service.c: Likewise.
15640 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15641 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15642 * Makefile.in (gdb_proc_service_h): Updated.
15643 * configure, config.in: Regenerated.
15644
15645 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15646
15647 * remote-utils.c (prepare_resume_reply): Move declaration
15648 of gdb_id_from_wait to the top of the block.
15649
15650 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15651
15652 * linux-low.c (regsets_store_inferior_registers): Read the regset
15653 from the target before filling it.
15654
15655 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15656
15657 * server.c (attach_inferior): Return SIGTRAP for a successful
15658 attach.
15659
15660 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15661
15662 * Makefile.in (OBS): Add version.o.
15663 (STAGESTUFF): Delete.
15664 (version.o): Add dependencies.
15665 (version.c): Replace rule.
15666 (clean): Remove version.c.
15667 * server.c (gdbserver_version): New.
15668 (gdbserver_usage): Use printf.
15669 (main): Handle --version and --help.
15670 * server.h (version, host_name): Add declarations.
15671
15672 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15673
15674 * linux-arm-low.c:
15675 * linux-arm-low.c:
15676 * inferiors.c:
15677 * i387-fp.h:
15678 * i387-fp.c:
15679 * gdbreplay.c:
15680 * regcache.c:
15681 * proc-service.c:
15682 * mem-break.h:
15683 * mem-break.c:
15684 * linux-x86-64-low.c:
15685 * linux-sh-low.c:
15686 * linux-s390-low.c:
15687 * linux-ppc64-low.c:
15688 * linux-ppc-low.c:
15689 * linux-mips-low.c:
15690 * linux-m68k-low.c:
15691 * linux-m32r-low.c:
15692 * linux-low.h:
15693 * linux-low.c:
15694 * linux-ia64-low.c:
15695 * linux-i386-low.c:
15696 * linux-crisv32-low.c:
15697 * thread-db.c:
15698 * terminal.h:
15699 * target.h:
15700 * target.c:
15701 * server.h:
15702 * server.c:
15703 * remote-utils.c:
15704 * regcache.h:
15705 * utils.c:
15706 * Makefile.in:
15707 * configure.ac:
15708 * gdbserver.1: Add (C) after Copyright. Update the FSF
15709 address.
15710
15711 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15712
15713 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15714 (arm_breakpoint_at): Recognize both breakpoints.
15715 (the_low_target): Use the correct breakpoint instruction.
15716
15717 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15718
15719 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15720 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15721 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15722 (the_low_target): Update.
15723
15724 2005-10-25 Andreas Schwab <schwab@suse.de>
15725
15726 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15727
15728 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15729 (ia64_num_regs): Reduce to 462.
15730
15731 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15732
15733 * acinclude.m4: Correct quoting.
15734 * aclocal.m4: Regenerated.
15735
15736 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15737 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15738 (thread_db_init): Call thread_db_err_str.
15739 * configure.ac: Check for TD_VERSION.
15740 * config.in, configure: Regenerated.
15741
15742 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15743
15744 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15745
15746 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15747
15748 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15749 is not available. Define HAVE_PTRACE_GETREGS if it is.
15750 * config.in, configure: Regenerated.
15751 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15752 * linux-i386-low.c, linux-m68k-low.c: Update to use
15753 HAVE_PTRACE_GETREGS.
15754 * linux-low.c (regsets_fetch_inferior_registers)
15755 (regsets_store_inferior_registers): Only return 0 if we processed
15756 GENERAL_REGS.
15757 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15758 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15759
15760 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15761
15762 * inferiors.c (struct thread_info): Add gdb_id.
15763 (add_thread): Add gdb_id argument.
15764 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15765 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15766 calls to add_thread.
15767 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15768 * server.c (handle_query): Use thread_to_gdb_id.
15769 (handle_v_cont, main): Use gdb_id_to_thread_id.
15770 * server.h (add_thread): Update prototype.
15771 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15772 prototypes.
15773
15774 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15775
15776 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15777 left-padded registers.
15778 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15779 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15780
15781 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15782
15783 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15784 * configure: Regenerate.
15785 * config.in: Regenerate.
15786 * server.h (NEED_DECLARATION_STRERROR):
15787 Replace with !HAVE_DECL_STRERROR.
15788
15789 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15790
15791 * linux-low.c (linux_wait, linux_send_signal): Don't test
15792 an unsigned long variable for > 0 if it could be MAX_ULONG.
15793 * server.c (myresume): Likewise.
15794 * target.c (set_desired_inferior): Likewise.
15795
15796 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15797
15798 * configure.ac: Simplify and improve check for socklen_t.
15799 * configure, config.in: Regenerate.
15800
15801 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15802
15803 * acconfig.h: Remove.
15804 * configure.ac: Add a test for socklen_t. Use three-argument
15805 AC_DEFINE throughout.
15806 * config.in: Regenerated using autoheader 2.59.
15807 * configure: Regenerated.
15808
15809 * gdbreplay.c (socklen_t): Provide a default.
15810 (remote_open): Use socklen_t.
15811 * remote-utils.c (socklen_t): Provide a default.
15812 (remote_open): Use socklen_t.
15813 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15814 unsigned char.
15815
15816 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15817 char for buffers.
15818 * linux-low.c (linux_read_memory, linux_write_memory)
15819 (linux_read_auxv): Likewise.
15820 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15821 (check_mem_write): Likewise.
15822 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15823 Likewise.
15824 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15825 (registers_from_string, register_data): Likewise.
15826 * server.c (handle_query, main): Likewise.
15827 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15828 (decode_M_packet): Likewise.
15829 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15830 * target.h (struct target_ops): Update read_memory, write_memory,
15831 and read_auxv.
15832 (read_inferior_memory, write_inferior_memory): Update.
15833 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15834 to unsigned char *.
15835 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15836 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15837 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15838 linux-s390-low.c, linux-sh-low.c: Update for changes in
15839 read_inferior_memory and the_low_target->breakpoint.
15840
15841 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15842
15843 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15844 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15845 * configure.srv: Add powerpc64-*-linux*.
15846 * linux-ppc64-low.c: New file.
15847
15848 2005-05-23 Orjan Friberg <orjanf@axis.com>
15849
15850 * linux-cris-low.c: New file with support for CRIS.
15851 * linux-crisv32-low.c: Ditto for CRISv32.
15852 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15853 (clean): Add reg-cris.c and reg-crisv32.c.
15854 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15855 reg-crisv32.o, and reg-crisv32.c to make rules.
15856 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15857 recognized targets.
15858
15859 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15860
15861 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15862 of sizeof (PTRACE_XFER_TYPE).
15863 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15864
15865 2005-05-12 Orjan Friberg <orjanf@axis.com>
15866
15867 * target.h (struct target_ops): Add insert_watchpoint,
15868 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15869 pointers for hardware watchpoint support.
15870 * linux-low.h (struct linux_target_ops): Ditto.
15871 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15872 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15873 to linux_target_ops.
15874 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15875 reply packet.
15876 * server.c (main): Recognize 'Z' and 'z' packets.
15877
15878 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15879
15880 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15881 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15882 (the_low_target): Add new members.
15883
15884 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15885
15886 * proc-service.c (ps_lgetregs): Search all_processes instead of
15887 all_threads.
15888
15889 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15890
15891 * server.c (start_inferior): Change return type to int.
15892 (attach_inferior): Change sigptr to int *.
15893 (handle_v_cont, handle_v_requests): Change signal to int *.
15894 (main): Change signal to int.
15895
15896 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15897
15898 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15899 * configure.srv: Add m32r*-*-linux*.
15900 * linux-m32r-low.c: New file.
15901
15902 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15903
15904 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15905
15906 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15907
15908 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15909 Take unsigned long arguments for PIDs.
15910 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15911 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15912 (wait_for_sigstop, linux_resume_one_process)
15913 (regsets_fetch_inferior_registers, linux_send_signal)
15914 (linux_read_auxv): Likewise. Update the types of variables holding
15915 PIDs. Update format string specifiers.
15916 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15917 * remote-utils.c (prepare_resume_reply): Likewise.
15918 * server.c (cont_thread, general_thread, step_thread)
15919 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15920 unsigned long.
15921 (handle_query): Update format specifiers.
15922 (handle_v_cont, main): Use strtoul for thread IDs.
15923 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15924 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15925 (general_thread, step_thread, thread_from_wait)
15926 (old_thread_from_wait): Update.
15927 * target.h (struct thread_resume): Use unsigned long for THREAD.
15928 (struct target_ops): Use unsigned long for arguments to attach and
15929 thread_alive.
15930
15931 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15932
15933 * acinclude.m4: Include bfd/bfd.m4 directly.
15934 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15935 <agriffis@toolchain.org>.
15936 * aclocal.m4, configure: Regenerated.
15937
15938 2005-01-07 Andrew Cagney <cagney@gnu.org>
15939
15940 * configure.ac: Rename configure.in, require autoconf 2.59.
15941 * configure: Re-generate.
15942
15943 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15944
15945 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15946 LIBS when finished.
15947 * aclocal.m4: Regenerated.
15948 * configure: Regenerated.
15949
15950 2004-11-21 Andreas Schwab <schwab@suse.de>
15951
15952 * linux-m68k-low.c (m68k_num_gregs): Define.
15953 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15954 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15955 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15956 (m68k_breakpoint_at): New. Add to the_low_target.
15957
15958 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15959 srv_linux_thread_db to yes.
15960
15961 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15962
15963 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15964 (ARCH_SET_FS): Likewise.
15965 (ARCH_GET_FS): Likewise.
15966 (ARCH_GET_GS): Likewise.
15967
15968 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15969
15970 * linux-i386-low.c (ps_get_thread_area): New.
15971 * linux-x86-64-low.c (ps_get_thread_area): New.
15972 * linux-low.c: Include <sys/syscall.h>.
15973 (linux_kill_one_process): Don't kill the first thread here.
15974 (linux_kill): Kill the first thread here.
15975 (kill_lwp): New function.
15976 (send_sigstop, linux_send_signal): Use it.
15977 * proc-service.c: Clean up #ifdefs.
15978 (fpregset_info): Delete.
15979 (ps_lgetregs): Update and enable implementation.
15980 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15981 implementations.
15982 * remote-utils.c (struct sym_cache, symbol_cache): New.
15983 (input_interrupt): Print a clearer message.
15984 (async_io_enabled): New variable.
15985 (enable_async_io, disable_async_io): Use it. Update comments.
15986 (look_up_one_symbol): Use the symbol cache.
15987 * thread-db.c (thread_db_look_up_symbols): New function.
15988 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15989
15990 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15991
15992 * configure.in: Test for -rdynamic.
15993 * configure: Regenerated.
15994 * Makefile (INTERNAL_LDFLAGS): New.
15995 (gdbserver, gdbreplay): Use it.
15996
15997 2004-09-02 Andrew Cagney <cagney@gnu.org>
15998
15999 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16000
16001 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16002
16003 * linux-low.c (linux_wait): Clear all_processes list also.
16004
16005 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16006
16007 * linux-low.c: Include <errno.h>. Remove extern declaration of
16008 errno.
16009
16010 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16011
16012 * gdbreplay.c, server.h, utils.c: Update copyright years.
16013
16014 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16015
16016 * server.c (main): Print child status or termination signal from
16017 variable 'signal', not 'sig'.
16018
16019 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16020
16021 * linux-low.c (linux_read_memory): Change return type to
16022 int. Check for and return error from ptrace().
16023 * target.c (read_inferior_memory): Change return type to int. Pass
16024 back return status from the_target->read_memory().
16025 * target.h (struct target_ops): Adapt *read_memory() prototype.
16026 Update comment.
16027 (read_inferior_memory): Adapt prototype.
16028 * server.c (main): Return an error packet if
16029 read_inferior_memory() returns an error.
16030
16031 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16032
16033 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16034 Unify with other clean targets.
16035
16036 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16037
16038 * server.c (handle_v_cont): Call set_desired_inferior.
16039
16040 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16041
16042 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16043
16044 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16045
16046 * linux-low.c (linux_wait): Unblock async I/O.
16047 (linux_resume): Block and enable async I/O.
16048 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16049 * server.h (block_async_io, unblock_async_io): Add prototypes.
16050
16051 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16052
16053 * remote-utils.c (remote_open): Print a status notice after
16054 opening a TCP port.
16055 * server.c (attach_inferior): Print a status notice after
16056 attaching.
16057
16058 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16059
16060 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16061
16062 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16063
16064 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16065 error packet.
16066 * server.c, target.h: Update copyright years.
16067
16068 2004-02-25 Roland McGrath <roland@redhat.com>
16069
16070 * target.h (struct target_ops): New member `read_auxv'.
16071 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16072 * linux-low.c (linux_read_auxv): New function.
16073 (linux_target_ops): Initialize `read_auxv' member to that.
16074
16075 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16076
16077 Committed by Jim Blandy <jimb@redhat.com>.
16078
16079 * linux-s390-low.c (s390_num_regs): Update.
16080 (s390_regmap): Remove control registers. Use __s390x__ predefine
16081 instead of GPR_SIZE to distiguish s390 and s390x targets.
16082
16083 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16084
16085 * linux-low.c: Update copyright year.
16086 (check_removed_breakpoint): Clear pending_is_breakpoint.
16087 (linux_set_resume_request, linux_queue_one_thread)
16088 (resume_status_pending_p): New functions.
16089 (linux_continue_one_thread): Use process->resume.
16090 (linux_resume): Only resume threads if there are no pending events.
16091 * linux-low.h (struct process_info): Add resume request
16092 pointer.
16093
16094 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16095
16096 * regcache.c (new_register_cache): Clear the allocated register
16097 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16098
16099 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16100
16101 * linux-low.c (linux_resume): Take a struct thread_resume *
16102 argument.
16103 (linux_wait): Update call.
16104 (resume_ptr): New static variable.
16105 (linux_continue_one_thread): Renamed from
16106 linux_continue_one_process. Use resume_ptr.
16107 (linux_resume): Use linux_continue_one_thread.
16108 * server.c (handle_v_cont, handle_v_requests): New functions.
16109 (myresume): New function.
16110 (main): Handle 'v' case.
16111 * target.h (struct thread_resume): New type.
16112 (struct target_ops): Change argument of "resume" to struct
16113 thread_resume *.
16114 (myresume): Delete macro.
16115
16116 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16117
16118 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16119 (uninstall): Support DESTDIR.
16120
16121 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16122
16123 * configure.srv: Add xscale*linux copy of arm*linux entry.
16124
16125 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16126
16127 * linux-arm-low.c (arm_reinsert_addr): New function.
16128 (the_low_target): Add arm_reinsert_addr.
16129
16130 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16131
16132 * mem-break.c: Remove whitespace at end of file.
16133
16134 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16135
16136 * configure.in: Check whether we need to prototype strerror.
16137 * server.h: Optionally prototype strerror.
16138 * gdbreplay.c (perror_with_name): Use strerror.
16139 * linux-low.c (linux_attach_lwp): Use strerror.
16140 * utils.c (perror_with_name): Use strerror.
16141 * config.in, configure: Regenerated.
16142
16143 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16144
16145 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16146 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16147
16148 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16149
16150 * Makefile.in (SFILES): Update.
16151 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16152 low-sun3.c: Remove files.
16153
16154 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16155
16156 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16157 (linux_detach_one_process, linux_detach): New functions.
16158 (linux_target_ops): Add linux_detach.
16159 * server.c (main): Handle 'D' packet.
16160 * target.h (struct target_ops): Add "detach" member.
16161 (detach_inferior): Define.
16162
16163 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16164
16165 From Kelley Cook <kelleycook@wideopenwest.com>:
16166 * configure.srv: Accept i[34567]86 variants.
16167
16168 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16169
16170 * linux-low.c (linux_wait_for_event): Correct comment typos.
16171 (linux_resume_one_process): Call check_removed_breakpoint.
16172 (linux_send_signal): New function.
16173 (linux_target_ops): Add linux_send_signal.
16174 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16175 of kill.
16176 * target.h (struct target_ops): Add send_signal.
16177
16178 2003-05-29 Jim Blandy <jimb@redhat.com>
16179
16180 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16181 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16182 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16183 away part of the register's value.
16184
16185 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16186
16187 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16188 (linux_wait_for_event, linux_init_signals): Likewise.
16189
16190 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16191
16192 * configure.in: Check for stdlib.h.
16193 * configure: Regenerated.
16194 * config.in: Regenerated.
16195
16196 2003-01-04 Andreas Schwab <schwab@suse.de>
16197
16198 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16199
16200 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16201
16202 * Makefile.in: Remove obsolete code.
16203
16204 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16205
16206 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16207 defined(PT_FPR0_HI).
16208
16209 2002-11-17 Stuart Hughes <seh@zee2.com>
16210
16211 * linux-arm-low.c (arm_num_regs): Increase.
16212 (arm_regmap): Include status register.
16213
16214 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16215
16216 * linux-low.c (register_addr): Remove incorrect -1 check.
16217
16218 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16219
16220 * linux-low.c (linux_create_inferior): Call setpgid. Return
16221 the new PID.
16222 (unstopped_p, linux_signal_pid): Remove.
16223 (linux_target_ops): Remove linux_signal_pid.
16224 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16225 global instead of target method.
16226 * target.h (struct target_ops): Remove signal_pid. Update comment
16227 for create_inferior.
16228 * server.c (signal_pid): New variable.
16229 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16230 gdbserver. Set the child to be the foreground process group.
16231 (attach_inferior): Set signal_pid.
16232
16233 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16234
16235 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16236
16237 2002-08-20 Jim Blandy <jimb@redhat.com>
16238
16239 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16240 default for this.
16241
16242 2002-08-01 Andrew Cagney <cagney@redhat.com>
16243
16244 * Makefile.in: Make chill references obsolete.
16245
16246 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16247
16248 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16249 * configure: Regenerate.
16250 * config.in: Regenerate.
16251
16252 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16253
16254 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16255 (perror_with_name, remote_close, remote_open, expect, play): Static.
16256
16257 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16258
16259 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16260 byte offsets instead of an array of indexes.
16261 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16262
16263 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16264
16265 * regcache.c: Add comment.
16266
16267 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16268
16269 * thread-db.c: New file.
16270 * proc-service.c: New file.
16271 * acinclude.m4: New file.
16272 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16273 proc-service.o, and thread-db.o.
16274 (linux-low.o): Add USE_THREAD_DB.
16275 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16276 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16277 * aclocal.m4: Regenerated.
16278 * config.in: Regenerated.
16279 * configure: Regenerated.
16280 * configure.in: Check for proc_service.h, sys/procfs.h,
16281 thread_db.h, and linux/elf.h headrs.
16282 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16283 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16284 Check for -lthread_db and thread support.
16285 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16286 PowerPC, and SuperH.
16287 * i387-fp.c: Constify arguments.
16288 * i387-fp.h: Likewise.
16289 * inferiors.c: (struct thread_info): Renamed from
16290 `struct inferior_info'. Remove PID member. Use generic inferior
16291 list header. All uses updated.
16292 (inferiors, signal_pid): Removed.
16293 (all_threads): New variable.
16294 (get_thread): Define.
16295 (add_inferior_to_list): New function.
16296 (for_each_inferior): New function.
16297 (change_inferior_id): New function.
16298 (add_inferior): Removed.
16299 (remove_inferior): New function.
16300 (add_thread): New function.
16301 (free_one_thread): New function.
16302 (remove_thread): New function.
16303 (clear_inferiors): Use for_each_inferior and free_one_thread.
16304 (find_inferior): New function.
16305 (find_inferior_id): New function.
16306 (inferior_target_data): Update argument type.
16307 (set_inferior_target_data): Likewise.
16308 (inferior_regcache_data): Likewise.
16309 (set_inferior_regcache_data): Likewise.
16310 * linux-low.c (linux_bp_reinsert): Remove.
16311 (all_processes, stopping_threads, using_thrads)
16312 (struct pending_signals, debug_threads, pid_of): New.
16313 (inferior_pid): Replace with macro.
16314 (struct inferior_linux_data): Remove.
16315 (get_stop_pc, add_process): New functions.
16316 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16317 Use add_process and add_thread.
16318 (linux_attach_lwp): New function, based on old linux_attach. Use
16319 add_process and add_thread. Set stop_expected for new threads.
16320 (linux_attach): New function.
16321 (linux_kill_one_process): New function.
16322 (linux_kill): Kill all LWPs.
16323 (linux_thread_alive): Use find_inferior_id.
16324 (check_removed_breakpoints, status_pending_p): New functions.
16325 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16326 Update. Use WNOHANG. Wait for cloned processes also. Update process
16327 struct for the found process.
16328 (linux_wait_for_event): New function.
16329 (linux_wait): Use it. Support LWPs.
16330 (send_sigstop, wait_for_sigstop, stop_all_processes)
16331 (linux_resume_one_process, linux_continue_one_process): New functions.
16332 (linux_resume): Support LWPs.
16333 (REGISTER_RAW_SIZE): Remove.
16334 (fetch_register): Use register_size instead. Call supply_register.
16335 (usr_store_inferior_registers): Likewise. Call collect_register.
16336 Fix recursive case.
16337 (regsets_fetch_inferior_registers): Improve error message.
16338 (regsets_store_inferior_registers): Add debugging.
16339 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16340 (unstopped_p, linux_signal_pid): New functions.
16341 (linux_target_ops): Add linux_signal_pid.
16342 (linux_init_signals): New function.
16343 (initialize_low): Call it. Initialize using_threads.
16344 * regcache.c (inferior_regcache_data): Add valid
16345 flag.
16346 (get_regcache): Fetch registers lazily. Add fetch argument
16347 and update all callers.
16348 (regcache_invalidate_one, regcache_invalidate): New
16349 functions.
16350 (new_register_cache): Renamed from create_register_cache.
16351 Return the new regcache.
16352 (free_register_cache): Change argument to a void *.
16353 (registers_to_string, registers_from_string): Call get_regcache
16354 with fetch flag set.
16355 (register_data): Make static. Pass fetch flag to get_regcache.
16356 (supply_register): Call get_regcache with fetch flag clear.
16357 (collect_register): Call get_regcache with fetch flag set.
16358 (collect_register_as_string): New function.
16359 * regcache.h: Update.
16360 * remote-utils.c (putpkt): Flush after debug output and use
16361 stderr.
16362 Handle input interrupts while waiting for an ACK.
16363 (input_interrupt): Use signal_pid method.
16364 (getpkt): Flush after debug output and use stderr.
16365 (outreg): Use collect_register_as_string.
16366 (new_thread_notify, dead_thread_notify): New functions.
16367 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16368 and general_thread.
16369 (look_up_one_symbol): Flush after debug output.
16370 * server.c (step_thread, server_waiting): New variables.
16371 (start_inferior): Don't use signal_pid. Update call to mywait.
16372 (attach_inferior): Update call to mywait.
16373 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16374 (main): Don't fetch/store registers explicitly. Use
16375 set_desired_inferior. Support proposed ``Hs'' packet. Update
16376 calls to mywait.
16377 * server.h: Update.
16378 (struct inferior_list, struct_inferior_list_entry): New.
16379 * target.c (set_desired_inferior): New.
16380 (write_inferior_memory): Constify.
16381 (mywait): New function.
16382 * target.h: Update.
16383 (struct target_ops): New signal_pid method.
16384 (mywait): Removed macro, added prototype.
16385
16386 * linux-low.h (regset_func): Removed.
16387 (regset_fill_func, regset_store_func): New.
16388 (enum regset_type): New.
16389 (struct regset_info): Add type field. Use new operation types.
16390 (struct linux_target_ops): stop_pc renamed to get_pc.
16391 Add decr_pc_after_break and breakpoint_at.
16392 (get_process, get_thread_proess, get_process_thread)
16393 (strut process_info, all_processes, linux_attach_lwp)
16394 (thread_db_init): New.
16395
16396 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16397 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16398 (the_low_target): Add new members.
16399 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16400 (i386_store_fpxregset): Constify.
16401 (target_regsets): Add new kind identifier.
16402 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16403 (i386_set_pc): Add debugging.
16404 (i386_breakpoint_at): New function.
16405 (the_low_target): Add new members.
16406 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16407 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16408 (mips_breakpoint_at): New.
16409 (the_low_target): Add new members.
16410 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16411 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16412 (the_low_target): Add new members.
16413 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16414 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16415 (the_low_target): Add new members.
16416 * linux-x86-64-low.c (target_regsets): Add new kind
16417 identifier.
16418
16419 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16420
16421 From Martin Pool <mbp@samba.org>:
16422 * server.c (gdbserver_usage): New function.
16423 (main): Call it.
16424
16425 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16426
16427 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16428 stop_at -> stop_pc.
16429
16430 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16431
16432 * Makefile.in: Remove obsolete code.
16433
16434 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16435
16436 * linux-low.c (regsets_fetch_inferior_registers),
16437 (regsets_store_inferior_registers): Removed cast to int from
16438 ptrace() calls.
16439 * regcache.h: Added declaration of struct inferior_info.
16440
16441 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16442
16443 * inferiors.c (struct inferior_info): Add regcache_data.
16444 (add_inferior): Call create_register_cache.
16445 (clear_inferiors): Call free_register_cache.
16446 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16447 * regcache.c (struct inferior_regcache_data): New.
16448 (registers): Remove.
16449 (get_regcache): New function.
16450 (create_register_cache, free_register_cache): New functions.
16451 (set_register_cache): Don't initialize the register cache here.
16452 (registers_to_string, registers_from_string, register_data): Call
16453 get_regcache.
16454 * regcache.h: Add prototypes.
16455 * server.h: Likewise.
16456
16457 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16458
16459 * mem-break.c: New file.
16460 * mem-break.h: New file.
16461 * Makefile.in: Add mem-break.o rule; update server.h
16462 dependencies.
16463 * inferiors.c (struct inferior_info): Add target_data
16464 member.
16465 (clear_inferiors): Free target_data member if set.
16466 (inferior_target_data, set_inferior_target_data): New functions.
16467 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16468 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16469 * linux-low.c (linux_bp_reinsert): New variable.
16470 (struct inferior_linux_data): New.
16471 (linux_create_inferior): Use set_inferior_target_data.
16472 (linux_attach): Likewise. Call add_inferior.
16473 (linux_wait_for_one_inferior): New function.
16474 (linux_wait): Call it.
16475 (linux_write_memory): Add const.
16476 (initialize_low): Call set_breakpoint_data.
16477 * linux-low.h (struct linux_target_ops): Add breakpoint
16478 handling members.
16479 * server.c (attach_inferior): Remove extra add_inferior
16480 call.
16481 * server.h: Include mem-break.h. Update inferior.c
16482 prototypes.
16483 * target.c (read_inferior_memory)
16484 (write_inferior_memory): New functions.
16485 * target.h (read_inferior_memory)
16486 (write_inferior_memory): Change macros to prototypes.
16487 (struct target_ops): Update comments. Add const to write_memory
16488 definition.
16489
16490 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16491
16492 * linux-low.c (usr_store_inferior_registers): Support
16493 registers which are allowed to fail to store.
16494 * linux-low.h (linux_target_ops): Likewise.
16495 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16496 (ppc_cannot_store_register): FPSCR may not be storable.
16497
16498 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16499
16500 * server.h: Include <string.h> if HAVE_STRING_H.
16501 * ChangeLog: Correct paths in last ChangeLog entry.
16502
16503 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16504
16505 * linux-low.h: Remove obsolete prototypes.
16506 (struct linux_target_ops): New.
16507 (extern the_low_target): New.
16508 * linux-low.c (num_regs, regmap): Remove declarations.
16509 (register_addr): Use the_low_target explicitly.
16510 (fetch_register): Likewise.
16511 (usr_fetch_inferior_registers): Likewise.
16512 (usr_store_inferior_registers): Likewise.
16513 * linux-arm-low.c (num_regs): Remove.
16514 (arm_num_regs): Define.
16515 (arm_regmap): Renamed from regmap, made static.
16516 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16517 made static.
16518 (arm_cannot_store_register): Renamed from cannot_store_register,
16519 made static.
16520 (the_low_target): New.
16521 * linux-i386-low.c (num_regs): Remove.
16522 (i386_num_regs): Define.
16523 (i386_regmap): Renamed from regmap, made static.
16524 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16525 made static.
16526 (i386_cannot_store_register): Renamed from cannot_store_register,
16527 made static.
16528 (the_low_target): New.
16529 * linux-ia64-low.c (num_regs): Remove.
16530 (ia64_num_regs): Define.
16531 (ia64_regmap): Renamed from regmap, made static.
16532 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16533 made static.
16534 (ia64_cannot_store_register): Renamed from cannot_store_register,
16535 made static.
16536 (the_low_target): New.
16537 * linux-m68k-low.c (num_regs): Remove.
16538 (m68k_num_regs): Define.
16539 (m68k_regmap): Renamed from regmap, made static.
16540 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16541 made static.
16542 (m68k_cannot_store_register): Renamed from cannot_store_register,
16543 made static.
16544 (the_low_target): New.
16545 * linux-mips-low.c (num_regs): Remove.
16546 (mips_num_regs): Define.
16547 (mips_regmap): Renamed from regmap, made static.
16548 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16549 made static.
16550 (mips_cannot_store_register): Renamed from cannot_store_register,
16551 made static.
16552 (the_low_target): New.
16553 * linux-ppc-low.c (num_regs): Remove.
16554 (ppc_num_regs): Define.
16555 (ppc_regmap): Renamed from regmap, made static.
16556 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16557 made static.
16558 (ppc_cannot_store_register): Renamed from cannot_store_register,
16559 made static.
16560 (the_low_target): New.
16561 * linux-s390-low.c (num_regs): Remove.
16562 (s390_num_regs): Define.
16563 (s390_regmap): Renamed from regmap, made static.
16564 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16565 made static.
16566 (s390_cannot_store_register): Renamed from cannot_store_register,
16567 made static.
16568 (the_low_target): New.
16569 * linux-sh-low.c (num_regs): Remove.
16570 (sh_num_regs): Define.
16571 (sh_regmap): Renamed from regmap, made static.
16572 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16573 made static.
16574 (sh_cannot_store_register): Renamed from cannot_store_register,
16575 made static.
16576 (the_low_target): New.
16577 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16578 (the_low_target): New.
16579
16580 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16581
16582 * Makefile.in: Add stamp-h target.
16583 * configure.in: Create stamp-h.
16584 * configure: Regenerated.
16585
16586 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16587
16588 * inferiors.c: New file.
16589 * target.c: New file.
16590 * target.h: New file.
16591 * Makefile.in: Add target.o and inferiors.o. Update
16592 dependencies.
16593 * linux-low.c (inferior_pid): New static variable,
16594 moved from server.c.
16595 (linux_create_inferior): Renamed from create_inferior.
16596 Call add_inferior. Return 0 on success instead of a PID.
16597 (linux_attach): Renamed from myattach.
16598 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16599 (linux_thread_alive): Renamed from mythread_alive.
16600 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16601 child dies.
16602 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16603 (regsets_store_inferior_registers): Correct error message.
16604 Add missing ``return 0''.
16605 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16606 (linux_store_registers): Renamed from store_inferior_registers.
16607 (linux_read_memory): Renamed from read_inferior_memory.
16608 (linux_write_memory): Renamed from write_inferior_memory.
16609 (linux_target_ops): New structure.
16610 (initialize_low): Call set_target_ops ().
16611 * remote-utils.c (unhexify): New function.
16612 (hexify): New function.
16613 (input_interrupt): Send signals to ``signal_pid''.
16614 * server.c (inferior_pid): Remove.
16615 (start_inferior): Update create_inferior call.
16616 (attach_inferior): Call add_inferior.
16617 (handle_query): New function.
16618 (main): Call handle_query for `q' packets.
16619 * server.h: Include "target.h". Remove obsolete prototypes.
16620 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16621
16622 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16623
16624 * Makefile.in: Add WARN_CFLAGS. Update configury
16625 dependencies.
16626 * configure.in: Check for <string.h>
16627 * configure: Regenerate.
16628 * config.in: Regenerate.
16629 * gdbreplay.c: Include needed system headers.
16630 (remote_open): Remove strchr prototype.
16631 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16632 * regcache.c (supply_register): Change buf argument to const void *.
16633 (supply_register_by_name): Likewise.
16634 (collect_register): Change buf argument to void *.
16635 (collect_register_by_name): Likewise.
16636 * regcache.h: Add missing prototypes.
16637 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16638 * server.c (handle_query): New function.
16639 (attached): New static variable, moved out of main.
16640 (main): Quiet longjmp clobber warnings.
16641 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16642 * utils.c (error): Remove NORETURN.
16643 (fatal): Likewise.
This page took 0.425483 seconds and 4 git commands to generate.