[PowerPC] Consolidate linux target description selection
[binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2
3 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
4 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
6 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
10 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
11 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
12 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
13 (tdesc_powerpc_e500l): Remove.
14 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
15 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
16 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
17 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
18 linux-ppc-tdesc.h.
19 (ppc_arch_setup): Remove target description matching code. Fill a
20 ppc_linux_features struct and call ppc_linux_match_description
21 with it.
22
23 2018-05-22 Maciej W. Rozycki <macro@mips.com>
24
25 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
26 width of the requested register exceeds the width of the
27 `ptrace' data type.
28 (mips_cannot_store_register): Likewise.
29
30 2018-05-21 Maciej W. Rozycki <macro@mips.com>
31
32 * linux-mips-low.c (mips_fetch_register): New function. Update
33 preceding comment.
34 (mips_store_gregset): Supply 0 rather than $restart for $zero.
35 (the_low_target): Wire `mips_fetch_register'.
36
37 2018-05-10 Joel Brobecker <brobecker@adacore.com>
38
39 * lynx-i386-low.c (LYNXOS_178): New macro.
40 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
41 the layout on LynxOS-178.
42 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
43 handle floating point registers that are not supported by
44 LynxOS-178.
45
46 2018-05-10 Tom Tromey <tom@tromey.com>
47
48 * configure: Rebuild.
49
50 2018-05-10 Joel Brobecker <brobecker@adacore.com>
51
52 PR server/23158:
53 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
54 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
55 Use it to set the expedite_regs field in the given tdesc.
56 * x86-tdesc.h: New file.
57 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
58 Adjust following the addition of the new expedite_regs parameter
59 to init_target_desc.
60 * linux-tic6x-low.c (tic6x_read_description): Likewise.
61 * linux-x86-tdesc.c: #include "x86-tdesc.h".
62 (i386_linux_read_description, amd64_linux_read_description):
63 Adjust following the addition of the new expedite_regs parameter
64 to init_target_desc.
65 * lynx-i386-low.c: #include "x86-tdesc.h".
66 (lynx_i386_arch_setup): Adjust following the addition of the new
67 expedite_regs parameter to init_target_desc.
68 * nto-x86-low.c: #include "x86-tdesc.h".
69 (nto_x86_arch_setup): Adjust following the addition of the new
70 expedite_regs parameter to init_target_desc.
71 * win32-i386-low.c: #include "x86-tdesc.h".
72 (i386_arch_setup): Adjust following the addition of the new
73 expedite_regs parameter to init_target_desc.
74
75 2018-05-10 Joel Brobecker <brobecker@adacore.com>
76
77 PR server/23158:
78 * win32-low.c (win32_create_inferior): Add call to my_wait
79 setting last_status global.
80
81 2018-05-10 Joel Brobecker <brobecker@adacore.com>
82
83 PR server/23158:
84 * win32-low.c (create_process): Only call gdb_tilde_expand if
85 inferior_cwd is not NULL.
86
87 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
88
89 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
90 registers to the cache if their values have changed.
91 (i387_xsave_to_cache): Provide default values for x87 control
92 registers when these features are available, but disabled.
93 * regcache.c (supply_register_by_name_zeroed): New function.
94 * regcache.h (supply_register_by_name_zeroed): Declare new
95 function.
96
97 2018-05-07 Tom Tromey <tom@tromey.com>
98
99 * configure: Rebuild.
100
101 2018-05-04 Tom Tromey <tom@tromey.com>
102
103 * configure: Rebuild.
104
105 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
106 Pedro Alves <palves@redhat.com>
107
108 * linux-aarch64-low.c (aarch64_stopped_data_address):
109 Likewise.
110
111 2018-04-27 Tom Tromey <tom@tromey.com>
112
113 * configure: Rebuild.
114
115 2018-04-23 Tom Tromey <tom@tromey.com>
116
117 * configure: Rebuild.
118
119 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
120
121 * Makefile.in (depcomp): Add "..".
122 (all_deps_files): New and use it.
123
124 2018-04-18 Alan Hayward <alan.hayward@arm.com>
125
126 * configure.srv (aarch64*-*-linux*): Don't include xml.
127 (i[34567]86-*-cygwin*): Likewise.
128 (i[34567]86-*-linux*): Likewise.
129 (i[34567]86-*-lynxos*): Likewise.
130 (i[34567]86-*-mingw32ce*): Likewise.
131 (i[34567]86-*-mingw*): Likewise.
132 (i[34567]86-*-nto*): Likewise.
133 (tic6x-*-uclinux): Likewise.
134 (x86_64-*-linux*): Likewise.
135 (x86_64-*-mingw*): Likewise.
136 (x86_64-*-cygwin*): Likewise.
137
138 2018-04-18 Alan Hayward <alan.hayward@arm.com>
139
140 * tdesc.c: Remove xml parameter.
141
142 2018-04-18 Alan Hayward <alan.hayward@arm.com>
143
144 * server.c (get_features_xml): Remove cast.
145 * tdesc.c (void target_desc::accept): Fill in function.
146 (tdesc_get_features_xml): Remove old xml creation.
147 (print_xml_feature::visit_pre): Add xml vistor.
148 * tdesc.h (struct target_desc): Make xmltarget mutable.
149 (tdesc_get_features_xml): Remove declaration.
150
151 2018-04-18 Alan Hayward <alan.hayward@arm.com>
152
153 * tdesc.c (tdesc_architecture_name): Add new function.
154 (tdesc_osabi_name): Likewise.
155 (tdesc_get_features_xml): Use new functions.
156
157 2018-04-18 Alan Hayward <alan.hayward@arm.com>
158
159 * tdesc.c (tdesc_create_flags): Remove.
160 (tdesc_add_flag): Likewise.
161 (tdesc_named_type): Likewise.
162 (tdesc_create_union): Likewise.
163 (tdesc_create_struct): Likewise.
164 (tdesc_create_vector): Likewise.
165 (tdesc_add_bitfield): Likewise.
166 (tdesc_add_field): Likewise.
167 (tdesc_set_struct_size): Likewise.
168
169 2018-04-18 Alan Hayward <alan.hayward@arm.com>
170
171 * tdesc.c (~target_desc): Remove implictly deleted items.
172 (init_target_desc): Iterate all features.
173 (tdesc_get_features_xml): Use vector.
174 (tdesc_create_feature): Create feature.
175 * tdesc.h (tdesc_feature) Remove
176 (target_desc): Add features.
177
178 2018-04-18 Alan Hayward <alan.hayward@arm.com>
179
180 * Makefile.in: Add common/tdesc.c
181 * tdesc.c (init_target_desc): init all reg_defs from register
182 vector.
183 (tdesc_create_reg): Create tdesc_reg.
184 * tdesc.h (tdesc_feature): Add register vector.
185
186 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
187
188 * tdesc.h (struct target_desc) <features>: Change type to
189 std::vector<std::string>.
190 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
191 changes.
192 (tdesc_get_features_xml): Likewise.
193 (tdesc_create_feature): Likewise.
194
195 2018-03-26 Alan Hayward <alan.hayward@arm.com>
196
197 * regcache.c (find_register_by_number): Return a ref.
198 (find_regno): Use references.
199 (register_size): Likewise.
200 (register_data): Likewise.
201 * tdesc.c (target_desc::~target_desc): Remove free calls.
202 (target_desc::operator==): Use std::vector compare.
203 (init_target_desc): Use reference.
204 (tdesc_create_reg): Use reg constructors.
205 * tdesc.h (struct target_desc): Replace pointer with object.
206
207 2018-03-23 Alan Hayward <alan.hayward@arm.com>
208
209 * regcache.c (find_register_by_number): Make static.
210 (find_regno): Use find_register_by_number
211 * regcache.h (struct reg): Remove declaration.
212
213 2018-03-23 Alan Hayward <alan.hayward@arm.com>
214
215 * tdesc.c (target_desc::~target_desc): Move to here.
216 (target_desc::operator==): Likewise.
217 * tdesc.h (target_desc::~target_desc): Move from here.
218 (target_desc::operator==): Likewise.
219
220 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
221
222 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
223
224 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
225
226 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
227 S390_TDESC_GS.
228 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
229 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
230 and init_registers_s390_gs_linux64.
231
232 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
233
234 * linux-s390-low.c (s390_fill_gs): Remove function.
235 (s390_fill_gsbc): Remove function.
236 (s390_regsets): Set fill functions for the guarded storage regsets
237 to NULL.
238
239 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
240
241 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
242 the word size. Add comment.
243 (s390_get_wordsize): New function.
244 (s390_arch_setup): No longer select a temporary tdesc to fetch the
245 pswm with it. Instead, use s390_get_wordsize to determine the
246 word size first and derive the correct tdesc from that directly.
247
248 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
249
250 * Makefile.in: Include silent-rules.mk.
251 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
252 (COMPILE): Add ECHO_CXX.
253 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
254 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
255 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
256 (version-generated.c): Add ECHO_GEN.
257 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
258 (IPAGENT_COMPILE): Add ECHO_CXX.
259 (%-generated.c): Add ECHO_REGDAT.
260
261 2018-03-14 Tom Tromey <tom@tromey.com>
262
263 PR cli/14977:
264 * ax.c (ax_printf): Special case for NULL.
265
266 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
267
268 * linux-low.c (linux_qxfer_libraries_svr4): Use
269 xml_escape_text_append.
270
271 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
272
273 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
274
275 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
276
277 * server.c (handle_general_set): Remove unnecessary xstrdup.
278
279 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
280
281 * server.c (parse_debug_format_options): Adjust to
282 delim_string_to_char_ptr_vec changes.
283 * thread-db.c (thread_db_load_search): Adjust to
284 dirnames_to_char_ptr_vec changes.
285
286 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
287
288 * target.h (target_enable_btrace, target_disable_btrace)
289 (target_read_btrace, target_read_btrace_conf): Turn macro into
290 inline function. Throw error if target method is not defined.
291 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
292 check for btrace target method. Be prepared to handle exceptions
293 from btrace target methods.
294
295 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
296
297 * server.c (captured_main): Change order of error message printed
298 when the current working directory cannot be found.
299
300 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
301
302 * server.c: Include "filenames.h" and "pathstuff.h".
303 (program_name): Delete variable.
304 (program_path): New anonymous class.
305 (get_exec_wrapper): Use "program_path" instead of
306 "program_name".
307 (handle_v_run): Likewise.
308 (captured_main): Likewise.
309 (process_serial_event): Likewise.
310
311 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
312
313 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
314 (OBJS): Add "pathstuff.o".
315 * server.c (current_directory): New global variable.
316 (captured_main): Initialize "current_directory".
317
318 2018-02-26 Alan Hayward <alan.hayward@arm.com>
319
320 * tdesc.c: Use common/tdesc.h.
321 * tdesc.h: Likewise.
322
323 2018-02-20 Alan Hayward <alan.hayward@arm.com>
324 Simon Marchi <simon.marchi@ericsson.com>
325
326 * Makefile.in: Switch order of make rules.
327
328 2018-02-19 Alan Hayward <alan.hayward@arm.com>
329
330 * Makefile.in: Add common directory in build.
331 * configure.ac: Add common reference.
332 * configure: Regenerate.
333
334 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
335
336 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
337 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
338 * spu-low.c (spu_target_ops): Likewise.
339 * win32-low.c (win32_target_ops): Likewise.
340 * server.c (supported_btrace_packets): Report packets unconditionally.
341 * target.h (target_ops) <supports_btrace>: Remove.
342 (target_supports_btrace): Remove.
343
344 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
345
346 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
347 (handle_btrace_disable): Change return type to void. Use exceptions
348 to report errors.
349 (handle_btrace_general_set): Catch exception and copy message to
350 return message.
351
352 2018-02-08 Tom Tromey <tom@tromey.com>
353
354 * linux-low.c (install_software_single_step_breakpoints): Use
355 make_scoped_restore.
356 * inferiors.c (make_cleanup_restore_current_thread): Remove.
357 (do_restore_current_thread_cleanup): Remove.
358 * gdbthread.h (make_cleanup_restore_current_thread): Don't
359 declare.
360
361 2018-02-08 Tom Tromey <tom@tromey.com>
362
363 * mem-break.c (set_raw_breakpoint_at): Use
364 gdb::unique_xmalloc_ptr.
365
366 2018-01-30 Pedro Alves <palves@redhat.com>
367
368 PR gdb/13211
369 * target.c (target_terminal::terminal_state): Rename to ...
370 (target_terminal::m_terminal_state): ... this.
371
372 2018-01-19 James Clarke <jrtc27@jrtc27.com>
373
374 * linux-low.c (handle_extended_wait): Surround call to
375 thread_db_notice_clone with #ifdef USE_THREAD_DB.
376
377 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
378
379 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
380 linux_ptrace_attach_fail_reason_string now returning an
381 std::string.
382 (linux_attach): Likewise.
383 * thread-db.c (attach_thread): Likewise.
384
385 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
386
387 PR gdb/21559
388 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
389 checking for fs_base/gs_base fields in struct user_regs_struct.
390 * configure: Regenerate.
391
392 2018-01-16 Yao Qi <yao.qi@linaro.org>
393
394 PR gdb/18749
395 * linux-low.c (fetch_register): Call supply_register instead of
396 error.
397
398 2018-01-08 Yao Qi <yao.qi@linaro.org>
399 Simon Marchi <simon.marchi@ericsson.com>
400
401 * Makefile.in (OBS): Remove selftest.o.
402 * configure.ac: Set srv_selftest_objs if $development is true.
403 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
404 * configure: Re-generated.
405 * server.c (captured_main): Wrap variable selftest_filter with
406 GDB_SELF_TEST.
407
408 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
409
410 * server.c (parse_debug_format_options): Return std::string.
411 (handle_monitor_command, captured_main): Adjust.
412
413 2018-01-05 Pedro Alves <palves@redhat.com>
414
415 PR gdb/18653
416 * server.c (captured_main): Pass quiet=false to
417 save_original_signals_state.
418
419 2018-01-01 Joel Brobecker <brobecker@adacore.com>
420
421 * gdbreplay.c (gdbreplay_version): Update copyright year in
422 version message.
423 * server.c (gdbserver_version): Likewise.
424
425 2017-12-08 Tom Tromey <tom@tromey.com>
426
427 * ax.c (ax_printf): Update.
428
429 2017-12-07 Yao Qi <yao.qi@linaro.org>
430
431 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
432 aarch64_linux_read_description.
433 * linux-amd64-ipa.c (idx2mask): New array.
434 (get_ipa_tdesc): Move idx2mask out.
435 (initialize_low_tracepoint): Initialize target descriptions.
436 * linux-i386-ipa.c (idx2mask): New array.
437 (get_ipa_tdesc): Move idx2mask out.
438 (initialize_low_tracepoint): Initialize target descriptions.
439
440 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
441
442 * tdesc.c (struct tdesc_type): Change return type.
443 (tdesc_add_flag): Change parameter type.
444 (tdesc_add_bitfield): Likewise.
445 (tdesc_add_field): Likewise.
446 (tdesc_set_struct_size): Likewise.
447
448 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
449
450 * regcache.c (registers_to_string): Remove unused variable.
451
452 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
453
454 * inferiors.c (for_each_inferior_with_data): Remove.
455 * inferiors.h (for_each_inferior_with_data): Remove.
456 * server.c (handle_qxfer_threads_worker): Change parameter type.
457 (handle_qxfer_threads_proper): Use for_each_thread.
458
459 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
460
461 * inferiors.c (for_each_inferior): Remove.
462 (clear_inferiors): Use for_each_thread.
463 * inferiors.h (for_each_inferior): Remove.
464 * linux-low.c (linux_wait_for_event_filtered): Use
465 for_each_thread.
466 (linux_stabilize_threads): Likewise.
467 * regcache.c (regcache_release): Likewise.
468 * server.c (gdb_wants_all_threads_stopped): Likewise.
469 (clear_pending_status_callback): Remove.
470 (handle_status): Use for_each_thread.
471 (captured_main): Likewise.
472 * win32-low.c (child_init_thread_list): Likewise.
473 (win32_clear_inferiors): Likewise.
474 (fake_breakpoint_event): Likewise.
475
476 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
477
478 * inferiors.h (find_inferior): Remove.
479 * inferiors.c (find_inferior): Remove.
480
481 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
482
483 * linux-low.c (resume_status_pending_p): Update comment.
484 (need_step_over_p): Update comment.
485
486 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
487
488 * linux-low.c (proceed_one_lwp): Return void, change parameter
489 type.
490 (unsuspend_and_proceed_one_lwp): Likewise.
491 (proceed_all_lwps): Use for_each_thread.
492 (unstop_all_lwps): Likewise.
493
494 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
495
496 * linux-low.c (linux_resume_one_thread): Return void, take
497 parameter directly.
498 (linux_resume): Use for_each_thread.
499
500 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
501
502 * linux-low.c (send_sigstop_callback): Return void, change
503 parameter type. Rename to...
504 (send_sigstop): ... this.
505 (suspend_and_send_sigstop_callback): Return void, change parameter
506 type. Rename to...
507 (suspend_and_send_sigstop): ... this.
508 (stop_all_lwps): Use for_each_thread.
509
510 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
511
512 * linux-low.c (lwp_running): Return bool, remove unused
513 argument.
514 (linux_stabilize_threads): Use find_thread.
515
516 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
517
518 * linux-low.c (select_singlestep_lwp_callback): Remove.
519 (count_events_callback): Remove.
520 (select_event_lwp_callback): Remove.
521 (select_event_lwp): Use find_thread/for_each_thread.
522
523 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
524
525 * linux-low.c (not_stopped_callback): Return bool, take filter
526 argument directly.
527 (linux_wait_for_event_filtered): Use find_thread.
528 (linux_wait_1): Likewise.
529
530 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
531
532 * linux-low.c (same_lwp): Remove.
533 (find_lwp_pid): Use find_thread.
534
535 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
536
537 * linux-low.c (delete_lwp_callback): Remove.
538 (linux_mourn): Use for_each_thread.
539
540 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
541
542 * linux-low.c (linux_detach_lwp_callback): Return void, remove
543 args parameter, don't check for pid.
544 (linux_detach): Use for_each_thread.
545
546 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
547
548 * linux-low.c (struct counter): Remove.
549 (second_thread_of_pid_p): Remove.
550 (last_thread_of_process_p): Use find_thread.
551
552 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
553
554 * inferiors.c (find_inferior_in_random): Remove.
555 * inferiors.h (find_inferior_in_random): Remove.
556 * linux-low.c (status_pending_p_callback): Return bool, accept
557 parameter ptid directly.
558 (linux_wait_for_event_filtered): Use find_thread_in_random.
559 (linux_wait_1): Likewise.
560
561 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
562
563 * inferiors.c (find_inferior_id): Remove.
564 (find_thread_ptid): Move implemention from find_inferior_id to
565 here.
566 * inferiors.h (find_inferior_id): Remove.
567 * server.c (handle_status): Use find_thread_ptid.
568 (process_serial_event): Likewise.
569 * thread-db.c (find_one_thread): Likewise.
570 (thread_db_thread_handle): Likewise.
571 * win32-low.c (thread_rec): Likewise.
572 (child_delete_thread): Likewise.
573 (win32_thread_alive): Likewise.
574 (get_child_debug_event): Likewise.
575
576 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
577
578 * linux-mips-low.c (update_watch_registers_callback): Return
579 void, remove pid_p parameter, don't check for pid.
580 (mips_insert_point, mips_remove_point): Use for_each_thread.
581
582 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
583
584 * lynx.low (lynx_delete_thread_callback): Remove.
585 (lynx_mourn): Use for_each_thread.
586
587 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
588
589 * regcache.c (regcache_invalidate_one): Remove.
590 (regcache_invalidate_pid): use for_each_thread.
591
592 2017-11-26 Tom Tromey <tom@tromey.com>
593
594 * linux-low.c (linux_create_inferior): Update.
595
596 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
597
598 * spu-low.c (spu_create_inferior): Fix typo in argument name.
599
600 2017-11-24 Alan Hayward <alan.hayward@arm.com>
601
602 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
603 * linux-aarch64-low.c (initialize_low_arch): Call init func.
604 * linux-aarch64-tdesc-selftest.c: New file.
605 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
606
607 2017-11-24 Alan Hayward <alan.hayward@arm.com>
608
609 * configure.srv: Add new file.
610 * linux-aarch64-low.c (initialize_low_arch): Call init func.
611 * linux-aarch64-tdesc-selftest.c: New file.
612 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
613
614 2017-11-24 Alan Hayward <alan.hayward@arm.com>
615
616 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
617 * linux-aarch64-low.c (initialize_low_arch): Remove init.
618 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
619
620 2017-11-24 Alan Hayward <alan.hayward@arm.com>
621
622 * configure.srv: Add new files.
623 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
624 aarch64_linux_read_description.
625 * linux-aarch64-low.c (aarch64_linux_read_description):
626 Merge with aarch64_arch_setup.
627 (aarch64_arch_setup): Call aarch64_linux_read_description.
628 * linux-aarch64-tdesc.c: New file.
629 * linux-aarch64-tdesc.h: New file.
630
631 2017-11-24 Yao Qi <yao.qi@linaro.org>
632
633 * configure.srv: Set $srv_regobj for tic6x-linux.
634 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
635 (tic6x_read_description): Move some code to tic6x_arch_setup.
636 (tic6x_tdesc_test): New function.
637 (initialize_low_arch): Call selftests::register_test.
638
639 2017-11-22 Yao Qi <yao.qi@linaro.org>
640
641 * remote-utils.c (prepare_resume_reply): Use memcpy.
642
643 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
644
645 * linux-low.c (kill_one_lwp_callback): Return void, take
646 argument directly, don't filter on pid.
647 (linux_kill): Use for_each_thread.
648
649 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
650
651 * linux-low.c (need_step_over_p): Return bool, remove dummy
652 argument.
653 (linux_resume, proceed_all_lwps): Use find_thread.
654
655 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
656
657 * linux-low.c (resume_status_pending_p): Return bool, remove
658 flag_p argument.
659 (linux_resume): Use find_thread.
660
661 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
662
663 * linux-low.c (struct thread_resume_array): Remove.
664 (linux_set_resume_request): Return void, take arguments
665 directly.
666 (linux_resume): Use for_each_thread.
667
668 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
669
670 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
671 return bool, remove data argument.
672 (linux_stabilize_threads): Use find_thread.
673
674 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
675
676 * linux-low.c (unsuspend_one_lwp): Remove.
677 (unsuspend_all_lwps): Use for_each_thread, inline code from
678 unsuspend_one_lwp.
679
680 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
681
682 * gdbthread.h (find_thread): Add overload with ptid_t filter.
683 * linux-low.c (struct iterate_over_lwps_args): Remove.
684 (iterate_over_lwps_filter): Remove.
685 (iterate_over_lwps): Use find_thread.
686
687 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
688
689 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
690 (linux_handle_new_gdb_connection): Use for_each_thread, inline
691 code from reset_lwp_ptrace_options_callback.
692
693 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
694
695 * linux-arm-low.c (struct update_registers_data): Remove.
696 (update_registers_callback): Return void, take arguments
697 directly, don't check thread's pid.
698 (arm_insert_point, arm_remove_point): Use for_each_thread.
699
700 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
701
702 * win32-low.c (continue_one_thread): Return void, take argument
703 directly.
704 (child_continue): Use for_each_thread.
705
706 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
707
708 * win32-i386-low.c (update_debug_registers_callback): Rename
709 to ...
710 (update_debug_registers): ... this, return void, remove pid_p arg.
711 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
712
713 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
714
715 * inferiors.h (struct process_info): Add constructor, initialize
716 fields..
717 <syscalls_to_catch>: Change type to std::vector<int>.
718 * inferiors.c (add_process): Allocate process_info with new.
719 (remove_process): Free process_info with delete.
720 * linux-low.c (handle_extended_wait): Adjust.
721 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
722 * server.c (handle_general_set): Adjust.
723
724 2017-11-16 Pedro Alves <palves@redhat.com>
725
726 * remote-utils.c (remote_close): Block SIGIO signals instead of
727 uninstalling the SIGIO handler.
728
729 2017-11-16 Alan Hayward <alan.hayward@arm.com>
730
731 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
732
733 2017-11-16 Yao Qi <yao.qi@linaro.org>
734
735 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
736 (tic6x_store_gregset): Likewise.
737 (tic6x_usrregs_info): Move it up.
738
739 2017-11-15 Alan Hayward <alan.hayward@arm.com>
740
741 * Makefile.in: Update arch rules.
742 * configure.srv: Explicitly mark arch/ files.
743
744 2017-11-13 Andreas Schwab <schwab@suse.de>
745
746 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
747 function.
748 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
749
750 2017-11-06 Pedro Alves <palves@redhat.com>
751
752 * config.in, configure: Regenerate.
753
754 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
755
756 * target.c (struct thread_search): Remove.
757 (thread_search_callback): Remove.
758 (prepare_to_access_memory): Use for_each_thread instead of
759 find_inferior. Inline code from thread_search_callback.
760
761 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
762
763 * server.c (struct visit_actioned_threads_data): Remove.
764 (visit_actioned_threads): Change prototype to take arguments
765 directly.
766 (resume): Use find_thread instead of find_inferior.
767
768 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
769
770 * server.c (queue_stop_reply_callback): Change prototype, return
771 void.
772 (find_status_pending_thread_callback): Remove.
773 (handle_status): Replace find_inferior with find_thread and
774 for_each_thread.
775
776 2017-10-25 Alan Hayward <alan.hayward@arm.com>
777
778 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
779 with REGNO.
780 (aarch64_store_gregset): Likewise.
781 (aarch64_fill_fpregset): Likewise.
782 (aarch64_store_fpregset): Likewise.
783
784 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
785
786 * gdbthread.h (find_thread, for_each_thread): New functions.
787 * inferiors.c (thread_of_pid): Remove.
788 (find_any_thread_of_pid): Use find_thread.
789 * linux-low.c (num_lwps): Use for_each_thread.
790
791 2017-10-17 Yao Qi <yao.qi@linaro.org>
792
793 * Makefile.in: Remove one rule.
794 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
795
796 2017-10-17 Yao Qi <yao.qi@linaro.org>
797
798 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
799 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
800
801 2017-10-17 Yao Qi <yao.qi@linaro.org>
802
803 * configure.srv: Rename arm.o with arch/arm.o.
804
805 2017-10-17 Yao Qi <yao.qi@linaro.org>
806
807 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
808 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
809 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
810 (arch-i386.o, arch-amd64.o): Remove rules.
811 (arch/%.o): New rule.
812 Update POSTCOMPILE and COMPILE.pre.
813 * configure.ac: Invoke AC_CONFIG_COMMANDS.
814 * configure: Re-generated.
815 * configure.srv: Replace arch-i386.o with arch/i386.o.
816 Replace arch-amd64.o with arch/amd64.o.
817
818 2017-10-16 Yao Qi <yao.qi@linaro.org>
819
820 * configure: Regenerated.
821
822 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
823
824 * inferiors.h: (struct inferior_list): Remove.
825 (struct inferior_list_entry); Remove.
826 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
827 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
828 get_first_inferior): Remove.
829 (for_each_inferior, for_each_inferior_with_data, find_inferior,
830 find_inferior_id, find_inferior_in_random): Change signature.
831 * inferiors.c (all_threads): Change type to
832 std::list<thread_info *>.
833 (get_thread): Remove macro.
834 (find_inferior, find_inferior_id): Change signature, implement
835 using find_thread.
836 (find_inferior_in_random): Change signature, implement using
837 find_thread_in_random.
838 (for_each_inferior, for_each_inferior_with_data): Change
839 signature, implement using for_each_thread.
840 (add_inferior_to_list, remove_inferior): Remove.
841 (add_thread, get_first_thread, thread_of_pid,
842 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
843 (get_first_inferior, one_inferior_p, clear_inferior_list):
844 Remove.
845 (clear_inferiors, get_thread_process): Update.
846 * gdbthread.h: Include <list>.
847 (struct thread_info) <entry>: Remove field.
848 <id>: New field.
849 (all_threads): Change type to std::list<thread_info *>.
850 (get_first_inferior): Add doc.
851 (find_thread, for_each_thread, find_thread_in_random): New
852 functions.
853 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
854 * linux-arm-low.c (update_registers_callback): Update.
855 * linux-low.c (second_thread_of_pid_p): Update.
856 (kill_one_lwp_callback, linux_detach_lwp_callback,
857 delete_lwp_callback, status_pending_p_callback, same_lwp,
858 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
859 iterate_over_lwps, not_stopped_callback,
860 resume_stopped_resumed_lwps, count_events_callback,
861 select_singlestep_lwp_callback, select_event_lwp_callback,
862 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
863 suspend_and_send_sigstop_callback, wait_for_sigstop,
864 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
865 lwp_running, linux_set_resume_request, resume_status_pending_p,
866 need_step_over_p, start_step_over, linux_resume_one_thread,
867 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
868 reset_lwp_ptrace_options_callback): Update.
869 * linux-mips-low.c (update_watch_registers_callback): Update.
870 * regcache.c (regcache_invalidate_one, regcache_invalidate):
871 Update.
872 (free_register_cache_thread_one): Remove.
873 (regcache_release): Update.
874 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
875 handle_qxfer_threads_worker): Update.
876 (handle_query): Update, use list iterator.
877 (visit_actioned_threads, handle_pending_status,
878 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
879 clear_pending_status_callback, set_pending_status_callback,
880 find_status_pending_thread_callback, handle_status,
881 process_serial_event): Update.
882 * target.c (thread_search_callback): Update.
883 * thread-db.c (thread_db_get_tls_address): Update.
884 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
885 Update.
886 * win32-i386-low.c (update_debug_registers_callback): Update.
887 * win32-low.c (delete_thread_info, child_delete_thread,
888 continue_one_thread, suspend_one_thread,
889 get_child_debug_event): Adjust.
890
891 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
892
893 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
894 * inferiors.h: Include <list>.
895 (struct process_info) <entry>: Remove field.
896 <pid>: New field.
897 (pid_of): Change macro to function.
898 (ptid_of, lwpid_of): Remove macro.
899 (all_processes): Change type to std::list<process_info *>.
900 (ALL_PROCESSES): Remove macro.
901 (for_each_process, find_process): New function.
902 * inferiors.c (all_processes): Change type to
903 std::list<process_info *>.
904 (find_thread_process): Adjust.
905 (add_process): Likewise.
906 (remove_process): Likewise.
907 (find_process_pid): Likewise.
908 (get_first_process): Likewise.
909 (started_inferior_callback): Remove.
910 (have_started_inferiors_p): Adjust.
911 (attached_inferior_callback): Remove.
912 (have_attached_inferiors_p): Adjust.
913 * linux-low.c (check_zombie_leaders): Likewise.
914 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
915 (x86_linux_update_xmltarget): Adjust.
916 * server.c (handle_query): Likewise.
917 (gdb_reattached_process): Remove.
918 (handle_status): Adjust.
919 (kill_inferior_callback): Likewise.
920 (detach_or_kill_inferior): Remove.
921 (print_started_pid): Likewise.
922 (print_attached_pid): Likewise.
923 (detach_or_kill_for_exit): Update.
924 (process_serial_event): Likewise.
925 * linux-arm-low.c (arm_new_fork): Likewise.
926
927 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
928
929 * dll.h: Include <list>.
930 (struct dll_info): Add constructor.
931 <entry>: Remove field.
932 (all_dlls): Change type to std::list<dll_info>.
933 * dll.c: Include <algorithm>.
934 (get_dll): Remove macro.
935 (all_dlls): Change type to std::list<dll_info *>.
936 (free_one_dll): Remove.
937 (match_dll): Likewise.
938 (loaded_dll): Adjust.
939 (unloaded_dll): Adjust to all_dlls type change, use
940 std::find_if. Inline code from match_dll.
941 (clear_dlls): Adjust to all_dlls type change.
942 * server.c (emit_dll_description): Remove.
943 (handle_qxfer_libraries): Adjust to all_dlls type change,
944 integrate emit_dll_description's functionality.
945
946 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
947
948 * linux-low.h (struct linux_target_ops) <delete_process>: New
949 field.
950 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
951 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
952 (struct linux_target_ops): Add delete_process callback.
953 * linux-arm-low.c (arm_delete_process): New.
954 (struct linux_target_ops): Add delete_process callback.
955 * linux-bfin-low.c (struct linux_target_ops): Likewise.
956 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
957 * linux-m32r-low.c (struct linux_target_ops): Likewise.
958 * linux-mips-low.c (mips_linux_delete_process): New.
959 (struct linux_target_ops): Add delete_process callback.
960 * linux-ppc-low.c (struct linux_target_ops): Likewise.
961 * linux-s390-low.c (struct linux_target_ops): Likewise.
962 * linux-sh-low.c (struct linux_target_ops): Likewise.
963 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
964 * linux-tile-low.c (struct linux_target_ops): Likewise.
965 * linux-x86-low.c (x86_linux_delete_process): New.
966 (struct linux_target_ops): Add delete_process callback.
967 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
968
969 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
970
971 * linux-aarch64-low.c (the_low_target): Add thread delete
972 callback.
973 * linux-arm-low.c (arm_delete_thread): New function.
974 (the_low_target): Add thread delete callback.
975 * linux-bfin-low.c (the_low_target): Likewise.
976 * linux-crisv32-low.c (the_low_target): Likewise.
977 * linux-low.c (delete_lwp): Invoke delete_thread callback if
978 set.
979 * linux-low.h (struct linux_target_ops) <delete_thread>: New
980 field.
981 * linux-m32r-low.c (the_low_target): Add thread delete callback.
982 * linux-mips-low.c (mips_linux_delete_thread): New function.
983 (the_low_target): Add thread delete callback.
984 * linux-ppc-low.c (the_low_target): Likewise.
985 * linux-s390-low.c (the_low_target): Likewise.
986 * linux-sh-low.c (the_low_target): Likewise.
987 * linux-tic6x-low.c (the_low_target): Likewise.
988 * linux-tile-low.c (the_low_target): Likewise.
989 * linux-x86-low.c (the_low_target): Likewise.
990 * linux-xtensa-low.c (the_low_target): Likewise.
991
992 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
993
994 * win32-low.c: Include "common-inferior.h".
995
996 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
997
998 * inferiors.c (set_inferior_cwd): New function.
999 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1000 (handle_query): Inform that QSetWorkingDir is supported.
1001 * win32-low.c (create_process): Pass the inferior's cwd to
1002 CreateProcess.
1003
1004 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1005
1006 * inferiors.c (current_inferior_cwd): New global variable.
1007 (get_inferior_cwd): New function.
1008 * inferiors.h (struct process_info) <cwd>: New field.
1009
1010 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1011
1012 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1013 (OBS): Add gdb_tilde_expand.o.
1014
1015 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1016
1017 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1018 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1019
1020 2017-09-29 Pedro Alves <palves@redhat.com>
1021
1022 * ax.c (gdb_parse_agent_expr): Constify.
1023 * ax.h (gdb_parse_agent_expr): Constify.
1024 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1025 Constify.
1026 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1027 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1028 * remote-utils.h (read_ptid): Constify.
1029 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1030 (process_point_options, process_serial_event): Constify.
1031 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1032 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1033 (cmd_qtbuffer): Constify.
1034
1035 2017-09-29 Pedro Alves <palves@redhat.com>
1036
1037 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1038 fails.
1039
1040 2017-09-29 Pedro Alves <palves@redhat.com>
1041
1042 * linux-low.c (handle_extended_wait): Pass parent thread instead
1043 of process to thread_db_notice_clone.
1044 * linux-low.h (thread_db_notice_clone): Replace parent process
1045 parameter with parent thread parameter.
1046 * thread-db.c (find_one_thread): Add comment.
1047 (thread_db_notice_clone): Replace parent process parameter with
1048 parent thread parameter. Temporarily switch to the parent thread.
1049
1050 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1051
1052 * gdbthread.h: Include "common-gdbthread.h".
1053 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1054 "if" when validating the ptid.
1055 * remote-utils.c: Include "gdbthread.h".
1056 (prepare_resume_reply): Use "switch_to_thread".
1057 * target.c (done_accessing_memory): Likewise.
1058
1059 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1060
1061 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1062 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1063 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1064 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1065 s390x-gs-linux64-ipa.o to ipa_obj.
1066 * linux-s390-low.c (HWCAP_S390_GS): New define.
1067 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1068 New functions.
1069 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1070 (s390_arch_setup): Check for guarded-storage support and choose
1071 appropriate tdesc.
1072 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1073 init_registers_s390x_gs_linux64.
1074 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1075 enum value.
1076 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1077 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1078
1079 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1080
1081 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1082
1083 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1084
1085 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1086 (thread_db_thread_handle): Declare.
1087 * linux-low.c (linux_target_ops): Initialize thread_handle.
1088 * server.c (handle_qxfer_threads_worker): Add support for
1089 "handle" attribute.
1090 * target.h (struct target_ops): Add new function pointer,
1091 thread_handle.
1092 (target_thread_handle): Define.
1093 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1094 field in lwp.
1095 (thread_db_thread_handle): New function.
1096
1097 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1098
1099 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1100 * linux-low.h (thread_db_notice_clone): Declare.
1101 * thread-db.c (thread_db_notice_clone): New function.
1102
1103 2017-09-21 Pedro Alves <palves@redhat.com>
1104
1105 * server.c (gdb_read_memory, handle_status, process_serial_event)
1106 (handle_serial_event, handle_target_event): Adjust to
1107 set_desired_thread prototype change.
1108 * target.c (set_desired_thread): Remove 'use_general' parameter
1109 and adjust.
1110 * target.h (set_desired_thread): Remove 'use_general' parameter.
1111
1112 2017-09-20 Tom Tromey <tom@tromey.com>
1113
1114 * target.c (target_terminal::terminal_state): Define.
1115 (target_terminal::init): Rename from target_terminal_init.
1116 (target_terminal::inferior): Rename from
1117 target_terminal_inferior.
1118 (target_terminal::ours): Rename from target_terminal_ours.
1119 (target_terminal::ours_for_output, target_terminal::info): New.
1120
1121 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1122
1123 * server.c (accumulate_file_name_length): Remove.
1124 (emit_dll_description): Adjust to std::string change.
1125 (handle_qxfer_libraries): Use std::string to hold document.
1126
1127 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1128
1129 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1130 return type of xml_escape_text.
1131 * server.c (emit_dll_description): Likewise.
1132
1133 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1134
1135 * server.c (captured_main): Accept argument for --selftest.
1136 Update run_tests call.
1137 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1138 when registering selftests.
1139
1140 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1141
1142 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1143 instead of "VEC" for "target_desc.reg_defs".
1144 (regcache_cpy): Likewise.
1145 (registers_to_string): Likewise.
1146 (registers_from_string): Likewise.
1147 (find_regno): Likewise.
1148 (supply_regblock): Likewise.
1149 (regcache_raw_read_unsigned): Likewise.
1150 * tdesc.c (init_target_desc): Likewise.
1151 (tdesc_create_reg): Likewise.
1152 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1153 (struct target_desc) <reg_defs>: Convert to "std::vector".
1154 (target_desc): Do not initialize "reg_defs".
1155 (~target_desc): Update code to use "std::vector" instead of "VEC"
1156 for "target_desc.reg_defs".
1157 (operator==): Likewise.
1158
1159 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1160
1161 * inferiors.h (thread_to_gdb_id): Remove.
1162 * inferiors.c (thread_to_gdb_id): Remove.
1163 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1164 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1165 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1166 Likewise.
1167 * nto-low.c (nto_fetch_registers, nto_store_registers,
1168 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1169
1170 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1171
1172 * inferiors.h (gdb_id_to_thread_id): Remove.
1173 * inferiors.c (gdb_id_to_thread_id): Remove.
1174 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1175 removal. Move pid declaration closer to where it's used.
1176
1177 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1178
1179 * server.c (handle_detach): New function.
1180 (process_serial_event): Move code out, call handle_detach.
1181
1182 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1183
1184 * server.c (require_running): Rename to ...
1185 (require_running_or_return): ... this ...
1186 (require_running_or_break): ... and this.
1187 (handle_query, process_serial_event): Adjust.
1188
1189 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1190
1191 * linux-low.c (linux_set_resume_request): Remove unused
1192 variables.
1193
1194 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1195
1196 * server.c (first_thread_of): Remove.
1197 (process_serial_event): Replace usage of first_thread_of with
1198 find_any_thread_of_pid.
1199 * tracepoint.c (same_process_p): Remove.
1200 (gdb_agent_about_to_close): Replace usage of same_process_p with
1201 find_any_thread_of_pid.
1202 * linux-x86-low.c (same_process_callback): Remove.
1203 (x86_arch_setup_process_callback): Replace usage of
1204 same_process_callback with find_any_thread_of_pid.
1205 * thread-db.c (any_thread_of): Remove.
1206 (switch_to_process): Replace usage of any_thread_of with
1207 find_any_thread_of_pid.
1208 * inferiors.c (thread_pid_matches_callback): Remove.
1209 (find_thread_process): Adjust to use find_any_thread_of_pid.
1210
1211 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1212
1213 * regcache.c (get_thread_regcache): Guard calls to "memset"
1214 with "!VEC_empty".
1215
1216 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1217
1218 * linux-low.c (handle_extended_wait): Use
1219 "allocate_target_description" instead of "XNEW".
1220 * linux-x86-low.c (initialize_low_arch): Likewise.
1221
1222 2017-09-05 Yao Qi <yao.qi@linaro.org>
1223
1224 * configure.srv (srv_i386_regobj): Remove.
1225 (srv_amd64_regobj): Remove.
1226 (srv_regobj): Set it to "" for x86 non-linux targets.
1227 * linux-x86-tdesc.c (i386_linux_read_description):
1228 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1229 (init_registers_i386): Remove the declaration.
1230 (tdesc_i386): Remove the declaration.
1231 (lynx_i386_arch_setup): Call i386_create_target_description.
1232 * nto-x86-low.c: Likewise.
1233 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1234 [!__x86_64__]: include arch/i386.h.
1235 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1236
1237 2017-09-05 Yao Qi <yao.qi@linaro.org>
1238
1239 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1240 i386/amd64-XXX-linux from it.
1241
1242 2017-09-05 Yao Qi <yao.qi@linaro.org>
1243
1244 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1245 false.
1246 (ipa_amd64_linux_regobj): Remove.
1247 (ipa_x32_linux_regobj): Remove.
1248
1249 2017-09-05 Yao Qi <yao.qi@linaro.org>
1250
1251 * Makefile.in (arch-amd64.o): New rule.
1252 * configure.srv: Append arch-amd64.o.
1253 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1254 (get_ipa_tdesc): Call amd64_linux_read_description.
1255 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1256 and init_registers_amd64_XXX.
1257 * linux-x86-low.c (x86_linux_read_description): Call
1258 amd64_linux_read_description.
1259 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1260 (initialize_low_arch): Don't call init_registers_x32_XXX and
1261 init_registers_amd64_XXX.
1262 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1263 and tdesc_amd64_XXX.
1264 [__x86_64__] (amd64_tdesc_test): New function.
1265 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1266 and init_registers_amd64_XXX.
1267 * linux-x86-tdesc.c: Include arch/amd64.h.
1268 (xcr0_to_tdesc_idx): New function.
1269 (i386_linux_read_description): New function.
1270 (amd64_get_ipa_tdesc_idx): New function.
1271 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1272 (amd64_get_ipa_tdesc): Declare.
1273
1274 2017-09-05 Yao Qi <yao.qi@linaro.org>
1275
1276 * configure.srv (srv_i386_linux_xmlfiles): Remove
1277 i386/i386-XXX-linux.xml from it.
1278
1279 2017-09-05 Yao Qi <yao.qi@linaro.org>
1280
1281 * configure.srv: Set srv_i386_linux_regobj empty if $development
1282 is false.
1283 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1284 initialize_low_tdesc.
1285 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1286 with #if initialize_low_tdesc.
1287 * linux-x86-tdesc-selftest.c: New file.
1288 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1289
1290 2017-09-05 Yao Qi <yao.qi@linaro.org>
1291
1292 * Makefile.in (arch-i386.o): New rule.
1293 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1294 (x86_64-*-linux*): Likewise.
1295 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1296 include arch/i386.h.
1297 (i386_linux_read_description): Remove code and call
1298 i386_create_target_description.
1299 * tdesc.c (allocate_target_description): New function.
1300 * tdesc.h (set_tdesc_architecture): Remove declaration.
1301 (set_tdesc_osabi): Likewise.
1302
1303 2017-09-05 Yao Qi <yao.qi@linaro.org>
1304
1305 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1306 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1307 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1308 .xmltarget.
1309 * server.c (get_features_xml): Call tdesc_get_features_xml.
1310 * tdesc.c (set_tdesc_architecture): New function.
1311 (set_tdesc_osabi): New function.
1312 (tdesc_get_features_xml): New function.
1313 (tdesc_create_feature): Add an argument.
1314 * tdesc.h (struct target_desc) <features>: New field.
1315 <arch, osabi>: New field.
1316 (~target_desc): xfree features, arch, and osabi.
1317 (target_desc::oerator==): Don't compare .xmltarget.
1318 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1319 (set_tdesc_osabi): Likewise.
1320 (tdesc_get_features_xml): Likewise.
1321
1322 2017-09-05 Yao Qi <yao.qi@linaro.org>
1323
1324 * linux-x86-tdesc.c: Include selftest.h.
1325 (i386_tdesc_test): New function.
1326 (initialize_low_tdesc): Call selftests::register_test.
1327 * tdesc.h: Include regdef.h.
1328 (target_desc): Override operator == and !=.
1329
1330 2017-09-05 Yao Qi <yao.qi@linaro.org>
1331
1332 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1333 (ipa_obj): Likewise.
1334 * linux-i386-ipa.c: Include common/x86-xstate.h
1335 (get_ipa_tdesc): Call i386_linux_read_description.
1336 (initialize_low_tracepoint): Don't call init_registers_XXX
1337 functions, call initialize_low_tdesc instead.
1338 * linux-x86-low.c (x86_linux_read_description): Call
1339 i386_linux_read_description.
1340 (initialize_low_arch): Don't call init_registers_i386_XXX
1341 functions, call initialize_low_tdesc.
1342 * linux-x86-tdesc.c: New file.
1343 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1344 (i386_get_ipa_tdesc_idx): Declare.
1345 (i386_get_ipa_tdesc): Declare.
1346 (initialize_low_tdesc): Declare.
1347
1348 2017-09-05 Yao Qi <yao.qi@linaro.org>
1349
1350 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1351 instead of 0.
1352
1353 2017-09-05 Yao Qi <yao.qi@linaro.org>
1354
1355 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1356 * regcache.c (get_thread_regcache): Use VEC_length.
1357 (init_register_cache): Likewise.
1358 (regcache_cpy): Likewise.
1359 (registers_to_string): Iterate reg_defs via VEC_iterate.
1360 (find_regno): Likewise.
1361 (find_register_by_number): Use VEC_index.
1362 (register_size): Call find_register_by_number.
1363 (register_data): Call find_register_by_number.
1364 (supply_regblock): Use VEC_length.
1365 (regcache_raw_read_unsigned): Likewise.
1366 * tdesc.c (init_target_desc): Iterate reg_defs via
1367 VEC_iterate.
1368 (default_description): Update initializer.
1369 (copy_target_description): Don't update field num_registers.
1370 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1371 <num_registers>: Remove.
1372
1373 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1374
1375 * Makefile.in (.SECONDARY): Define target.
1376
1377 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1378
1379 * linux-low.c (linux_wait_1): Adjust.
1380 * server.c (queue_stop_reply_callback): Adjust.
1381
1382 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1383
1384 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1385 QEnvironmentUnset and QEnvironmentReset packets.
1386 (handle_query): Inform remote that QEnvironmentHexEncoded,
1387 QEnvironmentUnset and QEnvironmentReset are supported.
1388
1389 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1390
1391 * inferiors.h (inferior_target_data): Rename to ...
1392 (thread_target_data): ... this.
1393 (inferior_regcache_data): Rename to ...
1394 (thread_regcache_data): ... this.
1395 (set_inferior_regcache_data): Rename to ...
1396 (set_thread_regcache_data): ... this.
1397 * inferiors.c (inferior_target_data): Rename to ...
1398 (thread_target_data): ... this.
1399 (inferior_regcache_data): Rename to ...
1400 (thread_regcache_data): ... this.
1401 (set_inferior_regcache_data): Rename to ...
1402 (set_thread_regcache_data): ... this.
1403 (free_one_thread): Update.
1404 * linux-low.h (get_thread_lwp): Update.
1405 * regcache.c (get_thread_regcache): Update.
1406 (regcache_invalidate_thread): Update.
1407 (free_register_cache_thread): Update.
1408 * win32-i386-low.c (update_debug_registers_callback): Update.
1409 (win32_get_current_dr): Update.
1410 * win32-low.c (thread_rec): Update.
1411 (delete_thread_info): Update.
1412 (continue_one_thread): Update.
1413 (suspend_one_thread): Update.
1414
1415 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1416
1417 * inferiors.c (set_inferior_target_data): Remove.
1418 * inferiors.h (set_inferior_target_data): Remove.
1419
1420 2017-08-18 Yao Qi <yao.qi@linaro.org>
1421
1422 * Makefile.in (OBS): Add selftest.o.
1423 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1424 * configure, config.in: Re-generated.
1425 * server.c: Include common/sefltest.h.
1426 (captured_main): Handle option --selftest.
1427
1428 2017-08-09 Yao Qi <yao.qi@linaro.org>
1429
1430 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1431 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1432 i386-avx-mpx.o and i386-mmx.o.
1433 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1434 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1435 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1436 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1437 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1438 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1439 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1440 i386/amd64-avx-mpx.xml.
1441
1442 2017-08-09 Yao Qi <yao.qi@linaro.org>
1443
1444 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1445 and x32-avx-avx512.o.
1446 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1447 i386/x32-avx-avx512.xml.
1448
1449 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1450
1451 * tracepoint.h (enum class fast_tpoint_collect_result): New
1452 enumeration.
1453 (fast_tracepoint_collecting): Change return type to
1454 fast_tpoint_collect_result.
1455 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1456 * linux-low.h: Include tracepoint.h.
1457 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1458 fast_tpoint_collect_result.
1459 * linux-low.c (handle_tracepoints): Adjust.
1460 (linux_fast_tracepoint_collecting): Change return type to
1461 fast_tpoint_collect_result.
1462 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1463 linux_wait_1, stuck_in_jump_pad_callback,
1464 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1465 proceed_one_lwp): Adjust to type change.
1466
1467 2017-07-10 Yao Qi <yao.qi@linaro.org>
1468
1469 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1470
1471 2017-06-29 Yao Qi <yao.qi@linaro.org>
1472
1473 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1474 Remove.
1475 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1476
1477 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1478
1479 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1480
1481 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1482
1483 * linux-low.c (linux_create_inferior): Adjust code to access the
1484 environment information via 'gdb_environ' class.
1485 * lynx-low.c (lynx_create_inferior): Likewise.
1486 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1487 (get_environ): Return a pointer to 'our_environ'.
1488 (captured_main): Initialize 'our_environ'.
1489 * server.h (get_environ): Adjust prototype.
1490 * spu-low.c (spu_create_inferior): Adjust code to access the
1491 environment information via 'gdb_environ' class.
1492
1493 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1494
1495 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1496 usage of "register" keyword.
1497
1498 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1499
1500 * configure: Re-generate.
1501
1502 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1503
1504 * configure: Re-generate.
1505
1506 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1507
1508 * Makefile.in (COMPILE.pre): Add "-x c++".
1509
1510 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1511
1512 * fork-child.c: Conditionally include <signal.h>.
1513
1514 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1515
1516 * server.c (handle_general_set): Handle new packet
1517 "QStartupWithShell".
1518 (handle_query): Add "QStartupWithShell" to the list of supported
1519 packets.
1520 (gdbserver_usage): Add help text explaining the
1521 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1522 options.
1523 (captured_main): Recognize and act upon the presence of the new
1524 CLI options.
1525
1526 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1527 Pedro Alves <palves@redhat.com>
1528
1529 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1530 * configure: Regenerate.
1531 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1532 "fork-inferior.o".
1533 (i[34567]86-*-lynxos*): Likewise.
1534 (spu*-*-*): Likewise.
1535 * fork-child.c: New file.
1536 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1537 and "environ.h".
1538 (linux_ptrace_fun): New function.
1539 (linux_create_inferior): Adjust function prototype to reflect
1540 change on "target.h". Adjust function code to use
1541 "fork_inferior".
1542 (linux_request_interrupt): Delete "signal_pid".
1543 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1544 (lynx_ptrace_fun): New function.
1545 (lynx_create_inferior): Adjust function prototype to reflect
1546 change on "target.h". Adjust function code to use
1547 "fork_inferior".
1548 * nto-low.c (nto_create_inferior): Adjust function prototype and
1549 code to reflect change on "target.h". Update comments.
1550 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1551 "common-terminal.h" and "environ.h".
1552 (terminal_fd): Moved to fork-child.c.
1553 (old_foreground_pgrp): Likewise.
1554 (restore_old_foreground_pgrp): Likewise.
1555 (last_status): Make it global.
1556 (last_ptid): Likewise.
1557 (our_environ): New variable.
1558 (startup_with_shell): Likewise.
1559 (program_name): Likewise.
1560 (program_argv): Rename to...
1561 (program_args): ...this.
1562 (wrapper_argv): New variable.
1563 (start_inferior): Delete function.
1564 (get_exec_wrapper): New function.
1565 (get_exec_file): Likewise.
1566 (get_environ): Likewise.
1567 (prefork_hook): Likewise.
1568 (post_fork_inferior): Likewise.
1569 (postfork_hook): Likewise.
1570 (postfork_child_hook): Likewise.
1571 (handle_v_run): Update code to deal with arguments coming from the
1572 remote host. Update calls from "start_inferior" to
1573 "create_inferior".
1574 (captured_main): Likewise. Initialize environment variable. Call
1575 "have_job_control".
1576 * server.h (post_fork_inferior): New prototype.
1577 (get_environ): Likewise.
1578 (last_status): Declare.
1579 (last_ptid): Likewise.
1580 (signal_pid): Likewise.
1581 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1582 (spu_ptrace_fun): New function.
1583 (spu_create_inferior): Adjust function prototype to reflect change
1584 on "target.h". Adjust function code to use "fork_inferior".
1585 * target.c (target_terminal_init): New function.
1586 (target_terminal_inferior): Likewise.
1587 (target_terminal_ours): Likewise.
1588 * target.h: Include <vector>.
1589 (struct target_ops) <create_inferior>: Update prototype.
1590 (create_inferior): Update macro.
1591 * utils.c (gdb_flush_out_err): New function.
1592 * win32-low.c (win32_create_inferior): Adjust function prototype
1593 and code to reflect change on "target.h".
1594
1595 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1596
1597 * inferiors.c (switch_to_thread): New function.
1598
1599 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1600
1601 * Makefile.in (SFILE): Add "common/job-control.c".
1602 (OBS): Add "job-control.o".
1603
1604 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1605
1606 * Makefile: Remove "@host_makefile_frag@".
1607
1608 2017-05-05 Pedro Alves <palves@redhat.com>
1609
1610 * configure: Regenerate.
1611
1612 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1613
1614 * configure: Regenerate.
1615
1616 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1617
1618 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1619 software_single_step change of return type to
1620 std::vector<CORE_ADDR>.
1621 * linux-low.c (install_software_single_step_breakpoints):
1622 Likewise.
1623 * linux-low.h (install_software_single_step_breakpoints):
1624 Likewise.
1625
1626 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1627
1628 * remote-utils.c: Include "gdb_termios.h" instead of
1629 "terminal.h".
1630 * terminal.h: Delete file.
1631
1632 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1633
1634 * server.c: Include <vector>.
1635 <program_argv, wrapper_argv>: Convert to std::vector.
1636 (start_inferior): Rewrite function to use C++.
1637 (handle_v_run): Likewise. Update code that calculates the argv
1638 based on the vRun packet; use C++.
1639 (captured_main): Likewise.
1640
1641 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1642
1643 * server.c (handle_v_cont): Initialize thread_resume::thread
1644 with null_ptid.
1645
1646 2017-04-05 Pedro Alves <palves@redhat.com>
1647
1648 * configure: Regenerate.
1649
1650 2017-04-05 Pedro Alves <palves@redhat.com>
1651
1652 * gdbreplay.c (sync_error): Constify.
1653 * linux-x86-low.c (push_opcode): Constify.
1654
1655 2017-04-05 Pedro Alves <palves@redhat.com>
1656
1657 * win32-low.c (get_child_debug_event)
1658 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1659 Report TARGET_WAITKIND_SPURIOUS instead.
1660
1661 2017-04-05 Pedro Alves <palves@redhat.com>
1662
1663 * remote-utils.c (remote_prepare, remote_open): Constify.
1664 * remote-utils.h (remote_prepare, remote_open): Constify.
1665 * server.c (captured_main): Constify 'port' handling.
1666
1667 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1668
1669 * Makefile.in (clean): Clear .deps.
1670
1671 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1672
1673 * .gitignore: Remove generated files, replace with wildcard.
1674 * (clean): Replace removal of generated files with wildcard.
1675 (version.c): Replace with...
1676 (version-generated.c): ...this.
1677 (xml-builtin.c): Replace with...
1678 (xml-builtin-generated.c): ...this.
1679 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1680 (%.c: *regformats*): Replace with...
1681 (%-generated.c: *regformats*): ...this.
1682
1683 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1684
1685 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1686 (xtensa_fill_gregset): Call collect_register_by_name for
1687 threadptr register.
1688 (xtensa_store_gregset): Call supply_register_by_name for
1689 threadptr register.
1690
1691 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1692
1693 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1694 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1695 (xtensa_store_gregset): Call supply_register for all registers in
1696 a0_regnum..a0_regnum + C0_NREGS range.
1697
1698 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1699
1700 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1701 (ax-ipa.o: ax.c): Remove.
1702 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1703 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1704 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1705 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1706 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1707
1708 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1709
1710 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1711 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1712 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1713 (errors-ipa.o: ../common/errors.c): Remove.
1714 (format-ipa.o: ../common/format.c): Remove.
1715 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1716
1717 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1718
1719 * Makefile.in (%-ipa.o: %.c): New rule.
1720 (tracepoint-ipa.o: tracepoint.c): Remove.
1721 (utils-ipa.o: utils.c): Remove.
1722 (remote-utils-ipa.o: remote-utils.c): Remove.
1723 (regcache-ipa.o: regcache.c): Remove.
1724 (i386-linux-ipa.o: i386-linux.c): Remove.
1725 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1726 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1727 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1728 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1729 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1730 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1731 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1732 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1733 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1734 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1735 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1736 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1737 (aarch64-ipa.o: aarch64.c): Remove.
1738 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1739 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1740 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1741 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1742 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1743 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1744 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1745 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1746 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1747 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1748 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1749 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1750 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1751 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1752 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1753 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1754 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1755 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1756 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1757 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1758 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1759 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1760 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1761 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1762 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1763 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1764 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1765 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1766 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1767 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1768 (tdesc-ipa.o: tdesc.c): Remove.
1769 (x32-linux-ipa.o: x32-linux.c): Remove.
1770 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1771 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1772
1773 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1774
1775 * Makefile.in (%.o: ../arch/%.c): New rule.
1776 (arm.o: ../arch/arm.c): Remove.
1777 (arm-linux.o: ../arch/arm-linux.c): Remove.
1778 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1779 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1780
1781 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1782
1783 * Makefile.in (%.o: ../nat/%.c): New rule.
1784 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1785 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1786 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1787 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1788 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1789 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1790 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1791 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1792 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1793 (linux-personality.o: ../nat/linux-personality.c): Remove.
1794 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1795 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1796 (x86-linux.o: ../nat/x86-linux.c): Remove.
1797 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1798 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1799
1800 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1801
1802 * Makefile.in (%.o: ../common/%.c): New rule.
1803 (signals.o: ../common/signals.c): Remove.
1804 (print-utils.o: ../common/print-utils.c): Remove.
1805 (rsp-low.o: ../common/rsp-low.c): Remove.
1806 (common-utils.o: ../common/common-utils.c): Remove.
1807 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1808 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1809 (vec.o: ../common/vec.c): Remove.
1810 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1811 (xml-utils.o: ../common/xml-utils.c): Remove.
1812 (ptid.o: ../common/ptid.c): Remove.
1813 (buffer.o: ../common/buffer.c): Remove.
1814 (format.o: ../common/format.c): Remove.
1815 (filestuff.o: ../common/filestuff.c): Remove.
1816 (agent.o: ../common/agent.c): Remove.
1817 (errors.o: ../common/errors.c): Remove.
1818 (environ.o: ../common/environ.c): Remove.
1819 (common-debug.o: ../common/common-debug.c): Remove.
1820 (cleanups.o: ../common/cleanups.c): Remove.
1821 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1822 (fileio.o: ../common/fileio.c): Remove.
1823 (common-regcache.o: ../common/common-regcache.c): Remove.
1824 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1825 (new-op.o: ../common/new-op.c): Remove.
1826 (btrace-common.o: ../common/btrace-common.c): Remove.
1827
1828 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1829
1830 * Makefile.in (%.o: ../target/%.c): New rule.
1831 (waitstatus.o: ../target/waitstatus.c): Remove.
1832
1833 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1834
1835 * Makefile.in
1836 (%.c: ../regformats/%.dat,
1837 (%.c: ../regformats/arm/%.dat,
1838 (%.c: ../regformats/i386/%.dat,
1839 (%.c: ../regformats/rs6000/%.dat): New rules.
1840 (aarch64.c): Remove.
1841 (reg-arm.c): Remove.
1842 (arm-with-iwmmxt.c): Remove.
1843 (arm-with-vfpv2.c): Remove.
1844 (arm-with-vfpv3.c): Remove.
1845 (arm-with-neon.c): Remove.
1846 (reg-bfin.c): Remove.
1847 (reg-cris.c): Remove.
1848 (reg-crisv32.c): Remove.
1849 (i386.c): Remove.
1850 (i386-linux.c): Remove.
1851 (i386-avx.c): Remove.
1852 (i386-avx-linux.c): Remove.
1853 (i386-avx-avx512.c): Remove.
1854 (i386-avx-avx512-linux.c): Remove.
1855 (i386-mpx.c): Remove.
1856 (i386-mpx-linux.c): Remove.
1857 (i386-avx-mpx-avx512-pku.c): Remove.
1858 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1859 (i386-avx-mpx.c): Remove.
1860 (i386-avx-mpx-linux.c): Remove.
1861 (i386-mmx.c): Remove.
1862 (i386-mmx-linux.c): Remove.
1863 (reg-ia64.c): Remove.
1864 (reg-m32r.c): Remove.
1865 (reg-m68k.c): Remove.
1866 (reg-cf.c): Remove.
1867 (mips-linux.c): Remove.
1868 (mips-dsp-linux.c): Remove.
1869 (mips64-linux.c): Remove.
1870 (mips64-dsp-linux.c): Remove.
1871 (nios2-linux.c): Remove.
1872 (powerpc-32.c): Remove.
1873 (powerpc-32l.c): Remove.
1874 (powerpc-altivec32l.c): Remove.
1875 (powerpc-cell32l.c): Remove.
1876 (powerpc-vsx32l.c): Remove.
1877 (powerpc-isa205-32l.c): Remove.
1878 (powerpc-isa205-altivec32l.c): Remove.
1879 (powerpc-isa205-vsx32l.c): Remove.
1880 (powerpc-e500l.c): Remove.
1881 (powerpc-64l.c): Remove.
1882 (powerpc-altivec64l.c): Remove.
1883 (powerpc-cell64l.c): Remove.
1884 (powerpc-vsx64l.c): Remove.
1885 (powerpc-isa205-64l.c): Remove.
1886 (powerpc-isa205-altivec64l.c): Remove.
1887 (powerpc-isa205-vsx64l.c): Remove.
1888 (s390-linux32.c): Remove.
1889 (s390-linux32v1.c): Remove.
1890 (s390-linux32v2.c): Remove.
1891 (s390-linux64.c): Remove.
1892 (s390-linux64v1.c): Remove.
1893 (s390-linux64v2.c): Remove.
1894 (s390-te-linux64.c): Remove.
1895 (s390-vx-linux64.c): Remove.
1896 (s390-tevx-linux64.c): Remove.
1897 (s390x-linux64.c): Remove.
1898 (s390x-linux64v1.c): Remove.
1899 (s390x-linux64v2.c): Remove.
1900 (s390x-te-linux64.c): Remove.
1901 (s390x-vx-linux64.c): Remove.
1902 (s390x-tevx-linux64.c): Remove.
1903 (tic6x-c64xp-linux.c): Remove.
1904 (tic6x-c64x-linux.c): Remove.
1905 (tic6x-c62x-linux.c): Remove.
1906 (reg-sh.c): Remove.
1907 (reg-sparc64.c): Remove.
1908 (reg-spu.c): Remove.
1909 (amd64.c): Remove.
1910 (amd64-linux.c): Remove.
1911 (amd64-avx.c): Remove.
1912 (amd64-avx-linux.c): Remove.
1913 (amd64-avx-avx512.c): Remove.
1914 (amd64-avx-avx512-linux.c): Remove.
1915 (amd64-mpx.c): Remove.
1916 (amd64-mpx-linux.c): Remove.
1917 (amd64-avx-mpx-avx512-pku.c): Remove.
1918 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1919 (amd64-avx-mpx.c): Remove.
1920 (amd64-avx-mpx-linux.c): Remove.
1921 (x32.c): Remove.
1922 (x32-linux.c): Remove.
1923 (x32-avx.c): Remove.
1924 (x32-avx-linux.c): Remove.
1925 (x32-avx-avx512.c): Remove.
1926 (x32-avx-avx512-linux.c): Remove.
1927 (reg-xtensa.c): Remove.
1928 (reg-tilegx.c): Remove.
1929 (reg-tilegx32.c): Remove.
1930
1931 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1932
1933 * Makefile.in (SFILES): Add "common/environ.c".
1934 (OBJS): Add "common/environ.h".
1935
1936 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1937
1938 * configure.ac: Check if the fs_base and gs_base members of
1939 `struct user_regs_struct' exist.
1940 * config.in: Regenerated.
1941 * configure: Likewise.
1942
1943 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1944
1945 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1946 target_read_memory.
1947 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1948 (get_next_pcs_syscall_next_pc): Likewise.
1949
1950 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1951
1952 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1953 * nto-x86-low.c: Likewise.
1954
1955 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1956
1957 * Makefile.in: Include disable-implicit-rules.mk.
1958
1959 2016-11-23 Pedro Alves <palves@redhat.com>
1960
1961 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1962 (debug_vprintf): Use std::chrono::steady_clock instead of
1963 gettimeofday. Use '.' instead of ':'.
1964 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1965 (get_timestamp): Use std::chrono::steady_clock instead of
1966 gettimeofday.
1967
1968 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1969
1970 * Makefile.in: Fix whitespace formatting.
1971
1972 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1973
1974 * Makefile.in (SFILES, OBS): Flatten list and order
1975 alphabetically.
1976
1977 2016-11-23 Pedro Alves <palves@redhat.com>
1978
1979 * event-loop.c (handle_file_event): Use warning.
1980 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1981 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1982 Use warning.
1983
1984 2016-11-23 Pedro Alves <palves@redhat.com>
1985
1986 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1987 output.
1988 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1989 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1990 debug_printf and debug_flush for debug output.
1991 * server.c (handle_general_set): Likewise.
1992 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1993 output.
1994
1995 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1996
1997 * Makefile.in (.c.o): Replace rule with ...
1998 (%.o: %.c): ... this one.
1999
2000 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2001
2002 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2003 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2004 make.
2005 * configure.ac: Remove checks for the make program.
2006 * configure: Re-generate.
2007
2008 2016-10-28 Pedro Alves <palves@redhat.com>
2009
2010 * Makefile.in (CXX_DIALECT): Get from configure.
2011 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2012 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2013 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2014 * config.in: Regenerate.
2015 * configure: Regenerate.
2016
2017 2016-10-27 Yao Qi <yao.qi@linaro.org>
2018
2019 * linux-low.c (linux_supports_range_stepping): Return true if
2020 can_software_single_step return true.
2021
2022 2016-10-27 Yao Qi <yao.qi@linaro.org>
2023
2024 * inferiors.c (find_inferior_in_random): New function.
2025 * inferiors.h (find_inferior_in_random): Declare.
2026 * linux-low.c (linux_wait_for_event_filtered): Call
2027 find_inferior_in_random instead of find_inferior.
2028
2029 2016-10-27 Yao Qi <yao.qi@linaro.org>
2030
2031 * linux-low.c (linux_wait_1): If single-step breakpoints are
2032 inserted, remove them.
2033
2034 2016-10-26 Pedro Alves <palves@redhat.com>
2035
2036 * linux-low.c (handle_extended_wait): Link parent/child fork
2037 threads.
2038 (linux_wait_1): Unlink them.
2039 (linux_set_resume_request): Ignore resume requests for
2040 already-resumed and unhandled fork child threads.
2041 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2042 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2043 New functions.
2044 (handle_v_requests) <vCont>: Don't call require_running.
2045 * server.h (in_queued_stop_replies): New declaration.
2046
2047 2016-10-24 Yao Qi <yao.qi@linaro.org>
2048
2049 PR server/20733
2050 * linux-aarch64-low.c (append_insns): Cast the return value to
2051 'uint32_t *'.
2052
2053 2016-10-10 Yao Qi <yao.qi@linaro.org>
2054
2055 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2056
2057 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2058
2059 * target.c (target_supports_multi_process): New function, moved
2060 from...
2061 * target.h (target_supports_multi_process): ... here. Remove
2062 macro.
2063
2064 2016-10-05 Tom Tromey <tom@tromey.com>
2065
2066 PR remote/20655:
2067 * tracepoint.c (handle_tracepoint_bkpts): Check
2068 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2069
2070 2016-10-05 Yao Qi <yao.qi@linaro.org>
2071
2072 * configure.srv: Update the path of arm-*.xml files.
2073
2074 2016-10-05 Terry Guo <terry.guo@arm.com>
2075 Yao Qi <yao.qi@linaro.org>
2076
2077 * Makefile.in: Adjust the path of rules.
2078 * configure.srv: Update the path of xml files.
2079 * regformats/arm-with-iwmmxt.dat: Regenerated.
2080 * regformats/arm-with-neon.dat: Likewise.
2081 * regformats/arm-with-vfpv2.dat: Likewise.
2082 * regformats/arm-with-vfpv3.dat Likewise.
2083
2084 2016-09-30 Yao Qi <yao.qi@linaro.org>
2085
2086 PR gdbserver/20627
2087 * target.c (target_stop_and_wait): Don't call
2088 target_continue_no_signal, use resume_stop instead.
2089
2090 2016-09-26 Yao Qi <yao.qi@linaro.org>
2091
2092 * linux-low.c (linux_wait_1): Call debug_exit.
2093
2094 2016-09-23 Pedro Alves <palves@redhat.com>
2095
2096 * Makefile.in (SFILES): Add common/new-op.c.
2097 (OBS): Add common/new-op.o.
2098 (new-op.o): New rule.
2099
2100 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2101
2102 * .gitinore: Ignore more files.
2103
2104 2016-09-21 Yao Qi <yao.qi@linaro.org>
2105
2106 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2107 23.
2108
2109 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2110
2111 * server.c (start_inferior): Call target_mourn_inferior instead of
2112 mourn_inferior; pass ptid_t argument to it.
2113 (resume): Likewise.
2114 (handle_target_event): Likewise.
2115 * target.c (target_mourn_inferior): New function.
2116 * target.h (mourn_inferior): Delete macro.
2117
2118 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2119
2120 * linux-low.c (lwp_is_stepping): New function.
2121
2122 2016-09-06 Carl Love <cel@us.ibm.com>
2123
2124 * server.c (start_inferior): Fixed comment, requested comment change
2125 didn't get updated correctly. Removed reference to ptrace () call as
2126 it is only true on Linux systems.
2127
2128 2016-09-06 Carl Love <cel@us.ibm.com>
2129
2130 * server.c (start_inferior): Do not call
2131 function target_post_create_inferior () if the
2132 inferior process has already exited.
2133
2134 2016-09-05 Pedro Alves <palves@redhat.com>
2135
2136 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2137 (COMPILE.pre, CC_LD): Use CXX directly.
2138 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2139 * acinclude.m4: Don't include build-with-cxx.m4.
2140 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2141 * configure: Regenerate.
2142
2143 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2144
2145 PR gdb/19495
2146 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2147 call writing data to own_buf.
2148
2149 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2150
2151 * target.c (mywait): Call target_wait instead of
2152 the_target->wait.
2153 (target_wait): New function.
2154
2155 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2156
2157 * server.c (start_inferior): New variable 'ptid'. Replace calls
2158 to the_target->resume by target_continue{,_no_signal}, depending
2159 on the case.
2160 * target.c (target_stop_and_wait): Call target_continue_no_signal
2161 instead of the_target->resume.
2162 (target_continue): New function.
2163
2164 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2165
2166 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2167
2168 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2169
2170 PR server/20491
2171 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2172 ps_prochandle.
2173 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2174 * linux-arm-low.c (ps_get_thread_area): Likewise.
2175 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2176 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2177 * linux-mips-low.c (ps_get_thread_area): Likewise.
2178 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2179 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2180 * linux-x86-low.c (ps_get_thread_area): Likewise.
2181 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2182
2183 2016-08-19 Pedro Alves <palves@redhat.com>
2184
2185 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2186
2187 2016-08-19 Pedro Alves <palves@redhat.com>
2188
2189 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2190 comment. Use memcpy instead of casting through unsigned long.
2191
2192 2016-08-19 Pedro Alves <palves@redhat.com>
2193
2194 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2195 allocating around 0x80000000.
2196
2197 2016-08-19 Pedro Alves <palves@redhat.com>
2198
2199 PR gdb/20415
2200 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2201 (x32-avx512-linux-ipa.o): New rules.
2202 * configure.ac (x86_64-*-linux*): New x32 check.
2203 * configure.srv (ipa_x32_linux_regobj): New.
2204 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2205 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2206 descriptions.
2207 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2208 descriptions.
2209 * configure: Regenerate.
2210
2211 2016-08-09 Pedro Alves <palves@redhat.com>
2212
2213 PR gdb/18653
2214 * Makefile.in (OBS): Add signals-state-save-restore.o.
2215 (signals-state-save-restore.o): New rule.
2216 * config.in: Regenerate.
2217 * configure: Regenerate.
2218 * linux-low.c: Include "signals-state-save-restore.h".
2219 (linux_create_inferior): Call
2220 restore_original_signals_state.
2221 * server.c: Include "dispositions-save-restore.h".
2222 (captured_main): Call save_original_signals_state.
2223
2224 2016-08-05 Pedro Alves <palves@redhat.com>
2225
2226 * configure: Regenerate.
2227
2228 2016-08-04 Yao Qi <yao.qi@linaro.org>
2229
2230 * linux-low.c (regsets_fetch_inferior_registers): Check
2231 errno is ESRCH or not.
2232
2233 2016-08-02 Yao Qi <yao.qi@linaro.org>
2234
2235 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2236 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2237 (thread_db_load_search): Update.
2238 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2239 td_ta_set_event and td_ta_event_getmsg.
2240
2241 2016-07-26 Pedro Alves <palves@redhat.com>
2242
2243 PR server/20414
2244 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2245 of unsigned long for 64-bit registers and use uint32_t instead of
2246 unsigned int for 32-bit registers.
2247
2248 2016-07-26 Pedro Alves <palves@redhat.com>
2249
2250 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2251 to 'ptrace'.
2252
2253 2016-07-21 Tom Tromey <tom@tromey.com>
2254
2255 * configure: Rebuild.
2256
2257 2016-07-21 Yao Qi <yao.qi@linaro.org>
2258
2259 * mem-break.c (find_gdb_breakpoint): Cast bp to
2260 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2261
2262 2016-07-21 Yao Qi <yao.qi@linaro.org>
2263
2264 * server.c (handle_v_requests): Support s and S actions
2265 if target_supports_software_single_step return true.
2266
2267 2016-07-21 Yao Qi <yao.qi@linaro.org>
2268
2269 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2270 is resume_step, call maybe_hw_step.
2271 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2272 and unstop them.
2273 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2274 breakpoints or not.
2275 (proceed_one_lwp): If resume request is resume_step, install
2276 reinsert breakpoints and call maybe_hw_step.
2277
2278 2016-07-21 Yao Qi <yao.qi@linaro.org>
2279
2280 * linux-low.c (proceed_one_lwp): Declare.
2281 (linux_resume_one_thread): Remove local variable 'step'.
2282 Lift code enqueue signal. Call proceed_one_lwp instead of
2283 linux_resume_one_lwp.
2284
2285 2016-07-21 Yao Qi <yao.qi@linaro.org>
2286
2287 * linux-low.c (linux_resume_one_thread): Call
2288 enqueue_pending_signal.
2289
2290 2016-07-21 Yao Qi <yao.qi@linaro.org>
2291
2292 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2293 * inferiors.c (do_restore_current_thread_cleanup): New function.
2294 (make_cleanup_restore_current_thread): Likewise.
2295 * linux-low.c (install_software_single_step_breakpoints): Call
2296 make_cleanup_restore_current_thread. Switch current_thread to
2297 thread.
2298
2299 2016-07-21 Yao Qi <yao.qi@linaro.org>
2300
2301 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2302 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2303 (clone_one_breakpoint): Likewise.
2304 (delete_reinsert_breakpoints): Change parameter to thread.
2305 Callers updated.
2306 (has_reinsert_breakpoints): Likewise.
2307 (uninsert_reinsert_breakpoints): Likewise.
2308 (reinsert_reinsert_breakpoints): Likewise.
2309 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2310 (delete_reinsert_breakpoints): Likewise.
2311 (reinsert_reinsert_breakpoints): Likewise.
2312 (uninsert_reinsert_breakpoints): Likewise.
2313 (has_reinsert_breakpoints): Likewise.
2314
2315 2016-07-21 Yao Qi <yao.qi@linaro.org>
2316
2317 * inferiors.c (get_thread_process): Make parameter const.
2318 * inferiors.h (get_thread_process): Update declaration.
2319 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2320 Add new parameters child_thread and parent_thread. Callers
2321 updated.
2322 * mem-break.h (clone_all_breakpoints): Update declaration.
2323
2324 2016-07-21 Yao Qi <yao.qi@linaro.org>
2325
2326 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2327 <command_list, handler>: Remove.
2328 (struct gdb_breakpoint): New.
2329 (struct other_breakpoint): New.
2330 (struct reinsert_breakpoint): New.
2331 (is_gdb_breakpoint): New function.
2332 (any_persistent_commands): Update command_list if
2333 is_gdb_breakpoint returns true.
2334 (set_breakpoint): Create breakpoints according to their types.
2335 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2336 (set_gdb_breakpoint_1): Likewise.
2337 (set_gdb_breakpoint): Likewise.
2338 (clear_breakpoint_conditions): Change parameter type to
2339 'struct gdb_breakpoint *'.
2340 (clear_breakpoint_commands): Likewise.
2341 (clear_breakpoint_conditions_and_commands): Likewise.
2342 (add_condition_to_breakpoint): Likewise.
2343 (add_breakpoint_condition): Likewise.
2344 (add_commands_to_breakpoint): Likewise.
2345 (check_breakpoints): Check other_breakpoint.
2346 (clone_one_breakpoint): Clone breakpopint according to its type.
2347 * mem-break.h (struct gdb_breakpoint): Declare.
2348 (set_gdb_breakpoint): Update declaration.
2349 (clear_breakpoint_conditions_and_commands): Likewise.
2350 (add_breakpoint_condition): Likewise.
2351 (add_breakpoint_commands): Likewise.
2352 * server.c (process_point_options): Change parameter type to
2353 'struct gdb_breakpoint *'.
2354
2355 2016-07-21 Yao Qi <yao.qi@linaro.org>
2356
2357 * mem-break.c (set_breakpoint_at): Rename it to ...
2358 (set_breakpoint_type_at): ... it.
2359 (set_breakpoint_at): Call set_breakpoint_type_at.
2360 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2361 * mem-break.h (set_breakpoint_at): Update comments.
2362
2363 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2364
2365 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2366 to buf parameter.
2367 (nios2_store_gregset): Likewise.
2368
2369 2016-07-01 Pedro Alves <palves@redhat.com>
2370 Antoine Tremblay <antoine.tremblay@ericsson.com>
2371
2372 * linux-low.c: Change interface to take the target lwp_info
2373 pointer directly and return void. Handle detaching from a zombie
2374 thread.
2375 (linux_detach_lwp_callback): New function.
2376 (linux_detach): Detach from the leader thread after detaching from
2377 the clone threads.
2378
2379 2016-06-28 Yao Qi <yao.qi@linaro.org>
2380
2381 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2382 for variable new_offset.
2383 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2384 (aarch64_ftrace_insn_reloc_cb): Likewise.
2385 (aarch64_ftrace_insn_reloc_tb): Likewise.
2386 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2387 PRIx64 instead of PRIx32.
2388
2389 2016-06-28 Yao Qi <yao.qi@linaro.org>
2390
2391 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2392 (the_low_target): Install arm_get_syscall_trapinfo.
2393
2394 2016-06-28 Yao Qi <yao.qi@linaro.org>
2395
2396 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2397 function.
2398 (the_low_target): Install aarch64_get_syscall_trapinfo.
2399
2400 2016-06-28 Yao Qi <yao.qi@linaro.org>
2401
2402 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2403 Callers updated.
2404 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2405 Remove parameter sysno.
2406 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2407 sysret.
2408
2409 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2410
2411 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2412 (s390_emit_ne_goto): Likewise.
2413 (s390_emit_lt_goto): Likewise.
2414 (s390_emit_le_goto): Likewise.
2415 (s390_emit_gt_goto): Likewise.
2416 (s390_emit_ge_goto): Likewise.
2417 (s390x_emit_eq_goto): Likewise.
2418 (s390x_emit_ne_goto): Likewise.
2419 (s390x_emit_lt_goto): Likewise.
2420 (s390x_emit_le_goto): Likewise.
2421 (s390x_emit_gt_goto): Likewise.
2422 (s390x_emit_ge_goto): Likewise.
2423 (s390_emit_ops_impl): Mark variable static.
2424 (s390x_emit_ops): Likewise.
2425
2426 2016-06-17 Yao Qi <yao.qi@linaro.org>
2427
2428 * linux-low.c (handle_extended_wait): Call
2429 uninsert_reinsert_breakpoints for the parent process. Remove
2430 reinsert breakpoints from the child process. Reinsert them to
2431 the parent process when vfork is done.
2432 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2433 (reinsert_reinsert_breakpoints): New function.
2434 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2435 (reinsert_reinsert_breakpoints): Declare.
2436
2437 2016-06-17 Yao Qi <yao.qi@linaro.org>
2438
2439 * linux-low.c (handle_extended_wait): If the parent is doing
2440 step-over, remove the reinsert breakpoints from the forked child.
2441
2442 2016-06-17 Yao Qi <yao.qi@linaro.org>
2443
2444 * linux-low.c (unsuspend_all_lwps): Declare.
2445 (linux_low_filter_event): If thread exited, call finish_step_over.
2446 If step-over is finished, unsuspend other threads.
2447
2448 2016-06-17 Yao Qi <yao.qi@linaro.org>
2449
2450 * linux-low.c (linux_resume_one_lwp_throw): Assert
2451 has_reinsert_breakpoints returns false.
2452 * mem-break.c (delete_disabled_breakpoints): Assert
2453 bp type isn't reinsert_breakpoint.
2454
2455 2016-06-17 Yao Qi <yao.qi@linaro.org>
2456
2457 * linux-low.c (maybe_hw_step): New function.
2458 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2459 (finish_step_over): Switch current_thread to lwp temporarily,
2460 and assert has_reinsert_breakpoints returns true.
2461 (proceed_one_lwp): Call maybe_hw_step.
2462 * mem-break.c (has_reinsert_breakpoints): New function.
2463 * mem-break.h (has_reinsert_breakpoints): Declare.
2464
2465 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2466
2467 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2468
2469 2016-05-17 Yao Qi <yao.qi@linaro.org>
2470
2471 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2472 instead of find_inferior.
2473
2474 2016-05-05 Yao Qi <yao.qi@linaro.org>
2475
2476 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2477 Initialize res to zero.
2478
2479 2016-05-05 Yao Qi <yao.qi@linaro.org>
2480
2481 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2482 to uint32_t.
2483
2484 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2485
2486 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2487 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2488 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2489
2490 2016-04-28 Par Olsson <par.olsson@windriver.com>
2491 Simon Marchi <simon.marchi@ericsson.com>
2492
2493 * tracepoint.c (write_inferior_int8): New function.
2494 (cmd_qtenable_disable): Write enable flag using
2495 write_inferior_int8.
2496
2497 2016-04-25 Yao Qi <yao.qi@linaro.org>
2498
2499 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2500 (need_step_over_p): Return zero if the LWP has pending signals
2501 can be delivered on software single step target.
2502
2503 2016-04-25 Yao Qi <yao.qi@linaro.org>
2504
2505 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2506 return instead of error.
2507
2508 2016-04-22 Yao Qi <yao.qi@linaro.org>
2509
2510 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2511 to 23.
2512
2513 2016-04-22 Yao Qi <yao.qi@linaro.org>
2514
2515 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2516 signal when stepping over breakpoint with software single
2517 step.
2518
2519 2016-04-21 Pedro Alves <palves@redhat.com>
2520
2521 * linux-s390-low.c (s390_collect_ptrace_register)
2522 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2523 add casts.
2524 (s390_check_regset): Use void * instead of gdb_byte *.
2525
2526 2016-04-20 Pedro Alves <palves@redhat.com>
2527
2528 * configure: Renegerate.
2529
2530 2016-04-20 Yao Qi <yao.qi@linaro.org>
2531
2532 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2533 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2534 number 16.
2535 (arm_store_gregset): Likewise.
2536
2537 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2538
2539 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2540 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2541 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2542 (amd64-avx-mpx-linux.c): New rules.
2543 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2544 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2545 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2546 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2547 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2548 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2549 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2550 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2551 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2552 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2553 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2554 * linux-x86-low.c (x86_linux_read_description): Add case for
2555 X86_XSTATE_AVX_MPX_MASK.
2556 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2557 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2558 init_registers_i386_avx_mpx_linux.
2559 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2560 (initialize_low_tracepoint): Call
2561 init_registers_i386_avx_mpx_linux.
2562 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2563 (initialize_low_tracepoint): Call
2564 init_registers_amd64_avx_mpx_linux.
2565 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2566 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2567 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2568 declarations.
2569
2570 2016-04-18 Pedro Alves <palves@redhat.com>
2571
2572 * configure: Regenerate.
2573
2574 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2575
2576 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2577 (aarch64_emit_sub): Likewise.
2578
2579 2016-04-12 Pedro Alves <palves@redhat.com>
2580
2581 * utils.c (prepare_to_throw_exception): Delete.
2582
2583 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2584
2585 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2586
2587 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2588
2589 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2590
2591 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2592
2593 * linux-aarch64-ipa.c: Add <elf.h> include.
2594 * linux-ppc-ipa.c: Add <elf.h> include.
2595 * linux-s390-ipa.c: Add <elf.h> include.
2596
2597 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2598
2599 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2600 (get_raw_reg_ptr): Likewise.
2601 (get_trace_state_variable_value_ptr): Likewise.
2602 (set_trace_state_variable_value_ptr): Likewise.
2603 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2604 char *.
2605
2606 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2607 Marcin Kościelnicki <koriakin@0x04.net>
2608
2609 PR/17221
2610 * linux-ppc-low.c (emit_insns): New function.
2611 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2612 (ppc_emit_prologue): New function.
2613 (ppc_emit_epilogue): New function.
2614 (ppc_emit_add): New function.
2615 (ppc_emit_sub): New function.
2616 (ppc_emit_mul): New function.
2617 (ppc_emit_lsh): New function.
2618 (ppc_emit_rsh_signed): New function.
2619 (ppc_emit_rsh_unsigned): New function.
2620 (ppc_emit_ext): New function.
2621 (ppc_emit_zero_ext): New function.
2622 (ppc_emit_log_not): New function.
2623 (ppc_emit_bit_and): New function.
2624 (ppc_emit_bit_or): New function.
2625 (ppc_emit_bit_xor): New function.
2626 (ppc_emit_bit_not): New function.
2627 (ppc_emit_equal): New function.
2628 (ppc_emit_less_signed): New function.
2629 (ppc_emit_less_unsigned): New function.
2630 (ppc_emit_ref): New function.
2631 (ppc_emit_const): New function.
2632 (ppc_emit_reg): New function.
2633 (ppc_emit_pop): New function.
2634 (ppc_emit_stack_flush): New function.
2635 (ppc_emit_swap): New function.
2636 (ppc_emit_stack_adjust): New function.
2637 (ppc_emit_call): New function.
2638 (ppc_emit_int_call_1): New function.
2639 (ppc_emit_void_call_2): New function.
2640 (ppc_emit_if_goto): New function.
2641 (ppc_emit_goto): New function.
2642 (ppc_emit_eq_goto): New function.
2643 (ppc_emit_ne_goto): New function.
2644 (ppc_emit_lt_goto): New function.
2645 (ppc_emit_le_goto): New function.
2646 (ppc_emit_gt_goto): New function.
2647 (ppc_emit_ge_goto): New function.
2648 (ppc_write_goto_address): New function.
2649 (ppc_emit_ops_impl): New static variable.
2650 (ppc64v1_emit_prologue): New function.
2651 (ppc64v2_emit_prologue): New function.
2652 (ppc64_emit_epilogue): New function.
2653 (ppc64_emit_add): New function.
2654 (ppc64_emit_sub): New function.
2655 (ppc64_emit_mul): New function.
2656 (ppc64_emit_lsh): New function.
2657 (ppc64_emit_rsh_signed): New function.
2658 (ppc64_emit_rsh_unsigned): New function.
2659 (ppc64_emit_ext): New function.
2660 (ppc64_emit_zero_ext): New function.
2661 (ppc64_emit_log_not): New function.
2662 (ppc64_emit_bit_and): New function.
2663 (ppc64_emit_bit_or): New function.
2664 (ppc64_emit_bit_xor): New function.
2665 (ppc64_emit_bit_not): New function.
2666 (ppc64_emit_equal): New function.
2667 (ppc64_emit_less_signed): New function.
2668 (ppc64_emit_less_unsigned): New function.
2669 (ppc64_emit_ref): New function.
2670 (ppc64_emit_const): New function.
2671 (ppc64v1_emit_reg): New function.
2672 (ppc64v2_emit_reg): New function.
2673 (ppc64_emit_pop): New function.
2674 (ppc64_emit_stack_flush): New function.
2675 (ppc64_emit_swap): New function.
2676 (ppc64v1_emit_call): New function.
2677 (ppc64v2_emit_call): New function.
2678 (ppc64v1_emit_int_call_1): New function.
2679 (ppc64v2_emit_int_call_1): New function.
2680 (ppc64v1_emit_void_call_2): New function.
2681 (ppc64v2_emit_void_call_2): New function.
2682 (ppc64_emit_if_goto): New function.
2683 (ppc64_emit_eq_goto): New function.
2684 (ppc64_emit_ne_goto): New function.
2685 (ppc64_emit_lt_goto): New function.
2686 (ppc64_emit_le_goto): New function.
2687 (ppc64_emit_gt_goto): New function.
2688 (ppc64_emit_ge_goto): New function.
2689 (ppc64v1_emit_ops_impl): New static variable.
2690 (ppc64v2_emit_ops_impl): New static variable.
2691 (ppc_emit_ops): New function.
2692 (linux_low_target): Wire in ppc_emit_ops.
2693
2694 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2695 Marcin Kościelnicki <koriakin@0x04.net>
2696
2697 PR/17221
2698 * Makefile.in: Add powerpc-*-ipa.o
2699 * configure.srv: Add ipa_obj for powerpc*-linux.
2700 * linux-ppc-ipa.c: New file.
2701 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2702 includes.
2703 (PPC_FIELD): New macro.
2704 (PPC_SEXT): New macro.
2705 (PPC_OP6): New macro.
2706 (PPC_BO): New macro.
2707 (PPC_LI): New macro.
2708 (PPC_BD): New macro.
2709 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2710 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2711 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2712 (ppc_get_thread_area): New function.
2713 (is_elfv2_inferior): New function.
2714 (gen_ds_form): New function.
2715 (GEN_STD): New macro.
2716 (GEN_STDU): New macro.
2717 (GEN_LD): New macro.
2718 (GEN_LDU): New macro.
2719 (gen_d_form): New function.
2720 (GEN_ADDI): New macro.
2721 (GEN_ADDIS): New macro.
2722 (GEN_LI): New macro.
2723 (GEN_LIS): New macro.
2724 (GEN_ORI): New macro.
2725 (GEN_ORIS): New macro.
2726 (GEN_LWZ): New macro.
2727 (GEN_STW): New macro.
2728 (GEN_STWU): New macro.
2729 (gen_xfx_form): New function.
2730 (GEN_MFSPR): New macro.
2731 (GEN_MTSPR): New macro.
2732 (GEN_MFCR): New macro.
2733 (GEN_MTCR): New macro.
2734 (GEN_SYNC): New macro.
2735 (GEN_LWSYNC): New macro.
2736 (gen_x_form): New function.
2737 (GEN_OR): New macro.
2738 (GEN_MR): New macro.
2739 (GEN_LWARX): New macro.
2740 (GEN_STWCX): New macro.
2741 (GEN_CMPW): New macro.
2742 (gen_md_form): New function.
2743 (GEN_RLDICL): New macro.
2744 (GEN_RLDICR): New macro.
2745 (gen_i_form): New function.
2746 (GEN_B): New macro.
2747 (GEN_BL): New macro.
2748 (gen_b_form): New function.
2749 (GEN_BNE): New macro.
2750 (GEN_LOAD): New macro.
2751 (GEN_STORE): New macro.
2752 (gen_limm): New function.
2753 (gen_atomic_xchg): New function.
2754 (gen_call): New function.
2755 (ppc_relocate_instruction): New function.
2756 (ppc_install_fast_tracepoint_jump_pad): New function.
2757 (ppc_get_min_fast_tracepoint_insn_len): New function.
2758 (ppc_get_ipa_tdesc_idx): New function.
2759 (the_low_target): Wire in the new functions.
2760 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2761 tdescs.
2762 * linux-ppc-tdesc.h: New file.
2763
2764 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2765
2766 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2767 (alloc_jump_pad_buffer): New function.
2768 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2769 (alloc_jump_pad_buffer): New function.
2770 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2771 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2772 (alloc_jump_pad_buffer): New function.
2773 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2774 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2775 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2776 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2777
2778 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2779
2780 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2781 * linux-amd64-ipa.c: Likewise.
2782 * linux-i386-ipa.c: Likewise.
2783 * linux-s390-ipa.c: Likewise.
2784 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2785 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2786 set_trace_state_variable_value_ptr.
2787 (struct ipa_sym_addresses): Likewise.
2788 (symbol_list): Likewise.
2789 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2790 accessing gdb_collect directly.
2791 (gdb_collect_ptr_type): New typedef.
2792 (get_raw_reg_ptr_type): New typedef.
2793 (get_trace_state_variable_value_ptr_type): New typedef.
2794 (set_trace_state_variable_value_ptr_type): New typedef.
2795 (gdb_collect_ptr): New global.
2796 (get_raw_reg_ptr): New global.
2797 (get_trace_state_variable_value_ptr): New global.
2798 (set_trace_state_variable_value_ptr): New global.
2799 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2800 accessing get_raw_reg directly.
2801 (get_get_tsv_func_addr): Likewise for
2802 get_trace_state_variable_value_ptr.
2803 (get_set_tsv_func_addr): Likewise for
2804 set_trace_state_variable_value_ptr.
2805 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2806
2807 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2808
2809 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2810
2811 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2812
2813 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2814 packets.
2815 (relocate_instruction): Remove own_buf.
2816 * server.c (own_buf): Make global.
2817 (handle_v_requests): Make global.
2818 * server.h (own_buf): New declaration.
2819 (handle_v_requests): New prototype.
2820
2821 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2822
2823 PR 18377
2824 * linux-s390-low.c (add_insns): New function.
2825 (s390_emit_prologue): New function.
2826 (s390_emit_epilogue): New function.
2827 (s390_emit_add): New function.
2828 (s390_emit_sub): New function.
2829 (s390_emit_mul): New function.
2830 (s390_emit_lsh): New function.
2831 (s390_emit_rsh_signed): New function.
2832 (s390_emit_rsh_unsigned): New function.
2833 (s390_emit_ext): New function.
2834 (s390_emit_log_not): New function.
2835 (s390_emit_bit_and): New function.
2836 (s390_emit_bit_or): New function.
2837 (s390_emit_bit_xor): New function.
2838 (s390_emit_bit_not): New function.
2839 (s390_emit_equal): New function.
2840 (s390_emit_less_signed): New function.
2841 (s390_emit_less_unsigned): New function.
2842 (s390_emit_ref): New function.
2843 (s390_emit_if_goto): New function.
2844 (s390_emit_goto): New function.
2845 (s390_write_goto_address): New function.
2846 (s390_emit_litpool): New function.
2847 (s390_emit_const): New function.
2848 (s390_emit_call): New function.
2849 (s390_emit_reg): New function.
2850 (s390_emit_pop): New function.
2851 (s390_emit_stack_flush): New function.
2852 (s390_emit_zero_ext): New function.
2853 (s390_emit_swap): New function.
2854 (s390_emit_stack_adjust): New function.
2855 (s390_emit_set_r2): New function.
2856 (s390_emit_int_call_1): New function.
2857 (s390_emit_void_call_2): New function.
2858 (s390_emit_eq_goto): New function.
2859 (s390_emit_ne_goto): New function.
2860 (s390_emit_lt_goto): New function.
2861 (s390_emit_le_goto): New function.
2862 (s390_emit_gt_goto): New function.
2863 (s390_emit_ge_goto): New function.
2864 (s390x_emit_prologue): New function.
2865 (s390x_emit_epilogue): New function.
2866 (s390x_emit_add): New function.
2867 (s390x_emit_sub): New function.
2868 (s390x_emit_mul): New function.
2869 (s390x_emit_lsh): New function.
2870 (s390x_emit_rsh_signed): New function.
2871 (s390x_emit_rsh_unsigned): New function.
2872 (s390x_emit_ext): New function.
2873 (s390x_emit_log_not): New function.
2874 (s390x_emit_bit_and): New function.
2875 (s390x_emit_bit_or): New function.
2876 (s390x_emit_bit_xor): New function.
2877 (s390x_emit_bit_not): New function.
2878 (s390x_emit_equal): New function.
2879 (s390x_emit_less_signed): New function.
2880 (s390x_emit_less_unsigned): New function.
2881 (s390x_emit_ref): New function.
2882 (s390x_emit_if_goto): New function.
2883 (s390x_emit_const): New function.
2884 (s390x_emit_call): New function.
2885 (s390x_emit_reg): New function.
2886 (s390x_emit_pop): New function.
2887 (s390x_emit_stack_flush): New function.
2888 (s390x_emit_zero_ext): New function.
2889 (s390x_emit_swap): New function.
2890 (s390x_emit_stack_adjust): New function.
2891 (s390x_emit_int_call_1): New function.
2892 (s390x_emit_void_call_2): New function.
2893 (s390x_emit_eq_goto): New function.
2894 (s390x_emit_ne_goto): New function.
2895 (s390x_emit_lt_goto): New function.
2896 (s390x_emit_le_goto): New function.
2897 (s390x_emit_gt_goto): New function.
2898 (s390x_emit_ge_goto): New function.
2899 (s390_emit_ops): New function.
2900 (struct linux_target_ops): Fill in emit_ops hook.
2901
2902 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2903
2904 PR 18377
2905 * Makefile.in: Add s390 IPA files.
2906 * configure.srv: Build IPA for s390.
2907 * linux-s390-ipa.c: New file.
2908 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2909 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2910 (tdesc_s390_linux32): Likewise.
2911 (init_registers_s390_linux32v1): Likewise.
2912 (tdesc_s390_linux32v1): Likewise.
2913 (init_registers_s390_linux32v2): Likewise.
2914 (tdesc_s390_linux32v2): Likewise.
2915 (init_registers_s390_linux64): Likewise.
2916 (tdesc_s390_linux64): Likewise.
2917 (init_registers_s390_linux64v1): Likewise.
2918 (tdesc_s390_linux64v1): Likewise.
2919 (init_registers_s390_linux64v2): Likewise.
2920 (tdesc_s390_linux64v2): Likewise.
2921 (init_registers_s390_te_linux64): Likewise.
2922 (tdesc_s390_te_linux64): Likewise.
2923 (init_registers_s390_vx_linux64): Likewise.
2924 (tdesc_s390_vx_linux64): Likewise.
2925 (init_registers_s390_tevx_linux64): Likewise.
2926 (tdesc_s390_tevx_linux64): Likewise.
2927 (init_registers_s390x_linux64): Likewise.
2928 (tdesc_s390x_linux64): Likewise.
2929 (init_registers_s390x_linux64v1): Likewise.
2930 (tdesc_s390x_linux64v1): Likewise.
2931 (init_registers_s390x_linux64v2): Likewise.
2932 (tdesc_s390x_linux64v2): Likewise.
2933 (init_registers_s390x_te_linux64): Likewise.
2934 (tdesc_s390x_te_linux64): Likewise.
2935 (init_registers_s390x_vx_linux64): Likewise.
2936 (tdesc_s390x_vx_linux64): Likewise.
2937 (init_registers_s390x_tevx_linux64): Likewise.
2938 (tdesc_s390x_tevx_linux64): Likewise.
2939 (have_hwcap_s390_vx): New static variable.
2940 (s390_arch_setup): Fill have_hwcap_s390_vx.
2941 (s390_get_thread_area): New function.
2942 (s390_ft_entry_gpr_esa): New const.
2943 (s390_ft_entry_gpr_zarch): New const.
2944 (s390_ft_entry_misc): New const.
2945 (s390_ft_entry_fr): New const.
2946 (s390_ft_entry_vr): New const.
2947 (s390_ft_main_31): New const.
2948 (s390_ft_main_64): New const.
2949 (s390_ft_exit_fr): New const.
2950 (s390_ft_exit_vr): New const.
2951 (s390_ft_exit_misc): New const.
2952 (s390_ft_exit_gpr_esa): New const.
2953 (s390_ft_exit_gpr_zarch): New const.
2954 (append_insns): New function.
2955 (s390_relocate_instruction): New function.
2956 (s390_install_fast_tracepoint_jump_pad): New function.
2957 (s390_get_min_fast_tracepoint_insn_len): New function.
2958 (s390_get_ipa_tdesc_idx): New function.
2959 (struct linux_target_ops): Wire in the above functions.
2960 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2961 * linux-s390-tdesc.h: New file.
2962
2963 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2964
2965 * linux-s390-low.c (s390_supports_tracepoints): New function.
2966 (struct linux_target_ops): Fill supports_tracepoints hook.
2967
2968 2016-03-18 Yao Qi <yao.qi@linaro.org>
2969
2970 * linux-low.c (lwp_signal_can_be_delivered): New function.
2971 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2972
2973 2016-03-18 Yao Qi <yao.qi@linaro.org>
2974
2975 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2976 0 if signal is enqueued. Remove 'signal' from one debugging
2977 message. Move one debugging message to some lines below.
2978 Remove code setting 'signal' to 0.
2979
2980 2016-03-18 Yao Qi <yao.qi@linaro.org>
2981
2982 * linux-low.c (linux_low_filter_event): Remove redundant
2983 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2984
2985 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2986
2987 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2988 (struct linux_target_ops): Wire in the above.
2989
2990 2016-03-03 Yao Qi <yao.qi@linaro.org>
2991
2992 * linux-low.c: Update comments to start_step_over.
2993
2994 2016-03-03 Yao Qi <yao.qi@linaro.org>
2995
2996 PR server/19736
2997 * linux-low.c (handle_extended_wait): Set child suspended
2998 if event_lwp->bp_reinsert isn't zero.
2999
3000 2016-03-02 Yao Qi <yao.qi@linaro.org>
3001
3002 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3003 enqueue_pending_signal.
3004
3005 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3006
3007 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3008 is actually loaded.
3009
3010 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3011
3012 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3013 (s390_regmap_3264) [!__s390x__]: New global.
3014 (s390_collect_ptrace_register): Skip map entries containing -1.
3015 (s390_supply_ptrace_register): Ditto.
3016 (s390_fill_gprs_high): New function.
3017 (s390_store_gprs_high): New function.
3018 (s390_regsets): Add NT_S390_HIGH_GPRS.
3019 (s390_get_hwcap): Enable on 31-bit.
3020 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3021 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3022 Detect NT_S390_HIGH_GPRS.
3023 (s390_usrregs_info_3264): Enable on 31-bit.
3024 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3025 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3026
3027 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3028
3029 PR gdb/13808
3030 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3031 * configure.srv: Ditto.
3032 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3033 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3034 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3035 (init_registers_amd64_linux): Remove prototype.
3036 (tdesc_amd64_linux): Remove declaration.
3037 (get_ipa_tdesc): New function.
3038 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3039 initialize remaining tdescs.
3040 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3041 (init_registers_i386_linux): Remove prototype.
3042 (tdesc_i386_linux): Remove declaration.
3043 (get_ipa_tdesc): New function.
3044 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3045 initialize remaining tdescs.
3046 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3047 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3048 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3049 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3050 (x86_get_ipa_tdesc_idx): New function.
3051 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3052 * linux-x86-tdesc.h: New file.
3053 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3054 (target_get_ipa_tdesc_idx): New macro.
3055 * tracepoint.c (ipa_tdesc_idx): New macro.
3056 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3057 (symbol_list): Add ipa_tdesc_idx.
3058 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3059 (ipa_tdesc): Remove.
3060 (ipa_tdesc_idx): New variable.
3061 (get_context_regcache): Use get_ipa_tdesc.
3062 (gdb_collect): Ditto.
3063 (gdb_probe): Ditto.
3064 * tracepoint.h (get_ipa_tdesc): New prototype.
3065 (ipa_tdesc): Remove.
3066
3067 2016-02-24 Pedro Alves <palves@redhat.com>
3068
3069 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3070 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3071 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3072 Factor out common code between the USE_SIGTRAP_SIGINFO and
3073 !USE_SIGTRAP_SIGINFO blocks.
3074 (linux_low_filter_event): Call save_stop_reason instead of
3075 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3076 Update comments.
3077 (linux_wait_1): Update comments.
3078
3079 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3080
3081 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3082 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3083 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3084 ppc_insert_point, ppc_remove_point.
3085
3086 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3087
3088 * linux-s390-low.c (s390_supports_z_point_type): New function.
3089 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3090
3091 2016-02-16 Yao Qi <yao.qi@linaro.org>
3092
3093 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3094 PC. Get pc from regcache_read_pc.
3095
3096 2016-02-12 Yao Qi <yao.qi@linaro.org>
3097
3098 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3099 or linux_get_pc_32bit.
3100 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3101
3102 2016-02-12 Yao Qi <yao.qi@linaro.org>
3103
3104 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3105 arm_linux_get_next_pcs_fixup.
3106
3107 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3108
3109 * tracepoint.c (x_tracepoint_action_download): Change
3110 write_inferior_data_ptr to write_inferior_data_pointer.
3111 (cmd_qtstart): Likewise.
3112 (write_inferior_data_ptr): Remove.
3113 (download_agent_expr): Change write_inferior_data_ptr to
3114 write_inferior_data_pointer.
3115 (download_tracepoint_1): Likewise.
3116 (download_tracepoint): Likewise.
3117 (download_trace_state_variables): Likewise.
3118
3119 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3120 Marcin Kościelnicki <koriakin@0x04.net>
3121
3122 * tracepoint.c (struct tracepoint_action_ops): Remove.
3123 (struct tracepoint_action): Remove ops.
3124 (m_tracepoint_action_download, r_tracepoint_action_download)
3125 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3126 size and offset accordingly.
3127 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3128 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3129 (tracepoint_action_send, tracepoint_action_download): New functions.
3130 Helpers for trace action handlers.
3131 (add_tracepoint_action): Remove setup actions ops.
3132 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3133
3134 2016-02-10 Yao Qi <yao.qi@linaro.org>
3135
3136 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3137
3138 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3139
3140 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3141 to AC_OUTPUT.
3142 * configure: Regenerate.
3143
3144 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3145
3146 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3147 void * to gdb_byte *.
3148 * linux-low.c (siginfo_fixup): Likewise.
3149 (linux_xfer_siginfo): Likewise.
3150 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3151 Likewise.
3152 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3153
3154 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3155
3156 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3157 to srv_tgtobj.
3158 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3159 to srv_tgtobj.
3160 * linux-x86-low.c [__x86_64__]: Include
3161 "nat/amd64-linux-siginfo.h".
3162 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3163 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3164 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3165 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3166 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3167 (cpt_si_fd, si_timerid, si_overrun): Move from
3168 nat/amd64-linux-siginfo.c.
3169 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3170
3171 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3172
3173 * server.c (skip_to_semicolon): Remove.
3174 (process_point_options): Use strchrnul instead of
3175 skip_to_semicolon.
3176
3177 2016-01-26 Yao Qi <yao.qi@linaro.org>
3178
3179 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3180 * linux-low.c (install_software_single_step_breakpoints): Don't
3181 call regcache_read_pc.
3182 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3183 argument pc.
3184
3185 2016-01-26 Yao Qi <yao.qi@linaro.org>
3186
3187 * linux-low.c (install_software_single_step_breakpoints): Call
3188 regcache_read_pc instead of get_pc.
3189
3190 2016-01-26 Yao Qi <yao.qi@linaro.org>
3191
3192 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3193 (unblock_async_io): Rename to ...
3194 (block_unblock_async_io): ... it. New function.
3195 (enable_async_io): Don't install SIGIO handler. Unblock it
3196 instead.
3197 (disable_async_io): Don't ignore SIGIO. Block it instead.
3198 (initialize_async_io): Install SIGIO handler. Don't call
3199 unblock_async_io.
3200
3201 2016-01-26 Yao Qi <yao.qi@linaro.org>
3202
3203 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3204 first character is '\003', call *the_target->request_interrupt.
3205
3206 2016-01-25 Yao Qi <yao.qi@linaro.org>
3207
3208 * remote-utils.c (new_thread_notify): Remove.
3209 (dead_thread_notify): Likewise.
3210 * remote-utils.h (new_thread_notify): Remove declaration.
3211 (dead_thread_notify): Likewise.
3212
3213 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3214
3215 * gdb.trace/pending.exp: Fix expected message on continue.
3216
3217 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3218
3219 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3220 it works properly on big-endian machines where sizeof (CORE_ADDR)
3221 != sizeof (void *).
3222
3223 2016-01-21 Pedro Alves <palves@redhat.com>
3224
3225 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3226 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3227 * configure: Regenerate.
3228
3229 2016-01-21 Yao Qi <yao.qi@linaro.org>
3230
3231 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3232 is_thumb and set it according to CPSR saved on the stack.
3233 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3234 arm_sigreturn_next_pc.
3235
3236 2016-01-18 Yao Qi <yao.qi@linaro.org>
3237
3238 * linux-low.c (linux_set_pc_64bit): New function.
3239 (linux_get_pc_64bit): New function.
3240 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3241 Declare.
3242 * linux-sparc-low.c (debug_threads): Remove declaration.
3243 (sparc_get_pc): Remove.
3244 (the_low_target): Use linux_get_pc_64bit instead of
3245 sparc_get_pc.
3246 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3247 (the_low_target): Use linux_get_pc_64bit and
3248 linux_set_pc_64bit.
3249
3250 2016-01-18 Yao Qi <yao.qi@linaro.org>
3251
3252 * linux-arm-low.c (debug_threads): Remove declaration.
3253 (arm_get_pc, arm_set_pc): Remove.
3254 (the_low_target): Use linux_get_pc_32bit and
3255 linux_set_pc_32bit.
3256 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3257 (the_low_target): Use linux_get_pc_32bit and
3258 linux_set_pc_32bit.
3259 * linux-cris-low.c (debug_threads): Remove declaration.
3260 (cris_get_pc, cris_set_pc,): Remove.
3261 (the_low_target): Use linux_get_pc_32bit and
3262 linux_set_pc_32bit.
3263 * linux-crisv32-low.c (debug_threads): Remove declaration.
3264 (cris_get_pc, cris_set_pc): Remove.
3265 (the_low_target): Use linux_get_pc_32bit and
3266 linux_set_pc_32bit.
3267 * linux-low.c: Include inttypes.h.
3268 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3269 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3270 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3271 (the_low_target): Use linux_get_pc_32bit and
3272 linux_set_pc_32bit.
3273 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3274 (the_low_target): Use linux_get_pc_32bit and
3275 linux_set_pc_32bit.
3276 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3277 (the_low_target): Use linux_get_pc_32bit and
3278 linux_set_pc_32bit.
3279 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3280 (the_low_target): Use linux_get_pc_32bit and
3281 linux_set_pc_32bit.
3282 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3283 (the_low_target): Use linux_get_pc_32bit and
3284 linux_set_pc_32bit.
3285
3286 2016-01-18 Gary Benson <gbenson@redhat.com>
3287
3288 * configure.ac (AC_FUNC_FORK): New check.
3289 * config.in: Regenerate.
3290 * configure: Likewise.
3291
3292 2016-01-14 Yao Qi <yao.qi@linaro.org>
3293
3294 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3295 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3296 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3297 arm_get_next_pcs_ctor.
3298
3299 2016-01-12 Josh Stone <jistone@redhat.com>
3300 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3301
3302 * inferiors.h: Include "gdb_vecs.h".
3303 (struct process_info): Add syscalls_to_catch.
3304 * inferiors.c (remove_process): Free syscalls_to_catch.
3305 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3306 syscall_return stops.
3307 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3308 * server.c (handle_general_set): Handle QCatchSyscalls.
3309 (handle_query): Report support for QCatchSyscalls.
3310 * target.h (struct target_ops): Add supports_catch_syscall.
3311 (target_supports_catch_syscall): New macro.
3312 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3313 (struct lwp_info): Add syscall_state.
3314 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3315 Maintain syscall_state and syscalls_to_catch across exec.
3316 (get_syscall_trapinfo): New function, proxy to the_low_target.
3317 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3318 (linux_low_filter_event): Toggle syscall_state entry/return for
3319 syscall traps, and set it ignored for all others.
3320 (gdb_catching_syscalls_p): New function.
3321 (gdb_catch_this_syscall_p): New function.
3322 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3323 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3324 (linux_supports_catch_syscall): New function.
3325 (linux_target_ops): Install it.
3326 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3327 (the_low_target): Install it.
3328
3329 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3330
3331 * acinclude.m4: Include new ../warning.m4 file.
3332 * configure: Regenerated.
3333 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3334
3335 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3336
3337 * ax.c (is_goto_target): Mark static.
3338 * linux-low.c (register_addr): Likewise.
3339 (linux_fetch_registers, linux_store_registers): Likewise.
3340 * mem-break.c (any_persistent_commands): Fix old prototype.
3341 (add_commands_to_breakpoint): Mark static.
3342 * regcache.c (find_register_by_name): Delete unused func.
3343 * remote-utils.c (hex_or_minus_one): Mark static.
3344 * server.c (monitor_show_help): Mark static.
3345 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3346 handle_v_requests): Likewise.
3347
3348 2016-01-12 Pedro Alves <palves@redhat.com>
3349
3350 Remove use of the registered trademark symbol throughout.
3351
3352 2016-01-08 Yao Qi <yao.qi@linaro.org>
3353
3354 * remote-utils.c (getpkt): If c is '\003', call target hook
3355 request_interrupt.
3356
3357 2016-01-06 Yao Qi <yao.qi@linaro.org>
3358
3359 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3360 linux-aarch32-low.c.
3361 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3362 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3363 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3364 (thumb2_breakpoint): Declare.
3365 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3366 linux-aarch32-low.h.
3367 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3368 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3369 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3370
3371 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3372
3373 * gdbreplay.c (gdbreplay_version): Change copyright year in
3374 version message.
3375 * server.c (gdbserver_version): Likewise.
3376
3377 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3378
3379 * server.c (crc32_table): Delete.
3380 (crc32): Use libiberty's xcrc32 function.
3381
3382 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3383
3384 * lynx-low.c (lynx_delete_thread_callback): New function.
3385 (lynx_mourn): Properly delete our process and all of its
3386 threads. Remove call to clear_inferiors.
3387
3388 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3389
3390 * target.c (thread_search_callback): Add check that
3391 the thread_stopped target callback is not NULL before
3392 calling it.
3393
3394 2015-12-21 Yao Qi <yao.qi@linaro.org>
3395
3396 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3397 arm breakpoint.
3398
3399 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3400
3401 * server.c (handle_query): Call target_supports_software_single_step.
3402
3403 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3404
3405 * linux-low.c (single_step): New function.
3406 (linux_resume_one_lwp_throw): Call single_step.
3407 (start_step_over): Likewise.
3408
3409 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3410
3411 * Makefile.in (SFILES): Append arch/arm-linux.c,
3412 arch/arm-get-next-pcs.c.
3413 (arm-linux.o): New rule.
3414 (arm-get-next-pcs.o): New rule.
3415 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3416 arm-linux.o.
3417 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3418 to linux-aarch32-low.c.
3419 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3420 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3421 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3422 (thumb2_breakpoint_len): Likewise.
3423 (arm_is_thumb_mode): Make non-static.
3424 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3425 from linux-aarch32-low.c.
3426 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3427 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3428 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3429 (thumb2_breakpoint_len): Likewise.
3430 (arm_is_thumb_mode): New declaration.
3431 * linux-arm-low.c: Include arch/arm-linux.h
3432 aarch/arm-get-next-pcs.h, sys/syscall.h.
3433 (get_next_pcs_ops): New struct.
3434 (get_next_pcs_addr_bits_remove): New function.
3435 (get_next_pcs_is_thumb): New function.
3436 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3437 (arm_sigreturn_next_pc): Likewise.
3438 (get_next_pcs_syscall_next_pc): Likewise.
3439 (arm_gdbserver_get_next_pcs): Likewise.
3440 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3441 Initialize.
3442 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3443 * server.h: Include gdb_vecs.h.
3444
3445 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3446
3447 * Makefile.in (SFILES): Append common/common-regcache.c.
3448 (OBS): Append common-regcache.o.
3449 (common-regcache.o): New rule.
3450 * regcache.c (init_register_cache): Initialize cache to
3451 REG_UNAVAILABLE.
3452 (regcache_raw_read_unsigned): New function.
3453 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3454 register_status enum.
3455
3456 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3457
3458 * linux-aarch64-low.c (the_low_targets): Rename
3459 breakpoint_reinsert_addr to get_next_pcs.
3460 * linux-arm-low.c (the_low_targets): Likewise.
3461 * linux-bfin-low.c (the_low_targets): Likewise.
3462 * linux-cris-low.c (the_low_targets): Likewise.
3463 * linux-crisv32-low.c (the_low_targets): Likewise.
3464 * linux-low.c (can_software_single_step): Likewise.
3465 (install_software_single_step_breakpoints): New function.
3466 (start_step_over): Use install_software_single_step_breakpoints.
3467 * linux-low.h: New CORE_ADDR vector.
3468 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3469 get_next_pcs.
3470 * linux-mips-low.c (the_low_targets): Likewise.
3471 * linux-nios2-low.c (the_low_targets): Likewise.
3472 * linux-sparc-low.c (the_low_targets): Likewise.
3473
3474 2015-12-17 Pedro Alves <palves@redhat.com>
3475
3476 * linux-low.c (linux_kill_one_lwp): Remove references to
3477 LinuxThreads.
3478 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3479 to 'kill'.
3480 (linux_init_signals): Delete.
3481 (initialize_low): Adjust.
3482 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3483
3484 2015-12-16 Pedro Alves <palves@redhat.com>
3485
3486 * configure.ac (compiler warning flags): When testing a
3487 -Wno-foo option, check whether -Wfoo works instead.
3488 * configure: Regenerate.
3489
3490 2015-12-11 Don Breazeal <donb@codesourcery.com>
3491
3492 * server.c (process_serial_event): Don't exit from gdbserver
3493 in remote mode if there are still active inferiors.
3494
3495 2015-12-11 Yao Qi <yao.qi@linaro.org>
3496
3497 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3498 arm_breakpoint_at if the process is 32-bit.
3499
3500 2015-12-11 Yao Qi <yao.qi@linaro.org>
3501
3502 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3503 arm breakpoint.
3504
3505 2015-12-07 Yao Qi <yao.qi@linaro.org>
3506
3507 * configure.srv: Append arm.o to srv_tgtobj for
3508 aarch64*-*-linux* target.
3509 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3510 from linux-arm-low.c.
3511 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3512 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3513 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3514 (thumb2_breakpoint_len): Likewise.
3515 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3516 (arm_breakpoint_kinds): Likewise.
3517 (arm_breakpoint_kind_from_pc): Likewise.
3518 (arm_sw_breakpoint_from_kind): Likewise.
3519 (arm_breakpoint_kind_from_current_state): Likewise.
3520 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3521 (arm_sw_breakpoint_from_kind): Declare.
3522 (arm_breakpoint_kind_from_current_state): Declare.
3523 (arm_breakpoint_at): Declare.
3524 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3525 arm_sw_breakpoint_from_kind if process is 32-bit.
3526 (aarch64_breakpoint_kind_from_pc): New function.
3527 (aarch64_breakpoint_kind_from_current_state): New function.
3528 (the_low_target): Initialize fields breakpoint_kind_from_pc
3529 and breakpoint_kind_from_current_state.
3530 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3531 linux-aarch32-low.c.
3532 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3533 (arm_breakpoint, arm_breakpoint_len): Likewise.
3534 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3535 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3536 (arm_is_thumb_mode): Likewise.
3537 (arm_breakpoint_at): Likewise.
3538 (arm_breakpoint_kind_from_pc): Likewise.
3539 (arm_sw_breakpoint_from_kind): Likewise.
3540 (arm_breakpoint_kind_from_current_state): Likewise.
3541
3542 Revert:
3543 2015-08-04 Yao Qi <yao.qi@linaro.org>
3544
3545 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3546 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3547 * server.c (extended_protocol): Remove "static".
3548 * server.h (extended_protocol): Declare it.
3549
3550 2015-12-04 Josh Stone <jistone@redhat.com>
3551
3552 * target.h (struct target_ops) <arch_setup>: Rename to ...
3553 (struct target_ops) <post_create_inferior>: ... this.
3554 (target_arch_setup): Rename to ...
3555 (target_post_create_inferior): ... this, calling post_create_inferior.
3556 * server.c (start_inferior): Update target_arch_setup calls to
3557 target_post_create_inferior.
3558 * linux-low.c (linux_low_ptrace_options): Forward declare.
3559 (linux_arch_setup): Update its comment for general use.
3560 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3561 (struct linux_target_ops): Use linux_post_create_inferior.
3562 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3563 to post_create_inferior.
3564 * nto-low.c (struct nto_target_ops): Likewise.
3565 * spu-low.c (struct spu_target_ops): Likewise.
3566 * win32-low.c (struct win32_target_ops): Likewise.
3567
3568 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3569
3570 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3571
3572 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3573
3574 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3575 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3576 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3577 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3578 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3579 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3580 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3581 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3582 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3583 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3584 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3585 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3586
3587 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3588
3589 * linux-low.c (linux_look_up_symbols): Don't call
3590 linux_supports_traceclone.
3591 * linux-low.h (thread_db_init): Remove use_events argument.
3592 * thread-db.c (thread_db_use_event): Remove global variable.
3593 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3594 (struct thread_db) <td_create_bp>: Remove field.
3595 (thread_db_create_event): Remove function.
3596 (thread_db_enable_reporting): Likewise.
3597 (find_one_thread): Don't check for thread_db_use_events.
3598 (attach_thread): Likewise.
3599 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3600 (try_thread_db_load_1): Don't check for thread_db_use_events.
3601 (thread_db_init): Remove use_events argument and thread events
3602 handling.
3603 (remove_thread_event_breakpoints): Remove function.
3604 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3605
3606 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3607
3608 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3609 New function.
3610 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3611 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3612 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3613 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3614 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3615 Initialize.
3616 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3617 New function.
3618 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3619 * linux-low.c (can_hardware_single_step): Use
3620 supports_hardware_single_step.
3621 (can_software_single_step): New function.
3622 (start_step_over): Call can_software_single_step.
3623 (linux_supports_hardware_single_step): New function.
3624 (struct target_ops) <supports_software_single_step>: Initialize.
3625 * linux-low.h (struct linux_target_ops)
3626 <supports_hardware_single_step>: Initialize.
3627 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3628 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3629 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3630 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3631 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3632 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3633 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3634 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3635 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3636 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3637 Initialize.
3638 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3639 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3640 Initialize.
3641 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3642 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3643 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3644 New function.
3645 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3646 * target.h (struct target_ops): <supports_software_single_step>:
3647 New field.
3648 (target_supports_software_single_step): New macro.
3649
3650 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3651
3652 * linux-low.c (linux_wait_1): Fix pc advance condition.
3653 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3654 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3655
3656 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3657
3658 * linux-arm-low.c (arm_is_thumb_mode): New function.
3659 (arm_breakpoint_at): Use arm_is_thumb_mode.
3660 (arm_breakpoint_kind_from_current_state): New function.
3661 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3662 Initialize.
3663 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3664 (linux_breakpoint_kind_from_current_state): New function.
3665 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3666 * linux-low.h (struct linux_target_ops)
3667 <breakpoint_kind_from_current_state>: New field.
3668 * target.h (struct target_ops): Likewise.
3669 (target_breakpoint_kind_from_current_state): New macro.
3670
3671 2015-11-30 Pedro Alves <palves@redhat.com>
3672
3673 * linux-low.c (linux_resume): Wake up the event loop before
3674 returning.
3675
3676 2015-11-30 Pedro Alves <palves@redhat.com>
3677
3678 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3679 check.
3680 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3681 to -1.
3682 * target.c (struct thread_search): New structure.
3683 (thread_search_callback): New function.
3684 (prev_general_thread): New global.
3685 (prepare_to_access_memory, done_accessing_memory): New functions.
3686 * target.h (prepare_to_access_memory, done_accessing_memory):
3687 Replace macros with function declarations.
3688
3689 2015-11-30 Pedro Alves <palves@redhat.com>
3690
3691 PR 14618
3692 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3693 report TARGET_WAITKIND_NO_RESUMED.
3694 * remote-utils.c (prepare_resume_reply): Handle
3695 TARGET_WAITKIND_NO_RESUMED.
3696 * server.c (report_no_resumed): New global.
3697 (handle_query) <qSupported>: Handle "no-resumed+". Report
3698 "no-resumed+" support.
3699 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3700 return error if the client doesn't support no-resumed events.
3701 (push_stop_notification): New function.
3702 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3703 events if the client supports them.
3704
3705 2015-11-30 Pedro Alves <palves@redhat.com>
3706
3707 * linux-low.c (thread_still_has_status_pending_p): Don't check
3708 vCont;t here.
3709 (lwp_resumed): New function.
3710 (status_pending_p_callback): Return early if the LWP is not
3711 supposed to be resumed.
3712
3713 2015-11-30 Pedro Alves <palves@redhat.com>
3714
3715 * linux-low.c (handle_extended_wait): Assert that the LWP's
3716 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3717 thread create events, leave the new child's status pending.
3718 (linux_low_filter_event): If GDB wants to hear about thread exit
3719 events, leave the LWP marked dead and don't delete it.
3720 (linux_wait_for_event_filtered): Don't check for thread exit.
3721 (filter_exit_event): New function.
3722 (linux_wait_1): Use it, when returning an exit event.
3723 (linux_resume_one_lwp_throw): Assert that the LWP's
3724 waitstatus is TARGET_WAITKIND_IGNORE.
3725 * remote-utils.c (prepare_resume_reply): Handle
3726 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3727 * server.c (report_thread_events): New global.
3728 (handle_general_set): Handle QThreadEvents.
3729 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3730 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3731 TARGET_WAITKIND_THREAD_EXITED.
3732 * server.h (report_thread_events): Declare.
3733
3734 2015-11-30 Pedro Alves <palves@redhat.com>
3735
3736 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3737 the thread's last_resume_kind was resume_stop.
3738
3739 2015-11-30 Pedro Alves <palves@redhat.com>
3740
3741 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3742 before returning.
3743
3744 2015-11-30 Pedro Alves <palves@redhat.com>
3745
3746 * server.c (handle_v_requests): Handle vCtrlC.
3747
3748 2015-11-30 Pedro Alves <palves@redhat.com>
3749
3750 * gdbthread.h (find_any_thread_of_pid): Declare.
3751 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3752 functions.
3753 * server.c (handle_query): If current_thread is NULL, look for
3754 another thread of the selected process.
3755
3756 2015-11-26 Daniel Colascione <dancol@dancol.org>
3757 Simon Marchi <simon.marchi@ericsson.com>
3758
3759 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3760 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3761 name in reply.
3762 * target.h (struct target_ops) <thread_name>: New field.
3763 (target_thread_name): New macro.
3764
3765 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3766
3767 * regcache.h (regcache_invalidate_pid): Add declaration.
3768 * regcache.c (regcache_invalidate_pid): New function, extracted
3769 from regcache_invalidate.
3770 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3771 Add trivial documentation comment.
3772 * lynx-low.c: Use regcache_invalidate_pid instead of
3773 regcache_invalidate.
3774
3775 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3776
3777 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3778 and Elf64_auxv_t if the target is Android.
3779
3780 2015-11-22 Doug Evans <xdje42@gmail.com>
3781
3782 * target.h: #include <sys/types.h>.
3783
3784 2015-11-19 Pedro Alves <palves@redhat.com>
3785
3786 * linux-low.c (linux_process_qsupported): Change prototype.
3787 Adjust.
3788 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3789 Change prototype.
3790 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3791 and adjust to loop over all features.
3792 * server.c (handle_query) <qSupported>: Adjust to call
3793 target_process_qsupported once, passing it a vector of unprocessed
3794 features.
3795 * target.h (struct target_ops) <process_qsupported>: Change
3796 prototype.
3797 (target_process_qsupported): Adjust.
3798
3799 2015-11-19 Pedro Alves <palves@redhat.com>
3800
3801 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3802 mode.
3803 * configure: Regenerate.
3804
3805 2015-11-19 Pedro Alves <palves@redhat.com>
3806
3807 * configure: Regenerate.
3808
3809 2015-11-19 Yao Qi <yao.qi@linaro.org>
3810
3811 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3812 type to uint32_t.
3813
3814 2015-11-19 Yao Qi <yao.qi@linaro.org>
3815
3816 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3817 (struct aarch64_operand): Move enum out.
3818
3819 2015-11-19 Yao Qi <yao.qi@linaro.org>
3820
3821 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3822 struct user_fpsimd_state *.
3823 (aarch64_store_fpregset): Likewise.
3824
3825 2015-11-19 Yao Qi <yao.qi@linaro.org>
3826
3827 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3828 struct user_pt_regs *.
3829 (aarch64_store_gregset): Likewise.
3830
3831 2015-11-18 Pedro Alves <palves@redhat.com>
3832
3833 * Makefile.in (all_object_files): Add $IPA_OBJS.
3834
3835 2015-11-17 Pedro Alves <palves@redhat.com>
3836
3837 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3838 GDB_SIGNAL_0 and gdb_signal_to_string.
3839
3840 2015-11-17 Pedro Alves <palves@redhat.com>
3841
3842 * win32-low.c (handle_output_debug_string): Remove parameter.
3843 (win32_kill): Remove our_status local and adjust call to
3844 handle_output_debug_string.
3845 (get_child_debug_event): Adjust call to
3846 handle_output_debug_string.
3847
3848 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3849
3850 * linux-mips-low.c (mips_fill_gregset): Add cast.
3851 (mips_store_gregset): Likewise.
3852 (mips_fill_fpregset): Likewise.
3853 (mips_store_fpregset): Likewise.
3854
3855 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3856
3857 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3858 priv.
3859
3860 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3861
3862 * linux-mips-low.c (mips_linux_new_thread): Change type of
3863 watch_type to enum target_hw_bp_type.
3864
3865 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3866
3867 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3868 Change return type to arm_hwbp_type.
3869
3870 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3871
3872 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3873 (arm_store_gregset): Likewise.
3874 * linux-arm-low.c (arm_get_hwcap): Likewise.
3875 (arm_read_description): Likewise.
3876
3877 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3878
3879 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3880
3881 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3882
3883 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3884 (ppc_fill_vsxregset): Likewise.
3885 (ppc_store_vsxregset): Likewise.
3886 (ppc_fill_vrregset): Likewise.
3887 (ppc_store_vrregset): Likewise.
3888 (ppc_fill_evrregset): Likewise.
3889 (ppc_store_evrregset): Likewise.
3890
3891 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3892
3893 * linux-ppc-low.c (ppc_usrregs_info): Remove
3894 forward-declaration.
3895 (ppc_arch_setup): Move lower in file.
3896
3897 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3898
3899 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3900 (ps_pdwrite): Likewise.
3901
3902 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3903
3904 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3905 to after assert checks.
3906
3907 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3908
3909 * proc-service.c (ps_pdread): Add/adjust casts.
3910 (ps_pdwrite): Add/adjust casts.
3911
3912 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3913
3914 * server.c (handle_search_memory_1): Cast return value of
3915 memmem.
3916
3917 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3918
3919 * server.c (write_qxfer_response): Change type of data to
3920 gdb_byte *.
3921
3922 2015-10-29 Pedro Alves <palves@redhat.com>
3923
3924 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3925
3926 2015-10-29 Pedro Alves <palves@redhat.com>
3927
3928 * tracepoint.c (clear_installed_tracepoints): Add casts.
3929
3930 2015-10-29 Pedro Alves <palves@redhat.com>
3931
3932 * server.c (handle_v_cont, process_serial_event): Add enum
3933 gdb_signal casts to signal parsing code.
3934
3935 2015-10-29 Pedro Alves <palves@redhat.com>
3936
3937 * linux-low.h (NULL_REGSET): Define.
3938 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3939 * linux-arm-low.c (arm_regsets): Likewise.
3940 * linux-crisv32-low.c (cris_regsets): Likewise.
3941 * linux-m68k-low.c (m68k_regsets): Likewise.
3942 * linux-mips-low.c (mips_regsets): Likewise.
3943 * linux-nios2-low.c (nios2_regsets): Likewise.
3944 * linux-ppc-low.c (ppc_regsets): Likewise.
3945 * linux-s390-low.c (s390_regsets): Likewise.
3946 * linux-sh-low.c (sh_regsets): Likewise.
3947 * linux-sparc-low.c (sparc_regsets): Likewise.
3948 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3949 * linux-tile-low.c (tile_regsets): Likewise.
3950 * linux-x86-low.c (x86_regsets): Likewise.
3951 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3952
3953 2015-10-29 Pedro Alves <palves@redhat.com>
3954
3955 * linux-low.h (NULL_REGSET): Define.
3956 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3957 * linux-arm-low.c (arm_regsets): Likewise.
3958 * linux-crisv32-low.c (cris_regsets): Likewise.
3959 * linux-m68k-low.c (m68k_regsets): Likewise.
3960 * linux-mips-low.c (mips_regsets): Likewise.
3961 * linux-nios2-low.c (nios2_regsets): Likewise.
3962 * linux-ppc-low.c (ppc_regsets): Likewise.
3963 * linux-s390-low.c (s390_regsets): Likewise.
3964 * linux-sh-low.c (sh_regsets): Likewise.
3965 * linux-sparc-low.c (sparc_regsets): Likewise.
3966 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3967 * linux-tile-low.c (tile_regsets): Likewise.
3968 * linux-x86-low.c (x86_regsets): Likewise.
3969 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3970
3971 2015-10-26 Doug Evans <dje@google.com>
3972
3973 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3974
3975 2015-10-26 Doug Evans <dje@google.com>
3976
3977 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3978
3979 2015-10-26 Doug Evans <dje@google.com>
3980
3981 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3982 for debug_printf.
3983 (attach_thread, find_new_threads_callback): Ditto.
3984
3985 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3986
3987 * mem-break.h (set_breakpoint_data): Remove.
3988
3989 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3990
3991 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3992 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3993 (initialize_low): Remove set_breakpoint_data call.
3994 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3995 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3996 (initialize_low): Remove set_breakpoint_data call.
3997 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3998 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3999 (initialize_low): Remove set_breakpoint_data call.
4000
4001 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4002
4003 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4004 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4005 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4006 * target.h (target_breakpoint_kind_from_pc): New macro.
4007
4008 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4009
4010 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4011 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4012 the default breakpoint kind.
4013
4014 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4015
4016 * linux-arm-low.c (arm_supports_z_point_type): Add software
4017 breakpoint support.
4018
4019 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4020
4021 * linux-arm-low.c: Refactor breakpoint definitions.
4022 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4023 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4024
4025 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4026
4027 * Makefile.in: Add arm.c/o.
4028 * configure.srv: Likewise.
4029 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4030 (arm_breakpoint_kind_from_pc): New function.
4031 (arm_sw_breakpoint_from_kind): Return proper kind.
4032 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4033
4034 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4035
4036 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4037 removal.
4038 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4039 (struct raw_breakpoint) <size>: Remove.
4040 (struct raw_breakpoint) <kind>: Add.
4041 (bp_size): New function.
4042 (bp_opcode): Likewise.
4043 (find_raw_breakpoint_at): Adjust for kind.
4044 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4045 (remove_memory_breakpoint): Adjust for kind call bp_size.
4046 (set_raw_breakpoint_at): Adjust for kind.
4047 (set_breakpoint): Likewise.
4048 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4049 (delete_raw_breakpoint): Adjust for kind.
4050 (delete_breakpoint): Likewise.
4051 (find_gdb_breakpoint): Likewise.
4052 (set_gdb_breakpoint_1): Likewise.
4053 (set_gdb_breakpoint): Likewise.
4054 (delete_gdb_breakpoint_1): Likewise.
4055 (delete_gdb_breakpoint): Likewise.
4056 (uninsert_raw_breakpoint): Likewise.
4057 (reinsert_raw_breakpoint): Likewise.
4058 (set_breakpoint_data): Remove.
4059 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4060 (check_mem_read): Adjust for kind call bp_size.
4061 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4062 (clone_one_breakpoint): Adjust for kind.
4063 * mem-break.h (set_gdb_breakpoint): Likewise.
4064 (delete_gdb_breakpoint): Likewise.
4065 * server.c (process_serial_event): Likewise.
4066
4067 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4068
4069 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4070 (struct linux_target_ops) <breakpoint>: Remove.
4071 (struct linux_target_ops) <breakpoint_len>: Remove.
4072 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4073 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4074 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4075 (arm_sw_breakpoint_from_kind): New function.
4076 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4077 (struct linux_target_ops) <breakpoint>: Remove.
4078 (struct linux_target_ops) <breakpoint_len>: Remove.
4079 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4080 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4081 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4082 (struct linux_target_ops) <breakpoint>: Remove.
4083 (struct linux_target_ops) <breakpoint_len>: Remove.
4084 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4085 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4086 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4087 (struct linux_target_ops) <breakpoint>: Remove.
4088 (struct linux_target_ops) <breakpoint_len>: Remove.
4089 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4090 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4091 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4092 and sw_breakpoint_from_kind to increment the pc.
4093 (linux_breakpoint_kind_from_pc): New function.
4094 (linux_sw_breakpoint_from_kind): New function.
4095 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4096 (initialize_low): Call breakpoint_kind_from_pc and
4097 sw_breakpoint_from_kind to replace breakpoint_data/len.
4098 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4099 New field.
4100 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4101 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4102 (struct linux_target_ops) <breakpoint>: Remove.
4103 (struct linux_target_ops) <breakpoint_len>: Remove.
4104 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4105 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4106 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4107 (struct linux_target_ops) <breakpoint>: Remove.
4108 (struct linux_target_ops) <breakpoint_len>: Remove.
4109 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4110 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4111 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4112 (struct linux_target_ops) <breakpoint>: Remove.
4113 (struct linux_target_ops) <breakpoint_len>: Remove.
4114 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4115 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4116 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4117 (struct linux_target_ops) <breakpoint>: Remove.
4118 (struct linux_target_ops) <breakpoint_len>: Remove.
4119 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4120 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4121 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4122 (struct linux_target_ops) <breakpoint>: Remove.
4123 (struct linux_target_ops) <breakpoint_len>: Remove.
4124 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4125 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4126 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4127 (struct linux_target_ops) <breakpoint>: Remove.
4128 (struct linux_target_ops) <breakpoint_len>: Remove.
4129 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4130 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4131 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4132 (struct linux_target_ops) <breakpoint>: Remove.
4133 (struct linux_target_ops) <breakpoint_len>: Remove.
4134 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4135 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4136 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4137 (struct linux_target_ops) <breakpoint>: Remove.
4138 (struct linux_target_ops) <breakpoint_len>: Remove.
4139 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4140 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4141 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4142 (struct linux_target_ops) <breakpoint>: Remove.
4143 (struct linux_target_ops) <breakpoint_len>: Remove.
4144 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4145 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4146 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4147 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4153 (struct linux_target_ops) <breakpoint>: Remove.
4154 (struct linux_target_ops) <breakpoint_len>: Remove.
4155 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4156 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4157
4158 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4159
4160 * linux-cris-low.c (cris_get_pc): Remove void arg.
4161
4162 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4163
4164 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4165 variable name.
4166
4167 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4168
4169 * inferiors.c (thread_pid_matches_callback): New function.
4170 (find_thread_process): New function.
4171 (remove_thread): Reset current_thread.
4172 (remove_process): Assert threads have been removed first.
4173
4174 2015-10-15 Yao Qi <yao.qi@linaro.org>
4175
4176 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4177 if it is 3.
4178 (aarch64_remove_point): Likewise.
4179 * regcache.c (regcache_register_size): New function.
4180
4181 2015-10-12 Yao Qi <yao.qi@linaro.org>
4182
4183 * linux-aarch64-low.c: Update all callers as emit_load_store
4184 is renamed to aarch64_emit_load_store.
4185
4186 2015-10-12 Yao Qi <yao.qi@linaro.org>
4187
4188 * linux-aarch64-low.c: Update all callers of function renaming
4189 from emit_insn to aarch64_emit_insn.
4190
4191 2015-10-12 Yao Qi <yao.qi@linaro.org>
4192
4193 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4194 arch/aarch64-insn.h.
4195 (struct aarch64_memory_operand): Likewise.
4196 (ENCODE): Likewise.
4197 (emit_insn): Move to arch/aarch64-insn.c.
4198 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4199 (emit_load_store): Move to arch/aarch64-insn.c.
4200 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4201 (can_encode_int32): Remove.
4202
4203 2015-10-12 Yao Qi <yao.qi@linaro.org>
4204
4205 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4206 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4207 (aarch64_relocate_instruction): Likewise.
4208 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4209 (struct aarch64_insn_visitor): Likewise.
4210
4211 2015-10-12 Yao Qi <yao.qi@linaro.org>
4212
4213 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4214 (struct aarch64_insn_visitor): New.
4215 (struct aarch64_insn_relocation_data): New.
4216 (aarch64_ftrace_insn_reloc_b): New function.
4217 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4218 (aarch64_ftrace_insn_reloc_cb): Likewise.
4219 (aarch64_ftrace_insn_reloc_tb): Likewise.
4220 (aarch64_ftrace_insn_reloc_adr): Likewise.
4221 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4222 (aarch64_ftrace_insn_reloc_others): Likewise.
4223 (visitor): New.
4224 (aarch64_relocate_instruction): Use visitor.
4225
4226 2015-10-12 Yao Qi <yao.qi@linaro.org>
4227
4228 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4229 int. Add argument buf.
4230 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4231 aarch64_relocate_instruction.
4232
4233 2015-10-12 Yao Qi <yao.qi@linaro.org>
4234
4235 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4236 argument insn. Remove local variable insn. Don't call
4237 target_read_uint32.
4238 (aarch64_install_fast_tracepoint_jump_pad): Call
4239 target_read_uint32.
4240
4241 2015-09-30 Yao Qi <yao.qi@linaro.org>
4242
4243 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4244 (emit_load_store_pair): Likewise.
4245
4246 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4247
4248 * dll.c (match_dll): Add cast(s).
4249 (unloaded_dll): Likewise.
4250 * linux-low.c (second_thread_of_pid_p): Likewise.
4251 (delete_lwp_callback): Likewise.
4252 (count_events_callback): Likewise.
4253 (select_event_lwp_callback): Likewise.
4254 (linux_set_resume_request): Likewise.
4255 * server.c (accumulate_file_name_length): Likewise.
4256 (emit_dll_description): Likewise.
4257 (handle_qxfer_threads_worker): Likewise.
4258 (visit_actioned_threads): Likewise.
4259 * thread-db.c (any_thread_of): Likewise.
4260 * tracepoint.c (same_process_p): Likewise.
4261 (match_blocktype): Likewise.
4262 (build_traceframe_info_xml): Likewise.
4263
4264 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4265
4266 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4267 assignment.
4268 (gdb_unparse_agent_expr): Likewise.
4269 * hostio.c (require_data): Likewise.
4270 (handle_pread): Likewise.
4271 * linux-low.c (disable_regset): Likewise.
4272 (fetch_register): Likewise.
4273 (store_register): Likewise.
4274 (get_dynamic): Likewise.
4275 (linux_qxfer_libraries_svr4): Likewise.
4276 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4277 (set_fast_tracepoint_jump): Likewise.
4278 (uninsert_fast_tracepoint_jumps_at): Likewise.
4279 (reinsert_fast_tracepoint_jumps_at): Likewise.
4280 (validate_inserted_breakpoint): Likewise.
4281 (clone_agent_expr): Likewise.
4282 * regcache.c (init_register_cache): Likewise.
4283 * remote-utils.c (putpkt_binary_1): Likewise.
4284 (decode_M_packet): Likewise.
4285 (decode_X_packet): Likewise.
4286 (look_up_one_symbol): Likewise.
4287 (relocate_instruction): Likewise.
4288 (monitor_output): Likewise.
4289 * server.c (handle_search_memory): Likewise.
4290 (handle_qxfer_exec_file): Likewise.
4291 (handle_qxfer_libraries): Likewise.
4292 (handle_qxfer): Likewise.
4293 (handle_query): Likewise.
4294 (handle_v_cont): Likewise.
4295 (handle_v_run): Likewise.
4296 (captured_main): Likewise.
4297 * target.c (write_inferior_memory): Likewise.
4298 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4299 * tracepoint.c (init_trace_buffer): Likewise.
4300 (add_tracepoint_action): Likewise.
4301 (add_traceframe): Likewise.
4302 (add_traceframe_block): Likewise.
4303 (cmd_qtdpsrc): Likewise.
4304 (cmd_qtdv): Likewise.
4305 (cmd_qtstatus): Likewise.
4306 (response_source): Likewise.
4307 (response_tsv): Likewise.
4308 (cmd_qtnotes): Likewise.
4309 (gdb_collect): Likewise.
4310 (initialize_tracepoint): Likewise.
4311
4312 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4313
4314 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4315 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4316 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4317 <NOP>: New.
4318 (enum aarch64_condition_codes): New enum.
4319 (w0): New static global.
4320 (fp): Likewise.
4321 (lr): Likewise.
4322 (struct aarch64_memory_operand) <type>: New
4323 MEMORY_OPERAND_POSTINDEX type.
4324 (postindex_memory_operand): New helper function.
4325 (emit_ret): New function.
4326 (emit_load_store_pair): New function, factored out of emit_stp
4327 with support for MEMORY_OPERAND_POSTINDEX.
4328 (emit_stp): Rewrite using emit_load_store_pair.
4329 (emit_ldp): New function.
4330 (emit_load_store): Likewise.
4331 (emit_ldr): Mention post-index instruction in comment.
4332 (emit_ldrh): New function.
4333 (emit_ldrb): New function.
4334 (emit_ldrsw): Mention post-index instruction in comment.
4335 (emit_str): Likewise.
4336 (emit_subs): New function.
4337 (emit_cmp): Likewise.
4338 (emit_and): Likewise.
4339 (emit_orr): Likewise.
4340 (emit_orn): Likewise.
4341 (emit_eor): Likewise.
4342 (emit_mvn): Likewise.
4343 (emit_lslv): Likewise.
4344 (emit_lsrv): Likewise.
4345 (emit_asrv): Likewise.
4346 (emit_mul): Likewise.
4347 (emit_sbfm): Likewise.
4348 (emit_sbfx): Likewise.
4349 (emit_ubfm): Likewise.
4350 (emit_ubfx): Likewise.
4351 (emit_csinc): Likewise.
4352 (emit_cset): Likewise.
4353 (emit_nop): Likewise.
4354 (emit_ops_insns): New helper function.
4355 (emit_pop): Likewise.
4356 (emit_push): Likewise.
4357 (aarch64_emit_prologue): New function.
4358 (aarch64_emit_epilogue): Likewise.
4359 (aarch64_emit_add): Likewise.
4360 (aarch64_emit_sub): Likewise.
4361 (aarch64_emit_mul): Likewise.
4362 (aarch64_emit_lsh): Likewise.
4363 (aarch64_emit_rsh_signed): Likewise.
4364 (aarch64_emit_rsh_unsigned): Likewise.
4365 (aarch64_emit_ext): Likewise.
4366 (aarch64_emit_log_not): Likewise.
4367 (aarch64_emit_bit_and): Likewise.
4368 (aarch64_emit_bit_or): Likewise.
4369 (aarch64_emit_bit_xor): Likewise.
4370 (aarch64_emit_bit_not): Likewise.
4371 (aarch64_emit_equal): Likewise.
4372 (aarch64_emit_less_signed): Likewise.
4373 (aarch64_emit_less_unsigned): Likewise.
4374 (aarch64_emit_ref): Likewise.
4375 (aarch64_emit_if_goto): Likewise.
4376 (aarch64_emit_goto): Likewise.
4377 (aarch64_write_goto_address): Likewise.
4378 (aarch64_emit_const): Likewise.
4379 (aarch64_emit_call): Likewise.
4380 (aarch64_emit_reg): Likewise.
4381 (aarch64_emit_pop): Likewise.
4382 (aarch64_emit_stack_flush): Likewise.
4383 (aarch64_emit_zero_ext): Likewise.
4384 (aarch64_emit_swap): Likewise.
4385 (aarch64_emit_stack_adjust): Likewise.
4386 (aarch64_emit_int_call_1): Likewise.
4387 (aarch64_emit_void_call_2): Likewise.
4388 (aarch64_emit_eq_goto): Likewise.
4389 (aarch64_emit_ne_goto): Likewise.
4390 (aarch64_emit_lt_goto): Likewise.
4391 (aarch64_emit_le_goto): Likewise.
4392 (aarch64_emit_gt_goto): Likewise.
4393 (aarch64_emit_ge_got): Likewise.
4394 (aarch64_emit_ops_impl): New static global variable.
4395 (aarch64_emit_ops): New target function, return
4396 &aarch64_emit_ops_impl.
4397 (struct linux_target_ops): Install it.
4398
4399 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4400
4401 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4402 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4403 aarch64-ipa.o.
4404 * linux-aarch64-ipa.c: New file.
4405 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4406 and endian.h.
4407 (aarch64_get_thread_area): New target method.
4408 (extract_signed_bitfield): New helper function.
4409 (aarch64_decode_ldr_literal): New function.
4410 (enum aarch64_opcodes): New enum.
4411 (struct aarch64_register): New struct.
4412 (struct aarch64_operand): New struct.
4413 (x0): New static global.
4414 (x1): Likewise.
4415 (x2): Likewise.
4416 (x3): Likewise.
4417 (x4): Likewise.
4418 (w2): Likewise.
4419 (ip0): Likewise.
4420 (sp): Likewise.
4421 (xzr): Likewise.
4422 (aarch64_register): New helper function.
4423 (register_operand): Likewise.
4424 (immediate_operand): Likewise.
4425 (struct aarch64_memory_operand): New struct.
4426 (offset_memory_operand): New helper function.
4427 (preindex_memory_operand): Likewise.
4428 (enum aarch64_system_control_registers): New enum.
4429 (ENCODE): New macro.
4430 (emit_insn): New helper function.
4431 (emit_b): New function.
4432 (emit_bcond): Likewise.
4433 (emit_cb): Likewise.
4434 (emit_tb): Likewise.
4435 (emit_blr): Likewise.
4436 (emit_stp): Likewise.
4437 (emit_ldp_q_offset): Likewise.
4438 (emit_stp_q_offset): Likewise.
4439 (emit_load_store): Likewise.
4440 (emit_ldr): Likewise.
4441 (emit_ldrsw): Likewise.
4442 (emit_str): Likewise.
4443 (emit_ldaxr): Likewise.
4444 (emit_stxr): Likewise.
4445 (emit_stlr): Likewise.
4446 (emit_data_processing_reg): Likewise.
4447 (emit_data_processing): Likewise.
4448 (emit_add): Likewise.
4449 (emit_sub): Likewise.
4450 (emit_mov): Likewise.
4451 (emit_movk): Likewise.
4452 (emit_mov_addr): Likewise.
4453 (emit_mrs): Likewise.
4454 (emit_msr): Likewise.
4455 (emit_sevl): Likewise.
4456 (emit_wfe): Likewise.
4457 (append_insns): Likewise.
4458 (can_encode_int32_in): New helper function.
4459 (aarch64_relocate_instruction): New function.
4460 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4461 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4462 (struct linux_target_ops): Install aarch64_get_thread_area,
4463 aarch64_install_fast_tracepoint_jump_pad and
4464 aarch64_get_min_fast_tracepoint_insn_len.
4465
4466 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4467
4468 * Makefile.in (aarch64-insn.o): New rule.
4469 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4470
4471 2015-09-21 Yao Qi <yao.qi@linaro.org>
4472
4473 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4474
4475 2015-09-21 Yao Qi <yao.qi@linaro.org>
4476
4477 * tracepoint.c (max_jump_pad_size): Remove.
4478
4479 2015-09-18 Yao Qi <yao.qi@linaro.org>
4480
4481 * linux-aarch64-low.c: Don't include sys/uio.h.
4482 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4483
4484 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4485
4486 * tracepoint.c (eval_result_type): Change prototype.
4487 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4488
4489 2015-09-15 Pedro Alves <palves@redhat.com>
4490
4491 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4492 Check whether to report exec events instead of checking whether
4493 multiprocess is enabled.
4494
4495 2015-09-15 Pedro Alves <palves@redhat.com>
4496
4497 PR remote/18965
4498 * remote-utils.c (prepare_resume_reply): Merge
4499 TARGET_WAITKIND_VFORK_DONE switch case with the
4500 TARGET_WAITKIND_FORKED case.
4501
4502 2015-09-15 Yao Qi <yao.qi@linaro.org>
4503
4504 * server.c (handle_query): Check string comparison using
4505 "else if" instead of "if".
4506
4507 2015-09-15 Yao Qi <yao.qi@linaro.org>
4508
4509 * server.c (vCont_supported): New global variable.
4510 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4511 matches. Append ";vContSupported+" to own_buf.
4512 (handle_v_requests): Append ";s;S" to own_buf if target supports
4513 hardware single step or vCont_supported is false.
4514 (capture_main): Set vCont_supported to zero.
4515
4516 2015-09-15 Yao Qi <yao.qi@linaro.org>
4517
4518 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4519 it to ...
4520 (linux_supports_hardware_single_step): ... New function.
4521 (linux_target_ops): Update.
4522 * lynx-low.c (lynx_target_ops): Set field
4523 supports_hardware_single_step to target_can_do_hardware_single_step.
4524 * nto-low.c (nto_target_ops): Likewise.
4525 * spu-low.c (spu_target_ops): Likewise.
4526 * win32-low.c (win32_target_ops): Likewise.
4527 * target.c (target_can_do_hardware_single_step): New function.
4528 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4529 Remove. <supports_hardware_single_step>: New field.
4530 (target_supports_conditional_breakpoints): Remove.
4531 (target_supports_hardware_single_step): New macro.
4532 (target_can_do_hardware_single_step): Declare.
4533 * server.c (handle_query): Use target_supports_hardware_single_step
4534 instead of target_supports_conditional_breakpoints.
4535
4536 2015-09-15 Yao Qi <yao.qi@linaro.org>
4537
4538 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4539 function.
4540 (struct linux_target_ops the_low_target): Install
4541 aarch64_linux_siginfo_fixup.
4542
4543 2015-09-11 Don Breazeal <donb@codesourcery.com>
4544 Luis Machado <lgustavo@codesourcery.com>
4545
4546 * linux-low.c (linux_mourn): Static declaration.
4547 (linux_arch_setup): Move in front of
4548 handle_extended_wait.
4549 (linux_arch_setup_thread): New function.
4550 (handle_extended_wait): Handle exec events. Call
4551 linux_arch_setup_thread. Make event_lwp argument a
4552 pointer-to-a-pointer.
4553 (check_zombie_leaders): Do not check stopped threads.
4554 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4555 (linux_low_filter_event): Add lwp and thread for exec'ing
4556 non-leader thread if leader thread has been deleted.
4557 Refactor code into linux_arch_setup_thread and call it.
4558 Pass child lwp pointer by reference to handle_extended_wait.
4559 (linux_wait_for_event_filtered): Update comment.
4560 (linux_wait_1): Prevent clobbering exec event status.
4561 (linux_supports_exec_events): New function.
4562 (linux_target_ops) <supports_exec_events>: Initialize new member.
4563 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4564 new member.
4565 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4566 * server.c (report_exec_events): New global variable.
4567 (handle_query): Handle qSupported query for exec-events feature.
4568 (captured_main): Initialize report_exec_events.
4569 * server.h (report_exec_events): Declare new global variable.
4570 * target.h (struct target_ops) <supports_exec_events>: New
4571 member.
4572 (target_supports_exec_events): New macro.
4573 * win32-low.c (win32_target_ops) <supports_exec_events>:
4574 Initialize new member.
4575
4576 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4577
4578 * linux-low.c (linux_low_enable_btrace): Remove.
4579 (linux_target_ops): Replace linux_low_enable_btrace with
4580 linux_enable_btrace.
4581
4582 2015-09-03 Yao Qi <yao.qi@linaro.org>
4583
4584 * linux-aarch64-low.c (aarch64_insert_point): Call
4585 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4586 returns true.
4587
4588 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4589
4590 * linux-low.c (check_stopped_by_breakpoint): Use
4591 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4592
4593 2015-08-27 Pedro Alves <palves@redhat.com>
4594
4595 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4596
4597 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4598
4599 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4600 the XNEW-family equivalent.
4601 (compile_bytecodes): Likewise.
4602 * dll.c (loaded_dll): Likewise.
4603 * event-loop.c (append_callback_event): Likewise.
4604 (create_file_handler): Likewise.
4605 (create_file_event): Likewise.
4606 * hostio.c (handle_open): Likewise.
4607 * inferiors.c (add_thread): Likewise.
4608 (add_process): Likewise.
4609 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4610 * linux-arm-low.c (arm_new_process): Likewise.
4611 (arm_new_thread): Likewise.
4612 * linux-low.c (add_to_pid_list): Likewise.
4613 (linux_add_process): Likewise.
4614 (handle_extended_wait): Likewise.
4615 (add_lwp): Likewise.
4616 (enqueue_one_deferred_signal): Likewise.
4617 (enqueue_pending_signal): Likewise.
4618 (linux_resume_one_lwp_throw): Likewise.
4619 (linux_resume_one_thread): Likewise.
4620 (linux_read_memory): Likewise.
4621 (linux_write_memory): Likewise.
4622 * linux-mips-low.c (mips_linux_new_process): Likewise.
4623 (mips_linux_new_thread): Likewise.
4624 (mips_add_watchpoint): Likewise.
4625 * linux-x86-low.c (initialize_low_arch): Likewise.
4626 * lynx-low.c (lynx_add_process): Likewise.
4627 * mem-break.c (set_raw_breakpoint_at): Likewise.
4628 (set_breakpoint): Likewise.
4629 (add_condition_to_breakpoint): Likewise.
4630 (add_commands_to_breakpoint): Likewise.
4631 (clone_agent_expr): Likewise.
4632 (clone_one_breakpoint): Likewise.
4633 * regcache.c (new_register_cache): Likewise.
4634 * remote-utils.c (look_up_one_symbol): Likewise.
4635 * server.c (queue_stop_reply): Likewise.
4636 (start_inferior): Likewise.
4637 (queue_stop_reply_callback): Likewise.
4638 (handle_target_event): Likewise.
4639 * spu-low.c (fetch_ppc_memory): Likewise.
4640 (store_ppc_memory): Likewise.
4641 * target.c (set_target_ops): Likewise.
4642 * thread-db.c (thread_db_load_search): Likewise.
4643 (try_thread_db_load_1): Likewise.
4644 * tracepoint.c (add_tracepoint): Likewise.
4645 (add_tracepoint_action): Likewise.
4646 (create_trace_state_variable): Likewise.
4647 (cmd_qtdpsrc): Likewise.
4648 (cmd_qtro): Likewise.
4649 (add_while_stepping_state): Likewise.
4650 * win32-low.c (child_add_thread): Likewise.
4651 (get_image_name): Likewise.
4652
4653 2015-08-25 Yao Qi <yao.qi@linaro.org>
4654
4655 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4656
4657 2015-08-25 Yao Qi <yao.qi@linaro.org>
4658
4659 * Makefile.in (aarch64-linux.o): New rule.
4660 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4661 srv_tgtobj.
4662 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4663 (aarch64_init_debug_reg_state): Make it extern.
4664 (aarch64_linux_prepare_to_resume): Remove.
4665
4666 2015-08-25 Yao Qi <yao.qi@linaro.org>
4667
4668 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4669 lwp_arch_private_info and ptid_of_lwp.
4670
4671 2015-08-25 Yao Qi <yao.qi@linaro.org>
4672
4673 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4674 Find proc_info by find_process_pid. All callers updated.
4675
4676 2015-08-25 Yao Qi <yao.qi@linaro.org>
4677
4678 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4679 Remove.
4680 (debug_reg_change_callback): Remove.
4681 (aarch64_notify_debug_reg_change): Remove.
4682
4683 2015-08-25 Yao Qi <yao.qi@linaro.org>
4684
4685 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4686 Call current_lwp_ptid.
4687
4688 2015-08-25 Yao Qi <yao.qi@linaro.org>
4689
4690 * linux-aarch64-low.c (debug_reg_change_callback): Use
4691 debug_printf.
4692
4693 2015-08-25 Yao Qi <yao.qi@linaro.org>
4694
4695 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4696
4697 2015-08-25 Yao Qi <yao.qi@linaro.org>
4698
4699 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4700
4701 2015-08-25 Yao Qi <yao.qi@linaro.org>
4702
4703 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4704 the code.
4705
4706 2015-08-25 Yao Qi <yao.qi@linaro.org>
4707
4708 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4709 Remove.
4710 (debug_reg_change_callback): Remove argument entry and add argument
4711 lwp. Remove local variable thread. Don't print thread id in the
4712 debugging output. Don't check whether pid of thread equals to pid.
4713 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4714 iterate_over_lwps instead find_inferior.
4715
4716 2015-08-24 Pedro Alves <palves@redhat.com>
4717
4718 * inferiors.c (get_first_process): New function.
4719 * inferiors.h (get_first_process): New declaration.
4720 * remote-utils.c (read_ptid): Default to the first process in the
4721 list, instead of to the current thread's process.
4722
4723 2015-08-24 Pedro Alves <palves@redhat.com>
4724
4725 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4726 * event-loop.c: Likewise.
4727 * remote-utils.c: Likewise.
4728 * tracepoint.c: Likewise.
4729
4730 2015-08-24 Pedro Alves <palves@redhat.com>
4731
4732 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4733 ptid_get_lwp.
4734
4735 2015-08-21 Pedro Alves <palves@redhat.com>
4736
4737 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4738 instead of literal 1.
4739
4740 2015-08-21 Pedro Alves <palves@redhat.com>
4741
4742 * tdesc.c (default_description): Explicitly zero-initialize.
4743
4744 2015-08-21 Pedro Alves <palves@redhat.com>
4745
4746 PR gdb/18749
4747 * inferiors.c (remove_thread): Discard any pending stop reply for
4748 this thread.
4749 * server.c (remove_all_on_match_pid): Rename to ...
4750 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4751 instead of a pid.
4752 (discard_queued_stop_replies): Change parameter to a ptid. Now
4753 extern.
4754 (handle_v_kill, kill_inferior_callback, captured_main)
4755 (process_serial_event): Adjust.
4756 * server.h (discard_queued_stop_replies): Declare.
4757
4758 2015-08-21 Pedro Alves <palves@redhat.com>
4759
4760 * linux-low.c (wait_for_sigstop): Always switch to no thread
4761 selected if the previously current thread dies.
4762 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4763 process instead of the current thread's.
4764 * remote-utils.c (input_interrupt): Don't check if there's no
4765 current thread.
4766 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4767 current thread to the general thread fails, error out.
4768 (handle_qxfer_auxv, handle_qxfer_libraries)
4769 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4770 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4771 (handle_query): Check if there's a thread selected instead of
4772 checking whether there's any thread in the thread list.
4773 (handle_qxfer_threads, handle_qxfer_btrace)
4774 (handle_qxfer_btrace_conf): Don't error out early if there's no
4775 thread in the thread list.
4776 (handle_v_cont, myresume): Don't set the current thread to the
4777 continue thread.
4778 (process_serial_event) <Hg handling>: Also set thread_id if the
4779 previous general thread is still alive.
4780 (process_serial_event) <g/G handling>: If setting the current
4781 thread to the general thread fails, error out.
4782 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4783 thread's lwp instead of the current thread's.
4784 * target.c (set_desired_thread): If the desired thread was not
4785 found, leave the current thread pointing to NULL. Return an int
4786 (boolean) indicating success.
4787 * target.h (set_desired_thread): Change return type to int.
4788
4789 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4790
4791 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4792 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4793 #includes.
4794 (ps_get_thread_area): New function.
4795
4796 2015-08-19 Gary Benson <gbenson@redhat.com>
4797
4798 * hostio.c (handle_pread): Do not attempt to read more data
4799 than hostio_reply_with_data can fit in a packet.
4800
4801 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4802
4803 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4804
4805 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4806
4807 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4808
4809 2015-08-06 Pedro Alves <palves@redhat.com>
4810
4811 * tracepoint.c (expr_eval_result): Now an int.
4812
4813 2015-08-06 Pedro Alves <palves@redhat.com>
4814
4815 * gdbthread.h (struct regcache): Forward declare.
4816 (struct thread_info) <regcache_data>: Now a struct regcache
4817 pointer.
4818 * inferiors.c (inferior_regcache_data)
4819 (set_inferior_regcache_data): Now work with struct regcache
4820 pointers.
4821 * inferiors.h (struct regcache): Forward declare.
4822 (inferior_regcache_data, set_inferior_regcache_data): Now work
4823 with struct regcache pointers.
4824 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4825 (free_register_cache_thread): Remove struct regcache pointer
4826 casts.
4827
4828 2015-08-06 Pedro Alves <palves@redhat.com>
4829
4830 * server.c (captured_main): On error, print the exception message
4831 to stderr, and if run_once is set, throw a quit.
4832
4833 2015-08-06 Pedro Alves <palves@redhat.com>
4834
4835 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4836 the current thread.
4837
4838 2015-08-06 Pedro Alves <palves@redhat.com>
4839
4840 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4841 reading beyond the passed in buffer length.
4842
4843 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4844
4845 * tracepoint.c (symbol_list) <required>: Remove.
4846
4847 2015-08-06 Pedro Alves <palves@redhat.com>
4848
4849 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4850 count if stopping and suspending threads.
4851 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4852 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4853 (linux_detach): Complete an ongoing step-over.
4854 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4855 throughout.
4856 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4857 (linux_wait_1): If passing a signal to the inferior after
4858 finishing a step-over, unsuspend and re-resume all lwps. If we
4859 see a single-step event but the thread should be continuing, don't
4860 pass the trap to gdb.
4861 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4862 internal_error instead of gdb_assert.
4863 (enqueue_pending_signal): New function.
4864 (check_ptrace_stopped_lwp_gone): Add debug output.
4865 (start_step_over): Use internal_error instead of gdb_assert.
4866 (complete_ongoing_step_over): New function.
4867 (linux_resume_one_thread): Don't resume a suspended thread.
4868 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4869 it stepping.
4870
4871 2015-08-06 Pedro Alves <palves@redhat.com>
4872
4873 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4874 (linux_thread_alive): Use lwp_is_marked_dead.
4875 (extended_event_reported): Delete.
4876 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4877 instead of extended_event_reported.
4878 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4879 as well.
4880 (lwp_is_marked_dead): New function.
4881 (lwp_running): Use lwp_is_marked_dead.
4882 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4883 comment.
4884
4885 2015-08-06 Pedro Alves <palves@redhat.com>
4886
4887 * linux-low.c (linux_wait_1): Move fork event output out of the
4888 !report_to_gdb check. Pass event_child->waitstatus to
4889 target_waitstatus_to_string instead of ourstatus.
4890
4891 2015-08-04 Yao Qi <yao.qi@linaro.org>
4892
4893 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4894 if current_thread is 32 bit.
4895
4896 2015-08-04 Yao Qi <yao.qi@linaro.org>
4897
4898 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4899 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4900 * server.c (extended_protocol): Remove "static".
4901 * server.h (extended_protocol): Declare it.
4902
4903 2015-08-04 Yao Qi <yao.qi@linaro.org>
4904
4905 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4906 both aarch64 and aarch32.
4907 (aarch64_set_pc): Likewise.
4908
4909 2015-08-04 Yao Qi <yao.qi@linaro.org>
4910
4911 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4912 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4913 arm-with-neon.xml to srv_xmlfiles.
4914 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4915 (is_64bit_tdesc): New function.
4916 (aarch64_linux_read_description): New function.
4917 (aarch64_arch_setup): Call aarch64_linux_read_description.
4918 (regs_info): Rename to regs_info_aarch64.
4919 (aarch64_regs_info): Return right regs_info.
4920 (initialize_low_arch): Call initialize_low_arch_aarch32.
4921
4922 2015-08-04 Yao Qi <yao.qi@linaro.org>
4923
4924 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4925 * linux-aarch32-low.c: New file.
4926 * linux-aarch32-low.h: New file.
4927 * linux-arm-low.c (arm_fill_gregset): Move it to
4928 linux-aarch32-low.c.
4929 (arm_store_gregset): Likewise.
4930 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4931 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4932 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4933 (regs_info): Rename to regs_info_arm.
4934 (arm_regs_info): Return regs_info_aarch32 if
4935 have_ptrace_getregset is 1 and target description is
4936 arm_with_neon or arm_with_vfpv3.
4937 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4938 Call initialize_low_arch_aarch32 instead.
4939
4940 2015-08-04 Yao Qi <yao.qi@linaro.org>
4941
4942 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4943 * linux-low.c: ... here.
4944 * linux-low.h (have_ptrace_getregset): Declare it.
4945
4946 2015-08-04 Pedro Alves <palves@redhat.com>
4947
4948 * thread-db.c (struct thread_db): Use new typedefs.
4949 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4950 CHK calls.
4951 (disable_thread_event_reporting): Cast result of dlsym to
4952 destination function pointer type.
4953 (thread_db_mourn): Use td_ta_delete_ftype.
4954
4955 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4956
4957 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4958 arch variant.
4959 (CDX_BREAKPOINT): Define for R2.
4960 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4961 (the_low_target): Add comments.
4962
4963 2015-07-30 Yao Qi <yao.qi@linaro.org>
4964
4965 * linux-arm-low.c (arm_hwcap): Remove it.
4966 (arm_read_description): New local variable arm_hwcap. Don't
4967 set arm_hwcap to zero.
4968
4969 2015-07-30 Yao Qi <yao.qi@linaro.org>
4970
4971 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4972 Use regcache->tdesc instead.
4973 (arm_store_wmmxregset): Likewise.
4974 (arm_fill_vfpregset): Likewise.
4975 (arm_store_vfpregset): Likewise.
4976
4977 2015-07-30 Yao Qi <yao.qi@linaro.org>
4978
4979 * linux-arm-low.c: Include arch/arm.h.
4980 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4981 (arm_store_gregset): Likewise.
4982
4983 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4984
4985 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4986 ptrace's 4th parameter.
4987
4988 2015-07-27 Yao Qi <yao.qi@linaro.org>
4989
4990 * configure.srv (case aarch64*-*-linux*): Don't set
4991 srv_linux_usrregs.
4992
4993 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4994
4995 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4996 sys/ptrace.h.
4997 * linux-arm-low.c: Likewise.
4998 * linux-cris-low.c: Likewise.
4999 * linux-crisv32-low.c: Likewise.
5000 * linux-low.c: Likewise.
5001 * linux-m68k-low.c: Likewise.
5002 * linux-mips-low.c: Likewise.
5003 * linux-nios2-low.c: Likewise.
5004 * linux-s390-low.c: Likewise.
5005 * linux-sparc-low.c: Likewise.
5006 * linux-tic6x-low.c: Likewise.
5007 * linux-tile-low.c: Likewise.
5008 * linux-x86-low.c: Likewise.
5009
5010 2015-07-24 Pedro Alves <palves@redhat.com>
5011
5012 * config.in: Regenerate.
5013 * configure: Regenerate.
5014
5015 2015-07-24 Pedro Alves <palves@redhat.com>
5016
5017 * acinclude.m4: Include ../ptrace.m4.
5018 * configure.ac: Call GDB_AC_PTRACE.
5019 * config.in, configure: Regenerate.
5020
5021 2015-07-24 Yao Qi <yao.qi@linaro.org>
5022
5023 * linux-low.c (linux_create_inferior): Remove setting to
5024 proc->priv->new_inferior.
5025 (linux_attach): Likewise.
5026 (linux_low_filter_event): Likewise.
5027 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5028
5029 2015-07-24 Yao Qi <yao.qi@linaro.org>
5030
5031 * linux-low.c (linux_arch_setup): New function.
5032 (linux_low_filter_event): If proc->tdesc is NULL and
5033 proc->attached is true, call the_low_target.arch_setup.
5034 Otherwise, keep status pending, and return.
5035 (linux_resume_one_lwp_throw): Don't call get_pc if
5036 thread->while_stepping isn't NULL. Don't call
5037 get_thread_regcache if proc->tdesc is NULL.
5038 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5039 (linux_target_ops): Install arch_setup.
5040 * server.c (start_inferior): Call the_target->arch_setup.
5041 * target.h (struct target_ops) <arch_setup>: New field.
5042 (target_arch_setup): New marco.
5043 * lynx-low.c (lynx_target_ops): Update.
5044 * nto-low.c (nto_target_ops): Update.
5045 * spu-low.c (spu_target_ops): Update.
5046 * win32-low.c (win32_target_ops): Update.
5047
5048 2015-07-24 Yao Qi <yao.qi@linaro.org>
5049
5050 * linux-low.c (linux_add_process): Don't set
5051 proc->priv->new_inferior.
5052 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5053 (linux_attach): Likewise.
5054
5055 2015-07-24 Yao Qi <yao.qi@linaro.org>
5056
5057 * server.c (start_inferior): Code refactor.
5058
5059 2015-07-24 Yao Qi <yao.qi@linaro.org>
5060
5061 * server.c (process_serial_event): Set general_thread.
5062
5063 2015-07-21 Yao Qi <yao.qi@linaro.org>
5064
5065 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5066 aarch64_linux_get_debug_reg_capacity.
5067
5068 2015-07-17 Yao Qi <yao.qi@linaro.org>
5069
5070 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5071 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5072 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5073 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5074 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5075 (AARCH64_HWP_ALIGNMENT): Likewise.
5076 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5077 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5078 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5079 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5080 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5081 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5082 (struct aarch64_debug_reg_state): Likewise.
5083 (struct arch_lwp_info): Likewise.
5084 (aarch64_align_watchpoint): Likewise.
5085 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5086 (aarch64_watchpoint_length): Likewise.
5087 (aarch64_point_encode_ctrl_reg): Likewise
5088 (aarch64_point_is_aligned): Likewise.
5089 (aarch64_align_watchpoint): Likewise.
5090 (aarch64_linux_set_debug_regs):
5091 (aarch64_dr_state_insert_one_point): Likewise.
5092 (aarch64_dr_state_remove_one_point): Likewise.
5093 (aarch64_handle_breakpoint): Likewise.
5094 (aarch64_handle_aligned_watchpoint): Likewise.
5095 (aarch64_handle_unaligned_watchpoint): Likewise.
5096 (aarch64_handle_watchpoint): Likewise.
5097
5098 2015-07-17 Yao Qi <yao.qi@linaro.org>
5099
5100 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5101 and don't aarch64_get_debug_reg_state. All callers update.
5102 (aarch64_handle_aligned_watchpoint): Likewise.
5103 (aarch64_handle_unaligned_watchpoint): Likewise.
5104 (aarch64_handle_watchpoint): Likewise.
5105 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5106 (aarch64_remove_point): Likewise.
5107
5108 2015-07-17 Yao Qi <yao.qi@linaro.org>
5109
5110 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5111 debug_printf.
5112 (aarch64_handle_unaligned_watchpoint): Likewise.
5113
5114 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5115
5116 Revert the previous 3 commits:
5117 Move gdb_regex* to common/
5118 Move linux_find_memory_regions_full & co.
5119 gdbserver build-id attribute generator
5120
5121 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5122 Jan Kratochvil <jan.kratochvil@redhat.com>
5123
5124 gdbserver build-id attribute generator.
5125 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5126 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5127 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5128 (find_phdr): New.
5129 (get_dynamic): Use find_pdhr to traverse program headers.
5130 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5131 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5132 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5133 (get_hex_build_id): New.
5134 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5135 to reply XML document.
5136
5137 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5138 Jan Kratochvil <jan.kratochvil@redhat.com>
5139
5140 * target.c: Include target/target-utils.h and fcntl.h.
5141 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5142 (target_fileio_read_stralloc): New functions.
5143
5144 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5145
5146 * Makefile.in (OBS): Add gdb_regex.o.
5147 (gdb_regex.o): New.
5148 * config.in: Rebuilt.
5149 * configure: Rebuilt.
5150
5151 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5152 Jan Kratochvil <jan.kratochvil@redhat.com>
5153
5154 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5155 * Makefile.in (OBS): Add target-utils.o.
5156 (linux-maps.o, target-utils.o): New.
5157 * configure.srv (srv_linux_obj): Add linux-maps.o.
5158
5159 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5160
5161 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5162 function, return 1.
5163 (the_low_target): Install it.
5164
5165 2015-07-14 Pedro Alves <palves@redhat.com>
5166
5167 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5168 Instead, ignore ECHILD, and throw an error for other errnos.
5169
5170 2015-07-10 Pedro Alves <palves@redhat.com>
5171
5172 * event-loop.c (struct callback_event) <data>: Change type to
5173 gdb_client_data instance instead of gdb_client_data pointer.
5174 (append_callback_event): Adjust.
5175
5176 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5177
5178 * linux-aarch64-low.c: Add comments for each linux_target_ops
5179 method. Remove comments already covered in target_ops and
5180 linux_target_ops definitions.
5181 (the_low_target): Add comments for each unimplemented method.
5182
5183 2015-07-09 Yao Qi <yao.qi@linaro.org>
5184
5185 * linux-aarch64-low.c (aarch64_regmap): Remove.
5186 (aarch64_usrregs_info): Remove.
5187 (regs_info): Set field usrregs to NULL.
5188
5189 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5190
5191 * linux-low.c: Include "rsp-low.h"
5192 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5193 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5194 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5195 (handle_btrace_enable_pt): New.
5196 (handle_btrace_general_set): Support "pt".
5197 (handle_btrace_conf_general_set): Support "pt:size".
5198
5199 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5200
5201 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5202 Z_PACKET_SW_BP.
5203
5204 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5205
5206 * linux-aarch64-low.c: Remove comment about endianness.
5207 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5208 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5209 memcmp.
5210
5211 2015-06-24 Gary Benson <gbenson@redhat.com>
5212
5213 * linux-i386-ipa.c (stdint.h): Do not include.
5214 * lynx-i386-low.c (stdint.h): Likewise.
5215 * lynx-ppc-low.c (stdint.h): Likewise.
5216 * mem-break.c (stdint.h): Likewise.
5217 * thread-db.c (stdint.h): Likewise.
5218 * tracepoint.c (stdint.h): Likewise.
5219 * win32-low.c (stdint.h): Likewise.
5220
5221 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5222
5223 * server.c (write_qxfer_response): Update call to
5224 remote_escape_output.
5225
5226 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5227 Jan Kratochvil <jan.kratochvil@redhat.com>
5228
5229 Merge multiple hex conversions.
5230 * gdbreplay.c (tohex): Rename to 'fromhex'.
5231 (logchar): Use fromhex.
5232
5233 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5234
5235 * server.c (handle_qxfer_libraries): Set `version' attribute for
5236 <library-list>.
5237
5238 2015-06-10 Gary Benson <gbenson@redhat.com>
5239
5240 * target.h (struct target_ops) <multifs_open>: New field.
5241 <multifs_unlink>: Likewise.
5242 <multifs_readlink>: Likewise.
5243 * linux-low.c (nat/linux-namespaces.h): New include.
5244 (linux_target_ops): Initialize the_target->multifs_open,
5245 the_target->multifs_unlink and the_target->multifs_readlink.
5246 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5247 * hostio.c (hostio_fs_pid): New static variable.
5248 (hostio_handle_new_gdb_connection): New function.
5249 (handle_setfs): Likewise.
5250 (handle_open): Use the_target->multifs_open as appropriate.
5251 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5252 (handle_readlink): Use the_target->multifs_readlink as
5253 appropriate.
5254 (handle_vFile): Handle vFile:setfs packets.
5255 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5256 after target_handle_new_gdb_connection.
5257
5258 2015-06-10 Gary Benson <gbenson@redhat.com>
5259
5260 * configure.ac (AC_CHECK_FUNCS): Add setns.
5261 * config.in: Regenerate.
5262 * configure: Likewise.
5263 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5264 (linux-namespaces.o): New rule.
5265 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5266
5267 2015-06-09 Gary Benson <gbenson@redhat.com>
5268
5269 * hostio.c (handle_open): Process mode argument with
5270 fileio_to_host_mode.
5271
5272 2015-06-01 Yao Qi <yao.qi@linaro.org>
5273
5274 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5275 * linux-x86-low.c: Likewise.
5276
5277 2015-05-28 Don Breazeal <donb@codesourcery.com>
5278
5279 * linux-low.c (handle_extended_wait): Initialize
5280 thread_info.last_resume_kind for new fork children.
5281
5282 2015-05-15 Pedro Alves <palves@redhat.com>
5283
5284 * target.h (target_handle_new_gdb_connection): Rewrite using if
5285 wrapped in do/while.
5286
5287 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5288
5289 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5290 * configure, config.in: Regenerate.
5291 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5292 Declare typedef.
5293
5294 2015-05-12 Don Breazeal <donb@codesourcery.com>
5295
5296 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5297 PTRACE_EVENT_VFORK_DONE.
5298 (linux_low_ptrace_options, extended_event_reported): Add vfork
5299 events.
5300 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5301 and "vforkdone" for RSP 'T' Stop Reply Packet.
5302 * server.h (report_vfork_events): Declare
5303 global variable.
5304
5305 2015-05-12 Don Breazeal <donb@codesourcery.com>
5306
5307 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5308 (the_low_target) <new_fork>: Initialize new member.
5309 * linux-arm-low.c (arm_new_fork): New function.
5310 (the_low_target) <new_fork>: Initialize new member.
5311 * linux-low.c (handle_extended_wait): Call new target function
5312 new_fork.
5313 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5314 * linux-mips-low.c (mips_add_watchpoint): New function
5315 extracted from mips_insert_point.
5316 (the_low_target) <new_fork>: Initialize new member.
5317 (mips_linux_new_fork): New function.
5318 (mips_insert_point): Call mips_add_watchpoint.
5319 * linux-x86-low.c (x86_linux_new_fork): New function.
5320 (the_low_target) <new_fork>: Initialize new member.
5321
5322 2015-05-12 Don Breazeal <donb@codesourcery.com>
5323
5324 * linux-low.c (handle_extended_wait): Implement return value,
5325 rename argument 'event_child' to 'event_lwp', handle
5326 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5327 (linux_low_ptrace_options): New function.
5328 (linux_low_filter_event): Call linux_low_ptrace_options,
5329 use different argument fo linux_enable_event_reporting,
5330 use return value from handle_extended_wait.
5331 (extended_event_reported): New function.
5332 (linux_wait_1): Call extended_event_reported and set
5333 status to report fork events.
5334 (linux_write_memory): Add pid to debug message.
5335 (reset_lwp_ptrace_options_callback): New function.
5336 (linux_handle_new_gdb_connection): New function.
5337 (linux_target_ops): Initialize new structure member.
5338 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5339 * lynx-low.c: Initialize new structure member.
5340 * remote-utils.c (prepare_resume_reply): Implement stop reason
5341 "fork" for "T" stop message.
5342 * server.c (handle_query): Call handle_new_gdb_connection.
5343 * server.h (report_fork_events): Declare global flag.
5344 * target.h (struct target_ops) <handle_new_gdb_connection>:
5345 New member.
5346 (target_handle_new_gdb_connection): New macro.
5347 * win32-low.c: Initialize new structure member.
5348
5349 2015-05-12 Don Breazeal <donb@codesourcery.com>
5350
5351 * mem-break.c (APPEND_TO_LIST): Define macro.
5352 (clone_agent_expr): New function.
5353 (clone_one_breakpoint): New function.
5354 (clone_all_breakpoints): New function.
5355 * mem-break.h: Declare new functions.
5356
5357 2015-05-12 Don Breazeal <donb@codesourcery.com>
5358
5359 * linux-low.c (linux_supports_fork_events): New function.
5360 (linux_supports_vfork_events): New function.
5361 (linux_target_ops): Initialize new structure members.
5362 (initialize_low): Call linux_check_ptrace_features.
5363 * lynx-low.c (lynx_target_ops): Initialize new structure
5364 members.
5365 * server.c (report_fork_events, report_vfork_events):
5366 New global flags.
5367 (handle_query): Add new features to qSupported packet and
5368 response.
5369 (captured_main): Initialize new global variables.
5370 * target.h (struct target_ops) <supports_fork_events>:
5371 New member.
5372 <supports_vfork_events>: New member.
5373 (target_supports_fork_events): New macro.
5374 (target_supports_vfork_events): New macro.
5375 * win32-low.c (win32_target_ops): Initialize new structure
5376 members.
5377
5378 2015-05-12 Gary Benson <gbenson@redhat.com>
5379
5380 * server.c (handle_qxfer_exec_file): Use current process
5381 if annex is empty.
5382
5383 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5384
5385 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5386 Remove HAVE_PTRACE_GETREGS conditionals.
5387 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5388 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5389
5390 2015-05-08 Yao Qi <yao.qi@linaro.org>
5391
5392 * linux-low.c (linux_supports_conditional_breakpoints): New
5393 function.
5394 (linux_target_ops): Install new target method.
5395 * lynx-low.c (lynx_target_ops): Install NULL hook for
5396 supports_conditional_breakpoints.
5397 * nto-low.c (nto_target_ops): Likewise.
5398 * spu-low.c (spu_target_ops): Likewise.
5399 * win32-low.c (win32_target_ops): Likewise.
5400 * server.c (handle_query): Check
5401 target_supports_conditional_breakpoints.
5402 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5403 New field.
5404 (target_supports_conditional_breakpoints): New macro.
5405
5406 2015-05-06 Pedro Alves <palves@redhat.com>
5407
5408 PR server/18081
5409 * server.c (start_inferior): If the process exits, mourn it.
5410
5411 2015-04-21 Gary Benson <gbenson@redhat.com>
5412
5413 * hostio.c (fileio_open_flags_to_host): Factored out to
5414 fileio_to_host_openflags in common/fileio.c. Single use
5415 updated.
5416
5417 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5418
5419 * linux-xtensa-low.c (xtensa_fill_gregset)
5420 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5421 XCHAL_HAVE_LOOP.
5422
5423 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5424
5425 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5426 (regs_info): Replace usrregs pointer with NULL.
5427
5428 2015-04-17 Gary Benson <gbenson@redhat.com>
5429
5430 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5431 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5432 * server.c (handle_qxfer_exec_file): New function.
5433 (qxfer_packets): Add exec-file entry.
5434 (handle_query): Report qXfer:exec-file:read as supported packet.
5435
5436 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5437
5438 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5439
5440 2015-04-09 Gary Benson <gbenson@redhat.com>
5441
5442 * hostio-errno.c (errno_to_fileio_error): Remove function.
5443 Update caller to use remote_fileio_to_fio_error.
5444
5445 2015-04-09 Yao Qi <yao.qi@linaro.org>
5446
5447 * linux-low.c (linux_insert_point): Call
5448 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5449 (linux_remove_point): Call remove_memory_breakpoint if type is
5450 raw_bkpt_type_sw.
5451 * linux-x86-low.c (x86_insert_point): Don't call
5452 insert_memory_breakpoint.
5453 (x86_remove_point): Don't call remove_memory_breakpoint.
5454
5455 2015-04-01 Pedro Alves <palves@redhat.com>
5456 Cleber Rosa <crosa@redhat.com>
5457
5458 * server.c (gdbserver_usage): Reorganize and extend the usage
5459 message.
5460
5461 2015-03-24 Pedro Alves <palves@redhat.com>
5462
5463 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5464 output. Also dump TRAP_TRACE.
5465 (linux_low_filter_event): In debug output, distinguish a
5466 resume_stop SIGSTOP from a delayed SIGSTOP.
5467
5468 2015-03-24 Gary Benson <gbenson@redhat.com>
5469
5470 * linux-x86-low.c (x86_linux_new_thread): Moved to
5471 nat/x86-linux.c.
5472 (x86_linux_prepare_to_resume): Likewise.
5473
5474 2015-03-24 Gary Benson <gbenson@redhat.com>
5475
5476 * Makefile.in (x86-linux-dregs.o): New rule.
5477 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5478 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5479 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5480 (x86_linux_dr_get): Likewise.
5481 (x86_linux_dr_set): Likewise.
5482 (update_debug_registers_callback): Likewise.
5483 (x86_linux_dr_set_addr): Likewise.
5484 (x86_linux_dr_get_addr): Likewise.
5485 (x86_linux_dr_set_control): Likewise.
5486 (x86_linux_dr_get_control): Likewise.
5487 (x86_linux_dr_get_status): Likewise.
5488 (x86_linux_update_debug_registers): Likewise.
5489
5490 2015-03-24 Gary Benson <gbenson@redhat.com>
5491
5492 * linux-x86-low.c (x86_linux_update_debug_registers):
5493 New function, factored out from...
5494 (x86_linux_prepare_to_resume): ...this.
5495
5496 2015-03-24 Gary Benson <gbenson@redhat.com>
5497
5498 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5499 (x86_linux_dr_set): Likewise.
5500 (update_debug_registers_callback): Likewise.
5501 (x86_linux_dr_set_addr): Likewise.
5502 (x86_linux_dr_get_addr): Likewise.
5503 (x86_linux_dr_set_control): Likewise.
5504 (x86_linux_dr_get_control): Likewise.
5505 (x86_linux_dr_get_status): Likewise.
5506 (x86_linux_prepare_to_resume): Likewise.
5507
5508 2015-03-24 Gary Benson <gbenson@redhat.com>
5509
5510 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5511 Use perror_with_name. Pass string through gettext.
5512 (x86_linux_dr_set): Likewise.
5513
5514 2015-03-24 Gary Benson <gbenson@redhat.com>
5515
5516 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5517 (x86_linux_dr_set_addr): ...this.
5518 (x86_dr_low_get_addr): Rename to...
5519 (x86_linux_dr_get_addr): ...this.
5520 (x86_dr_low_set_control): Rename to...
5521 (x86_linux_dr_set_control): ...this.
5522 (x86_dr_low_get_control): Rename to...
5523 (x86_linux_dr_get_control): ...this.
5524 (x86_dr_low_get_status): Rename to...
5525 (x86_linux_dr_get_status): ...this.
5526 (x86_dr_low): Update with new function names.
5527
5528 2015-03-24 Gary Benson <gbenson@redhat.com>
5529
5530 * Makefile.in (x86-linux.o): New rule.
5531 * configure.srv: Add x86-linux.o to relevant targets.
5532 * linux-low.c (lwp_set_arch_private_info): New function.
5533 (lwp_arch_private_info): Likewise.
5534 * linux-x86-low.c: Include nat/x86-linux.h.
5535 (arch_lwp_info): Removed structure.
5536 (update_debug_registers_callback):
5537 Use lwp_set_debug_registers_changed.
5538 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5539 and lwp_set_debug_registers_changed.
5540 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5541
5542 2015-03-24 Gary Benson <gbenson@redhat.com>
5543
5544 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5545 * linux-arm-low.c (arm_new_thread): Likewise.
5546 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5547 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5548 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5549 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5550
5551 2015-03-24 Gary Benson <gbenson@redhat.com>
5552
5553 * linux-low.c (ptid_of_lwp): New function.
5554 (lwp_is_stopped): Likewise.
5555 (lwp_stop_reason): Likewise.
5556 * linux-x86-low.c (update_debug_registers_callback):
5557 Use lwp_is_stopped.
5558 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5559 lwp_stop_reason.
5560
5561 2015-03-24 Gary Benson <gbenson@redhat.com>
5562
5563 * linux-low.h (linux_stop_lwp): Remove declaration.
5564
5565 2015-03-24 Gary Benson <gbenson@redhat.com>
5566
5567 * linux-low.h: Include nat/linux-nat.h.
5568 * linux-low.c (iterate_over_lwps_args): New structure.
5569 (iterate_over_lwps_filter): New function.
5570 (iterate_over_lwps): Likewise.
5571 * linux-x86-low.c (update_debug_registers_callback):
5572 Update signature to what iterate_over_lwps expects.
5573 Remove PID check that iterate_over_lwps now performs.
5574 (x86_dr_low_set_addr): Use iterate_over_lwps.
5575 (x86_dr_low_set_control): Likewise.
5576
5577 2015-03-24 Gary Benson <gbenson@redhat.com>
5578
5579 * linux-x86-low.c (x86_debug_reg_state): New function.
5580 (x86_linux_prepare_to_resume): Use the above.
5581
5582 2015-03-24 Gary Benson <gbenson@redhat.com>
5583
5584 * linux-low.c (current_lwp_ptid): New function.
5585 * linux-x86-low.c: Include nat/linux-nat.h.
5586 (x86_dr_low_get_addr): Use current_lwp_ptid.
5587 (x86_dr_low_get_control): Likewise.
5588 (x86_dr_low_get_status): Likewise.
5589
5590 2015-03-20 Pedro Alves <palves@redhat.com>
5591
5592 * tracepoint.c (cmd_qtstatus): Make "str" const.
5593
5594 2015-03-20 Pedro Alves <palves@redhat.com>
5595
5596 * server.c (handle_general_set): Make "req_str" const.
5597
5598 2015-03-19 Pedro Alves <palves@redhat.com>
5599
5600 * linux-low.c (linux_resume_one_lwp): Rename to ...
5601 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5602 instead call perror_with_name.
5603 (check_ptrace_stopped_lwp_gone): New function.
5604 (linux_resume_one_lwp): Reimplement as wrapper around
5605 linux_resume_one_lwp_throw that swallows errors if the LWP is
5606 gone.
5607
5608 2015-03-19 Pedro Alves <palves@redhat.com>
5609
5610 * linux-low.c (count_events_callback, select_event_lwp_callback):
5611 No longer check whether the thread has resume_stop as last resume
5612 kind.
5613
5614 2015-03-19 Pedro Alves <palves@redhat.com>
5615
5616 * linux-low.c (count_events_callback, select_event_lwp_callback):
5617 Use the lwp's status_pending_p field, not the thread's.
5618
5619 2015-03-19 Pedro Alves <palves@redhat.com>
5620
5621 * linux-low.c (select_event_lwp_callback): Update comments to
5622 no longer mention SIGTRAP.
5623
5624 2015-03-18 Gary Benson <gbenson@redhat.com>
5625
5626 * server.c (handle_query): Do not report vFile:fstat as supported.
5627
5628 2015-03-11 Gary Benson <gbenson@redhat.com>
5629
5630 * hostio.c (sys/types.h): New include.
5631 (sys/stat.h): Likewise.
5632 (common-remote-fileio.h): Likewise.
5633 (handle_fstat): New function.
5634 (handle_vFile): Handle vFile:fstat packets.
5635
5636 2015-03-11 Gary Benson <gbenson@redhat.com>
5637
5638 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5639 struct stat.st_blocks and struct stat.st_blksize.
5640 * configure: Regenerate.
5641 * config.in: Likewise.
5642 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5643 (OBS): Add common-remote-fileio.o.
5644 (common-remote-fileio.o): New rule.
5645
5646 2015-03-09 Pedro Alves <palves@redhat.com>
5647
5648 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5649 'struct sockaddr' pointer in 'accept' call.
5650
5651 2015-03-09 Pedro Alves <palves@redhat.com>
5652
5653 Revert:
5654 2015-03-07 Pedro Alves <palves@redhat.com>
5655 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5656 or <winsock2.h> here. Instead include "gdb_socket.h".
5657 (remote_open): Use union gdb_sockaddr_u.
5658 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5659 or <winsock2.h> here. Instead include "gdb_socket.h".
5660 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5661 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5662 or <sys/un.h>.
5663 (init_named_socket, gdb_agent_helper_thread): Use union
5664 gdb_sockaddr_u.
5665
5666 2015-03-07 Pedro Alves <palves@redhat.com>
5667
5668 * configure.ac (build_warnings): Move
5669 -Wdeclaration-after-statement to the C-specific set.
5670 * configure: Regenerate.
5671
5672 2015-03-07 Pedro Alves <palves@redhat.com>
5673
5674 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5675 or <winsock2.h> here. Instead include "gdb_socket.h".
5676 (remote_open): Use union gdb_sockaddr_u.
5677 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5678 or <winsock2.h> here. Instead include "gdb_socket.h".
5679 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5680 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5681 or <sys/un.h>.
5682 (init_named_socket, gdb_agent_helper_thread): Use union
5683 gdb_sockaddr_u.
5684
5685 2015-03-07 Pedro Alves <palves@redhat.com>
5686
5687 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5688 instead.
5689
5690 2015-03-06 Yao Qi <yao.qi@linaro.org>
5691
5692 * linux-aarch64-low.c (aarch64_insert_point): Use
5693 show_debug_regs as a boolean.
5694 (aarch64_remove_point): Likewise.
5695
5696 2015-03-05 Pedro Alves <palves@redhat.com>
5697
5698 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5699 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5700 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5701 * nto-low.c (nto_target_ops): Likewise.
5702 * spu-low.c (spu_target_ops): Likewise.
5703 * win32-low.c (win32_target_ops): Likewise.
5704
5705 2015-03-04 Pedro Alves <palves@redhat.com>
5706
5707 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5708 Decide whether a breakpoint triggered based on the SIGTRAP's
5709 siginfo.si_code.
5710 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5711 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5712 (linux_low_filter_event): Check for breakpoints before checking
5713 watchpoints.
5714 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5715 siginfo.si_code.
5716 (linux_stopped_by_sw_breakpoint)
5717 (linux_supports_stopped_by_sw_breakpoint)
5718 (linux_stopped_by_hw_breakpoint)
5719 (linux_supports_stopped_by_hw_breakpoint): New functions.
5720 (linux_target_ops): Install new target methods.
5721
5722 2015-03-04 Pedro Alves <palves@redhat.com>
5723
5724 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5725 * server.c (swbreak_feature, hwbreak_feature): New globals.
5726 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5727 (captured_main): Clear swbreak_feature and hwbreak_feature.
5728 * server.h (swbreak_feature, hwbreak_feature): Declare.
5729 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5730 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5731 supports_stopped_by_hw_breakpoint>: New fields.
5732 (target_supports_stopped_by_sw_breakpoint)
5733 (target_stopped_by_sw_breakpoint)
5734 (target_supports_stopped_by_hw_breakpoint)
5735 (target_stopped_by_hw_breakpoint): Declare.
5736
5737 2015-03-04 Pedro Alves <palves@redhat.com>
5738
5739 enum lwp_stop_reason -> enum target_stop_reason
5740 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5741 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5742 (linux_wait_1, stuck_in_jump_pad_callback)
5743 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5744 (linux_stopped_by_watchpoint):
5745 * linux-low.h (enum lwp_stop_reason): Delete.
5746 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5747 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5748
5749 2015-03-04 Yao Qi <yao.qi@linaro.org>
5750
5751 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5752
5753 2015-03-03 Gary Benson <gbenson@redhat.com>
5754
5755 * hostio.c (handle_vFile): Fix prefix lengths.
5756
5757 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5758
5759 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5760 ptr_bits.
5761
5762 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5763
5764 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5765 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5766 (clean): Add "rm -f" for above C files.
5767 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5768 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5769 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5770 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5771 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5772 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5773 (init_registers_s390x_vx_linux64)
5774 (init_registers_s390x_tevx_linux64)
5775 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5776 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5777 declarations.
5778 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5779 (s390_store_vxrs_high): New functions.
5780 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5781 NT_S390_VXRS_HIGH.
5782 (s390_arch_setup): Add logic for selecting one of the new target
5783 descriptions. Activate the new vector regsets if applicable.
5784 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5785 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5786 and init_registers_s390x_tevx_linux64.
5787
5788 2015-03-01 Pedro Alves <palves@redhat.com>
5789
5790 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5791 parameter.
5792
5793 2015-02-27 Pedro Alves <palves@redhat.com>
5794
5795 * linux-x86-low.c (u_debugreg_offset): New function.
5796 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5797
5798 2015-02-27 Pedro Alves <palves@redhat.com>
5799
5800 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5801 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5802 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5803 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5804 (ps_lsetfpregs, ps_getpid)
5805 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5806 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5807 (ps_lsetxregs, ps_plog): Declare.
5808
5809 2015-02-27 Pedro Alves <palves@redhat.com>
5810
5811 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5812 IP_AGENT_EXPORT_FUNC.
5813 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5814 IP_AGENT_EXPORT_FUNC.
5815 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5816 (IP_AGENT_EXPORT): Delete.
5817 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5818 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5819 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5820 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5821 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5822 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5823 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5824 (traceframe_read_count, traceframe_write_count)
5825 (traceframes_created, trace_state_variables, get_raw_reg)
5826 (get_trace_state_variable_value, set_trace_state_variable_value)
5827 (ust_loaded, helper_thread_id, cmd_buf): Use
5828 IPA_SYM_EXPORTED_NAME.
5829 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5830 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5831 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5832 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5833 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5834 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5835 EXTERN_C_PUSH/EXTERN_C_POP.
5836 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5837 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5838 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5839 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5840 (traceframe_write_count, traceframe_read_count)
5841 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5842 (about_to_request_buffer_space, get_trace_state_variable_value)
5843 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5844 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5845 EXTERN_C_PUSH/EXTERN_C_POP.
5846 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5847 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5848 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5849 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5850 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5851 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5852 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5853 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5854 Define.
5855 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5856 (IP_AGENT_EXPORT_VAR_DECL): Define.
5857 (tracing): Declare.
5858 (gdb_agent_get_raw_reg): Declare.
5859
5860 2015-02-27 Tom Tromey <tromey@redhat.com>
5861 Pedro Alves <palves@redhat.com>
5862
5863 Rename symbols whose names are reserved C++ keywords throughout.
5864
5865 2015-02-27 Pedro Alves <palves@redhat.com>
5866
5867 * Makefile.in (COMPILER): New, get it from autoconf.
5868 (CXX): Get from autoconf instead.
5869 (COMPILE.pre): Use COMPILER.
5870 (CC-LD): Rename to ...
5871 (CC_LD): ... this. Use COMPILER.
5872 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5873 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5874 * acinclude.m4: Include build-with-cxx.m4.
5875 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5876 Disable -Werror by default if building in C++ mode.
5877 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5878 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5879 the C++ compiler. Save/restore CXXFLAGS too.
5880 * configure: Regenerate.
5881
5882 2015-02-27 Pedro Alves <palves@redhat.com>
5883
5884 * acinclude.m4: Include libiberty.m4.
5885 * configure.ac: Call libiberty_INIT.
5886 * config.in, configure: Regenerate.
5887
5888 2015-02-26 Pedro Alves <palves@redhat.com>
5889
5890 * linux-low.c (linux_wait_1): When incrementing the PC past a
5891 program breakpoint always use the_low_target.breakpoint_len as
5892 increment, rather than the maximum between that and
5893 the_low_target.decr_pc_after_break.
5894
5895 2015-02-23 Pedro Alves <palves@redhat.com>
5896
5897 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5898 thread was doing a step-over; always adjust the PC if
5899 we stepped over a permanent breakpoint.
5900 (linux_wait_1): If we stepped over breakpoint that was on top of a
5901 permanent breakpoint, manually advance the PC past it.
5902
5903 2015-02-23 Pedro Alves <palves@redhat.com>
5904
5905 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5906 modes.
5907 (x86_fill_gregset, x86_store_gregset): Use it when handling
5908 $orig_eax.
5909
5910 2015-02-20 Pedro Alves <palves@redhat.com>
5911
5912 * thread-db.c: Include "nat/linux-procfs.h".
5913 (thread_db_init): Skip listing new threads if the kernel supports
5914 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5915
5916 2015-02-20 Pedro Alves <palves@redhat.com>
5917
5918 * linux-low.c (status_pending_p_callback): Use ptid_match.
5919
5920 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5921
5922 PR breakpoints/16812
5923 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5924 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5925 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5926
5927 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5928
5929 PR breakpoints/15956
5930 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5931
5932 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5933
5934 * linux-low.c (linux_low_btrace_conf): Print size.
5935 * server.c (handle_btrace_conf_general_set): New.
5936 (hanle_general_set): Call handle_btrace_conf_general_set.
5937 (handle_query): Report Qbtrace-conf:bts:size as supported.
5938
5939 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5940
5941 * linux-low.c (linux_low_enable_btrace): Update parameters.
5942 (linux_low_btrace_conf): New.
5943 (linux_target_ops)<to_btrace_conf>: Initialize.
5944 * server.c (current_btrace_conf): New.
5945 (handle_btrace_enable): Rename to ...
5946 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5947 to target_enable_btrace. Update comment. Update users.
5948 (handle_qxfer_btrace_conf): New.
5949 (qxfer_packets): Add btrace-conf entry.
5950 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5951 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5952 (target_ops)<read_btrace_conf>: New.
5953 (target_enable_btrace): Update parameters.
5954 (target_read_btrace_conf): New.
5955
5956 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5957
5958 * server.c (handle_btrace_general_set): Remove call to
5959 target_supports_btrace.
5960 (supported_btrace_packets): New.
5961 (handle_query): Call supported_btrace_packets.
5962 * target.h: include btrace-common.h.
5963 (btrace_target_info): Removed.
5964 (supports_btrace, target_supports_btrace): Update parameters.
5965
5966 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5967
5968 * Makefile.in (SFILES): Add common/btrace-common.c.
5969 (OBS): Add common/btrace-common.o.
5970 (btrace-common.o): Add build rules.
5971 * linux-low: Include btrace-common.h.
5972 (linux_low_read_btrace): Use struct btrace_data. Call
5973 btrace_data_init and btrace_data_fini.
5974
5975 2015-02-06 Pedro Alves <palves@redhat.com>
5976
5977 * thread-db.c (find_new_threads_callback): Add debug output.
5978
5979 2015-02-04 Pedro Alves <palves@redhat.com>
5980
5981 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5982 (resume_stopped_resumed_lwps): New function.
5983 (linux_wait_for_event_filtered): Use it.
5984
5985 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5986
5987 * Makefile.in (SFILES): Add linux-personality.c.
5988 (linux-personality.o): New rule.
5989 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5990 list of objects to be built.
5991 * linux-low.c: Include nat/linux-personality.h.
5992 (linux_create_inferior): Remove code to disable address space
5993 randomization (moved to ../nat/linux-personality.c). Create
5994 cleanup to disable address space randomization.
5995
5996 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5997
5998 * Makefile.in (posix-strerror.o): New rule.
5999 (mingw-strerror.o): Likewise.
6000 * configure: Regenerated.
6001 * configure.ac: Source file ../common/common.host. Initialize new
6002 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6003
6004 2015-01-14 Yao Qi <yao@codesourcery.com>
6005
6006 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6007 (ppc-linux.o): New rule.
6008 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6009 * configure.ac: AC_CHECK_FUNCS(getauxval).
6010 * config.in: Re-generated.
6011 * configure: Re-generated.
6012 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6013 ppc64_64bit_inferior_p
6014
6015 2015-01-14 Yao Qi <yao@codesourcery.com>
6016
6017 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6018 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6019 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6020 (PT_ORIG_R3, PT_TRAP): Likewise.
6021 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6022 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6023 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6024
6025 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6026
6027 * i387-fp.c (i387_cache_to_xsave): In look over
6028 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6029 zmmh_low_space field by use of zmmh_high_space.
6030
6031 2015-01-09 Pedro Alves <palves@redhat.com>
6032
6033 * linux-low.c (step_over_bkpt): Move higher up in the file.
6034 (handle_extended_wait): Don't store the stop_pc here.
6035 (get_stop_pc): Adjust comments and rename to ...
6036 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6037 stopped for a software breakpoint or hardware breakpoint.
6038 (thread_still_has_status_pending_p): New function.
6039 (status_pending_p_callback): Use
6040 thread_still_has_status_pending_p. If the event is no longer
6041 interesting, resume the LWP.
6042 (handle_tracepoints): Add assert.
6043 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6044 (wstatus_maybe_breakpoint): New function.
6045 (cancel_breakpoint): Delete function.
6046 (check_stopped_by_watchpoint): New function, factored out from
6047 linux_low_filter_event.
6048 (lp_status_maybe_breakpoint): Delete function.
6049 (linux_low_filter_event): Remove filter_ptid argument.
6050 Leave thread group exits pending here. Store the LWP's stop PC.
6051 Always leave events pending.
6052 (linux_wait_for_event_filtered): Pull all events out of the
6053 kernel, and leave them all pending.
6054 (count_events_callback, select_event_lwp_callback): Consider all
6055 events.
6056 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6057 (select_event_lwp): Only give preference to the stepping LWP in
6058 all-stop mode. Adjust comments.
6059 (ignore_event): New function.
6060 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6061 references to cancel_breakpoints. Adjust to renames. Also give
6062 equal priority to all LWPs that have had events in non-stop mode.
6063 If reporting a software breakpoint event, unadjust the LWP's PC.
6064 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6065 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6066 Adjust.
6067 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6068 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6069 (linux_stopped_by_watchpoint): Adjust.
6070 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6071 * linux-low.h (enum lwp_stop_reason): New.
6072 (struct lwp_info) <stop_pc>: Adjust comment.
6073 <stopped_by_watchpoint>: Delete field.
6074 <stop_reason>: New field.
6075 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6076 * mem-break.c (software_breakpoint_inserted_here)
6077 (hardware_breakpoint_inserted_here): New function.
6078 * mem-break.h (software_breakpoint_inserted_here)
6079 (hardware_breakpoint_inserted_here): Declare.
6080 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6081 (cancel_breakpoints): Delete.
6082 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6083 (upload_fast_traceframes): Remove references to
6084 cancel_breakpoints.
6085
6086 2015-01-09 Pedro Alves <palves@redhat.com>
6087
6088 * thread-db.c (find_new_threads_callback): Ignore thread if the
6089 kernel thread ID is -1.
6090
6091 2015-01-09 Pedro Alves <palves@redhat.com>
6092
6093 * linux-low.c (linux_attach_fail_reason_string): Move to
6094 nat/linux-ptrace.c, and rename.
6095 (linux_attach_lwp): Update comment.
6096 (attach_proc_task_lwp_callback): New function.
6097 (linux_attach): Adjust to rename and use
6098 linux_proc_attach_tgid_threads.
6099 (linux_attach_fail_reason_string): Delete declaration.
6100
6101 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6102
6103 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6104 * server.c (gdbserver_version): Likewise.
6105
6106 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6107
6108 * remote-utils.c: Include ctype.h.
6109 (input_interrupt): Explicitly handle the case when the char
6110 received is the NUL byte. Improve the printing of non-ASCII
6111 characters.
6112
6113 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6114
6115 * linux-low.c (linux_low_filter_event): Update call to
6116 linux_enable_event_reporting following the addition of
6117 a new parameter to that function.
6118
6119 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6120
6121 PR server/17457
6122 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6123 (AARCH64_FPCR_REGNO): Likewise.
6124 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6125 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6126 (aarch64_store_fpregset): Likewise.
6127
6128 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6129
6130 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6131 Remove FIXME comment about assumption about N.
6132
6133 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6134
6135 * configure.ac: If large-file support is disabled in GDBserver,
6136 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6137 * configure: Regenerate.
6138
6139 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6140
6141 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6142 warning upon ENODATA from ptrace.
6143 * linux-s390-low.c (s390_store_tdb): New.
6144 (s390_regsets): Add regset for NT_S390_TDB.
6145
6146 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6147
6148 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6149 without a fill_function.
6150 * linux-s390-low.c (s390_fill_last_break): Remove.
6151 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6152 (s390_arch_setup): Use regset's size instead of fill_function for
6153 loop end condition.
6154
6155 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6156
6157 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6158 the regset's store function when ptrace returned an error.
6159 * regcache.c (get_thread_regcache): Invalidate register cache
6160 before fetching inferior's registers.
6161
6162 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6163
6164 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6165 while-loop as for-loop.
6166 (regsets_store_inferior_registers): Likewise.
6167
6168 2014-11-28 Yao Qi <yao@codesourcery.com>
6169
6170 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6171 * config.in, configure: Re-generate.
6172 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6173 is defined.
6174
6175 2014-11-21 Yao Qi <yao@codesourcery.com>
6176
6177 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6178 (AC_CHECK_HEADERS): Remove malloc.h.
6179 * configure: Re-generated.
6180 * config.in: Re-generated.
6181 * server.h: Don't include alloca.h and malloc.h.
6182 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6183 Don't include malloc.h.
6184
6185 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6186
6187 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6188 corresponding ERRNO check in same block.
6189
6190 2014-11-12 Pedro Alves <palves@redhat.com>
6191
6192 * server.c (cont_thread): Update comment.
6193 (start_inferior, attach_inferior): No longer clear cont_thread.
6194 (handle_v_cont): No longer set cont_thread.
6195 (captured_main): Clear cont_thread each time a GDB connects.
6196
6197 2014-11-12 Pedro Alves <palves@redhat.com>
6198
6199 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6200 thread, and don't resume all threads if the Hc thread has exited.
6201
6202 2014-11-12 Pedro Alves <palves@redhat.com>
6203
6204 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6205 the process group instead of to a specific LWP.
6206
6207 2014-10-15 Pedro Alves <palves@redhat.com>
6208
6209 PR server/17487
6210 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6211 parameter.
6212 (arm_set_thread_context): Delete.
6213 (the_low_target): Adjust.
6214 * win32-i386-low.c (debug_registers_changed)
6215 (debug_registers_used): Delete.
6216 (update_debug_registers_callback): New function.
6217 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6218 needing to update their debug registers.
6219 (win32_get_current_dr): New function.
6220 (x86_dr_low_get_addr, x86_dr_low_get_control)
6221 (x86_dr_low_get_status): Fetch the debug register from the thread
6222 record's context.
6223 (i386_initial_stuff): Adjust.
6224 (i386_get_thread_context): Remove current_event parameter. Don't
6225 clear debug_registers_changed nor copy DR values to
6226 debug_reg_state.
6227 (i386_set_thread_context): Delete.
6228 (i386_prepare_to_resume): New function.
6229 (i386_thread_added): Mark the thread as needing to update irs
6230 debug registers.
6231 (the_low_target): Remove i386_set_thread_context and install
6232 i386_prepare_to_resume.
6233 * win32-low.c (win32_get_thread_context): Adjust.
6234 (win32_set_thread_context): Use SetThreadContext
6235 directly.
6236 (win32_prepare_to_resume): New function.
6237 (win32_require_context): New function, factored out from ...
6238 (thread_rec): ... this.
6239 (continue_one_thread): Call win32_prepare_to_resume on each thread
6240 we're about to continue.
6241 (win32_resume): Call win32_prepare_to_resume on the event thread.
6242 * win32-low.h (struct win32_thread_info)
6243 <debug_registers_changed>: New field.
6244 (struct win32_target_ops): Change prototype of set_thread_context,
6245 delete set_thread_context and add prepare_to_resume.
6246 (win32_require_context): New declaration.
6247
6248 2014-10-08 Gary Benson <gbenson@redhat.com>
6249
6250 * server.h: Do not include common-exceptions.h.
6251
6252 2014-10-08 Gary Benson <gbenson@redhat.com>
6253
6254 * server.h: Do not include cleanups.h.
6255
6256 2014-09-30 James Hogan <james.hogan@imgtec.com>
6257
6258 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6259 mips64-dsp-linux.c.
6260
6261 2014-09-23 Yao Qi <yao@codesourcery.com>
6262
6263 * linux-low.c (lp_status_maybe_breakpoint): New function.
6264 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6265 (count_events_callback): Likewise.
6266 (select_event_lwp_callback): Likewise.
6267 (cancel_breakpoints_callback): Likewise.
6268
6269 2014-09-19 Don Breazeal <donb@codesourcery.com>
6270
6271 * linux-low.c (handle_extended_wait): Call
6272 linux_ptrace_get_extended_event.
6273 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6274 linux_is_extended_waitstatus.
6275
6276 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6277
6278 * Makefile.in (CPPFLAGS): Define.
6279 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6280 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6281
6282 2014-09-16 Gary Benson <gbenson@redhat.com>
6283
6284 * inferiors.h (current_inferior): Renamed as...
6285 (current_thread): New variable. All uses updated.
6286 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6287 (maybe_move_out_of_jump_pad): Likewise.
6288 (cancel_breakpoint): Likewise.
6289 (linux_low_filter_event): Likewise.
6290 (wait_for_sigstop): Likewise.
6291 (linux_resume_one_lwp): Likewise.
6292 (need_step_over_p): Likewise.
6293 (start_step_over): Likewise.
6294 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6295 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6296 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6297 and save_inferior as saved_thread.
6298 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6299 saved_thread.
6300 (regcache_invalidate_thread): Likewise.
6301 * remote-utils.c (prepare_resume_reply): Likewise.
6302 * thread-db.c (thread_db_get_tls_address): Likewise.
6303 (disable_thread_event_reporting): Likewise.
6304 (remove_thread_event_breakpoints): Likewise.
6305 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6306 as saved_thread.
6307 * target.h (set_desired_inferior): Renamed as...
6308 (set_desired_thread): New declaration. All uses updated.
6309 * server.c (myresume): Updated comment to reference thread instead
6310 of inferior.
6311 (handle_serial_event): Likewise.
6312 (handle_target_event): Likewise.
6313
6314 2014-09-12 Tom Tromey <tromey@redhat.com>
6315 Gary Benson <gbenson@redhat.com>
6316
6317 * regcache.h: Include common-regcache.h.
6318 (regcache_read_pc): Don't declare.
6319 * regcache.c (get_thread_regcache_for_ptid): New function.
6320
6321 2014-09-11 Tom Tromey <tromey@redhat.com>
6322 Gary Benson <gbenson@redhat.com>
6323
6324 * symbol.c: New file.
6325 * Makefile.in (SFILES): Add symbol.c.
6326 (OBS): Add symbol.o.
6327
6328 2014-09-11 Gary Benson <gbenson@redhat.com>
6329
6330 * target.c (target_stop_ptid, target_continue_ptid): New
6331 functions.
6332
6333 2014-09-11 Tom Tromey <tromey@redhat.com>
6334 Gary Benson <gbenson@redhat.com>
6335
6336 * target.h: Include target/target.h.
6337 * target.c (target_read_memory, target_read_uint32)
6338 (target_write_memory): New functions.
6339
6340 2014-09-11 Gary Benson <gbenson@redhat.com>
6341
6342 * server.h (debug_hw_points): Don't declare.
6343 * server.c (debug_hw_points): Don't define. Replace all uses
6344 with show_debug_regs.
6345 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6346 all uses with show_debug_regs.
6347
6348 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6349
6350 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6351 endianness into account.
6352 (ppc_supply_ptrace_register): Likewise.
6353
6354 2014-09-03 James Hogan <james.hogan@imgtec.com>
6355
6356 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6357 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6358
6359 2014-09-03 Gary Benson <gbenson@redhat.com>
6360
6361 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6362 ALL_DEBUG_ADDRESS_REGISTERS.
6363
6364 2014-09-02 Gary Benson <gbenson@redhat.com>
6365
6366 * i386-low.h: Renamed as...
6367 * x86-low.h: New file. All type, function and variable name
6368 prefixes changed from "i386_" to "x86_". All references updated.
6369 * i386-low.c: Renamed as...
6370 * x86-low.c: New file. All type, function and variable name
6371 prefixes changed from "i386_" to "x86_". All references updated.
6372
6373 2014-09-02 Gary Benson <gbenson@redhat.com>
6374
6375 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6376 (x86_linux_new_thread): Likewise.
6377
6378 2014-08-29 Gary Benson <gbenson@redhat.com>
6379
6380 * server.h (setjmp.h): Do not include.
6381 (toplevel): Do not declare.
6382 (common-exceptions.h): Include.
6383 (cleanups.h): Likewise.
6384 * server.c (toplevel): Do not define.
6385 (exit_code): New static global.
6386 (detach_or_kill_for_exit_cleanup): New function.
6387 (main): New function. Original main renamed to...
6388 (captured_main): New function.
6389 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6390
6391 2014-08-29 Gary Benson <gbenson@redhat.com>
6392
6393 * Makefile.in (SFILES): Add common/common-exceptions.c.
6394 (OBS): Add common-exceptions.o.
6395 (common-exceptions.o): New rule.
6396 * utils.c (prepare_to_throw_exception): New function.
6397
6398 2014-08-29 Gary Benson <gbenson@redhat.com>
6399
6400 * config.in: Regenerate.
6401 * configure: Likewise.
6402
6403 2014-08-29 Gary Benson <gbenson@redhat.com>
6404
6405 * Makefile.in (SFILES): Add common/cleanups.c.
6406 (OBS): cleanups.o.
6407 (cleanups.o): New rule.
6408
6409 2014-08-29 Gary Benson <gbenson@redhat.com>
6410
6411 * utils.c (internal_vwarning): New function.
6412
6413 2014-08-28 Gary Benson <gbenson@redhat.com>
6414
6415 * utils.h (fatal): Remove declaration.
6416 * utils.c (fatal): Remove function.
6417
6418 2014-08-28 Gary Benson <gbenson@redhat.com>
6419
6420 * tracepoint.c (gdb_agent_init): Replace fatal with
6421 perror_with_name.
6422 (initialize_tracepoint): Likewise.
6423
6424 2014-08-28 Gary Benson <gbenson@redhat.com>
6425
6426 * remote-utils.c (remote_prepare): Replace fatal with error.
6427
6428 2014-08-28 Gary Benson <gbenson@redhat.com>
6429
6430 * linux-low.c (linux_async): Replace fatal with warning.
6431 Tidy up and return.
6432 (linux_start_non_stop): Return -1 if linux_async failed.
6433
6434 2014-08-28 Gary Benson <gbenson@redhat.com>
6435
6436 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6437 gdb_assert.
6438 (i386_dr_low_get_addr): Remove vague comment.
6439 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6440 gdb_assert.
6441
6442 2014-08-28 Gary Benson <gbenson@redhat.com>
6443
6444 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6445 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6446 internal_error.
6447 (linux_resume_one_lwp): Likewise.
6448 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6449 gdb_assert.
6450 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6451 with internal_error.
6452 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6453 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6454 (find_register_by_name): Replace fatal with internal_error.
6455 (find_regno): Likewise.
6456 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6457 * thread-db.c (thread_db_create_event): Likewise.
6458 (thread_db_load_search): Likewise.
6459 (try_thread_db_load_1): Likewise.
6460 * tracepoint.c (get_jump_space_head): Replace fatal with
6461 internal_error.
6462 (claim_trampoline_space): Likewise.
6463 (have_fast_tracepoint_trampoline_buffer): Likewise.
6464 (cmd_qtstart): Likewise.
6465 (stop_tracing): Likewise.
6466 (fast_tracepoint_collecting): Likewise.
6467 (target_malloc): Likewise.
6468 (download_tracepoint): Likewise.
6469 (download_trace_state_variables): Replace check with gdb_assert.
6470 (upload_fast_traceframes): Replace fatal with internal_error.
6471
6472 2014-08-19 Tom Tromey <tromey@redhat.com>
6473 Gary Benson <gbenson@redhat.com>
6474
6475 * Makefile.in (SFILES): Add common/common-debug.c.
6476 (OBS): Add common-debug.o.
6477 (common-debug.o): New rule.
6478 * debug.h (debug_printf): Don't declare.
6479 * debug.c (debug_printf): Renamed and rewritten as...
6480 (debug_vprintf): New function.
6481
6482 2014-08-19 Gary Benson <gbenson@redhat.com>
6483
6484 * utils.h: Do not include print-utils.h.
6485
6486 2014-08-19 Tom Tromey <tromey@redhat.com>
6487 Gary Benson <gbenson@redhat.com>
6488
6489 * server.h: Add static assertion.
6490 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6491
6492 2014-08-19 Tom Tromey <tromey@redhat.com>
6493 Gary Benson <gbenson@redhat.com>
6494
6495 * Makefile.in (SFILES): Add common/errors.c.
6496 (OBS): Add errors.o.
6497 (IPA_OBS): Add errors-ipa.o.
6498 (errors.o): New rule.
6499 (errors-ipa.o): Likewise.
6500 * utils.h (perror_with_name, error, warning): Don't declare.
6501 * utils.c (warning): Renamed and rewritten as...
6502 (vwarning): New function.
6503 (error): Renamed and rewritten as...
6504 (verror): New function.
6505 (internal_error): Renamed and rewritten as...
6506 (internal_verror): New function.
6507
6508 2014-08-07 Gary Benson <gbenson@redhat.com>
6509
6510 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6511 * configure: Regenerate.
6512 * config.in: Likewise.
6513 * server.h: Do not include errno.h.
6514 * event-loop.c: Likewise.
6515 * hostio-errno.c: Likewise.
6516 * linux-low.c: Likewise.
6517 * remote-utils.c: Likewise.
6518 * spu-low.c: Likewise.
6519 * utils.c: Likewise.
6520 * gdbreplay.c: Unconditionally include errno.h.
6521
6522 2014-08-07 Gary Benson <gbenson@redhat.com>
6523
6524 * server.h: Do not include string.h.
6525 * event-loop.c: Likewise.
6526 * linux-low.c: Likewise.
6527 * regcache.c: Likewise.
6528 * remote-utils.c: Likewise.
6529 * spu-low.c: Likewise.
6530 * utils.c: Likewise.
6531
6532 2014-08-07 Gary Benson <gbenson@redhat.com>
6533
6534 * server.h: Do not include gdb_assert.h.
6535
6536 2014-08-07 Gary Benson <gbenson@redhat.com>
6537
6538 * server.h: Do not include common-utils.h.
6539
6540 2014-08-07 Gary Benson <gbenson@redhat.com>
6541
6542 * server.h: Do not include ptid.h.
6543 * notif.h: Likewise.
6544
6545 2014-08-07 Gary Benson <gbenson@redhat.com>
6546
6547 * server.h: Do not include gdb_locale.h.
6548
6549 2014-08-07 Gary Benson <gbenson@redhat.com>
6550
6551 * server.h: Do not include gdb/signals.h.
6552 * win32-low.c: Likewise.
6553
6554 2014-08-07 Gary Benson <gbenson@redhat.com>
6555
6556 * server.h: Do not include pathmax.h.
6557
6558 2014-08-07 Gary Benson <gbenson@redhat.com>
6559
6560 * server.h: Do not include libiberty.h.
6561 * linux-bfin-low.c: Likewise.
6562
6563 2014-08-07 Gary Benson <gbenson@redhat.com>
6564
6565 * server.h: Do not include ansidecl.h.
6566
6567 2014-08-07 Gary Benson <gbenson@redhat.com>
6568
6569 * linux-x86-low.c: Do not include stddef.h.
6570 * lynx-ppc-low.c: Likewise.
6571 * tracepoint.c: Likewise.
6572
6573 2014-08-07 Gary Benson <gbenson@redhat.com>
6574
6575 * server.h: Do not include stdarg.h.
6576 * nto-low.c: Likewise.
6577
6578 2014-08-07 Gary Benson <gbenson@redhat.com>
6579
6580 * server.h: Do not include stdlib.h.
6581 * inferiors.c: Likewise.
6582 * linux-low.c: Likewise.
6583 * regcache.c: Likewise.
6584 * spu-low.c: Likewise.
6585 * tracepoint.c: Likewise.
6586 * utils.c: Likewise.
6587
6588 2014-08-07 Gary Benson <gbenson@redhat.com>
6589
6590 * server.h: Do not include stdio.h.
6591 * linux-low.c: Likewise.
6592 * remote-utils.c: Likewise.
6593 * spu-low.c: Likewise.
6594 * utils.c: Likewise.
6595 * wincecompat.c: Likewise.
6596
6597 2014-08-06 Gary Benson <gbenson@redhat.com>
6598
6599 * regcache.c (init_register_cache): Move conditionals inside if.
6600
6601 2014-08-06 Gary Benson <gbenson@redhat.com>
6602
6603 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6604
6605 2014-07-31 Gary Benson <gbenson@redhat.com>
6606
6607 * ax.h: Do not include server.h.
6608 * gdbthread.h: Likewise.
6609 * lynx-low.h: Likewise.
6610 * notif.h: Likewise.
6611
6612 2014-07-30 Gary Benson <gbenson@redhat.com>
6613
6614 * server.h: Include common-defs.h.
6615 Do not include config.h or build-gnulib-gdbserver/config.h.
6616
6617 2014-07-30 Gary Benson <gbenson@redhat.com>
6618
6619 * hostio-errno.c: Move server.h to top of includes list.
6620 * inferiors.c: Likewise.
6621 * linux-x86-low.c: Likewise.
6622 * notif.c: Include server.h.
6623
6624 2014-07-24 Tom Tromey <tromey@redhat.com>
6625 Gary Benson <gbenson@redhat.com>
6626
6627 * server.h (CORE_ADDR): Now unsigned.
6628
6629 2014-07-16 Pedro Alves <palves@redhat.com>
6630
6631 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6632
6633 2014-07-15 Pedro Alves <palves@redhat.com>
6634
6635 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6636 copy.
6637
6638 2014-07-11 Pedro Alves <palves@redhat.com>
6639
6640 * linux-low.c (kill_wait_lwp): New function, based on
6641 kill_one_lwp_callback, but use my_waitpid directly.
6642 (kill_one_lwp_callback, linux_kill): Use it.
6643
6644 2014-06-23 Pedro Alves <palves@redhat.com>
6645
6646 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6647 before setting DR0..DR3.
6648
6649 2014-06-20 Gary Benson <gbenson@redhat.com>
6650
6651 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6652 * configure: Regenerated.
6653 * config.in: Likewise.
6654
6655 2014-06-20 Gary Benson <gbenson@redhat.com>
6656
6657 * Makefile.in (SFILES): Update locations for files moved
6658 from common to nat.
6659 (object file files): Reordered.
6660
6661 2014-06-20 Gary Benson <gbenson@redhat.com>
6662
6663 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6664 (i386_dr_low_set_addr): Likewise.
6665 (i386_dr_low_get_addr): Likewise.
6666 (i386_dr_low_can_set_control): Likewise.
6667 (i386_dr_low_set_control): Likewise.
6668 (i386_dr_low_get_control): Likewise.
6669 (i386_dr_low_get_status): Likewise.
6670 (i386_get_debug_register_length): Likewise.
6671 * linux-x86-low.c (i386_dr_low_set_addr):
6672 Changed signature. Made static.
6673 (i386_dr_low_get_addr): Likewise.
6674 (i386_dr_low_set_control): Likewise.
6675 (i386_dr_low_get_control): Likewise.
6676 (i386_dr_low_get_status): Likewise.
6677 (i386_dr_low): New global variable.
6678 * win32-i386-low.c (i386_dr_low_set_addr):
6679 Changed signature. Made static.
6680 (i386_dr_low_get_addr): Likewise.
6681 (i386_dr_low_set_control): Likewise.
6682 (i386_dr_low_get_control): Likewise.
6683 (i386_dr_low_get_status): Likewise.
6684 (i386_dr_low): New global variable.
6685
6686 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6687
6688 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6689 * Makefile.in (AR, AR_FLAGS): Define.
6690 * configure: Regenerate.
6691
6692 2014-06-19 Gary Benson <gbenson@redhat.com>
6693
6694 * Makefile.in (i386-dregs.o): New rule.
6695 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6696 * i386-low.c (target.h): Remove include.
6697 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6698 (DR_CONTROL_SHIFT): Likewise.
6699 (DR_CONTROL_SIZE): Likewise.
6700 (DR_RW_EXECUTE): Likewise.
6701 (DR_RW_WRITE): Likewise.
6702 (DR_RW_READ): Likewise.
6703 (DR_RW_IORW): Likewise.
6704 (DR_LEN_1): Likewise.
6705 (DR_LEN_2): Likewise.
6706 (DR_LEN_4): Likewise.
6707 (DR_LEN_8): Likewise.
6708 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6709 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6710 (DR_ENABLE_SIZE): Likewise.
6711 (DR_LOCAL_SLOWDOWN): Likewise.
6712 (DR_GLOBAL_SLOWDOWN): Likewise.
6713 (DR_CONTROL_RESERVED): Likewise.
6714 (I386_DR_CONTROL_MASK): Likewise.
6715 (I386_DR_VACANT): Likewise.
6716 (I386_DR_LOCAL_ENABLE): Likewise.
6717 (I386_DR_GLOBAL_ENABLE): Likewise.
6718 (I386_DR_DISABLE): Likewise.
6719 (I386_DR_SET_RW_LEN): Likewise.
6720 (I386_DR_GET_RW_LEN): Likewise.
6721 (I386_DR_WATCH_HIT): Likewise.
6722 (i386_wp_op_t): Likewise.
6723 (i386_show_dr): Likewise.
6724 (i386_length_and_rw_bits): Likewise.
6725 (i386_insert_aligned_watchpoint): Likewise.
6726 (i386_remove_aligned_watchpoint): Likewise.
6727 (i386_handle_nonaligned_watchpoint): Likewise.
6728 i386_update_inferior_debug_regs(): Likewise.
6729 (i386_dr_insert_watchpoint): Likewise.
6730 (i386_dr_remove_watchpoint): Likewise.
6731 (i386_dr_region_ok_for_watchpoint): Likewise.
6732 (i386_dr_stopped_data_address): Likewise.
6733 (i386_dr_stopped_by_watchpoint): Likewise.
6734
6735 2014-06-19 Gary Benson <gbenson@redhat.com>
6736
6737 * i386-low.c (i386_dr_show): Renamed to
6738 i386_show_dr and made static. All uses updated.
6739 (i386_dr_length_and_rw_bits): Renamed to
6740 i386_length_and_rw_bits and made static.
6741 All uses updated.
6742 (i386_dr_insert_aligned_watchpoint): Renamed to
6743 i386_insert_aligned_watchpoint and made static.
6744 All uses updated.
6745 (i386_dr_remove_aligned_watchpoint): Renamed to
6746 i386_remove_aligned_watchpoint and made static.
6747 All uses updated.
6748 (i386_dr_update_inferior_debug_regs): Renamed to
6749 i386_update_inferior_debug_regs and made static.
6750 All uses updated.
6751
6752 2014-06-18 Gary Benson <gbenson@redhat.com>
6753
6754 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6755 (i386_dr_low_can_set_control): Likewise.
6756 (i386_get_debug_register_length): Likewise.
6757 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6758 (i386_dr_low_can_set_control): Likewise.
6759 (i386_get_debug_register_length): Likewise.
6760
6761 2014-06-17 Gary Benson <gbenson@redhat.com>
6762
6763 * i386-low.h (i386-dregs.h): New include.
6764 (DR_FIRSTADDR): Now in i386-dregs.h.
6765 (DR_LASTADDR): Likewise.
6766 (DR_NADDR): Likewise.
6767 (DR_STATUS): Likewise.
6768 (DR_CONTROL): Likewise.
6769 (i386_debug_reg_state): Likewise.
6770 (i386_dr_insert_watchpoint): Likewise.
6771 (i386_dr_remove_watchpoint): Likewise.
6772 (i386_dr_region_ok_for_watchpoint): Likewise.
6773 (i386_dr_stopped_data_address): Likewise.
6774 (i386_dr_stopped_by_watchpoint): Likewise.
6775 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6776
6777 2014-06-18 Gary Benson <gbenson@redhat.com>
6778
6779 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6780 i386_dr_insert_watchpoint.
6781 (i386_low_remove_watchpoint): Renamed to
6782 i386_dr_remove_watchpoint.
6783 (i386_low_region_ok_for_watchpoint): Renamed to
6784 i386_dr_region_ok_for_watchpoint.
6785 (i386_low_stopped_data_address): Renamed to
6786 i386_dr_stopped_data_address.
6787 (i386_low_stopped_by_watchpoint): Renamed to
6788 i386_dr_stopped_by_watchpoint.
6789 * i386-low.c (i386_show_dr): Renamed to
6790 i386_dr_show and made nonstatic. All uses updated.
6791 (i386_length_and_rw_bits): Renamed to
6792 i386_dr_length_and_rw_bits and made nonstatic.
6793 All uses updated.
6794 (i386_insert_aligned_watchpoint): Renamed to
6795 i386_dr_insert_aligned_watchpoint and made nonstatic.
6796 All uses updated.
6797 (i386_remove_aligned_watchpoint): Renamed to
6798 i386_dr_remove_aligned_watchpoint and made nonstatic.
6799 All uses updated.
6800 (i386_update_inferior_debug_regs): Renamed to
6801 i386_dr_update_inferior_debug_regs and made nonstatic.
6802 All uses updated.
6803 (i386_low_insert_watchpoint): Renamed to
6804 i386_dr_insert_watchpoint. All uses updated.
6805 (i386_low_remove_watchpoint): Renamed to
6806 i386_dr_remove_watchpoint. All uses updated.
6807 (i386_low_region_ok_for_watchpoint): Renamed to
6808 i386_dr_region_ok_for_watchpoint. All uses updated.
6809 (i386_low_stopped_data_address): Renamed to
6810 i386_dr_stopped_data_address. All uses updated.
6811 (i386_low_stopped_by_watchpoint): Renamed to
6812 i386_dr_stopped_by_watchpoint. All uses updated.
6813
6814 2014-06-18 Gary Benson <gbenson@redhat.com>
6815
6816 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6817 (i386_dr_low_can_set_control): Likewise.
6818 (i386_insert_aligned_watchpoint): New check.
6819
6820 2014-06-18 Gary Benson <gbenson@redhat.com>
6821
6822 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6823 Renamed to state.
6824
6825 2014-06-18 Gary Benson <gbenson@redhat.com>
6826
6827 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6828 instead of fatal and error.
6829 (i386_handle_nonaligned_watchpoint): Likewise.
6830
6831 2014-06-18 Gary Benson <gbenson@redhat.com>
6832
6833 * i386-low.c (i386_get_debug_register_length): New macro.
6834 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6835 (i386_show_dr): Use debug_printf instead of fprintf. Use
6836 phex to format values.
6837
6838 2014-06-18 Gary Benson <gbenson@redhat.com>
6839
6840 * i386-low.h: Comment changes.
6841 * i386-low.c: Likewise.
6842
6843 2014-06-18 Gary Benson <gbenson@redhat.com>
6844
6845 * i386-low.c: Whitespace changes.
6846
6847 2014-06-12 Tom Tromey <tromey@redhat.com>
6848
6849 * utils.c (freeargv): Remove.
6850
6851 2014-06-12 Tom Tromey <tromey@redhat.com>
6852
6853 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6854 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6855 (parse_debug_format_options): Likewise.
6856 (gdbserver_usage): Likewise.
6857 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6858 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6859 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6860 against libiberty.
6861 ($(LIBGNU)): Depend on libiberty.
6862 (all-lib): Recurse into all subdirs.
6863 (install-only): Invoke "install" target in subdirs.
6864 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6865 targets.
6866 * configure: Rebuild.
6867 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6868 for vasprintf, vsnprintf, or gettimeofday.
6869 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6870 srv_tgtobj.
6871
6872 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6873
6874 * development.sh: Delete.
6875 * Makefile.in (config.status): Adjust dependency on development.sh.
6876 * configure.ac: Adjust development.sh source call.
6877 * configure: Regenerate.
6878
6879 2014-06-02 Pedro Alves <palves@redhat.com>
6880
6881 * ax.c (gdb_free_agent_expr): New function.
6882 * ax.h (gdb_free_agent_expr): New declaration.
6883 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6884 list.
6885 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6886 static.
6887 (clear_breakpoint_conditions_and_commands): New function.
6888 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6889 (clear_breakpoint_conditions_and_commands): New declaration.
6890
6891 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6892
6893 * linux-aarch64-low.c (asm/ptrace.h): Include.
6894
6895 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6896
6897 Fix TLS access for -static -pthread.
6898 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6899 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6900 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6901
6902 2014-05-20 Pedro Alves <palves@redhat.com>
6903
6904 * linux-aarch64-low.c (aarch64_insert_point)
6905 (aarch64_remove_point): No longer check whether the type is
6906 supported here. Adjust to new interface.
6907 (the_low_target): Install aarch64_supports_z_point_type as
6908 supports_z_point_type method.
6909 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6910 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6911 instead of a Z packet char. Adjust.
6912 (arm_supports_z_point_type): New function.
6913 (arm_insert_point, arm_remove_point): Adjust to new interface.
6914 (the_low_target): Install arm_supports_z_point_type.
6915 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6916 (cris_insert_point, cris_remove_point): Adjust to new interface.
6917 Don't check whether the type is supported here.
6918 (the_low_target): Install cris_supports_z_point_type.
6919 * linux-low.c (linux_supports_z_point_type): New function.
6920 (linux_insert_point, linux_remove_point): Adjust to new interface.
6921 * linux-low.h (struct linux_target_ops) <insert_point,
6922 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6923 raw_breakpoint pointer parameter.
6924 <supports_z_point_type>: New method.
6925 * linux-mips-low.c (mips_supports_z_point_type): New function.
6926 (mips_insert_point, mips_remove_point): Adjust to new interface.
6927 Use mips_supports_z_point_type.
6928 (the_low_target): Install mips_supports_z_point_type.
6929 * linux-ppc-low.c (the_low_target): Install NULL as
6930 supports_z_point_type method.
6931 * linux-s390-low.c (the_low_target): Install NULL as
6932 supports_z_point_type method.
6933 * linux-sparc-low.c (the_low_target): Install NULL as
6934 supports_z_point_type method.
6935 * linux-x86-low.c (x86_supports_z_point_type): New function.
6936 (x86_insert_point): Adjust to new insert_point interface. Use
6937 insert_memory_breakpoint. Adjust to new
6938 i386_low_insert_watchpoint interface.
6939 (x86_remove_point): Adjust to remove_point interface. Use
6940 remove_memory_breakpoint. Adjust to new
6941 i386_low_remove_watchpoint interface.
6942 (the_low_target): Install x86_supports_z_point_type.
6943 * lynx-low.c (lynx_target_ops): Install NULL as
6944 supports_z_point_type callback.
6945 * nto-low.c (nto_supports_z_point_type): New.
6946 (nto_insert_point, nto_remove_point): Adjust to new interface.
6947 (nto_target_ops): Install nto_supports_z_point_type.
6948 * mem-break.c: Adjust intro comment.
6949 (struct raw_breakpoint) <raw_type, size>: New fields.
6950 <inserted>: Update comment.
6951 <shlib_disabled>: Delete field.
6952 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6953 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6954 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6955 (raw_bkpt_type_to_target_hw_bp_type): New function.
6956 (find_enabled_raw_code_breakpoint_at): New function.
6957 (find_raw_breakpoint_at): New type and size parameters. Use them.
6958 (insert_memory_breakpoint): New function, based off
6959 set_raw_breakpoint_at.
6960 (remove_memory_breakpoint): New function.
6961 (set_raw_breakpoint_at): Reimplement.
6962 (set_breakpoint): New, based on set_breakpoint_at.
6963 (set_breakpoint_at): Reimplement.
6964 (delete_raw_breakpoint): Go through the_target->remove_point
6965 instead of assuming memory breakpoints.
6966 (find_gdb_breakpoint_at): Delete.
6967 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6968 (find_gdb_breakpoint): New function.
6969 (set_gdb_breakpoint_at): Delete.
6970 (z_type_supported): New function.
6971 (set_gdb_breakpoint_1): New function, loosely based off
6972 set_gdb_breakpoint_at.
6973 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6974 (delete_gdb_breakpoint_at): Delete.
6975 (delete_gdb_breakpoint_1): New function, loosely based off
6976 delete_gdb_breakpoint_at.
6977 (delete_gdb_breakpoint): New function.
6978 (clear_gdb_breakpoint_conditions): Rename to ...
6979 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6980 breakpoint.
6981 (add_condition_to_breakpoint): Make static.
6982 (add_breakpoint_condition): Take a struct breakpoint pointer
6983 instead of an address. Adjust.
6984 (gdb_condition_true_at_breakpoint): Rename to ...
6985 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6986 z_type parameter.
6987 (gdb_condition_true_at_breakpoint): Reimplement.
6988 (add_breakpoint_commands): Take a struct breakpoint pointer
6989 instead of an address. Adjust.
6990 (gdb_no_commands_at_breakpoint): Rename to ...
6991 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6992 parameter. Return true if no breakpoint was found. Change debug
6993 output.
6994 (gdb_no_commands_at_breakpoint): Reimplement.
6995 (run_breakpoint_commands): Rename to ...
6996 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6997 and change return type to boolean.
6998 (run_breakpoint_commands): New function.
6999 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7000 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7001 breakpoint. Go through the_target->remove_point instead of
7002 assuming memory breakpoint.
7003 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7004 software and hardware breakpoints.
7005 (reinsert_raw_breakpoint): Go through the_target->insert_point
7006 instead of assuming memory breakpoint.
7007 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7008 software and hardware breakpoints.
7009 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7010 Check both software and hardware breakpoints.
7011 (validate_inserted_breakpoint): Assert the breakpoint is a
7012 software breakpoint. Set the inserted flag to -1 instead of
7013 setting shlib_disabled.
7014 (delete_disabled_breakpoints): Adjust.
7015 (validate_breakpoints): Only validate software breakpoints.
7016 Adjust to inserted flag change.
7017 (check_mem_read, check_mem_write): Skip breakpoint types other
7018 than software breakpoints. Adjust to inserted flag change.
7019 * mem-break.h (enum raw_bkpt_type): New enum.
7020 (raw_breakpoint, struct process_info): Forward declare.
7021 (Z_packet_to_target_hw_bp_type): Delete declaration.
7022 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7023 (set_gdb_breakpoint, delete_gdb_breakpoint)
7024 (clear_breakpoint_conditions): New declarations.
7025 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7026 (breakpoint_inserted_here): Update comment.
7027 (add_breakpoint_condition, add_breakpoint_commands): Replace
7028 address parameter with a breakpoint pointer parameter.
7029 (gdb_breakpoint_here): Update comment.
7030 (delete_gdb_breakpoint_at): Delete.
7031 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7032 * server.c (process_point_options): Take a struct breakpoint
7033 pointer instead of an address. Adjust.
7034 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7035 delete_gdb_breakpoint.
7036 * spu-low.c (spu_target_ops): Install NULL as
7037 supports_z_point_type method.
7038 * target.h: Include mem-break.h.
7039 (struct target_ops) <prepare_to_access_memory>: Update comment.
7040 <supports_z_point_type>: New field.
7041 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7042 instead of a char. Also take a raw breakpoint pointer.
7043 * win32-arm-low.c (the_low_target): Install NULL as
7044 supports_z_point_type.
7045 * win32-i386-low.c (i386_supports_z_point_type): New function.
7046 (i386_insert_point, i386_remove_point): Adjust to new interface.
7047 (the_low_target): Install i386_supports_z_point_type.
7048 * win32-low.c (win32_supports_z_point_type): New function.
7049 (win32_insert_point, win32_remove_point): Adjust to new interface.
7050 (win32_target_ops): Install win32_supports_z_point_type.
7051 * win32-low.h (struct win32_target_ops):
7052 <supports_z_point_type>: New method.
7053 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7054 instead of a char. Also take a raw breakpoint pointer.
7055
7056 2014-05-20 Pedro Alves <palves@redhat.com>
7057
7058 * mem-break.h: Include break-common.h.
7059 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7060 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7061 (Z_packet_to_target_hw_bp_type): New declaration.
7062 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7063 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7064 (Z_PACKET_ACCESS_WP): Delete macros.
7065 (Z_packet_to_hw_type): Delete function.
7066 * i386-low.h: Don't include break-common.h here.
7067 (Z_packet_to_hw_type): Delete declaration.
7068 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7069 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7070 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7071 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7072 * linux-aarch64-low.c: Don't include break-common.h here.
7073 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7074 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7075 (Z_packet_to_target_hw_bp_type): Delete function.
7076 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7077 function.
7078 (mips_insert_point, mips_remove_point): Use
7079 Z_packet_to_target_hw_bp_type.
7080
7081 2014-05-20 Pedro Alves <palves@redhat.com>
7082
7083 * linux-aarch64-low.c: Include break-common.h.
7084 (enum target_point_type): Delete.
7085 (Z_packet_to_point_type): Rename to ...
7086 (Z_packet_to_target_hw_bp_type): ... this, and return a
7087 target_hw_bp_type instead.
7088 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7089 instead of an enum target_point_type.
7090 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7091 breakpoint type.
7092 (aarch64_dr_state_insert_one_point)
7093 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7094 (aarch64_handle_aligned_watchpoint)
7095 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7096 Take an enum target_hw_bp_type instead of an enum
7097 target_point_type.
7098 (aarch64_supports_z_point_type): New function.
7099 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7100 use Z_packet_to_target_hw_bp_type.
7101
7102 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7103
7104 * configure.ac: Only use -Werror by default when DEVELOPMENT
7105 is true.
7106 * configure: Regenerate.
7107
7108 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7109
7110 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7111 * linux-x86-low.c (X86_64_USER_REGS): New.
7112 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7113
7114 2014-04-28 Yao Qi <yao@codesourcery.com>
7115
7116 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7117 name.
7118
7119 2014-04-25 Pedro Alves <palves@redhat.com>
7120
7121 PR server/16255
7122 * linux-low.c (linux_attach_fail_reason_string): New function.
7123 (linux_attach_lwp): Delete.
7124 (linux_attach_lwp_1): Rename to ...
7125 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7126 argument. Remove "initial" parameter. Return int instead of
7127 void. Don't error or warn here.
7128 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7129 failure to attach to the tgid. Call warning when failing to
7130 attach to an lwp.
7131 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7132 argument. Remove "initial" parameter. Return int instead of
7133 void. Don't error or warn here.
7134 (linux_attach_fail_reason_string): New declaration.
7135 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7136 interface change. Use linux_attach_fail_reason_string.
7137
7138 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7139 Walfred Tedeschi <walfred.tedeschi@intel.com>
7140
7141 * Makefile.in: Added rules to handle new files
7142 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7143 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7144 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7145 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7146 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7147 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7148 x32-avx512-linux.o.
7149 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7150 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7151 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7152 i386/x32-avx512.xml.
7153 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7154 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7155 i386/x32-avx512-linux.xml.
7156 * i387-fp.c (num_avx512_k_registers): New constant for number
7157 of K registers.
7158 (num_avx512_zmmh_low_registers): New constant for number of
7159 lower ZMM registers (0-15).
7160 (num_avx512_zmmh_high_registers): New constant for number of
7161 higher ZMM registers (16-31).
7162 (num_avx512_ymmh_registers): New contant for number of higher
7163 YMM registers (ymm16-31 added by avx521 on x86_64).
7164 (num_avx512_xmm_registers): New constant for number of higher
7165 XMM registers (xmm16-31 added by AVX512 on x86_64).
7166 (struct i387_xsave): Add space for AVX512 registers.
7167 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7168 Add code to handle AVX512 registers.
7169 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7170 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7171 prototypei from generated file.
7172 (tdesc_amd64_avx512_linux): Likewise.
7173 (init_registers_x32_avx512_linux): Likewise.
7174 (tdesc_x32_avx512_linux): Likewise.
7175 (init_registers_i386_avx512_linux): Likewise.
7176 (tdesc_i386_avx512_linux): Likewise.
7177 (x86_64_regmap): Add AVX512 registers.
7178 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7179 mask.
7180 (initialize_low_arch): Add code to initialize AVX512 registers.
7181
7182 2014-04-23 Pedro Alves <palves@redhat.com>
7183
7184 * mem-break.c (find_gdb_breakpoint_at): Make static.
7185 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7186
7187 2014-04-23 Pedro Alves <palves@redhat.com>
7188
7189 * i386-low.c: Don't include break-common.h here.
7190 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7191 prototype to take target_hw_bp_type as argument instead of a Z
7192 packet char.
7193 * i386-low.h: Include break-common.h here.
7194 (Z_packet_to_hw_type): Declare.
7195 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7196 prototypes.
7197 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7198 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7199 (x86_remove_point): Convert the packet number to a
7200 target_hw_bp_type before calling i386_low_remove_watchpoint.
7201 * win32-i386-low.c (i386_insert_point): Convert the packet number
7202 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7203 (i386_remove_point): Convert the packet number to a
7204 target_hw_bp_type before calling i386_low_remove_watchpoint.
7205
7206 2014-04-23 Pedro Alves <palves@redhat.com>
7207
7208 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7209
7210 2014-04-10 Pedro Alves <palves@redhat.com>
7211
7212 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7213 Check if the condition or command is NULL before checking if the
7214 breakpoint is known. On success, return true.
7215 * mem-break.h (add_breakpoint_condition): Document return.
7216 (add_breakpoint_commands): Add describing comment.
7217 * server.c (skip_to_semicolon): New function.
7218 (process_point_options): Use it.
7219
7220 2014-04-09 Pedro Alves <palves@redhat.com>
7221
7222 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7223 to lwpid_of.
7224
7225 2014-02-27 Pedro Alves <palves@redhat.com>
7226
7227 PR 12702
7228 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7229 macros.
7230 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7231 output.
7232 (last_thread_of_process_p): Take a PID argument instead of a
7233 thread pointer.
7234 (linux_wait_for_lwp): Delete.
7235 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7236 functions.
7237 (linux_low_filter_event): New function, party factored out from
7238 linux_wait_for_event.
7239 (linux_wait_for_event): Rename to ...
7240 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7241 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7242 sigsuspend. Check for zombie leaders.
7243 (linux_wait_for_event): Reimplement as wrapper around
7244 linux_wait_for_event_filtered.
7245 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7246 a normal or signal exit is seen, it's the whole process exiting.
7247 (wait_for_sigstop): No longer a for_each_inferior callback.
7248 Rewrite on top of linux_wait_for_event_filtered.
7249 (stop_all_lwps): Call wait_for_sigstop directly.
7250 * server.c (resume, handle_target_event): Handle
7251 TARGET_WAITKIND_NO_RESUMED.
7252
7253 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7254
7255 * win32-low.c (psapi_get_dll_name,
7256 * win32_CreateToolhelp32Snapshot): Delete.
7257 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7258 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7259 Delete.
7260 (handle_load_dll): Add function description.
7261 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7262
7263 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7264
7265 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7266 Add comment.
7267 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7268 base address when calling win32_add_one_solib.
7269 (handle_load_dll): Delete local variable load_addr.
7270 Remove 0x1000 offset applied to DLL base address when calling
7271 win32_add_one_solib.
7272 (handle_unload_dll): Add comment.
7273
7274 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7275
7276 * win32-low.c (win32_add_all_dlls): Renames
7277 win32_ensure_ntdll_loaded. Rewrite function documentation.
7278 Adjust implementation to always load all DLLs.
7279 Add 0x1000 offset to DLL base address when calling
7280 win32_add_one_solib.
7281 (child_initialization_done): New static global.
7282 (do_initial_child_stuff): Set child_initialization_done to
7283 zero during child initialization, and 1 after. Replace call
7284 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7285 Add comment.
7286 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7287 (handle_unload_dll): Add function documentation.
7288 (get_child_debug_event): Ignore load and unload DLL events
7289 during child initialization.
7290
7291 2014-02-20 Doug Evans <dje@google.com>
7292
7293 Remove global all_lwps.
7294 * inferiors.h (ptid_of): Move here from linux-low.h.
7295 (pid_of, lwpid_of): Ditto.
7296 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7297 parameter is a struct thread_info * now.
7298 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7299 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7300 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7301 directly.
7302 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7303 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7304 * linux-arm-low.c (update_registers_callback): Update, "entry"
7305 parameter is a struct thread_info * now.
7306 Fetch lwpid from current_inferior directly.
7307 (arm_insert_point): Pass &all_threads to find_inferior instead of
7308 &all_lwps.
7309 (arm_remove_point): Ditto.
7310 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7311 (arm_prepare_to_resume): Fetch pid from thread.
7312 (arm_read_description): Fetch lwpid from current_inferior directly.
7313 * linux-low.c (all_lwps): Delete.
7314 (delete_lwp): Delete call to remove_inferior.
7315 (handle_extended_wait): Fetch lwpid from thread.
7316 (add_lwp): Don't set lwp->entry.id. Remove call to
7317 add_inferior_to_list.
7318 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7319 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7320 (kill_one_lwp_callback): Ditto.
7321 (linux_kill): Don't dereference NULL pointer.
7322 Fetch ptid,lwpid from thread.
7323 (get_detach_signal): Fetch ptid from thread.
7324 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7325 Simplify call to regcache_invalidate_thread.
7326 (delete_lwp_callback): Update, "entry" parameter is a
7327 struct thread_info * now. Fetch pid from thread.
7328 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7329 (status_pending_p_callback): Update, "entry" parameter is a
7330 struct thread_info * now. Fetch ptid from thread.
7331 (find_lwp_pid): Update, "entry" parameter is a
7332 struct thread_info * now.
7333 (linux_wait_for_lwp): Fetch pid from thread.
7334 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7335 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7336 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7337 (dequeue_one_deferred_signal): Ditto.
7338 (cancel_breakpoint): Fetch ptid from current_inferior.
7339 (linux_wait_for_event): Pass &all_threads to find_inferior,
7340 not &all_lwps. Fetch ptid, lwpid from thread.
7341 (count_events_callback): Update, "entry" parameter is a
7342 struct thread_info * now.
7343 (select_singlestep_lwp_callback): Ditto.
7344 (select_event_lwp_callback): Ditto.
7345 (cancel_breakpoints_callback): Ditto.
7346 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7347 not &all_lwps.
7348 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7349 (unsuspend_one_lwp): Update, "entry" parameter is a
7350 struct thread_info * now.
7351 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7352 not &all_lwps.
7353 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7354 Fetch lwpid from thread, not lwp.
7355 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7356 Pass &all_threads to find_inferior, not &all_lwps.
7357 (send_sigstop): Fetch lwpid from thread, not lwp.
7358 (send_sigstop_callback): Update, "entry" parameter is a
7359 struct thread_info * now.
7360 (suspend_and_send_sigstop_callback): Ditto.
7361 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7362 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7363 struct thread_info * now.
7364 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7365 from thread, lwp.
7366 (lwp_running): Update, "entry" parameter is a
7367 struct thread_info * now.
7368 (stop_all_lwps): Fetch ptid from thread.
7369 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7370 (linux_resume_one_lwp): Fetch lwpid from thread.
7371 (linux_set_resume_request): Update, "entry" parameter is a
7372 struct thread_info * now. Fetch pid, lwpid from thread.
7373 (resume_status_pending_p): Update, "entry" parameter is a
7374 struct thread_info * now.
7375 (need_step_over_p): Ditto. Fetch lwpid from thread.
7376 (start_step_over): Fetch lwpid from thread.
7377 (linux_resume_one_thread): Update, "entry" parameter is a
7378 struct thread_info * now. Fetch lwpid from thread.
7379 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7380 (proceed_one_lwp): Update, "entry" parameter is a
7381 struct thread_info * now. Fetch lwpid from thread.
7382 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7383 struct thread_info * now.
7384 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7385 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7386 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7387 directly.
7388 (regsets_store_inferior_registers): Ditto.
7389 (fetch_register, store_register): Ditto.
7390 (linux_read_memory, linux_write_memory): Ditto.
7391 (linux_request_interrupt): Ditto.
7392 (linux_read_auxv): Ditto.
7393 (linux_xfer_siginfo): Ditto.
7394 (linux_qxfer_spu): Ditto.
7395 (linux_qxfer_libraries_svr4): Ditto.
7396 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7397 moved to inferiors.h.
7398 (get_lwp): Delete.
7399 (get_thread_lwp): Update.
7400 (struct lwp_info): Delete member "entry". Simplify comment for
7401 member "thread".
7402 (all_lwps): Delete.
7403 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7404 current_inferior directly.
7405 (update_watch_registers_callback): Update, "entry" parameter is a
7406 struct thread_info * now. Fetch pid from thread.
7407 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7408 (mips_insert_point): Fetch lwpid from current_inferior.
7409 Pass &all_threads to find_inferior, not &all_lwps.
7410 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7411 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7412 directly.
7413 (mips_stopped_data_address): Ditto.
7414 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7415 directly.
7416 * linux-tile-low.c (tile_arch_setup): Ditto.
7417 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7418 (update_debug_registers_callback): Update, "entry" parameter is a
7419 struct thread_info * now. Fetch pid from thread.
7420 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7421 Pass &all_threads to find_inferior, not &all_lwps.
7422 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7423 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7424 Pass &all_threads to find_inferior, not &all_lwps.
7425 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7426 (i386_dr_low_get_status): Ditto.
7427 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7428 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7429 (x86_linux_read_description): Ditto.
7430 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7431
7432 2014-02-20 Doug Evans <dje@google.com>
7433
7434 * inferiors.c (get_first_inferior): Fix buglet.
7435
7436 2014-02-19 Doug Evans <dje@google.com>
7437
7438 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7439 * inferiors.c (add_thread): Change result type to struct thread_info *.
7440 All callers updated.
7441 (add_lwp): Call add_thread here instead of in callers.
7442 All callers updated.
7443 * linux-low.h (get_lwp_thread): Rewrite.
7444 (struct lwp_info): New member "thread".
7445
7446 2014-02-19 Doug Evans <dje@google.com>
7447
7448 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7449 All callers updated.
7450
7451 2014-02-19 Doug Evans <dje@google.com>
7452
7453 * inferiors.c (add_thread): Fix whitespace.
7454
7455 2014-02-19 Doug Evans <dje@google.com>
7456
7457 * dll.c (clear_dlls): Replace accessing list implemention details
7458 with API function.
7459 * gdbthread.h (get_first_thread): Declare.
7460 * inferiors.c (for_each_inferior_with_data): New function.
7461 (get_first_thread): New function.
7462 (find_thread_ptid): Simplify.
7463 (get_first_inferior): New function.
7464 (clear_list): Delete.
7465 (one_inferior_p): New function.
7466 (clear_inferior_list): New function.
7467 (clear_inferiors): Update.
7468 * inferiors.h (for_each_inferior_with_data): Declare.
7469 (clear_inferior_list): Declare.
7470 (one_inferior_p): Declare.
7471 (get_first_inferior): Declare.
7472 * linux-low.c (linux_wait_for_event): Replace accessing list
7473 implemention details with API function.
7474 * server.c (target_running): Ditto.
7475 (accumulate_file_name_length): New function.
7476 (emit_dll_description): New function.
7477 (handle_qxfer_libraries): Replace accessing list implemention
7478 details with API function.
7479 (handle_qxfer_threads_worker): New function.
7480 (handle_qxfer_threads_proper): Replace accessing list implemention
7481 details with API function.
7482 (handle_query): Ditto.
7483 (visit_actioned_threads_callback_ftype): New typedef.
7484 (visit_actioned_threads_data): New struct.
7485 (visit_actioned_threads): Rewrite to be find_inferior callback.
7486 (resume): Call find_inferior.
7487 (handle_status): Replace accessing list implemention
7488 details with API function.
7489 (process_serial_event): Replace accessing list implemention details
7490 with API function.
7491 * target.c (set_desired_inferior): Replace accessing list implemention
7492 details with API function.
7493 * tracepoint.c (same_process_p): New function.
7494 (gdb_agent_about_to_close): Replace accessing list implemention
7495 details with API function.
7496 * win32-low.c (child_delete_thread): Replace accessing list
7497 implemention details with API function.
7498 (match_dll_by_basename): New function.
7499 (dll_is_loaded_by_basename): New function.
7500 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7501 details call to dll_is_loaded_by_basename.
7502
7503 2014-02-19 Doug Evans <dje@google.com>
7504
7505 * dll.h (struct dll_info): Add comment.
7506 * gdbthread.h (struct thread_info): Add comment.
7507 (current_ptid): Simplify.
7508 * inferiors.c (add_process): Update.
7509 (remove_process): Update.
7510 * inferiors.h (struct process_info): Rename member "head" to "entry".
7511 * linux-low.c (delete_lwp): Update.
7512 (add_lwp): Update.
7513 (last_thread_of_process_p): Update.
7514 (kill_one_lwp_callback, linux_kill): Update.
7515 (status_pending_p_callback): Update.
7516 (wait_for_sigstop): Update. Simplify read of ptid.
7517 (start_step_over): Update.
7518 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7519 (get_lwp_thread): Update.
7520 (struct lwp_info): Rename member "head" to "entry".
7521 * regcache.h (inferior_list_entry): Delete.
7522 * server.c (kill_inferior_callback): Update.
7523 (detach_or_kill_inferior_callback): Update.
7524 (print_started_pid): Update.
7525 (print_attached_pid): Update.
7526 (process_serial_event): Simplify read of ptid.
7527 * thread-db.c (thread_db_create_event): Update.
7528 (thread_db_get_tls_address): Update.
7529 * win32-low.c (current_inferior_ptid): Simplify.
7530
7531 2014-02-19 Tom Tromey <tromey@redhat.com>
7532
7533 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7534 argument.
7535 (target_supports_btrace): Update.
7536
7537 2014-02-14 Yao Qi <yao@codesourcery.com>
7538
7539 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7540 (rsp-low-ipa.o): New target.
7541
7542 2014-02-12 Tom Tromey <tromey@redhat.com>
7543
7544 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7545 convert_ascii_to_int.
7546 * regcache.c (registers_to_string): Likewise.
7547 * remote-utils.c (decode_M_packet): Likewise.
7548 * server.c (process_serial_event): Likewise.
7549
7550 2014-02-12 Tom Tromey <tromey@redhat.com>
7551
7552 * server.c (handle_query, handle_v_run): Use hex2bin, not
7553 unhexify.
7554 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7555
7556 2014-02-12 Tom Tromey <tromey@redhat.com>
7557
7558 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7559 convert_int_to_ascii.
7560 * regcache.c (registers_to_string, collect_register_as_string):
7561 Likewise.
7562 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7563 Likewise.
7564 * server.c (process_serial_event): Likewise.
7565 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7566 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7567
7568 2014-02-12 Tom Tromey <tromey@redhat.com>
7569
7570 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7571 bin2hex, not hexify.
7572 * tracepoint.c (cmd_qtstatus): Likewise.
7573
7574 2014-02-12 Tom Tromey <tromey@redhat.com>
7575
7576 * remote-utils.c (monitor_output): Pass explicit length to
7577 hexify.
7578
7579 2014-02-12 Tom Tromey <tromey@redhat.com>
7580
7581 * tracepoint.c: Include rsp-low.h.
7582 * server.c: Include rsp-low.h.
7583 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7584 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7585 declare.
7586 * remote-utils.c: Include rsp-low.h.
7587 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7588 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7589 (convert_int_to_ascii, convert_ascii_to_int): Move to
7590 common/rsp-low.c.
7591 * regcache.c: Include rsp-low.h.
7592 * ax.c: Include rsp-low.h.
7593 * Makefile.in (SFILES): Add common/rsp-low.c.
7594 (OBS): Add rsp-low.o.
7595 (rsp-low.o): New target.
7596
7597 2014-02-12 Tom Tromey <tromey@redhat.com>
7598
7599 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7600 Include print-utils.h.
7601 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7602 (plongest, thirty_two, phex_nz): Remove.
7603 * Makefile.in (SFILES): Add common/print-utils.c.
7604 (OBS): Add print-utils.o.
7605 (print-utils-ipa.o): New target.
7606 (print-utils.o): New target.
7607 (IPA_OBJS): Add print-utils-ipa.o.
7608
7609 2014-02-06 Tom Tromey <tromey@redhat.com>
7610
7611 * Makefile.in (SFILES): Fix indentation.
7612
7613 2014-02-05 Doug Evans <dje@google.com>
7614
7615 * linux-low.c (linux_wait_for_event): Improve comment.
7616 (linux_wait_1): Keep current_inferior in sync with event_child.
7617
7618 2014-01-22 Doug Evans <dje@google.com>
7619
7620 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7621
7622 2014-01-22 Doug Evans <dje@google.com>
7623
7624 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7625 * configure: Regenerate.
7626 * config.in: Regenerate.
7627 * Makefile.in (SFILES): Add debug.c.
7628 (OBS): Add debug.o.
7629 * debug.c: New file.
7630 * debug.h: New file.
7631 * linux-aarch64-low.c (*): Update all debugging printfs to use
7632 debug_printf instead of fprintf.
7633 * linux-arm-low.c (*): Ditto.
7634 * linux-cris-low.c (*): Ditto.
7635 * linux-crisv32-low.c (*): Ditto.
7636 * linux-m32r-low.c (*): Ditto.
7637 * linux-sparc-low.c (*): Ditto.
7638 * linux-x86.c (*): Ditto.
7639 * linux-low.c (*): Ditto.
7640 (linux_wait_1): Add calls to debug_enter, debug_exit.
7641 (linux_wait): Remove redundant debugging printf.
7642 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7643 (linux_resume, unstop_all_lwps): Ditto.
7644 * mem-break.c (*): Update all debugging printfs to use
7645 debug_printf instead of fprintf.
7646 * remote-utils.c (*): Ditto.
7647 * thread-db.c (*): Ditto.
7648 * server.c #include <ctype.h>, "gdb_vecs.h".
7649 (debug_threads): Moved to debug.c.
7650 (*): Update all debugging printfs to use debug_printf instead of
7651 fprintf.
7652 (start_inferior): Replace call to fflush with call to debug_flush.
7653 (monitor_show_help): Mention set debug-format.
7654 (parse_debug_format_options): New function.
7655 (handle_monitor_command): Handle "monitor set debug-format".
7656 (gdbserver_usage): Mention --debug-format.
7657 (main): Parse --debug-format.
7658 * server.h (debug_threads): Declaration moved to debug.h.
7659 #include "debug.h".
7660 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7661 trace_debug_1 that uses debug_printf.
7662 (tracepoint_look_up_symbols): Update all debugging printfs to use
7663 debug_printf instead of fprintf.
7664
7665 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7666
7667 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7668 sys/ptrace.h.
7669
7670 2014-01-17 Pedro Alves <palves@redhat.com>
7671
7672 PR build/16445
7673 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7674 defined after including gdb_proc_service.h.
7675
7676 2014-01-16 Doug Evans <dje@google.com>
7677
7678 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7679 (match_dll): Use it.
7680
7681 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7682
7683 * target.h (target_ops) <read_btrace>: Change parameters and
7684 return type to allow error reporting.
7685 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7686 trace reading errors on.
7687 * linux-low.c (linux_low_read_btrace): Pass trace reading
7688 errors on.
7689 (linux_low_disable_btrace): New.
7690
7691 2014-01-15 Doug Evans <dje@google.com>
7692
7693 * inferiors.c (thread_id_to_gdb_id): Delete.
7694 * inferiors.h (thread_id_to_gdb_id): Delete.
7695
7696 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7697
7698 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7699 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7700 versions.
7701
7702 2014-01-08 Pedro Alves <palves@redhat.com>
7703
7704 * server.c (handle_status): Don't discard previous queued stop
7705 replies or thread's pending status here.
7706 (main) <disconnection>: Do it here instead.
7707
7708 2014-01-08 Pedro Alves <palves@redhat.com>
7709
7710 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7711 * server.c (visit_actioned_threads, handle_pending_status): New
7712 function.
7713 (handle_v_cont): Factor out parts to ...
7714 (resume): ... this new function. If in all-stop, and a thread
7715 being resumed has a pending status, report it without actually
7716 resuming.
7717 (myresume): Adjust to use the new 'resume' function.
7718 (clear_pending_status_callback, set_pending_status_callback)
7719 (find_status_pending_thread_callback): New functions.
7720 (handle_status): Handle the case of multiple threads having
7721 interesting statuses to report. Report threads' real last signal
7722 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7723 with an interesting thread to report the status for, instead of
7724 always reporting the status of the first thread.
7725
7726 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7727
7728 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7729 * gdbreplay.c (gdbreplay_version): Likewise.
7730
7731 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7732
7733 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7734 iov.iov_len with the real length in use.
7735
7736 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7737
7738 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7739 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7740 for all targets that use win32-low.c.
7741 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7742 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7743
7744 2013-12-13 Pedro Alves <palves@redhat.com>
7745
7746 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7747 if equal to TARGET_WAITKIND_LOADED.
7748 * win32-low.c (cached_status): New static global.
7749 (win32_wait): Add declaration.
7750 (do_initial_child_stuff): Flush all initial pending debug events
7751 up to the initial breakpoint.
7752 (win32_wait): If CACHED_STATUS was set, return that instead
7753 of doing a real wait. Remove the code resuming the execution
7754 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7755 during the initial phase. Also remove the code changing
7756 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7757 TARGET_WAITKIND_STOPPED.
7758
7759 2013-12-11 Yao Qi <yao@codesourcery.com>
7760
7761 * notif.c (handle_notif_ack): Return 0 if no notification
7762 matches.
7763
7764 2013-11-20 Doug Evans <dje@google.com>
7765
7766 * linux-low.c (linux_set_resume_request): Fix comment.
7767
7768 2013-11-20 Doug Evans <dje@google.com>
7769
7770 * linux-low.c (resume_status_pending_p): Tweak comment.
7771
7772 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7773
7774 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7775 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7776 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7777 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7778 (srv_amd64_regobj): Add amd64-mpx.o.
7779 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7780 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7781 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7782 * i387-fp.c (num_pl_bnd_register) Added constant.
7783 (num_pl_bnd_cfg_registers) Added constant.
7784 (struct i387_xsave) Added reserved area and MPX fields.
7785 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7786 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7787 function.
7788 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7789 (init_registers_amd64_mpx_linux): Declare new function.
7790 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7791 (x86_64_regmap): Add MPX registers.
7792 (x86_linux_read_description): Add MPX case.
7793 (initialize_low_arch): Initialize MPX targets.
7794
7795 2013-11-18 Tom Tromey <tromey@redhat.com>
7796
7797 * configure: Rebuild.
7798 * configure.ac: Don't check for stdlib.h.
7799 * gdbreplay.c: Unconditionally include stdlib.h.
7800
7801 2013-11-18 Tom Tromey <tromey@redhat.com>
7802
7803 * config.in: Rebuild.
7804 * configure: Rebuild.
7805 * configure.ac: Don't use AC_HEADER_DIRENT.
7806
7807 2013-11-18 Tom Tromey <tromey@redhat.com>
7808
7809 * server.h: Don't check HAVE_STRING_H.
7810 * gdbreplay.c: Don't check HAVE_STRING_H.
7811 * configure: Rebuild.
7812
7813 2013-11-18 Tom Tromey <tromey@redhat.com>
7814
7815 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7816 LIBGNU.
7817
7818 2013-11-08 Tom Tromey <tromey@redhat.com>
7819
7820 * configure, config.in: Rebuild.
7821 * configure.ac: Remove unused configury.
7822
7823 2013-11-08 Tom Tromey <tromey@redhat.com>
7824
7825 * acinclude.m4: Include common.m4, codeset.m4.
7826 * configure, config.in: Rebuild.
7827 * configure.ac: Use GDB_AC_COMMON.
7828
7829 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7830
7831 * linux-s390-low.c (HWCAP_S390_TE): New define.
7832 (s390_arch_setup): Consider the TE field in the HWCAP for
7833 determining 'have_regset_tdb'.
7834
7835 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7836
7837 PR gdb/16014
7838 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7839 call to sizeof.
7840
7841 2013-10-02 Pedro Alves <palves@redhat.com>
7842
7843 * server.c (process_serial_event): Don't output "GDBserver
7844 exiting" if GDB is connected through stdio.
7845 * target.c (mywait): Likewise, be silent if GDB is connected
7846 through stdio.
7847
7848 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7849
7850 * lynx-low.c (lynx_add_threads_after_attach): New function.
7851 (lynx_attach): Remove call to add_thread. Add call to
7852 lynx_add_threads_after_attach instead.
7853
7854 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7855
7856 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7857 * config.in, configure: Regenerated.
7858
7859 2013-09-18 Yao Qi <yao@codesourcery.com>
7860
7861 PR server/15959
7862 * server.c (start_inferior): Clear 'resume_info'.
7863
7864 2013-09-16 Jiong Wang <jiwang@tilera.com>
7865
7866 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7867 for each register.
7868
7869 2013-09-16 Jiong Wang <jiwang@tilera.com>
7870
7871 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7872 linux-tile-low.o to srv_tgtobj.
7873
7874 2013-09-16 Will Newton <will.newton@linaro.org>
7875
7876 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7877 out regs.
7878
7879 2013-09-06 Pedro Alves <palves@redhat.com>
7880
7881 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7882 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7883 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7884 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7885 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7886 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7887
7888 2013-09-06 Pedro Alves <palves@redhat.com>
7889
7890 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7891 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7892
7893 2013-09-06 Pedro Alves <palves@redhat.com>
7894
7895 * linux-amd64-ipa.c: Include tracepoint.h.
7896 * linux-i386-ipa.c: Include tracepoint.h.
7897
7898 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7899
7900 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7901 (ps_get_thread_area): New function.
7902
7903 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7904
7905 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7906 (initialize_low_arch): Call init_registers_crisv32 rather than
7907 init_register_crisv32.
7908
7909 2013-09-05 Pedro Alves <palves@redhat.com>
7910
7911 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7912 to ...
7913 * hostio.h: ... this new file.
7914 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7915 win32-low.c: Include hostio.h.
7916
7917 2013-09-05 Pedro Alves <palves@redhat.com>
7918
7919 * server.h (gdb_client_data, handler_func, callback_handler_func)
7920 (delete_file_handler, add_file_handler, append_callback_event)
7921 (delete_callback_event, start_event_loop, initialize_event_loop):
7922 Move to event-loop.h and include it.
7923 * event-loop.h: New file.
7924
7925 2013-09-05 Pedro Alves <palves@redhat.com>
7926
7927 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7928 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7929 (loaded_dll, unloaded_dll): Move to ...
7930 * dll.h: ... this new file.
7931 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7932
7933 2013-09-05 Pedro Alves <palves@redhat.com>
7934
7935 * server.h (current_process, get_thread_process, all_processes)
7936 (add_inferior_to_list, for_each_inferior, current_inferior)
7937 (remove_inferior, add_process, remove_process, find_process_pid)
7938 (have_started_inferiors_p, have_attached_inferiors_p)
7939 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7940 (clear_inferiors, find_inferior, find_inferior_id)
7941 (inferior_target_data, set_inferior_target_data)
7942 (inferior_regcache_data, set_inferior_regcache_data): Move to
7943 inferiors.h, and include it.
7944 * inferiors.h: New file.
7945
7946 2013-09-05 Pedro Alves <palves@redhat.com>
7947
7948 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7949 Move ...
7950 * ax.h: ... here.
7951
7952 2013-09-05 Pedro Alves <palves@redhat.com>
7953
7954 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7955 tracepoint.h.
7956 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7957 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7958 (handle_tracepoint_general_set, handle_tracepoint_query)
7959 (tracepoint_finished_step, tracepoint_was_hit)
7960 (release_while_stepping_state_list, current_traceframe)
7961 (in_readonly_region, traceframe_read_mem)
7962 (fetch_traceframe_registers, traceframe_read_sdata)
7963 (traceframe_read_info, struct fast_tpoint_collect_status)
7964 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7965 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7966 (supply_fast_tracepoint_registers)
7967 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7968 (ipa_tdesc, claim_trampoline_space)
7969 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7970 (agent_mem_read, agent_get_trace_state_variable_value)
7971 (agent_set_trace_state_variable_value, agent_tsv_read)
7972 (agent_mem_read_string, get_raw_reg_func_addr)
7973 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7974 * tracepoint.h: ... this new file.
7975
7976 2013-09-05 Pedro Alves <palves@redhat.com>
7977
7978 * server.h (perror_with_name, error, fatal, warning, paddress)
7979 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7980 include it.
7981 * utils.h: New file.
7982
7983 2013-09-05 Pedro Alves <palves@redhat.com>
7984
7985 * server.h (remote_debug, noack_mode, transport_is_reliable)
7986 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7987 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7988 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7989 (write_enn, initialize_async_io, enable_async_io)
7990 (disable_async_io, check_remote_input_interrupt_request)
7991 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7992 (dead_thread_notify, prepare_resume_reply)
7993 (decode_address_to_semicolon, decode_address, decode_m_packet)
7994 (decode_M_packet, decode_X_packet, decode_xfer_write)
7995 (decode_search_memory_packet, unhexify, hexify)
7996 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7997 (look_up_one_symbol, relocate_instruction)
7998 (monitor_output): Move to remote-utils.h, and include it.
7999 * remote-utils.h: New file.
8000
8001 2013-09-05 Pedro Alves <palves@redhat.com>
8002
8003 * server.h (_): Delete.
8004
8005 2013-09-02 Pedro Alves <palves@redhat.com>
8006
8007 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8008 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8009 allocated.
8010 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8011
8012 2013-09-02 Pierre Muller <muller@sourceware.org>
8013
8014 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8015 or WriteProcessMemory complete successfully and handle
8016 ERROR_PARTIAL_COPY error.
8017
8018 2013-09-02 Pedro Alves <palves@redhat.com>
8019
8020 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8021 error instead of EIO.
8022
8023 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8024
8025 PR server/15604
8026 * linux-low.c: Include filestuff.h.
8027 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8028 * lynx-low.c: Include filestuff.h.
8029 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8030 * server.c: Include filestuff.h.
8031 (main): Call notice_open_fds.
8032 * spu-low.c: Include filestuff.h.
8033 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8034
8035 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8036
8037 * Makefile.in: Explain why ../target and ../nat are not
8038 listed as include file search paths.
8039 (linux-waitpid.o): New object file rule.
8040 * configure.srv (srv_native_linux_obj): New variable.
8041 Replace all occurrences of linux native object files with
8042 $srv_native_linux_obj.
8043 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8044 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8045 (linux_enable_event_reporting): Remove declaration.
8046 (my_waitpid): Moved to common/linux-waitpid.c.
8047 (linux_wait_for_event): Pass ptid when calling
8048 linux_enable_event_reporting.
8049 (linux_supports_tracefork_flag): Remove.
8050 (linux_enable_event_reporting): Likewise.
8051 (linux_tracefork_grandchild): Remove.
8052 (STACK_SIZE): Moved to common/linux-ptrace.c.
8053 (linux_tracefork_child): Remove.
8054 (linux_test_for_tracefork): Remove.
8055 (linux_look_up_symbols): Call linux_supports_traceclone.
8056 (initialize_low): Remove call to linux_test_for_tracefork.
8057 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8058 common/linux-ptrace.h.
8059 (PTRACE_TYPE_ARG4): Likewise.
8060 Include linux-ptrace.h.
8061
8062 2013-08-21 Pedro Alves <palves@redhat.com>
8063
8064 * config.in: Renegerate.
8065
8066 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8067
8068 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8069 (SFILES): Remove $(srcdir)/common/target-common.c and
8070 add $(srcdir)/target/waitstatus.c.
8071 (OBS): Remove target-common.o and add waitstatus.o.
8072 (server_h): Remove $(srcdir)/../common/target-common.h and
8073 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8074 and $(srcdir)/../target/waitstatus.h.
8075 (target-common.o): Remove.
8076 (waitstatus.o): New target object file.
8077 * target.h: Do not include target-common.h and
8078 include target/resume.h, target/wait.h and
8079 target/waitstatus.h.
8080
8081 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8082
8083 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8084 to PTRACE_TYPE_ARG3.
8085 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8086 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8087 PTRACE_TYPE_ARG4.
8088 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8089 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8090
8091 2013-07-27 Jie Zhang <jie@codesourcery.com>
8092 Daniel Jacobowitz <dan@codesourcery.com>
8093 Yao Qi <yao@codesourcery.com>
8094
8095 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8096 (mips-linux-watch.o): New rule.
8097 (mips_linux_watch_h): New variable.
8098 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8099 srv_tgtobj.
8100 * linux-mips-low.c: Include mips-linux-watch.h.
8101 (struct arch_process_info, struct arch_lwp_info): New.
8102 (update_watch_registers_callback): New function.
8103 (mips_linux_new_process, mips_linux_new_thread) New functions.
8104 (mips_linux_prepare_to_resume, mips_insert_point): New
8105 functions.
8106 (mips_remove_point, mips_stopped_by_watchpoint): New
8107 functions.
8108 (rsp_bp_type_to_target_hw_bp_type): New function.
8109 (mips_stopped_data_address): New function.
8110 (the_low_target): Add watchpoint support functions.
8111
8112 2013-07-27 Yao Qi <yao@codesourcery.com>
8113
8114 * i386-low.c: Include break-common.h.
8115 (enum target_hw_bp_type): Remove.
8116
8117 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8118
8119 * Makefile.in (SFILES): /common/target-common.c.
8120 (OBS): Add target-common.o.
8121 (server_h): Add $(srcdir)/../common/target-common.h.
8122 (target-common.o): New target.
8123 * server.c (queue_stop_reply_callback): Free
8124 status string after use.
8125 * target.c (target_waitstatus_to_string): Remove.
8126 * target.h: Include target-common.h.
8127 (resume_kind): Likewise.
8128 (target_waitkind): Likewise.
8129 (target_waitstatus): Likewise.
8130 (TARGET_WNOHANG): Likewise.
8131
8132 2013-07-04 Yao Qi <yao@codesourcery.com>
8133
8134 * Makefile.in (host_alias): Use @host_noncanonical@.
8135 (target_alias): Use @target_noncanonical@.
8136 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8137 ACX_NONCANONICAL_HOST.
8138 * configure: Regenerated.
8139
8140 Revert:
8141 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8142
8143 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8144 * configure: Rebuild.
8145 * Makefile.in (version_host, version_target): Get from configure.
8146 (version.c): Use $(version_host) and $(version_target).
8147
8148 2013-07-03 Pedro Alves <palves@redhat.com>
8149
8150 * Makefile.in (config.status): Depend on development.sh.
8151 * acinclude.m4: Include libmcheck.m4.
8152 * configure: Regenerate.
8153
8154 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8155
8156 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8157 attribute inside the parentheses.
8158 (winapi_DebugSetProcessKillOnExit): Ditto.
8159 (winapi_DebugBreakProcess): Ditto.
8160 (winapi_GenerateConsoleCtrlEvent): Ditto.
8161
8162 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8163
8164 * notif.h (notif_event): Add a dummy member to avoid compiler
8165 errors.
8166
8167 2013-07-01 Pedro Alves <palves@redhat.com>
8168
8169 * hostio.c (HOSTIO_PATH_MAX): Define.
8170 (require_filename, handle_open, handle_unlink, handle_readlink):
8171 Use it.
8172
8173 2013-07-01 Pedro Alves <palves@redhat.com>
8174
8175 * server.h: Include "pathmax.h".
8176 * linux-low.c: Don't include sys/param.h.
8177 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8178 MAXPATHLEN.
8179 * win32-low.c: Don't include sys/param.h.
8180 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8181
8182 2013-07-01 Pedro Alves <palves@redhat.com>
8183
8184 * event-loop.c: Don't check HAVE_UNISTD_H before including
8185 <unistd.h>.
8186 * gdbreplay.c: Likewise.
8187 * remote-utils.c: Likewise.
8188 * server.c: Likewise.
8189 * configure.ac: Don't check for unistd.h.
8190 * configure: Regenerate.
8191
8192 2013-06-28 Tom Tromey <tromey@redhat.com>
8193
8194 * Makefile.in (version.c): Use version.in, not
8195 common/version.in.
8196
8197 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8198
8199 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8200 * configure: Rebuild.
8201 * Makefile.in (version_host, version_target): Get from configure.
8202 (version.c): Use $(version_host) and $(version_target).
8203
8204 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8205
8206 Fix trace-status to output user name without trailing colon.
8207 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8208
8209 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8210
8211 Fix trace-status to output proper start-time and stop-time.
8212 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8213 output start time and stop time in hex as gdb expects.
8214
8215 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8216
8217 * tracepoint.c (build_traceframe_info_xml): Output trace state
8218 variables present in the trace buffer.
8219
8220 2013-06-24 Tom Tromey <tromey@redhat.com>
8221
8222 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8223 create-version.sh.
8224 (version.o): Remove.
8225 * gdbreplay.c: Include version.h.
8226 (version, host_name): Don't declare.
8227 * server.h: Include version.h.
8228 (version, host_name): Don't declare.
8229
8230 2013-06-12 Pedro Alves <palves@redhat.com>
8231
8232 * linux-x86-low.c (linux_is_elf64): Delete global.
8233 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8234 with local linux_pid_exe_is_elf_64_file use.
8235
8236 2013-06-11 Pedro Alves <palves@redhat.com>
8237
8238 * linux-low.c (regset_disabled, disable_regset): New functions.
8239 (regsets_fetch_inferior_registers)
8240 (regsets_store_inferior_registers): Use them.
8241 (initialize_regsets_info); Don't allocate the disabled_regsets
8242 array here.
8243 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8244 comment.
8245
8246 2013-06-11 Pedro Alves <palves@redhat.com>
8247
8248 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8249 xmalloc.
8250
8251 2013-06-11 Pedro Alves <palves@redhat.com>
8252
8253 * linux-x86-low.c (initialize_low_arch): Call
8254 init_registers_x32_avx_linux.
8255
8256 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8257
8258 Fix compatibility with Android Bionic.
8259 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8260 it is not empty.
8261
8262 2013-06-07 Pedro Alves <palves@redhat.com>
8263
8264 PR server/14823
8265 * Makefile.in (OBS): Add tdesc.o.
8266 (IPA_OBJS): Add tdesc-ipa.o.
8267 (tdesc-ipa.o): New rule.
8268 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8269 interface.
8270 * linux-low.c (new_inferior): Delete.
8271 (disabled_regsets, num_regsets): Delete.
8272 (linux_add_process): Adjust to set the new per-process
8273 new_inferior flag.
8274 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8275 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8276 was a stop. When calling arch_setup, switch the current inferior
8277 to the thread that got an event.
8278 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8279 (regsets_fetch_inferior_registers)
8280 (regsets_store_inferior_registers): New regsets_info parameter.
8281 Adjust to use it.
8282 (linux_register_in_regsets): New regs_info parameter. Adjust to
8283 use it.
8284 (register_addr, fetch_register, store_register): New usrregs_info
8285 parameter. Adjust to use it.
8286 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8287 parameter regs_info. Adjust to use it.
8288 (linux_fetch_registers): Get the current inferior's regs_info, and
8289 adjust to use it.
8290 (linux_store_registers): Ditto.
8291 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8292 (initialize_low): Don't initialize the target_regsets here. Call
8293 initialize_low_arch.
8294 * linux-low.h (target_regsets): Delete declaration.
8295 (struct regsets_info): New.
8296 (struct usrregs_info): New.
8297 (struct regs_info): New.
8298 (struct process_info_private) <new_inferior>: New field.
8299 (struct linux_target_ops): Delete the num_regs, regmap, and
8300 regset_bitmap fields. New field regs_info.
8301 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8302 * i387-fp.c (num_xmm_registers): Delete.
8303 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8304 calls to new interface.
8305 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8306 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8307 Infer the number of xmm registers from the regcache's target
8308 description.
8309 * i387-fp.h (num_xmm_registers): Delete.
8310 * inferiors.c (add_thread): Don't install the thread's regcache
8311 here.
8312 * proc-service.c (gregset_info): Fetch the current inferior's
8313 regs_info. Adjust to use it.
8314 * regcache.c: Include tdesc.h.
8315 (register_bytes, reg_defs, num_registers)
8316 (gdbserver_expedite_regs): Delete.
8317 (get_thread_regcache): If the thread doesn't have a regcache yet,
8318 create one, instead of aborting gdbserver.
8319 (regcache_invalidate_one): Rename to ...
8320 (regcache_invalidate_thread): ... this.
8321 (regcache_invalidate_one): New.
8322 (regcache_invalidate): Only invalidate registers of the current
8323 process.
8324 (init_register_cache): Add target_desc parameter, and use it.
8325 (new_register_cache): Ditto. Assert the target description has a
8326 non zero registers_size.
8327 (regcache_cpy): Add assertions. Adjust.
8328 (realloc_register_cache, set_register_cache): Delete.
8329 (registers_to_string, registers_from_string): Adjust.
8330 (find_register_by_name, find_regno, find_register_by_number)
8331 (register_cache_size): Add target_desc parameter, and use it.
8332 (free_register_cache_thread, free_register_cache_thread_one)
8333 (regcache_release, register_cache_size): New.
8334 (register_size): Add target_desc parameter, and use it.
8335 (register_data, supply_register, supply_register_zeroed)
8336 (supply_regblock, supply_register_by_name, collect_register)
8337 (collect_register_as_string, collect_register_by_name): Adjust.
8338 * regcache.h (struct target_desc): Forward declare.
8339 (struct regcache) <tdesc>: New field.
8340 (init_register_cache, new_register_cache): Add target_desc
8341 parameter.
8342 (regcache_invalidate_thread): Declare.
8343 (regcache_invalidate_one): Delete declaration.
8344 (regcache_release): Declare.
8345 (find_register_by_number, register_cache_size, register_size)
8346 (find_regno): Add target_desc parameter.
8347 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8348 declarations.
8349 * remote-utils.c: Include tdesc.h.
8350 (outreg, prepare_resume_reply): Adjust.
8351 * server.c: Include tdesc.h.
8352 (gdbserver_xmltarget): Delete declaration.
8353 (get_features_xml, process_serial_event): Adjust.
8354 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8355 declare.
8356 (struct process_info) <tdesc>: New field.
8357 (ipa_tdesc): Declare.
8358 * tdesc.c: New file.
8359 * tdesc.h: New file.
8360 * tracepoint.c: Include tdesc.h.
8361 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8362 (get_context_regcache): Adjust to pass ipa_tdesc down.
8363 (do_action_at_tracepoint): Adjust to get the register cache size
8364 from the context regcache's description.
8365 (traceframe_walk_blocks): Adjust to get the register cache size
8366 from the current trace frame's description.
8367 (traceframe_get_pc): Adjust to get current trace frame's
8368 description and pass it down.
8369 (gdb_collect): Adjust to get the register cache size from the
8370 IPA's description.
8371 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8372 (gdbserver_xmltarget): Delete.
8373 (initialize_low_tracepoint): Set the ipa's target description.
8374 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8375 (initialize_low_tracepoint): Set the ipa's target description.
8376 * linux-x86-low.c: Include tdesc.h.
8377 [__x86_64__] (is_64bit_tdesc): New.
8378 (ps_get_thread_area, x86_get_thread_area): Use it.
8379 (i386_cannot_store_register): Rename to ...
8380 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8381 (i386_cannot_fetch_register): Rename to ...
8382 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8383 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8384 to new interface.
8385 (target_regsets): Rename to ...
8386 (x86_regsets): ... this.
8387 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8388 interface.
8389 (x86_siginfo_fixup): Use is_64bit_tdesc.
8390 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8391 (tdesc_x32_avx_linux, tdesc_x32_linux)
8392 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8393 Declare.
8394 (x86_linux_update_xmltarget): Delete.
8395 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8396 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8397 (AMD64_LINUX_USER64_CS): New.
8398 (x86_linux_read_description): New, based on
8399 x86_linux_update_xmltarget.
8400 (same_process_callback): New.
8401 (x86_arch_setup_process_callback): New.
8402 (x86_linux_update_xmltarget): New.
8403 (x86_regsets_info): New.
8404 (amd64_linux_regs_info): New.
8405 (i386_linux_usrregs_info): New.
8406 (i386_linux_regs_info): New.
8407 (x86_linux_regs_info): New.
8408 (x86_arch_setup): Reimplement.
8409 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8410 (x86_emit_ops): Ditto.
8411 (the_low_target): Adjust. Install x86_linux_regs_info,
8412 x86_cannot_fetch_register, and x86_cannot_store_register.
8413 (initialize_low_arch): New.
8414 * linux-ia64-low.c (tdesc_ia64): Declare.
8415 (ia64_fetch_register): Adjust.
8416 (ia64_usrregs_info, regs_info): New globals.
8417 (ia64_regs_info): New function.
8418 (the_low_target): Adjust.
8419 (initialize_low_arch): New function.
8420 * linux-sparc-low.c (tdesc_sparc64): Declare.
8421 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8422 Adjust.
8423 (sparc_arch_setup): New function.
8424 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8425 (the_low_target): Adjust.
8426 (initialize_low_arch): New function.
8427 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8428 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8429 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8430 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8431 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8432 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8433 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8434 (tdesc_powerpc_isa205_vsx64l): Declare.
8435 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8436 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8437 (ppc_set_pc, ppc_get_hwcap): Adjust.
8438 (ppc_usrregs_info): Forward declare.
8439 (!__powerpc64__) ppc_regmap_adjusted: New global.
8440 (ppc_arch_setup): Adjust to the current process'es target
8441 description.
8442 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8443 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8444 (ppc_store_evrregset): Adjust.
8445 (target_regsets): Rename to ...
8446 (ppc_regsets): ... this, and make static.
8447 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8448 (ppc_regs_info): New function.
8449 (the_low_target): Adjust.
8450 (initialize_low_arch): New function.
8451 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8452 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8453 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8454 (tdesc_s390x_linux64v2): Declare.
8455 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8456 (s390_fill_gregset, s390_store_last_break): Adjust.
8457 (target_regsets): Rename to ...
8458 (s390_regsets): ... this, and make static.
8459 (s390_get_pc, s390_set_pc): Adjust.
8460 (s390_get_hwcap): New target_desc parameter, and use it.
8461 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8462 (s390_arch_setup): Adjust to set the current process'es target
8463 description. Don't adjust the regmap.
8464 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8465 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8466 (regs_info_3264): New globals.
8467 (s390_regs_info): New function.
8468 (the_low_target): Adjust.
8469 (initialize_low_arch): New function.
8470 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8471 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8472 [__mips64] (init_registers_mips_linux)
8473 (init_registers_mips_dsp_linux): Delete defines.
8474 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8475 (have_dsp): New global.
8476 (mips_read_description): New, based on mips_arch_setup.
8477 (mips_arch_setup): Reimplement.
8478 (get_usrregs_info): New function.
8479 (mips_cannot_fetch_register, mips_cannot_store_register)
8480 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8481 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8482 (target_regsets): Rename to ...
8483 (mips_regsets): ... this, and make static.
8484 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8485 (dsp_regs_info, regs_info): New globals.
8486 (mips_regs_info): New function.
8487 (the_low_target): Adjust.
8488 (initialize_low_arch): New function.
8489 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8490 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8491 Declare.
8492 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8493 (arm_read_description): New, with bits factored from
8494 arm_arch_setup.
8495 (arm_arch_setup): Reimplement.
8496 (target_regsets): Rename to ...
8497 (arm_regsets): ... this, and make static.
8498 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8499 (arm_regs_info): New function.
8500 (the_low_target): Adjust.
8501 (initialize_low_arch): New function.
8502 * linux-m68k-low.c (tdesc_m68k): Declare.
8503 (target_regsets): Rename to ...
8504 (m68k_regsets): ... this, and make static.
8505 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8506 (m68k_regs_info): New function.
8507 (m68k_arch_setup): New function.
8508 (the_low_target): Adjust.
8509 (initialize_low_arch): New function.
8510 * linux-sh-low.c (tdesc_sharch): Declare.
8511 (target_regsets): Rename to ...
8512 (sh_regsets): ... this, and make static.
8513 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8514 (sh_regs_info, sh_arch_setup): New functions.
8515 (the_low_target): Adjust.
8516 (initialize_low_arch): New function.
8517 * linux-bfin-low.c (tdesc_bfin): Declare.
8518 (bfin_arch_setup): New function.
8519 (bfin_usrregs_info, regs_info): New globals.
8520 (bfin_regs_info): New function.
8521 (the_low_target): Adjust.
8522 (initialize_low_arch): New function.
8523 * linux-cris-low.c (tdesc_cris): Declare.
8524 (cris_arch_setup): New function.
8525 (cris_usrregs_info, regs_info): New globals.
8526 (cris_regs_info): New function.
8527 (the_low_target): Adjust.
8528 (initialize_low_arch): New function.
8529 * linux-cris-low.c (tdesc_crisv32): Declare.
8530 (cris_arch_setup): New function.
8531 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8532 (cris_regs_info): New function.
8533 (the_low_target): Adjust.
8534 (initialize_low_arch): New function.
8535 * linux-m32r-low.c (tdesc_m32r): Declare.
8536 (m32r_arch_setup): New function.
8537 (m32r_usrregs_info, regs_info): New globals.
8538 (m32r_regs_info): Adjust.
8539 (initialize_low_arch): New function.
8540 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8541 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8542 (tic6x_usrregs_info): Forward declare.
8543 (tic6x_read_description): New function, based on ...
8544 (tic6x_arch_setup): ... this. Reimplement.
8545 (target_regsets): Rename to ...
8546 (tic6x_regsets): ... this, and make static.
8547 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8548 (tic6x_regs_info): New function.
8549 (the_low_target): Adjust.
8550 (initialize_low_arch): New function.
8551 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8552 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8553 (target_regsets): Rename to ...
8554 (xtensa_regsets): ... this, and make static.
8555 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8556 globals.
8557 (xtensa_arch_setup, xtensa_regs_info): New functions.
8558 (the_low_target): Adjust.
8559 (initialize_low_arch): New function.
8560 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8561 (nios2_arch_setup): Set the current process'es tdesc.
8562 (target_regsets): Rename to ...
8563 (nios2_regsets): ... this.
8564 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8565 (nios2_regs_info): New function.
8566 (the_low_target): Adjust.
8567 (initialize_low_arch): New function.
8568 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8569 (aarch64_arch_setup): Set the current process'es tdesc.
8570 (target_regsets): Rename to ...
8571 (aarch64_regsets): ... this.
8572 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8573 (aarch64_regs_info): New function.
8574 (the_low_target): Adjust.
8575 (initialize_low_arch): New function.
8576 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8577 globals.
8578 (target_regsets): Rename to ...
8579 (tile_regsets): ... this.
8580 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8581 (tile_regs_info): New function.
8582 (tile_arch_setup): Set the current process'es tdesc.
8583 (the_low_target): Adjust.
8584 (initialize_low_arch): New function.
8585 * spu-low.c (tdesc_spu): Declare.
8586 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8587 * win32-arm-low.c (tdesc_arm): Declare.
8588 (arm_arch_setup): New function.
8589 (the_low_target): Install arm_arch_setup instead of
8590 init_registers_arm.
8591 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8592 (init_windows_x86): Rename to ...
8593 (i386_arch_setup): ... this. Set `win32_tdesc'.
8594 (the_low_target): Adjust.
8595 * win32-low.c (win32_tdesc): New global.
8596 (child_add_thread): Don't create the thread cache here.
8597 (do_initial_child_stuff): Set the new process'es tdesc.
8598 * win32-low.h (struct target_desc): Forward declare.
8599 (win32_tdesc): Declare.
8600 * lynx-i386-low.c (tdesc_i386): Declare global.
8601 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8602 * lynx-low.c (lynx_tdesc): New global.
8603 (lynx_add_process): Set the new process'es tdesc.
8604 * lynx-low.h (struct target_desc): Forward declare.
8605 (lynx_tdesc): Declare global.
8606 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8607 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8608 * nto-low.c (nto_tdesc): New global.
8609 (do_attach): Set the new process'es tdesc.
8610 * nto-low.h (struct target_desc): Forward declare.
8611 (nto_tdesc): Declare.
8612 * nto-x86-low.c (tdesc_i386): Declare.
8613 (nto_x86_arch_setup): Set `nto_tdesc'.
8614
8615 2013-06-04 Gary Benson <gbenson@redhat.com>
8616
8617 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8618 to qSupported response when appropriate.
8619 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8620 with nonzero-length annex.
8621 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8622 arguments supplied in annex.
8623
8624 2013-05-31 Doug Evans <dje@google.com>
8625
8626 PR server/15594
8627 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8628 64 bits in 64-cross-32 environment.
8629
8630 2013-05-28 Pedro Alves <palves@redhat.com>
8631
8632 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8633 (aarch64-without-fpu.c): Delete rule.
8634 * configure.srv (aarch64*-*-linux*): Remove references to
8635 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8636 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8637 declaration.
8638
8639 2013-05-24 Pedro Alves <palves@redhat.com>
8640
8641 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8642 instead of strchr/decode_address. Error if the range isn't split
8643 with a ','. Don't assume there's be a ':' in the action.
8644
8645 2013-05-23 Yao Qi <yao@codesourcery.com>
8646 Pedro Alves <palves@redhat.com>
8647
8648 * linux-low.c (lwp_in_step_range): New function.
8649 (linux_wait_1): If the thread was range stepping and stopped
8650 outside the stepping range, report the stop to GDB. Otherwise,
8651 continue stepping. Add range stepping debug output.
8652 (linux_set_resume_request): Copy the step range from the resume
8653 request to the lwp.
8654 (linux_supports_range_stepping): New.
8655 (linux_target_ops) <supports_range_stepping>: Set to
8656 linux_supports_range_stepping.
8657 * linux-low.h (struct linux_target_ops)
8658 <supports_range_stepping>: New field.
8659 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8660 * linux-x86-low.c (x86_supports_range_stepping): New.
8661 (the_low_target) <supports_range_stepping>: Set to
8662 x86_supports_range_stepping.
8663 * server.c (handle_v_cont): Handle 'r' action.
8664 (handle_v_requests): Append ";r" if the target supports range
8665 stepping.
8666 * target.h (struct thread_resume) <step_range_start,
8667 step_range_end>: New fields.
8668 (struct target_ops) <supports_range_stepping>:
8669 New field.
8670 (target_supports_range_stepping): New macro.
8671
8672 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8673
8674 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8675 confusion in comment.
8676
8677 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8678
8679 * lynx-low.c (struct process_info_private): New type.
8680 (lynx_add_process): New function.
8681 (lynx_create_inferior, lynx_attach): Replace calls to
8682 add_process by calls to lynx_add_process.
8683 (lynx_resume): If PTID is null, then try using
8684 current_process()->private->last_wait_event_ptid.
8685 Add comments.
8686 (lynx_clear_inferiors): Delete. The contents of that function
8687 has been inlined in lynx_mourn;
8688 (lynx_wait_1): Save the ptid in the process's private data.
8689 (lynx_mourn): Free the process' private data. Replace call
8690 to lynx_clear_inferiors by call to clear_inferiors.
8691
8692 2013-05-17 Yao Qi <yao@codesourcery.com>
8693
8694 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8695 the right place.
8696
8697 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8698
8699 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8700 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8701 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8702 PT_TEXT_END_ADDR guards. Update comments.
8703 (linux_target_op) <read_offsets>: Conditionally define to
8704 linux_read_offsets if the target is UCLIBC and if it defines
8705 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8706
8707 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8708 Andrew Jenner <andrew@codesourcery.com>
8709
8710 * Makefile.in (SFILES): Add linux-nios2-low.c.
8711 (clean): Add action to delete nios2-linux.c.
8712 (nios2-linux.c): New rule.
8713 * configure.srv: Add nios2*-*-linux*.
8714 * linux-nios2-low.c: New.
8715
8716 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8717
8718 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8719
8720 2013-04-25 Hui Zhu <hui@codesourcery.com>
8721
8722 PR gdb/15186
8723 * ax.c (ax_printf): Add fflush.
8724
8725 2013-04-22 Tom Tromey <tromey@redhat.com>
8726
8727 * Makefile.in (SFILES): Add filestuff.c.
8728 (OBS): Add filestuff.o.
8729 (filestuff.o): New target.
8730 * config.in, configure: Rebuild.
8731 * configure.ac: Check for fdwalk, pipe2.
8732
8733 2013-04-17 Pedro Alves <palves@redhat.com>
8734
8735 * configure.ac (USE_THREAD_DB): Delete variable.
8736 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8737 Don't AC_SUBST USE_THREAD_DB.
8738 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8739 * config.in, configure: Regenerate.
8740
8741 2013-04-16 Pedro Alves <palves@redhat.com>
8742
8743 * linux-low.h (struct lwp_info) <thread_known>: Move under
8744 the USE_THREAD_DB #ifdef.
8745
8746 2013-04-16 Pedro Alves <palves@redhat.com>
8747
8748 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8749 (linux-low.o): Delete rule.
8750 * linux-low.h: Always include "gdb_thread_db.h" instead of
8751 conditionally including thread_db.h.
8752 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8753 HAVE_THREAD_DB_H.
8754
8755 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8756
8757 * Makefile.in (install-only): Fix make install regression.
8758
8759 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8760
8761 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8762 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8763 installation.
8764 * gdbserver.1: Remove.
8765
8766 2013-03-22 Pedro Alves <palves@redhat.com>
8767
8768 * linux-low.c (handle_extended_wait): Don't call
8769 linux_enable_event_reporting.
8770
8771 2013-03-15 Tony Theodore <tonyt@logyst.com>
8772
8773 PR build/9098:
8774 * Makefile.in (SHELL): Use @SHELL@.
8775
8776 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8777
8778 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8779 compiler warning.
8780
8781 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8782
8783 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8784 Remove extraneous NULL element.
8785
8786 2013-03-13 Yao Qi <yao@codesourcery.com>
8787
8788 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8789 'V' block in trace frame.
8790
8791 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8792
8793 * target.h (struct target_ops): Add btrace ops.
8794 (target_supports_btrace): New macro.
8795 (target_enable_btrace): New macro.
8796 (target_disable_btrace): New macro.
8797 (target_read_btrace): New macro.
8798 * gdbthread.h (struct thread_info): Add btrace field.
8799 * server.c: Include btrace-common.h.
8800 (handle_btrace_general_set): New function.
8801 (handle_btrace_enable): New function.
8802 (handle_btrace_disable): New function.
8803 (handle_general_set): Call handle_btrace_general_set.
8804 (handle_qxfer_btrace): New function.
8805 (struct qxfer qxfer_packets[]): Add btrace entry.
8806 * inferiors.c (remove_thread): Disable btrace.
8807 * linux-low: Include linux-btrace.h.
8808 (linux_low_enable_btrace): New function.
8809 (linux_low_read_btrace): New function.
8810 (linux_target_ops): Add btrace ops.
8811 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8812 Add srv_linux_btrace=yes.
8813 (x86_64-*-linux*): Add linux-btrace.o.
8814 Add srv_linux_btrace=yes.
8815 * configure.ac: Define HAVE_LINUX_BTRACE.
8816 * config.in: Regenerated.
8817 * configure: Regenerated.
8818
8819 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8820
8821 * server.c (handle_qxfer): Preserve error message if -3 is
8822 returned.
8823 (qxfer): Document the -3 return value.
8824
8825 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8826
8827 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8828 (linux_btrace_h): New variable.
8829 (linux-btrace.o): New rule.
8830
8831 2013-03-08 Stan Shebs <stan@codesourcery.com>
8832 Hafiz Abid Qadeer <abidh@codesourcery.com>
8833
8834 * tracepoint.c (trace_buffer_size): New global.
8835 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8836 (init_trace_buffer): Change to one-argument function. Allocate
8837 trace buffer memory.
8838 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8839 handle QTBuffer:size packet.
8840 (cmd_bigqtbuffer_size): New function.
8841 (initialize_tracepoint): Call init_trace_buffer with
8842 DEFAULT_TRACE_BUFFER_SIZE.
8843 * server.c (handle_query): Add QTBuffer:size in the
8844 supported packets.
8845
8846 2013-03-07 Yao Qi <yao@codesourcery.com>
8847
8848 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8849 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8850 of -1.
8851 (cmd_qtsp): Adjust condition. Do post increment.
8852 Set cur_action and cur_step_action back to 0.
8853
8854 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8855
8856 PR server/15236
8857 * linux-low.c (linux_write_memory): Return early success if LEN is
8858 zero.
8859
8860 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8861
8862 * configure.srv: Add x86_64-*-cygwin* as target.
8863
8864 2013-02-28 Tom Tromey <tromey@redhat.com>
8865
8866 * configure.ac: Invoke AC_SYS_LARGEFILE.
8867 * configure, config.in: Rebuild.
8868
8869 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8870
8871 * win32-low.c: Throughout, fix format strings and casts of
8872 printf-like functions to avoid type related warnings on all
8873 platforms.
8874 (get_child_debug_event): Print dwDebugEventCode as hex since
8875 that's how it's usually documented.
8876
8877 2013-02-28 Yao Qi <yao@codesourcery.com>
8878
8879 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8880 pulongest.
8881
8882 2013-02-27 Jiong Wang <jiwang@tilera.com>
8883
8884 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8885 (reg-tilegx32.c): New rule.
8886 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8887 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8888 different register info initializer according to elf class.
8889 (init_registers_tilgx32): New function. The tilegx32 register info
8890 initializer.
8891 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8892 (tile_store_gregset): Likewise.
8893
8894 2013-02-27 Yao Qi <yao@codesourcery.com>
8895
8896 * server.c (process_point_options): Print debug message when
8897 debug_threads is true.
8898
8899 2013-02-26 Yao Qi <yao@codesourcery.com>
8900
8901 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8902
8903 2013-02-19 Pedro Alves <palves@redhat.com>
8904 Kai Tietz <ktietz@redhat.com>
8905
8906 PR gdb/15161
8907
8908 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8909 instead of strtoul to extract address from packet.
8910 (process_serial_event) <'z'>: Likewise.
8911
8912 2013-02-18 Yao Qi <yao@codesourcery.com>
8913
8914 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8915
8916 2013-02-14 Pedro Alves <palves@redhat.com>
8917
8918 Plug memory leak.
8919
8920 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8921 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8922
8923 2013-02-14 Pedro Alves <palves@redhat.com>
8924
8925 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8926
8927 2013-02-14 Pedro Alves <palves@redhat.com>
8928
8929 * tracepoint.c (save_string): Delete.
8930 (add_tracepoint_action): Use savestring instead of save_string.
8931
8932 2013-02-12 Pedro Alves <palves@redhat.com>
8933
8934 * linux-xtensa-low.c: Ditto.
8935 * xtensa-xtregs.c: Ditto.
8936
8937 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8938
8939 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8940 thread_db.
8941
8942 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8943
8944 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8945 aarch64_num_wp_regs and aarch64_num_bp_regs to
8946 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8947
8948 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8949
8950 * linux-aarch64-low.c (ps_get_thread_area): Replace
8951 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8952
8953 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8954 Marcus Shawcroft <marcus.shawcroft@arm.com>
8955 Nigel Stephens <nigel.stephens@arm.com>
8956 Yufeng Zhang <yufeng.zhang@arm.com>
8957
8958 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8959 (aarch64.c, aarch64-without-fpu.c): New targets.
8960 * configure.srv (aarch64*-*-linux*): New.
8961 * linux-aarch64-low.c: New file.
8962
8963 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8964
8965 * linux-low.c (handle_extended_wait, linux_create_inferior)
8966 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8967 (dequeue_one_deferred_signal, linux_resume_one_thread)
8968 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8969 (linux_tracefork_grandchild, linux_test_for_tracefork)
8970 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8971 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8972 where the argument is 0.
8973
8974 2013-01-25 Yao Qi <yao@codesourcery.com>
8975
8976 * event-loop.c: Include "queue.h".
8977 (gdb_event_p): New typedef.
8978 (struct gdb_event) <next_event>: Remove.
8979 (event_queue): Change to QUEUE(gdb_event_p).
8980 (async_queue_event): Remove.
8981 (gdb_event_xfree): New.
8982 (initialize_event_loop): New.
8983 (process_event): Use API from QUEUE.
8984 (wait_for_event): Likewise.
8985 * server.c (main): Call initialize_event_loop.
8986 * server.h (initialize_event_loop): Declare.
8987
8988 2013-01-18 Yao Qi <yao@codesourcery.com>
8989
8990 * ax.h (struct eval_agent_expr_context): New.
8991 (gdb_eval_agent_expr): Update declaration.
8992 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8993 TFRAME. Add new argument CTX.
8994 * server.h (struct eval_agent_expr_context): Declare.
8995 (agent_mem_read, agent_tsv_read): Update declaration.
8996 (agent_mem_read_string): Likewise.
8997 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8998 (add_traceframe_block): Add new argument TPOINT.
8999 Increase TPOINT->traceframe_usage.
9000 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9001 eval_tracepoint_agent_expr.
9002 (condition_true_at_tracepoint): Likewise.
9003 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9004 (agent_mem_read_string, agent_tsv_read): Likewise.
9005
9006 2013-01-16 Yao Qi <yao@codesourcery.com>
9007
9008 * linux-low.c (linux_resume_one_lwp): Don't check
9009 'lwp->bp_reinsert != 0'.
9010
9011 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9012 Pedro Alves <palves@redhat.com>
9013
9014 * lynx-low.c (ptrace_request_to_str): Define a temporary
9015 macro and use it to simplify this function's implementation.
9016
9017 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9018
9019 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9020 sets errno.
9021
9022 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9023
9024 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9025
9026 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9027
9028 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9029
9030 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9031
9032 * lynx-low.c (lynx_resume): Use the resume_info parameter
9033 to determine the ptid for the lynx_ptrace call, unless
9034 it is equal to minus_one_ptid, in which case we use the
9035 ptid of the current_inferior.
9036 (lynx_wait_1): After having received a thread create/exit
9037 event, resume the inferior's execution using the signaling
9038 thread's ptid, rather than the old ptid.
9039
9040 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9041
9042 * lynx-low.c (lynx_resume): Delete variable ret.
9043
9044 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9045
9046 * gdbreplay.c (gdbreplay_version): Update copyright year.
9047 * server.c (gdbserver_version): Likewise.
9048
9049 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9050
9051 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9052 new thread.
9053
9054 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9055
9056 * lynx-low.c (ptrace_request_to_str): Add handling for
9057 PTRACE_GETTRACESIG.
9058
9059 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9060
9061 * lynx-low.c (lynx_attach): Delete variable new_process.
9062
9063 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9064
9065 * lynx-low.c (lynx_create_inferior): Delete variable
9066 new_process.
9067
9068 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9069
9070 * lynx-low.c (ptrace_request_to_str): Do not handle
9071 PTRACE_GETTHREADLIST if this macro does not exist.
9072
9073 2012-12-15 Yao Qi <yao@codesourcery.com>
9074
9075 * Makefile.in (OBS): Add notif.o.
9076 * notif.c, notif.h: New.
9077 * server.c: Include "notif.h".
9078 (struct vstop_notif) <next>: Remove.
9079 <base>: New field.
9080 (queue_stop_reply): Update.
9081 (push_event, send_next_stop_reply): Remove.
9082 (discard_queued_stop_replies): Update.
9083 (notif_stop): New variable.
9084 (handle_v_stopped): Remove.
9085 (handle_v_requests): Don't call handle_v_stopped. Call
9086 handle_ack_notif instead.
9087 (queue_stop_reply_callback): Call notif_event_enque instead
9088 of queue_stop_reply.
9089 (handle_status): Don't call send_next_stop_reply, call
9090 notif_write_event instead.
9091 (kill_inferior_callback): Likewise.
9092 (detach_or_kill_inferior_callback): Likewise.
9093 (main): Call initialize_notif.
9094 (process_serial_event): Call QUEUE_is_empty.
9095 (handle_target_event): Call notif_push instead of push event.
9096 * server.h (push_event): Remove declaration.
9097
9098 2012-12-10 Tom Tromey <tromey@redhat.com>
9099
9100 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9101 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9102 macros.
9103 (.c.o): Rewrite.
9104 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9105 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9106 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9107 (amd64-linux-ipa.o, ax.o): Rewrite.
9108 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9109 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9110 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9111 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9112 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9113 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9114 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9115 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9116 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9117 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9118 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9119 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9120 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9121 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9122 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9123 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9124 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9125 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9126 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9127 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9128 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9129 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9130 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9131 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9132 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9133 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9134 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9135 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9136 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9137 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9138 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9139 (reg-tilegx.o): Remove.
9140 (all_object_files): New macro.
9141 Include .deps files.
9142 * aclocal.m4, configure: Rebuild.
9143 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9144 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9145 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9146
9147 2012-12-05 Tom Tromey <tromey@redhat.com>
9148
9149 PR gdb/14917:
9150 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9151
9152 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9153
9154 * configure.ac: Check for linux/perf_event.h.
9155 * config.in: Regenerated.
9156 * configure: Regenerated.
9157
9158 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9159
9160 * hostio.c (handle_readlink): Decrease buffer size
9161 parameter passed to readlink by one byte.
9162
9163 2012-11-26 Yao Qi <yao@codesourcery.com>
9164
9165 * configure.ac (build_warnings): Append '-Wempty-body'.
9166 * configure: Regenerated.
9167 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9168 body.
9169
9170 2012-11-15 Pierre Muller <muller@sourceware.org>
9171
9172 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9173 * config.in: Regenerate.
9174 * configure: Regenerate.
9175 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9176 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9177 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9178 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9179 header.
9180 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9181 instead of <sys/wait.h> header.
9182 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9183
9184 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9185
9186 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9187 (various make rules): Remove -DGDBSERVER
9188
9189 2012-11-09 Yao Qi <yao@codesourcery.com>
9190
9191 * spu-low.c (current_ptid): Move it to ..
9192 * gdbthread.h: ... here. New.
9193 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9194 * server.c (myresume, process_serial_event): Likewise.
9195 * thread-db.c (thread_db_find_new_threads): Likewise.
9196 * tracepoint.c (run_inferior_command): Likewise.
9197
9198 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9199
9200 * server.c (handle_search_memory_1): Include access length in
9201 warning message.
9202
9203 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9204
9205 * linux-crisv32-low.c: Fix compile errors.
9206
9207 2012-09-04 Yao Qi <yao@codesourcery.com>
9208
9209 * tracepoint.c (cmd_qtsv): Adjust debug message.
9210 Don't check CUR_TPOINT.
9211
9212 2012-08-28 Yao Qi <yao@codesourcery.com>
9213
9214 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9215 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9216 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9217 Remove declarations of xmalloc, xreallloc, xstrdup and
9218 freeargv.
9219 * Makefile.in (libiberty_h): New.
9220 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9221 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9222
9223 2012-08-23 Yao Qi <yao@codesourcery.com>
9224
9225 * server.h: Remove declaration of 'xsnprintf'.
9226
9227 2012-08-22 Keith Seitz <keiths@redhat.com>
9228
9229 * server.h: Include build-gnulib-gbserver/config.h.
9230 * gdbreplay.c: Likewise.
9231
9232 2012-08-08 Doug Evans <dje@google.com>
9233
9234 * Makefile.in (SFILES): Add gdb_vecs.c.
9235 (OBS): Add gdb_vecs.o.
9236 (gdb_vecs_h, host_defs_h): New variables.
9237 (thread-db.o): Add $(gdb_vecs_h) dependency.
9238 (gdb_vecs.o): New rule.
9239 * thread-db.c: #include "gdb_vecs.h".
9240 (thread_db_load_search): Use a vector to iterate over path elements.
9241 Handle text appearing after "$pdir".
9242
9243 * configure.ac: Add check for strstr.
9244 * config.in: Regenerate.
9245 * configure: Regenerate.
9246
9247 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9248
9249 * hostio.c (handle_pread): If pread fails, fall back to attempting
9250 lseek/read.
9251 (handle_pwrite): Likewise for pwrite.
9252
9253 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9254
9255 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9256 between unsupported TYPE and unimplementable ADDR/LEN combination.
9257 (arm_insert_point): Act on new return value.
9258
9259 2012-07-31 Pedro Alves <palves@redhat.com>
9260
9261 * server.c (process_point_options): Only skip tokens if we find
9262 one that is unrecognized. Don't treat 'X' specially while
9263 skipping unrecognized tokens.
9264
9265 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9266
9267 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9268 to 4-byte-align HW breakpoint addresses for Thumb.
9269
9270 2012-07-27 Yao Qi <yao@codesourcery.com>
9271
9272 PR remote/14161.
9273
9274 * server.h: Declare gdb_agent_about_to_close.
9275 * target.c (kill_inferior): Include "agent.h".
9276 New. Send command 'kill'.
9277 * target.h (kill_inferior): Removed macro.
9278 * tracepoint.c (gdb_agent_about_to_close): New.
9279 (gdb_agent_helper_thread): Handle command 'close'.
9280 Wait endlessly until the inferior stops.
9281 Install gdb_agent_remove_socket to atexit hook.
9282 (agent_socket_name): New static variable.
9283 (gdb_agent_socket_init): Replace local variable 'name' with
9284 'agent_socket_name'.
9285 (gdb_agent_remove_socket): New.
9286
9287 2012-07-27 Yao Qi <yao@codesourcery.com>
9288
9289 * server.c (process_point_options): Stop at 'X' when parsing.
9290
9291 2012-07-19 Michael Eager <eager@eagercon.com>
9292
9293 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9294 to hw_execute.
9295 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9296 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9297 hardware breakpoint.
9298
9299 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9300
9301 * gdbserver/linux-low.c (initialize_low): Call
9302 linux_ptrace_init_warnings.
9303
9304 2012-07-02 Doug Evans <dje@google.com>
9305
9306 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9307 pointer to int.
9308
9309 2012-07-02 Stan Shebs <stan@codesourcery.com>
9310
9311 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9312 (ax.o): Add it to build rule.
9313 (ax-ipa.o): Ditto.
9314 (OBS): Add format.o.
9315 (IPA_OBS): Add format.o.
9316 * server.c (handle_query): Claim support for breakpoint commands.
9317 (process_point_options): Add command case.
9318 (process_serial_event): Leave running if there are printfs in
9319 effect.
9320 * mem-break.h (any_persistent_commands): Declare.
9321 (add_breakpoint_commands): Declare.
9322 (gdb_no_commands_at_breakpoint): Declare.
9323 (run_breakpoint_commands): Declare.
9324 * mem-break.c (struct point_command_list): New struct.
9325 (struct breakpoint): New field command_list.
9326 (any_persistent_commands): New function.
9327 (add_commands_to_breakpoint): New function.
9328 (add_breakpoint_commands): New function.
9329 (gdb_no_commands_at_breakpoint): New function.
9330 (run_breakpoint_commands): New function.
9331 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9332 locally.
9333 * ax.c: Include format.h.
9334 (ax_printf): New function.
9335 (gdb_eval_agent_expr): Add printf opcode.
9336
9337 2012-06-13 Yao Qi <yao@codesourcery.com>
9338
9339 * server.c (start_inferior): Remove duplicated writes to fields
9340 'last_resume_kind' and 'last_status' of 'current_inferior'.
9341
9342 2012-06-12 Yao Qi <yao@codesourcery.com>
9343 Pedro Alves <palves@redhat.com>
9344
9345 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9346 comment.
9347 * server.c (handle_v_cont): Extend comment.
9348
9349 2012-06-11 Yao Qi <yao@codesourcery.com>
9350
9351 * linux-low.c (linux_attach): Add 'static'.
9352
9353 2012-06-06 Yao Qi <yao@codesourcery.com>
9354
9355 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9356
9357 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9358
9359 Fix gcc -flto compilation warning.
9360 * server.c (main): Make variable multi_mode and attach volatile.
9361
9362 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9363
9364 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9365 if the platform doesn't know about it.
9366
9367 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9368
9369 * Makefile.in (SFILES): Add linux-tile-low.c.
9370 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9371 * configure.srv: Handle tilegx-*-linux*.
9372 * linux-tile-low.c: New file.
9373
9374 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9375
9376 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9377
9378 2012-05-24 Pedro Alves <palves@redhat.com>
9379
9380 PR gdb/7205
9381
9382 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9383
9384 2012-05-24 Pedro Alves <palves@redhat.com>
9385
9386 PR gdb/7205
9387
9388 Replace target_signal with gdb_signal throughout.
9389
9390 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9391
9392 * linux-low.c (linux_store_registers): Avoid the copying sequence
9393 when no data has been retrieved by ptrace.
9394
9395 2012-05-22 Will Deacon <will.deacon@arm.com>
9396
9397 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9398 Include asm/ptrace.h.
9399 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9400 already defined.
9401
9402 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9403
9404 * linux-low.c (linux_store_registers): Don't re-retrieve data
9405 with ptrace that has already been obtained from /proc. Always
9406 copy any data retrieved with ptrace to the buffer supplied.
9407
9408 2012-05-11 Yao Qi <yao@codesourcery.com>
9409 Pedro Alves <palves@redhat.com>
9410
9411 * linux-low.c (enum stopping_threads_kind): New.
9412 (stopping_threads): Change type to `enum stopping_threads_kind'.
9413 (handle_extended_wait): If stopping and suspending threads, leave
9414 the new_lwp suspended too.
9415 (linux_wait_for_event): Adjust.
9416 (stop_all_lwps): Set `stopping_threads' to
9417 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9418 whether we're suspending threads or just stopping them. Assert no
9419 recursion happens.
9420
9421 2012-04-29 Yao Qi <yao@codesourcery.com>
9422
9423 * server.h: Move some code to ...
9424 * gdbthread.h: ... here. New.
9425 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9426 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9427 (nto-low.o, win32-low.o): Likewise.
9428 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9429 * regcache.c, remote-utils.c, server.c: Likewise.
9430 * target.c, tracepoint.c, win32-low.c: Likewise.
9431
9432 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9433
9434 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9435 (PTRACE_ARG4_TYPE): Likewise.
9436 (PTRACE_XFER_TYPE): Likewise.
9437 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9438 ptrace to PTRACE_ARG3_TYPE.
9439 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9440 (PTRACE_ARG4_TYPE): Likewise.
9441 (PTRACE_XFER_TYPE): Likewise.
9442 (linux_detach_one_lwp): Cast fourth argument of
9443 ptrace to long then PTRACE_ARG4_TYPE.
9444 (regsets_fetch_inferior_registers): Cast third argument of
9445 ptrace to long then PTRACE_ARG3_TYPE.
9446 (regsets_store_inferior_registers): Likewise.
9447
9448 2012-04-20 Pedro Alves <palves@redhat.com>
9449
9450 * configure: Regenerate.
9451
9452 2012-04-19 Pedro Alves <palves@redhat.com>
9453
9454 * Makefile.in (GNULIB_BUILDDIR): New.
9455 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9456 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9457 (all, install-only, uninstall, clean-info, all-lib, clean): No
9458 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9459 (maintainer-clean realclean distclean): Use subdir_do.
9460 (subdir_do): New.
9461 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9462 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9463 * acinclude.m4: Include acx_configure_dir.m4.
9464 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9465 calls. Call AC_PROG_RANLIB. Configure gnulib using
9466 ACX_CONFIGURE_DIR.
9467 (GNULIB): New.
9468 (GNULIB_STDINT_H): Adjust.
9469 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9470 * gdbreplay.c: Include build-gnulib/config.h.
9471 * server.h: Likewise.
9472 * aclocal.m4: Regenerate.
9473 * config.in: Regenerate.
9474 * configure: Regenerate.
9475
9476 2012-04-19 Pedro Alves <palves@redhat.com>
9477
9478 * Makefile.in (LIBGNU, INCGNU): Adjust.
9479 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9480 (all, install-only, uninstall, clean-info, all-lib, clean)
9481 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9482 * configure.ac: Adjust AC_OUTPUT output.
9483 * aclocal.m4: Regenerate.
9484 * configure: Regenerate.
9485
9486 2012-04-19 Pedro Alves <palves@redhat.com>
9487
9488 * Makefile.in (generated_files): New.
9489 (server_h): Remove the explicit dependency on config.h, and depend
9490 on $generated_files.
9491
9492 2012-04-19 Pedro Alves <palves@redhat.com>
9493
9494 * Makefile.in (INCGNU): Add -Ignulib.
9495
9496 2012-04-19 Pedro Alves <palves@redhat.com>
9497
9498 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9499 (INCGNU): ... this, and spell out -I here.
9500 (GNULIB_LIB): Rename to ...
9501 (LIBGNU): ... this.
9502 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9503
9504 2012-04-19 Pedro Alves <palves@redhat.com>
9505
9506 * config.in: Regenerate.
9507
9508 2012-04-19 Pedro Alves <palves@redhat.com>
9509
9510 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9511 * server.h (memmem): Remove declaration.
9512 * config.in: Regenerate.
9513 * configure: Regenerate.
9514
9515 2012-04-19 Yao Qi <yao@codesourcery.com>
9516
9517 * Makefile.in (SFILES): Add common/vec.c.
9518 (OBS): Add vec.o.
9519 (vec.o): New rule.
9520
9521 2012-04-19 Yao Qi <yao@codesourcery.com>
9522
9523 * remote-utils.c (prepare_resume_reply): Replace with macro
9524 target_core_of_thread.
9525 * server.c (handle_qxfer_threads_proper): Likewise.
9526 * target.h (traget_core_of_thread): New macro.
9527
9528 2012-04-18 Pedro Alves <palves@redhat.com>
9529
9530 * aclocal.m4: Regenerate.
9531 * configure: Regenerate.
9532
9533 2012-04-16 Yao Qi <yao@codesourcery.com>
9534
9535 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9536 duplicated on address.
9537
9538 2012-04-16 Yao Qi <yao@codesourcery.com>
9539
9540 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9541 (struct tracepoint_action_ops) <send>: New field.
9542 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9543 (agent_expr_send, x_tracepoint_action_send): New.
9544 (l_tracepoint_action_send): New.
9545 (cmd_qtdp): Download and install tracepoint
9546 according to `use_agent'.
9547 (run_inferior_command): Add one more parameter `len'.
9548 Update callers.
9549 (tracepoint_send_agent): New.
9550 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9551
9552 2012-04-16 Yao Qi <yao@codesourcery.com>
9553
9554 * tracepoint.c (download_tracepoints): Moved to ...
9555 (cmd_qtstart): ... here.
9556
9557 2012-04-14 Yao Qi <yao@codesourcery.com>
9558
9559 * tracepoint.c: Include inttypes.h.
9560 (struct collect_memory_action): Use sized types.
9561 (struct tracepoint): Likewise.
9562 (cmd_qtdp, stop_tracing): Update print specifiers.
9563 (cmd_qtp, response_tracepoint): Likewise.
9564 (collect_data_at_tracepoint): Likewise.
9565 (collect_data_at_step): Likewise.
9566
9567 2012-04-14 Yao Qi <yao@codesourcery.com>
9568
9569 Import gnulib module inttypes.
9570 * aclocal.m4, config.in, configure: Regenerated.
9571
9572 2012-04-14 Yao Qi <yao@codesourcery.com>
9573
9574 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9575 Makefile and config.status at last.
9576
9577 2012-04-13 Yao Qi <yao@codesourcery.com>
9578
9579 * tracepoint.c: Include stdint.h unconditionally.
9580
9581 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9582
9583 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9584 on BFD_HAVE_SYS_PROCFS_TYPE.
9585 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9586 * configure: Regenerate.
9587 * config.in: Likewise.
9588
9589 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9590
9591 * Makefile.in (clean): Also remove x32.c x32-linux.c
9592 x32-avx.c x32-avx-linux.c.
9593 (x32.o): New target.
9594 (x32.c): Likewise.
9595 (x32-linux.o): Likewise.
9596 (x32-linux.c): Likewise.
9597 (x32-avx.o): Likewise.
9598 (x32-avx.c): Likewise.
9599 (x32-avx-linux.o): Likewise.
9600 (x32-avx-linux.c): Likewise.
9601
9602 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9603 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9604 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9605 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9606 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9607 i386/x32-avx-linux.xml.
9608
9609 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9610 (init_registers_x32_avx_linux): Likwise.
9611 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9612 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9613
9614 2012-04-13 Pedro Alves <palves@redhat.com>
9615
9616 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9617 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9618 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9619 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9620 the sub-make.
9621
9622 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9623
9624 * linux-x86-low.c (compat_x32_clock_t): New.
9625 (compat_x32_siginfo_t): Likewise.
9626 (compat_x32_siginfo_from_siginfo): Likewise.
9627 (siginfo_from_compat_x32_siginfo): Likewise.
9628 (linux_is_elf64): Likewise.
9629 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9630 and siginfo_from_compat_x32_siginfo for x32.
9631 (x86_arch_setup): Set linux_is_elf64.
9632
9633 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9634
9635 PR gdb/13969
9636 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9637 e_machine field.
9638 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9639 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9640 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9641 compatible with process.
9642
9643 2012-04-12 Yao Qi <yao@codesourcery.com>
9644
9645 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9646 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9647 (install-only, install-info, clean): Handle sub dir gnulib.
9648 (all-lib, am--refresh): New targets.
9649 (memmem.o): Remove target.
9650 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9651 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9652 (AC_REPLACE_FUNCS): Remove memmem.
9653 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9654 (AC_OUTPUT): Generate Makefile in gnulib/.
9655 * aclocal.m4, config.in, configure: Regenerated.
9656
9657 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9658
9659 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9660
9661 2012-04-05 Pedro Alves <palves@redhat.com>
9662
9663 -Werror=strict-aliasing
9664
9665 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9666 pointer.
9667
9668 2012-04-04 Pedro Alves <palves@redhat.com>
9669
9670 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9671 (sparc_store_gregset_from_stack, sparc_store_gregset)
9672 (sparc_breakpoint_at): Fix formatting.
9673
9674 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9675
9676 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9677 are available.
9678 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9679 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9680 * config.in: Regenerate.
9681 * configure: Likewise.
9682
9683 2012-03-29 Pedro Alves <palves@redhat.com>
9684
9685 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9686 Correct ptrace arguments.
9687
9688 2012-03-28 Pedro Alves <palves@redhat.com>
9689
9690 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9691 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9692 (IA64_FR1_REGNUM): New defines.
9693 (ia64_fetch_register): New.
9694 (the_low_target): Install it.
9695 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9696 field.
9697 * linux-low.c (linux_fetch_registers): Try the
9698 the_low_target.fetch_register hook first.
9699
9700 * linux-arm-low.c (the_low_target): Adjust.
9701 * linux-bfin-low.c (the_low_target): Adjust.
9702 * linux-cris-low.c (the_low_target): Adjust.
9703 * linux-crisv32-low.c (the_low_target): Adjust.
9704 * linux-m32r-low.c (the_low_target): Adjust.
9705 * linux-m68k-low.c (the_low_target): Adjust.
9706 * linux-mips-low.c (the_low_target): Adjust.
9707 * linux-ppc-low.c (the_low_target): Adjust.
9708 * linux-s390-low.c (the_low_target): Adjust.
9709 * linux-sh-low.c (the_low_target): Adjust.
9710 * linux-sparc-low.c (the_low_target): Adjust.
9711 * linux-tic6x-low.c (the_low_target): Adjust.
9712 * linux-x86-low.c (the_low_target): Adjust.
9713 * linux-xtensa-low.c (the_low_target): Adjust.
9714
9715 2012-03-26 Pedro Alves <palves@redhat.com>
9716
9717 * server.c (handle_qxfer_libraries): Don't bail early if
9718 the_target->qxfer_libraries_svr4 is not NULL.
9719
9720 2012-03-26 Pedro Alves <palves@redhat.com>
9721
9722 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9723
9724 2012-03-23 Pedro Alves <palves@redhat.com>
9725
9726 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9727 "library-list-svr4" element's start tag when the the DSO list is
9728 empty.
9729
9730 2012-03-23 Pedro Alves <palves@redhat.com>
9731
9732 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9733 a variable whose type size is the same as the inferior's pointer
9734 size.
9735
9736 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9737
9738 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9739 struct siginfo.
9740 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9741 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9742 * linux-low.h: Include <signal.h>.
9743 (struct siginfo): Remove forward declaration.
9744 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9745 struct siginfo.
9746
9747 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9748
9749 * .gitignore: Ignore more files.
9750
9751 2012-03-19 Pedro Alves <palves@redhat.com>
9752 Jan Kratochvil <jan.kratochvil@redhat.com>
9753
9754 * server.c (cont_thread, general_thread): Add describing comments.
9755 (start_inferior): Clear `cont_thread'.
9756 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9757 of a process.
9758
9759 2012-03-15 Yao Qi <yao@codesourcery.com>
9760
9761 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9762 handling to ...
9763 (cmd_qtdp): ... here.
9764
9765 2012-03-15 Yao Qi <yao@codesourcery.com>
9766
9767 * tracepoint.c (struct tracepoint_action_ops): New.
9768 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9769 (m_tracepoint_action_download): New.
9770 (r_tracepoint_action_download): New.
9771 (x_tracepoint_action_download): New.
9772 (l_tracepoint_action_download): New.
9773 (add_tracepoint_action): Install `action->ops' according type.
9774 (download_tracepoint_1): Move code `download' function pointer
9775 of various tracepoint_action_ops.
9776
9777 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9778
9779 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9780 linux_ptrace_attach_warnings.
9781
9782 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9783
9784 * Makefile.in (linux-ptrace.o): New.
9785 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9786 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9787 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9788 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9789 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9790 of these targets.
9791 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9792
9793 2012-03-08 Yao Qi <yao@codesourcery.com>
9794 Pedro Alves <palves@redhat.com>
9795
9796 Fix PR server/13392.
9797 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9798 offset of JMP insn.
9799 * tracepoint.c (remove_tracepoint): New.
9800 (cmd_qtdp): Call remove_tracepoint when failed to install.
9801
9802 2012-03-07 Pedro Alves <palves@redhat.com>
9803
9804 * linux-low.c (get_detach_signal): New.
9805 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9806 Pass on pending signals to PTRACE_DETACH. Check the result of the
9807 ptrace call.
9808 * server.c (program_signals, program_signals_p): New.
9809 (handle_general_set): Handle QProgramSignals.
9810 * server.h (program_signals, program_signals_p): Declare.
9811
9812 2012-03-05 Pedro Alves <palves@redhat.com>
9813 Jan Kratochvil <jan.kratochvil@redhat.com>
9814
9815 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9816 New comment why.
9817
9818 2012-03-03 Yao Qi <yao@codesourcery.com>
9819
9820 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9821 agent_look_up_symbols.
9822
9823 2012-03-03 Yao Qi <yao@codesourcery.com>
9824
9825 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9826 (linux-x86-low.o): Likewise.
9827 * server.h: Remove in_process_agent_loaded.
9828 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9829 common/agent.c.
9830 Update callers.
9831
9832 2012-03-03 Yao Qi <yao@codesourcery.com>
9833
9834 * tracepoint.c (gdb_agent_capability): New global.
9835 (in_process_agent_loaded_ust): Renamed to
9836 `in_process_agent_supports_ust'.
9837 Update callers.
9838 (in_process_agent_supports_ust): Call agent_capability_check.
9839 (clear_installed_tracepoints): Assert that agent supports
9840 agent.
9841
9842 2012-03-03 Yao Qi <yao@codesourcery.com>
9843
9844 * linux-low.c (linux_supports_agent): New.
9845 (linux_target_ops): Initialize field `supports_agent' with
9846 linux_supports_agent.
9847 * target.h (struct target_ops) <supports_agent>: New.
9848 (target_supports_agent): New macro.
9849 * server.c (handle_general_set): Handle packet 'QAgent'.
9850 (handle_query): Send `QAgent+'.
9851 * Makefile.in (server.o): Depends on agent.h.
9852
9853 2012-03-03 Yao Qi <yao@codesourcery.com>
9854
9855 * Makefile.in (OBS): Add agent.o.
9856 Add new rule for agent.o.
9857 Track dependence of tracepoint.c on agent.h.
9858 * tracepoint.c (run_inferior_command_1):
9859 (run_inferior_command): Call agent_run_command.
9860 (gdb_ust_connect_sync_socket): Deleted. Move it to
9861 common/agent.c.
9862 (resume_thread, stop_thread): Likewise.
9863 (gdb_ust_socket_init): Renamed to ...
9864 (gdb_agent_socket_init): ... New.
9865 (gdb_ust_thread): Renamed to ...
9866 (gdb_agent_helper_thread): ... New.
9867 (gdb_ust_init): Move some code to ...
9868 (gdb_agent_init): ... here. New.
9869 [HAVE_UST]: Call gdb_ust_init.
9870 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9871 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9872 * config.in, configure: Regenerated.
9873
9874 2012-03-02 Pedro Alves <palves@redhat.com>
9875
9876 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9877 * linux-low.c (struct simple_pid_list): New.
9878 (stopped_pids): New a struct simple_pid_list pointer.
9879 (add_to_pid_list, pull_pid_from_list): New.
9880 (handle_extended_wait): Don't assume the first signal new children
9881 report is SIGSTOP. Adjust call to pull_pid_from_list.
9882 (linux_wait_for_lwp): Adjust.
9883
9884 2012-03-02 Yao Qi <yao@codesourcery.com>
9885
9886 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9887 debug log.
9888
9889 2012-03-02 Yao Qi <yao@codesourcery.com>
9890
9891 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9892 `stop_pc' and `tpoint'. Update caller.
9893
9894 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9895
9896 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9897 * linux-low.c (use_linux_regsets): New macro.
9898 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9899 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9900 (linux_register_in_regsets): New function.
9901 (usr_fetch_inferior_registers): Skip registers covered by
9902 regsets.
9903 (usr_store_inferior_registers): Likewise.
9904 (usr_fetch_inferior_registers): New macro.
9905 (usr_store_inferior_registers): Likewise.
9906 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9907 (linux_store_registers): Likewise.
9908 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9909 prototype.
9910 (init_registers_mips64_dsp_linux): Likewise.
9911 (init_registers_mips_linux): New macro.
9912 (init_registers_mips_dsp_linux): Likewise.
9913 (mips_dsp_num_regs): Likewise.
9914 (DSP_BASE, DSP_CONTROL): New fallback macros.
9915 (mips_base_regs): New macro.
9916 (mips_regmap): Use it. Fix the size.
9917 (mips_dsp_regmap): New variable.
9918 (mips_dsp_regset_bitmap): Likewise.
9919 (mips_arch_setup): New function.
9920 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9921 than mips_regmap.
9922 (mips_cannot_store_register): Likewise.
9923 (the_low_target): Update .arch_setup, .num_regs and .regmap
9924 initializers. Add .regset_bitmap initializer.
9925 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9926 initializer.
9927 * linux-bfin-low.c (the_low_target): Likewise.
9928 * linux-cris-low.c (the_low_target): Likewise.
9929 * linux-crisv32-low.c (the_low_target): Likewise.
9930 * linux-ia64-low.c (the_low_target): Likewise.
9931 * linux-m32r-low.c (the_low_target): Likewise.
9932 * linux-m68k-low.c (the_low_target): Likewise.
9933 * linux-ppc-low.c (the_low_target): Likewise.
9934 * linux-s390-low.c (the_low_target): Likewise.
9935 * linux-sh-low.c (the_low_target): Likewise.
9936 * linux-sparc-low.c (the_low_target): Likewise.
9937 * linux-tic6x-low.c (the_low_target): Likewise.
9938 * linux-x86-low.c (the_low_target): Likewise.
9939 * linux-xtensa-low.c (the_low_target): Likewise.
9940 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9941 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9942 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9943 srv_xmlfiles.
9944 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9945 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9946
9947 2012-02-29 Yao Qi <yao@codesourcery.com>
9948 Pedro Alves <palves@redhat.com>
9949
9950 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9951 `step_over_finished' is true.
9952
9953 2012-02-27 Pedro Alves <palves@redhat.com>
9954
9955 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9956 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9957
9958 2012-02-27 Pedro Alves <palves@redhat.com>
9959
9960 PR server/9684
9961 * linux-low.c (pid_is_stopped): New.
9962 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9963
9964 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9965
9966 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9967 of conditions.
9968
9969 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9970
9971 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9972
9973 2012-02-24 Luis Machado <lgustavo@codesourcery>
9974
9975 * server.c (handle_query): Advertise support for target-side
9976 breakpoint condition evaluation.
9977 (process_point_options): New function.
9978 (process_serial_event): When inserting a breakpoint, check for
9979 a target-side condition that should be evaluated.
9980
9981 * mem-break.c: Include regcache.h and ax.h.
9982 (point_cond_list_t): New data structure.
9983 (breakpoint) <cond_list>: New field.
9984 (find_gdb_breakpoint_at): Make non-static.
9985 (delete_gdb_breakpoint_at): Clear any target-side
9986 conditions.
9987 (clear_gdb_breakpoint_conditions): New function.
9988 (add_condition_to_breakpoint): Likewise.
9989 (add_breakpoint_condition): Likewise.
9990 (gdb_condition_true_at_breakpoint): Likewise.
9991 (gdb_breakpoint_here): Return result directly instead
9992 of going through a local variable.
9993
9994 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9995 (clear_gdb_breakpoint_conditions): Likewise.
9996 (add_breakpoint_condition): Likewise.
9997 (gdb_condition_true_at_breakpoint): Likewise.
9998
9999 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10000 (need_step_over_p): Take target-side breakpoint condition into
10001 consideration.
10002
10003 2012-02-24 Luis Machado <lgustavo@codesourcery>
10004
10005 * server.h: Include tracepoint.h.
10006 (agent_mem_read, agent_get_trace_state_variable_value,
10007 agent_set_trace_state_variable_value,
10008 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10009 get_set_tsv_func_addr): New prototypes.
10010
10011 * ax.h: New include file.
10012 * ax.c: New source file.
10013
10014 * tracepoint.c: Include ax.h.
10015 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10016 agent_expr, eval_result_type): Move to ax.h.
10017 (parse_agent_expr): Rename to ...
10018 (gdb_parse_agent_expr): ... this, make it non-static and move
10019 to ax.h.
10020 (unparse_agent_expr) Rename to ...
10021 (gdb_unparse_agent_expr): ... this, make it non-static and move
10022 to ax.h.
10023 (eval_agent_expr): Rename to ...
10024 (eval_tracepoint_agent_expr): ... this.
10025 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10026 forward declarations.
10027 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10028 (agent_get_trace_state_variable_value): New function.
10029 (agent_set_trace_state_variable_value): New function.
10030 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10031 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10032 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10033 (condition_true_at_tracepoint): Likewise.
10034 (parse_agent_expr): Rename to ...
10035 (gdb_parse_agent_expr): ... this and move to ax.c.
10036 (unparse_agent_expr): Rename to ...
10037 (gdb_unparse_agent_expr): ... this and move to ax.c.
10038 (gdb_agent_op_name): Move to ax.c.
10039 (eval_agent_expr): Rename to ...
10040 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10041 and move to ax.c.
10042 (eval_tracepoint_agent_expr): New function.
10043 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10044 non-static.
10045 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10046 ax.c.
10047 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10048 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10049 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10050 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10051 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10052 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10053 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10054 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10055 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10056 (compile_bytecodes): Remove forward declaration.
10057 (is_goto_target): Move to ax.c.
10058 (compile_bytecodes): Move to ax.c and call
10059 agent_get_trace_state_variable_value (...) and
10060 agent_set_trace_state_variable_value (...).
10061
10062 * Makefile.in: Update ax.c and IPA dependencies.
10063
10064 2012-02-24 Pedro Alves <palves@redhat.com>
10065
10066 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10067 (cmd_bigqtbuffer_circular): ... this. Only handle
10068 'QTBuffer:circular:'.
10069 (handle_tracepoint_general_set): Adjust.
10070
10071 2012-02-16 Yao Qi <yao@codesourcery.com>
10072
10073 * inferiors.c: Move code to ...
10074 * dll.c: .... here. New.
10075 * server.h: Declare clear_dlls.
10076 * Makefile.in (SFILES): Add dll.c.
10077 (OBS): Add dll.o
10078 (dll.o): New rule.
10079
10080 2012-02-11 Yao Qi <yao@codesourcery.com>
10081
10082 * server.c: (handle_monitor_command): Add a new parameter
10083 `own_buf'.
10084 (handle_query): Update caller.
10085
10086 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10087
10088 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10089 * configure, config.in: Regenerate.
10090 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10091 is not defined.
10092
10093 2012-02-02 Pedro Alves <palves@redhat.com>
10094
10095 Try SIGKILL first, then PTRACE_KILL.
10096 * linux-low.c (linux_kill_one_lwp): New.
10097 (linux_kill_one_lwp): Rename to ...
10098 (kill_one_lwp_callback): ... this. Use the new
10099 linux_kill_one_lwp.
10100
10101 2012-02-02 Pedro Alves <palves@redhat.com>
10102
10103 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10104 inferior.
10105
10106 2012-01-27 Pedro Alves <palves@redhat.com>
10107
10108 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10109 (elf_64_file_p): Make static.
10110 (linux_pid_exe_is_elf_64_file): New.
10111 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10112 Delete declarations.
10113 (linux_pid_exe_is_elf_64_file): Declare.
10114 * linux-x86-low.c (x86_arch_setup): Use
10115 linux_pid_exe_is_elf_64_file.
10116
10117 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10118
10119 * linux-low.c (linux_wait_for_event_1): Rename to ...
10120 (linux_wait_for_event): ... here and merge it with former
10121 linux_wait_for_event - new variable wait_ptid, use it.
10122 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10123
10124 2012-01-23 Pedro Alves <palves@redhat.com>
10125
10126 * server.c (main): Avoid yet another case of infinite loop while
10127 detaching/killing after a longjmp.
10128
10129 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10130
10131 Code cleanup.
10132 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10133
10134 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10135
10136 * hostio.c (handle_readlink): New function.
10137 (handle_vFile): Call it to handle "vFile:readlink" packets.
10138
10139 2012-01-20 Pedro Alves <palves@redhat.com>
10140 Ulrich Weigand <ulrich.weigand@linaro.org>
10141
10142 * server.c (handle_v_requests): Only support vAttach and vRun to
10143 start multiple processes when in extended protocol mode.
10144
10145 2012-01-17 Pedro Alves <palves@redhat.com>
10146
10147 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10148 memalign plus mprotect to allocate the scratch buffer.
10149
10150 2012-01-13 Pedro Alves <palves@redhat.com>
10151
10152 * server.c (attach_inferior): Clear `cont_thread'.
10153
10154 2012-01-13 Pedro Alves <palves@redhat.com>
10155
10156 * server.c (main): Avoid infinite loop while detaching/killing
10157 after a longjmp.
10158
10159 2012-01-09 Doug Evans <dje@google.com>
10160
10161 * server.c (start_inferior): Set last_ptid in --wrapper case.
10162
10163 2012-01-06 Yao Qi <yao@codesourcery.com>
10164
10165 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10166 defined.
10167 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10168
10169 2012-01-04 Yao Qi <yao@codesourcery.com>
10170
10171 * tracepoint.c (cmd_qtdp): Print debug message
10172 for static tracepoint.
10173
10174 2012-01-04 Yao Qi <yao@codesourcery.com>
10175
10176 * tracepoint.c (trace_vdebug): Differentiate debug message
10177 between gdbserver and IPA.
10178
10179 2012-01-03 Yao Qi <yao@codesourcery.com>
10180
10181 * tracepoint.c (tracepoint_was_hit): Don't collect for
10182 static tracepoint.
10183
10184 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10185
10186 * terminal.h: Reformat copyright header.
10187
10188 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10189
10190 * server.c (gdbserver_version): Update copyright year.
10191 * gdbreplay.c (gdbreplay_version): Likewise.
10192
10193 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10194
10195 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10196
10197 Revert:
10198 2011-12-18 Hui Zhu <teawater@gmail.com>
10199 * linux-low.c (linux_create_inferior): Save return value to ret.
10200
10201 2011-12-18 Hui Zhu <teawater@gmail.com>
10202
10203 * linux-low.c (linux_create_inferior): Save return value to ret.
10204
10205 2011-12-16 Doug Evans <dje@google.com>
10206
10207 * linux-low.c (linux_create_inferior): If stdio connection,
10208 redirect stdin from /dev/null, stdout to stderr.
10209 * remote-utils.c (remote_is_stdio): New static global.
10210 (remote_connection_is_stdio): New function.
10211 (remote_prepare): Handle stdio connection.
10212 (remote_open): Ditto.
10213 (remote_close): Don't close stdin for stdio connections.
10214 (read_prim,write_prim): New functions. Replace all calls to
10215 read/write to these.
10216 * server.c (main): Watch for "-" argument. Move call to
10217 remote_prepare before start_inferior.
10218 * server.h (STDIO_CONNECTION_NAME): New macro.
10219 (remote_connection_is_stdio): Declare.
10220
10221 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10222 in debugging output.
10223
10224 2011-12-15 Yao Qi <yao@codesourcery.com>
10225
10226 * tracepoint.c: Include sys/syscall.h.
10227 (gdb_ust_thread): Remove preprocessor conditional.
10228
10229 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10230
10231 * linux-low.c (linux_detach_one_lwp): Call
10232 the_low_target.prepare_to_resume before detaching.
10233
10234 2011-12-14 Yao Qi <yao@codesourcery.com>
10235
10236 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10237 of write.
10238
10239 2011-12-14 Yao Qi <yao@codesourcery.com>
10240
10241 * i386-low.c (i386_low_stopped_data_address): Initialize local
10242 variable `control'.
10243
10244 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10245
10246 PR remote/13492
10247
10248 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10249 DR_CONTROL unless necessary. Extend comments.
10250 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10251 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10252
10253 2011-12-13 Yao Qi <yao@codesourcery.com>
10254
10255 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10256 macros.
10257 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10258
10259 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10260
10261 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10262 Print new debug message for such case.
10263
10264 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10265
10266 Fix overlapping memcpy.
10267 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10268 the read_inferior_memory transfer.
10269 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10270 write_inferior_memory transfer.
10271 (set_fast_tracepoint_jump): New variable buf. Use it for the
10272 read_inferior_memory and write_inferior_memory transfers.
10273 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10274 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10275 Use it for the write_inferior_memory transfer.
10276 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10277 buffers.
10278
10279 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10280
10281 * linux-low.c (fetch_register, store_register): Make code
10282 consistent, fix formatting.
10283
10284 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10285
10286 * linux-low.c (usr_store_inferior_registers): Factor out code
10287 to handle individual registers into...
10288 (store_register): ... this new function.
10289
10290 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10291
10292 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10293 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10294 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10295 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10296 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10297 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10298 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10299 (srv_xmlfiles): Add new XML files.
10300
10301 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10302 and <sys/uio.h>.
10303 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10304 (init_registers_s390_linux32v1): Add prototype.
10305 (init_registers_s390_linux32v2): Likewise.
10306 (init_registers_s390_linux64v1): Likewise.
10307 (init_registers_s390_linux64v2): Likewise.
10308 (init_registers_s390x_linux64v1): Likewise.
10309 (init_registers_s390x_linux64v2): Likewise.
10310 (s390_num_regs): Increment to 52.
10311 (s390_regmap): Add orig_r2 register.
10312 (s390_num_regs_3264): Increment to 68.
10313 (s390_regmap_3264): Add orig_r2 register.
10314 (s390_collect_ptrace_register): Handle orig_r2 register.
10315 (s390_supply_ptrace_register): Likewise.
10316 (s390_fill_last_break): New function.
10317 (s390_store_last_break): Likewise.
10318 (s390_fill_system_call): New function.
10319 (s390_store_system_call): Likewise.
10320 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10321 register sets.
10322 (s390_check_regset): New function.
10323 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10324 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10325 Update target_regsets for available register sets.
10326
10327 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10328 Jan Kratochvil <jan.kratochvil@redhat.com>
10329
10330 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10331 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10332 New.
10333 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10334 * linux-low.h (struct process_info_private): New member r_debug.
10335 * server.c (handle_qxfer_libraries): Call
10336 the_target->qxfer_libraries_svr4.
10337 (handle_qxfer_libraries_svr4): New function.
10338 (qxfer_packets): New entry "libraries-svr4".
10339 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10340 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10341 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10342 PACKET_qXfer_libraries_svr4.
10343
10344 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10345
10346 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10347 PSW address/mask between 8-byte and 16-byte formats.
10348 (s390_supply_ptrace_register): Likewise.
10349 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10350 basic addressing mode bit.
10351
10352 2011-11-24 Stan Shebs <stan@codesourcery.com>
10353
10354 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10355
10356 2011-11-17 Stan Shebs <stan@codesourcery.com>
10357
10358 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10359 (tracing_start_time): New global.
10360 (tracing_stop_time): New global.
10361 (tracing_user_name): New global.
10362 (tracing_notes): New global.
10363 (tracing_stop_note): New global.
10364 (cmd_qtstart): Set traceframe_usage, start_time.
10365 (stop_tracing): Set stop_time.
10366 (cmd_qtstatus): Report additional status.
10367 (cmd_qtp): New function.
10368 (handle_tracepoint_query): Call it.
10369 (cmd_qtnotes): New function.
10370 (handle_tracepoint_general_set): Call it.
10371 (get_timestamp): Rename from tsv_get_timestamp.
10372
10373 2011-11-14 Stan Shebs <stan@codesourcery.com>
10374 Kwok Cheung Yeung <kcy@codesourcery.com>
10375
10376 * linux-x86-low.c (small_jump_insn): New.
10377 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10378 trampoline and error message, build a trampoline and issue a small
10379 jump instruction to it.
10380 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10381 trampoline and error message.
10382 (x86_get_min_fast_tracepoint_insn_len): New.
10383 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10384 * linux-low.h (struct linux_target_ops): Add arguments to
10385 install_fast_tracepoint_jump_pad operation, add new operation.
10386 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10387 arguments.
10388 (linux_get_min_fast_tracepoint_insn_len): New function.
10389 (linux_target_op): Add new operation.
10390 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10391 (gdb_trampoline_buffer_end): Ditto.
10392 (gdb_trampoline_buffer_error): Ditto.
10393 (struct ipa_sym_addresses): Add fields for new IPA variables.
10394 (symbol_list): Add entries for new IPA variables.
10395 (struct tracepoint): Add fields to hold the address range of the
10396 trampoline used by the tracepoint.
10397 (trampoline_buffer_head): New static variable.
10398 (trampoline_buffer_tail): Ditto.
10399 (claim_trampoline_space): New function.
10400 (have_fast_tracepoint_trampoline_buffer): New function.
10401 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10402 structure.
10403 (install_fast_tracepoint): Ditto, also add error buffer argument.
10404 (cmd_qtminftpilen): New function.
10405 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10406 (fast_tracepoint_from_trampoline_address): New function.
10407 (fast_tracepoint_collecting): Handle trampoline as part of jump
10408 pad space.
10409 (set_trampoline_buffer_space): New function.
10410 (initialize_tracepoint): Initialize new IPA variables.
10411 * target.h (struct target_ops): Add arguments to
10412 install_fast_tracepoint_jump_pad operation, add new
10413 get_min_fast_tracepoint_insn_len operation.
10414 (target_get_min_fast_tracepoint_insn_len): New.
10415 (install_fast_tracepoint_jump_pad): Add arguments.
10416 * server.h (IPA_BUFSIZ): Define.
10417 * linux-i386-ipa.c: Include extra header files.
10418 (initialize_fast_tracepoint_trampoline_buffer): New function.
10419 (initialize_low_tracepoint): Call it.
10420 * server.h (set_trampoline_buffer_space): Declare.
10421 (claim_trampoline_space): Ditto.
10422 (have_fast_tracepoint_trampoline_buffer): Ditto.
10423
10424 2011-11-14 Yao Qi <yao@codesourcery.com>
10425
10426 * server.c (handle_query): Handle InstallInTrace for qSupported.
10427 * tracepoint.c (add_tracepoint): Sort list.
10428 (install_tracepoint, download_tracepoint): New.
10429 (cmd_qtdp): Call them to install and download tracepoints.
10430 (sort_tracepoints): Removed.
10431 (cmd_qtstart): Update.
10432
10433 2011-11-14 Yao Qi <yao@codesourcery.com>
10434
10435 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10436 * mem-break.h: Declare.
10437 * tracepoint.c (cmd_qtstart): Move some code to ...
10438 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10439 New.
10440 (download_tracepoints): Move some code to ...
10441 (download_tracepoint_1): ... here. New.
10442
10443 2011-11-08 Yao Qi <yao@codesourcery.com>
10444
10445 * remote-utils.c (relocate_instruction): A comment fix.
10446
10447 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10448
10449 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10450 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10451 dr_status_mirror and dr_control_mirror from debug_reg_state.
10452 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10453 (i386_initial_stuff): Remove use of deleted globals.
10454 (i386_get_thread_context, i386_set_thread_context,
10455 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10456 from debug_reg_state.
10457
10458 2011-11-05 Yao Qi <yao@codesourcery.com>
10459
10460 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10461 address as TPOINT's.
10462
10463 2011-11-02 Stan Shebs <stan@codesourcery.com>
10464
10465 * tracepoint.c (agent_mem_read_string): New function.
10466 (eval_agent_expr): Call it for tracenz.
10467 * server.c (handle_query): Report support for tracenz.
10468
10469 2011-11-02 Yao Qi <yao@codesourcery.com>
10470
10471 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10472
10473 2011-11-02 Yao Qi <yao@codesourcery.com>
10474
10475 * target.h: Fix a typo in comment.
10476
10477 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10478
10479 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10480 clobber the breakpoints' shadows with fast tracepoint jumps.
10481 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10482 * target.c (write_inferior_memory): Also pass MYADDR down to
10483 check_mem_write.
10484
10485 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10486
10487 * configure.ac: Check support for personality routine.
10488 * configure: Regenerate.
10489 * config.in: Likewise.
10490 * linux-low.c: Include <sys/personality.h>.
10491 Define ADDR_NO_RANDOMIZE if necessary.
10492 (linux_create_inferior): Disable address space randomization when
10493 forking inferior, if requested.
10494 (linux_supports_disable_randomization): New function.
10495 (linux_target_ops): Install it.
10496 * server.h (disable_randomization): Declare.
10497 * server.c (disable_randomization): New global variable.
10498 (handle_general_set): Handle QDisableRandomization.
10499 (handle_query): Likewise for qSupported.
10500 (main): Support --disable-randomization and --no-disable-randomization
10501 command line arguments.
10502 * target.h (struct target_ops): Add supports_disable_randomization.
10503 (target_supports_disable_randomization): New macro.
10504
10505 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10506
10507 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10508 ifdef check.
10509 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10510 [!PT_GETDSBT] (target_loadmap): New definition.
10511 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10512 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10513 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10514 and PT_GETDSBT to LINUX_LOADMAP.
10515 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10516 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10517
10518 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10519
10520 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10521 (arm_linux_hwbp_cap): New static variable.
10522 (arm_linux_get_hwbp_cap): Replace by ...
10523 (arm_linux_init_hwbp_cap): ... this new function.
10524 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10525 (arm_linux_get_hw_watchpoint_count): Likewise.
10526 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10527 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10528 (arm_prepare_to_resume): Use perror_with_name instead of error.
10529
10530 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10531
10532 * linux-arm-low.c: Include <signal.h>.
10533 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10534 (struct arm_linux_hwbp_cap): New data type.
10535 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10536 (struct arm_linux_hw_breakpoint): New data type.
10537 (MAX_BPTS, MAX_WPTS): Define.
10538 (struct arch_process_info, struct arch_lwp_info): New data types.
10539 (arm_linux_get_hwbp_cap): New function.
10540 (arm_linux_get_hw_breakpoint_count): Likewise.
10541 (arm_linux_get_hw_watchpoint_count): Likewise.
10542 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10543 (arm_hwbp_control_initialize): Likewise.
10544 (arm_hwbp_control_is_enabled): Likewise.
10545 (arm_hwbp_control_is_initialized): Likewise.
10546 (arm_hwbp_control_disable): Likewise.
10547 (arm_linux_hw_breakpoint_equal): Likewise.
10548 (arm_linux_hw_point_initialize): Likewise.
10549 (struct update_registers_data): New data structure.
10550 (update_registers_callback: New function.
10551 (arm_insert_point): Likewise.
10552 (arm_remove_point): Likewise.
10553 (arm_stopped_by_watchpoint): Likewise.
10554 (arm_stopped_data_address): Likewise.
10555 (arm_new_process): Likewise.
10556 (arm_new_thread): Likewise.
10557 (arm_prepare_to_resume): Likewise.
10558 (the_low_target): Register arm_insert_point, arm_remove_point,
10559 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10560 arm_new_thread, and arm_prepare_to_resume.
10561
10562 2011-09-15 Stan Shebs <stan@codesourcery.com>
10563
10564 * server.h (struct emit_ops): Add compare-goto fields.
10565 * tracepoint.c (gdb_agent_op_sizes): New table.
10566 (emit_eq_goto): New function.
10567 (emit_ne_goto): New function.
10568 (emit_lt_goto): New function.
10569 (emit_le_goto): New function.
10570 (emit_gt_goto): New function.
10571 (emit_ge_goto): New function.
10572 (is_goto_target): New function.
10573 (compile_bytecodes): Recognize special cases of compare-goto
10574 combinations and call specialized emitters for them.
10575 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10576 (amd64_emit_ne_goto): New function.
10577 (amd64_emit_lt_goto): New function.
10578 (amd64_emit_le_goto): New function.
10579 (amd64_emit_gt_goto): New function.
10580 (amd64_emit_ge_goto): New function.
10581 (amd64_emit_ops): Add the new functions.
10582 (i386_emit_eq_goto): New function.
10583 (i386_emit_ne_goto): New function.
10584 (i386_emit_lt_goto): New function.
10585 (i386_emit_le_goto): New function.
10586 (i386_emit_gt_goto): New function.
10587 (i386_emit_ge_goto): New function.
10588 (i386_emit_ops): Add the new functions.
10589
10590 2011-09-08 Stan Shebs <stan@codesourcery.com>
10591
10592 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10593 (i386_emit_epilogue): Restore %ebx.
10594
10595 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10596
10597 * server.c (step_thread): Remove definition.
10598 (process_serial_event): Don't handle Hs.
10599 * server.h (step_thread): Remove declaration.
10600 * target.c (set_desired_inferior): Remove use of step_thread.
10601
10602 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10603
10604 * linux-low.c: Include linux-procfs.h.
10605 (linux_attach_lwp_1): Update comments.
10606 (linux_attach): Scan for existing threads when attaching to a
10607 process that is the tgid.
10608 * Makefile.in: Update dependencies.
10609
10610 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10611
10612 * configure.srv: Add linux-procfs.o dependencies.
10613
10614 2011-08-14 Yao Qi <yao@codesourcery.com>
10615
10616 * target.h (struct target_ops): Fix indent.
10617 * win32-low.c (win32_target_ops): Fix comment.
10618
10619 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10620 Yao Qi <yao@codesourcery.com>
10621
10622 * Makefile.in (clean): Remove tic6x-*.c files.
10623 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10624 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10625 (tic6x-c64xp-linux.c): Likewise.
10626 * configure.srv: Add support for tic6x-*-uclinux.
10627 * linux-tic6x-low.c: New.
10628 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10629
10630 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10631 Yao Qi <yao@codesourcery.com>
10632
10633 * target.h (struct target_ops): Add read_loadmap.
10634 * linux-low.c (struct target_loadseg): New type.
10635 (struct target_loadmap): New type.
10636 (linux_read_loadmap): New function.
10637 (linux_target_ops): Add linux_read_loadmap.
10638 * server.c (handle_query): Support qXfer:fdpic:read packet.
10639 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10640 to NULL.
10641
10642 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10643
10644 * win32-low.c: Include <stdint.h>.
10645
10646 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10647
10648 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10649 to the inferior here.
10650 (i386_remove_aligned_watchpoint): Ditto.
10651 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10652 fit part of the watchpoint in the debug registers.
10653 (i386_update_inferior_debug_regs): New.
10654 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10655 registers, and only update the inferior on success.
10656 (i386_low_remove_watchpoint): Ditto.
10657
10658 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10659
10660 * linux-low.c (compare_ints, unique, list_threads, show_process,
10661 linux_core_of_thread): Delete.
10662 (linux_target_ops): Change linux_core_of_thread to
10663 linux_common_core_of_thread.
10664 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10665 * utils.c (malloc_failure): Change type of argument.
10666 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10667 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10668 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10669 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10670 (IPA_OBJS): Add common-utils-ipa.o.
10671 (ptid_h, linux_osdata_h): New macros.
10672 (server_h): Add common/common-utils.h, common/xml-utils.h,
10673 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10674 common/ptid.h.
10675 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10676 ptid.o, buffer.o): New rules.
10677 (linux-low.o): Add common/linux-osdata.h as a dependency.
10678 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10679 * configure.ac: Add AC_HEADER_DIRENT check.
10680 * config.in: Regenerate.
10681 * configure: Regenerate.
10682 * remote-utils.c (xml_escape_text): Delete.
10683 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10684 buffer_xml_printf): Move to common/buffer.c.
10685 * server.c (main): Remove call to initialize_inferiors.
10686 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10687 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10688 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10689 internal_error, gdb_assert, gdb_assert_fail): Delete.
10690 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10691 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10692 common/buffer.h.
10693 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10694 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10695 initialize_inferiors): Delete.
10696
10697 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10698
10699 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10700 symbol error.
10701
10702 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10703
10704 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10705 assertion.
10706 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10707
10708 2011-05-26 Yao Qi <yao@codesourcery.com>
10709
10710 * Makefile.in (thread-db.o): Track dependence to
10711 common/gdb_thread_db.h.
10712 * thread-db.c: include gdb_thread_db.h from right place.
10713
10714 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10715
10716 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10717 __FILE__ and __LINE__ to internal_error.
10718
10719 2011-05-13 Doug Evans <dje@google.com>
10720
10721 * thread-db.c (try_thread_db_load_from_sdir): New function.
10722 (try_thread_db_load_from_dir): New function.
10723 (thread_db_load_search): Handle $sdir, ignore $pdir.
10724 Remove trying of system directories if search of
10725 libthread-db-search-path fails, that is now done via $sdir.
10726
10727 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10728
10729 * server.c (handle_query): Add EnableDisableTracepoints to the list
10730 of supported features.
10731 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10732 tracepoints.
10733 (cmd_qtenable_disable): New.
10734 (cmd_qtstart): Install tracepoints even if disabled.
10735 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10736 receiving a QTEnable or QTDisable packet.
10737 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10738 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10739 tracepoints.
10740 (gdb_probe): Skip data collection if static tracepoint is disabled.
10741
10742 2011-05-10 Doug Evans <dje@google.com>
10743
10744 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10745
10746 2011-05-04 Doug Evans <dje@google.com>
10747
10748 * linux-low.c (linux_join): Skip process lookup.
10749 * spu-low.c (spu_join): Ditto.
10750 * server.c (join_inferiors_callback): Delete.
10751 (process_serial_event): For 'D' packet (detach) call join_inferior
10752 directly.
10753
10754 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10755
10756 * README: Don't mention xscale*-*-linux*.
10757 * configure.srv (xscale*-*-linux*): Don't handle target.
10758
10759 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10760
10761 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10762 casting pointers.
10763 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10764 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10765 (i386_emit_void_call_2): Likewise.
10766
10767 2011-04-26 Yao Qi <yao@codesourcery.com>
10768
10769 * linux-low.c: Move common macros to linux-ptrace.h.
10770 Include linux-ptrace.h.
10771 * Makefile.in (linux_ptrace_h): New.
10772 (linux-low.o): Depends on linux-ptrace.h.
10773
10774 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10775
10776 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10777 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10778 (remote_prepare): New function with most of the TCP code from ...
10779 (remote_open): ... here. Detect PORT here unconditionally. Move also
10780 setting transport_is_reliable.
10781 * server.c (run_once): New variable.
10782 (gdbserver_usage): Document it.
10783 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10784 the first run if RUN_ONCE.
10785 * server.h (run_once, remote_prepare): New declarations.
10786
10787 2011-04-19 Tom Tromey <tromey@redhat.com>
10788
10789 * win32-low.c (handle_load_dll): Remove duplicate "the".
10790
10791 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10792
10793 Remove support for old Cygwin 1.5 versions.
10794 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10795 function to avoid warning.
10796 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10797 warning.
10798
10799 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10800
10801 * gdbserver/server.h (Macro _): Define it if not available.
10802
10803 2011-03-14 Michael Snyder <msnyder@vmware.com>
10804
10805 * hostio.c (handle_close): Remove unnecessary null test.
10806
10807 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10808
10809 * Makefile.in (maintainer-clean realclean distclean): Remove
10810 "make ... subdir_do" command.
10811
10812 2011-03-10 Michael Snyder <msnyder@vmware.com>
10813
10814 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10815
10816 * server.c (handle_v_run): Free alloced buffer on early return.
10817
10818 2011-03-09 Yao Qi <yao@codesourcery.com>
10819
10820 Revert:
10821 2011-03-04 Yao Qi <yao@codesourcery.com>
10822
10823 * Makefile.in: Remove GNU make feature --directory.
10824
10825 2011-03-05 Yao Qi <yao@codesourcery.com>
10826
10827 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10828 (subdir_do): New make target. Copied from gdb/Makefile.
10829 (maintainer-clean, realclean, distclean, clean): Call corresponding
10830 make targets in common/Makefile.
10831
10832 2011-02-11 Yao Qi <yao@codesourcery.com>
10833
10834 * configure.ac: Call AC_PROG_RANLIB.
10835 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10836 * configure: Regenerate.
10837
10838 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10839
10840 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10841
10842 2011-03-06 Yao Qi <yao@codesourcery.com>
10843
10844 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10845
10846 2011-03-05 Yao Qi <yao@codesourcery.com>
10847
10848 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10849 (subdir_do): New make target. Copied from gdb/Makefile.
10850 (maintainer-clean, realclean, distclean, clean): Call corresponding
10851 make targets in common/Makefile.
10852
10853 2011-03-04 Yao Qi <yao@codesourcery.com>
10854
10855 * Makefile.in: Remove GNU make feature --directory.
10856
10857 2011-03-04 Michael Snyder <msnyder@vmware.com>
10858
10859 * server.c (queue_stop_reply): Call xmalloc not malloc.
10860
10861 2011-03-02 Michael Snyder <msnyder@vmware.com>
10862
10863 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10864
10865 2011-02-28 Michael Snyder <msnyder@vmware.com>
10866
10867 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10868 (cmd_qtframe): Ditto.
10869 (cmd_qtbuffer): Ditto.
10870 (cmd_bigqtbuffer): Ditto.
10871
10872 * utils.c (decimal2str): Initialize 'width' to nine, then
10873 don't mess with it.
10874
10875 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10876
10877 * hostio.c (require_data): Free *data, not data.
10878
10879 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10880
10881 * hostio.c (require_data): Use free, not xfree.
10882
10883 2011-02-27 Michael Snyder <msnyder@vmware.com>
10884
10885 * server.c (handle_query): Discard unused value.
10886
10887 * hostio.c (require_data): Free malloc memory before returning
10888 error.
10889
10890 2011-02-26 Michael Snyder <msnyder@vmware.com>
10891
10892 * linux-low.c (list_threads): Call closedir for dirent.
10893
10894 2011-02-27 Michael Snyder <msnyder@vmware.com>
10895
10896 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10897 a case statement falls through.
10898
10899 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10900
10901 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10902 in comparison.
10903
10904 2011-02-26 Michael Snyder <msnyder@vmware.com>
10905
10906 * utils.c (decimal2str): Eliminate dead code and dead param.
10907 (pulongest): Drop dead param from call to decimal2str.
10908 (plongest): Ditto.
10909
10910 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10911
10912 Revert the following patch (not approved yet):
10913 2011-02-21 Hui Zhu <teawater@gmail.com>
10914 * tracepoint.c (tp_printf): New function.
10915 (eval_agent_expr): Handle gdb_agent_op_printf.
10916
10917 2011-02-21 Hui Zhu <teawater@gmail.com>
10918
10919 * tracepoint.c (tp_printf): New function.
10920 (eval_agent_expr): Handle gdb_agent_op_printf.
10921
10922 2011-02-18 Tom Tromey <tromey@redhat.com>
10923
10924 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10925 (tracepoint.o): Likewise.
10926 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10927 (gdb_agent_op_names): Likewise.
10928
10929 2011-02-18 Tom Tromey <tromey@redhat.com>
10930
10931 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10932 gdb_agent_op_rot>: New constants.
10933 (gdb_agent_op_names): Add pick and roll.
10934 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10935 cases.
10936
10937 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10938
10939 * aclocal.m4: Regenerated with aclocal-1.11.1.
10940
10941 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10942
10943 * server.c (handle_qxfer_traceframe_info): New.
10944 (qxfer_packets): Register "traceframe-info".
10945 (handle_query): Report support for qXfer:traceframe-info:read+.
10946 * tracepoint.c (match_blocktype): New.
10947 (traceframe_find_block_type): Rename to ...
10948 (traceframe_walk_blocks): ... this. Add callback filter argument,
10949 and use it.
10950 (traceframe_find_block_type): New, reimplemented on top of
10951 traceframe_walk_blocks.
10952 (build_traceframe_info_xml): New.
10953 (traceframe_read_info): New.
10954 * server.h (traceframe_read_info): Declare.
10955
10956 2011-02-11 Yao Qi <yao@codesourcery.com>
10957
10958 * configure.ac: Call AC_PROG_RANLIB.
10959 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10960 * configure: Regenerate.
10961
10962 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10963
10964 * server.c (gdb_read_memory): Change return semantics to allow
10965 partial transfers.
10966 (handle_search_memory_1): Adjust.
10967 (process_serial_event) <'m' packet>: Handle partial transfers.
10968 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10969
10970 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10971
10972 * regcache.c (init_register_cache): Initialize
10973 regcache->register_status.
10974 (free_register_cache): Release regcache->register_status.
10975 (regcache_cpy): Copy register_status.
10976 (registers_to_string): Print 'x's for unavailable registers.
10977 (supply_register): Mark the register's status valid or
10978 unavailable, depending on whether a buffer was passed in or not.
10979 (supply_register_zeroed): New.
10980 (supply_regblock): Mark the registers' status valid or
10981 unavailable, depending on whether a buffer was passed in or not.
10982 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10983 (struct regcache): New `register_status' field.
10984 (supply_register_zeroed): Declare.
10985 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10986 supply_register_zeroed, rather than passing a NULL buffer to
10987 supply_register.
10988 * tracepoint.c (fetch_traceframe_registers): Update comment.
10989
10990 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10991
10992 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10993 buffer explicit.
10994
10995 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10996
10997 * server.h (decode_xfer_write): Change prototype.
10998 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10999 and don't extract the annex here.
11000 * server.c (decode_xfer_read): Remove `annex' parameter,
11001 and don't extract the annex here.
11002 (decode_xfer): New.
11003 (struct qxfer): New.
11004 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11005 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11006 (handle_qxfer_statictrace): New functions, abstracted out from
11007 handle_query, and made to use the struct qxfer interface.
11008 (handle_threads_qxfer_proper): Rename to ...
11009 (handle_qxfer_threads_proper): ... this.
11010 (handle_threads_qxfer): Rename to ...
11011 (handle_qxfer_threads): ... this. Adjust.
11012 (qxfer_packets): New array.
11013 (handle_qxfer): New function.
11014 (handle_query): Use handle_qxfer.
11015
11016 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11017
11018 * gdbreplay.c: Shorten lines of >= 80 columns.
11019 * linux-low.c: Ditto.
11020 * linux-ppc-low.c: Ditto.
11021 * linux-s390-low.c: Ditto.
11022 * linux-sparc-low.c: Ditto.
11023 * linux-x86-low.c: Ditto.
11024 * linux-xtensa-low.c: Ditto.
11025 * mem-break.c: Ditto.
11026 * nto-low.c: Ditto.
11027 * regcache.h: Ditto.
11028 * remote-utils.c: Ditto.
11029 * server.c: Ditto.
11030 * server.h: Ditto.
11031 * thread-db.c: Ditto.
11032 * tracepoint.c: Ditto.
11033 * utils.c: Ditto.
11034 * win32-low.h: Ditto.
11035
11036 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11037
11038 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11039 update.
11040
11041 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11042
11043 * server.c (gdbserver_version): Update copyright year in version
11044 output.
11045 * gdbreplay.c (gdbreplay_version): Ditto.
11046
11047 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11048
11049 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11050 * linux-bfin-low.c: New file.
11051 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11052 PT_DATA_ADDR for BFIN targets.
11053 * Makefile.in (SFILES): Add linux-bfin-low.c.
11054 (clean): Remove reg-bfin.c.
11055 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11056 * README: Mention supported Blackfin targets.
11057
11058 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11059
11060 * .gitignore: New file.
11061
11062 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11063
11064 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11065
11066 2010-10-22 Jie Zhang <jie@codesourcery.com>
11067
11068 * Makefile.in: Add FLAGS_TO_PASS variable.
11069 (install): Remove dependency of install-only and recursively
11070 invoke make for install-only.
11071
11072 2010-10-04 Doug Evans <dje@google.com>
11073
11074 * Makefile.in (uninstall): Use $(DESTDIR).
11075
11076 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11077
11078 PR gdb/11842
11079
11080 * linux-x86-low.c (compat_siginfo_from_siginfo)
11081 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11082 si_code is < 0. Check for si_code == SI_TIMER before checking for
11083 si_code < 0.
11084
11085 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11086
11087 * lynx-i386-low.c: New file.
11088 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11089
11090 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11091
11092 * lynx-low.c (ptrace_request_to_str): Remove handling for
11093 request values that have been removed in LynxOS 5.x.
11094
11095 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11096
11097 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11098 <ptrace.h>
11099
11100 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11101
11102 * configure.ac: Add --enable-inprocess-agent option.
11103 * configure: Rebuilt.
11104
11105 2010-09-06 Yao Qi <yao@codesourcery.com>
11106
11107 * linux-low.c (linux_kill): Remove unused variable.
11108 (linux_stabilize_threads): Likewise.
11109 * server.c (start_inferior): Likewise.
11110 (queue_stop_reply_callback): Likewise.
11111 * tracepoint.c (do_action_at_tracepoint): Likewise.
11112
11113 2010-09-06 Yao Qi <yao@codesourcery.com>
11114
11115 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11116 on return.
11117
11118 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11119
11120 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11121
11122 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11123
11124 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11125 "$(IPA_DEPFILES)".
11126
11127 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11128
11129 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11130 gdbserver/lynx-ppc-low.c: New files.
11131 * Makefile.in (lynx_low_h): New variable.
11132 (lynx-low.o, lynx-ppc-low.o): New rules.
11133 * configure.ac: On LynxOS, link with -lnetinet.
11134 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11135 * configure: regenerate.
11136
11137 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11138
11139 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11140 * configure.ac: Add check for vasprintf and vsnprintf.
11141 * configure, config.in: Regenerate.
11142 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11143
11144 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11145
11146 * gdbreplay.c: Move include of alloca.h up, next to include of
11147 malloc.h.
11148 * server.h: Add include of malloc.h.
11149 * mem-break.c: Remove include of malloc.h.
11150 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11151
11152 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11153
11154 * Makefile.in (memmem.o): Build with -Wno-error.
11155
11156 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11157
11158 * utils.c (xsnprintf): Make non-static.
11159 * server.h: Add xsnprintf declaration.
11160 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11161 replace calls to snprintf by calls to xsnprintf throughout.
11162
11163 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11164
11165 * configure.ac: Add configure check for alloca.
11166 * configure, config.in: Regenerate.
11167 * server.h: Include alloca.h if it exists.
11168 * gdbreplay.c: Include alloca.h if it exists.
11169
11170 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11171
11172 * linux-low.c (__SIGRTMIN): Define if not already defined.
11173 (linux_create_inferior): Check for __ANDROID__ rather than
11174 __SIGRTMIN.
11175 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11176 are already deferred.
11177 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11178 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11179 stopped and already has a pending signal to report.
11180 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11181 a pending signal to report or is moving out of a jump pad.
11182 (linux_init_signals): Check for __ANDROID__ rather than
11183 __SIGRTMIN.
11184
11185 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11186
11187 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11188 debug_threads check. Avoid a linear search when not doing debug
11189 output.
11190
11191 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11192
11193 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11194 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11195 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11196 (process_event): Change local fd's type to gdb_fildes_t.
11197 (create_file_handler): Adjust prototype.
11198 (delete_file_handler): Adjust prototype.
11199 (handle_file_event): Adjust prototype. Use pfildes.
11200 (create_file_event): Adjsut prototype.
11201 * remote-utils.c (remote_desc, listen_desc): Change type to
11202 gdb_fildes_t.
11203 * server.h: New gdb_fildes_t typedef.
11204 [USE_WIN32API]: Include winsock2.h.
11205 (delete_file_handler, add_file_handler): Adjust prototypes.
11206 (pfildes): Declare.
11207 * utils.c (pfildes): New.
11208
11209 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11210
11211 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11212 * configure: Regenerate.
11213
11214 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11215
11216 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11217 (linux_done_accessing_memory): ... this.
11218 (linux_target_ops): Adjust.
11219 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11220 * nto-low.c (nto_target_ops): Adjust comment.
11221 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11222 * spu-low.c (spu_target_ops): Adjust comment.
11223 * target.h (target_ops): Rename unprepare_to_access_memory field
11224 to done_accessing_memory.
11225 (unprepare_to_access_memory): Rename to ...
11226 (done_accessing_memory): ... this.
11227
11228 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11229
11230 * linux-low.c (linux_prepare_to_access_memory): New.
11231 (linux_unprepare_to_access_memory): New.
11232 (linux_target_ops): Install them.
11233 * server.c (read_memory): Rename to ...
11234 (gdb_read_memory): ... this. Use
11235 prepare_to_access_memory/prepare_to_access_memory.
11236 (write_memory): Rename to ...
11237 (gdb_write_memory): ... this. Use
11238 prepare_to_access_memory/prepare_to_access_memory.
11239 (handle_search_memory_1): Adjust.
11240 (process_serial_event): Adjust.
11241 * target.h (struct target_ops): New fields
11242 prepare_to_access_memory and unprepare_to_access_memory.
11243 (prepare_to_access_memory, unprepare_to_access_memory): New.
11244 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11245 prepare_to_access_memory/prepare_to_access_memory.
11246 * nto-low.c (nto_target_ops): Adjust.
11247 * spu-low.c (spu_target_ops): Adjust.
11248 * win32-low.c (win32_target_ops): Adjust.
11249
11250 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11251
11252 * Makefile.in (WARN_CFLAGS): Get it from configure.
11253 (WERROR_CFLAGS): New.
11254 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11255 * configure.ac: Introduce --enable-werror, which adds -Werror to
11256 the compiler command line. Enabled by default. Disable with
11257 --disable-werror. Add -Wdeclaration-after-statement
11258 Wpointer-arith and -Wformat-nonliteral to warning flags.
11259 * configure: Regenerate.
11260
11261 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11262
11263 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11264
11265 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11266
11267 * gdbreplay.c (remote_error): New.
11268 (gdbchar): New.
11269 (expect): Use gdbchar. Check for error reading from GDB.
11270 Clarify sync error output.
11271 (play): Check for errors writing to GDB.
11272 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11273 * remote-utils.c (getpkt): Check for errors writing to the remote
11274 descriptor.
11275
11276 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11277
11278 * linux-low.c (linux_wait_1): Move non-debugging code out of
11279 `debug_threads' control.
11280
11281 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11282
11283 * linux-low.c (linux_wait_1): Don't set last_status here.
11284 * server.c (push_event, queue_stop_reply_callback): Assert we're
11285 not pushing a TARGET_WAITKIND_IGNORE event.
11286 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11287 (myresume, handle_target_event): Set the thread's last_resume_kind
11288 and last_status from the target returned status.
11289
11290 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11291
11292 PR threads/10729
11293
11294 * linux-x86-low.c (update_debug_registers_callback): New.
11295 (i386_dr_low_set_addr): Use it.
11296 (i386_dr_low_get_addr): New.
11297 (i386_dr_low_set_control): Use update_debug_registers_callback.
11298 (i386_dr_low_get_control): New.
11299 (i386_dr_low_get_status): Adjust.
11300 * linux-low.c (linux_stop_lwp): New.
11301 * linux-low.h (linux_stop_lwp): Declare.
11302
11303 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11304 argument instead of a i386_debug_reg_state.
11305 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11306 a i386_debug_reg_state.
11307 (i386_insert_aligned_watchpoint): Adjust.
11308 (i386_remove_aligned_watchpoint): Adjust.
11309 (i386_low_stopped_data_address): Read the debug registers from the
11310 inferior instead of from the mirrors.
11311 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11312 (i386_dr_low_get_addr): Declare.
11313 (i386_dr_low_get_control): Declare.
11314 (i386_dr_low_get_status): Change prototype.
11315
11316 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11317 (i386_dr_low_get_addr): New.
11318 (i386_dr_low_get_control): New.
11319 (i386_dr_low_get_status): Adjust prototype. Return
11320 dr_status_mirror.
11321 (i386_initial_stuff): Clear dr_status_mirror and
11322 dr_control_mirror.
11323 (i386_get_thread_context): Adjust.
11324 (i386_set_thread_context): Adjust.
11325 (i386_thread_added): Adjust.
11326
11327 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11328
11329 * linux-low.h (linux_thread_area): Delete declaration.
11330
11331 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11332
11333 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11334 after its termination.
11335
11336 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11337
11338 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11339 (gdb_wants_all_stopped): Delete.
11340 (linux_wait_1): Don't call them.
11341 * server.c (handle_v_cont): Tag all threads as want-stopped.
11342 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11343 stopped as "client-wants-stopped".
11344
11345 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11346
11347 * Makefile.in (signals_h): New.
11348 (server_h): Depend on it.
11349 (server.o): Don't depend on $(signals_def).
11350 (signals.o): Depend on $(signals_def).
11351
11352 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11353
11354 * Makefile.in (signals_def): New.
11355 (server_h): Append include/gdb/signals.h and signals_def.
11356 (server.o): Append signals_def.
11357
11358 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11359
11360 * server.c (handle_target_event): Use target_signal_to_host for
11361 resume_info.sig initialization.
11362 * target.h (struct thread_resume) <sig>: New comment.
11363
11364 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11365
11366 * server.c (handle_query): strcpy() the returned string from paddress()
11367 instead of sprintf().
11368 * utils.c (paddress): Return phex_nz().
11369
11370 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11371
11372 * server.c (handle_v_cont): Call mourn_inferior if process
11373 just exited.
11374 (myresume): Likewise.
11375
11376 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11377
11378 Static tracepoints, and integration with UST.
11379
11380 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11381 * mem-break.c (uninsert_all_breakpoints)
11382 (reinsert_all_breakpoints): New.
11383 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11384 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11385 (gdb_agent_ust_loaded, helper_thread_id)
11386 (gdb_agent_helper_thread_id): New macros.
11387 (struct ipa_sym_addresses): Add addr_ust_loaded,
11388 addr_helper_thread_id, addr_cmd_buf.
11389 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11390 (in_process_agent_loaded_ust): New.
11391 (write_e_ust_not_loaded): New.
11392 (maybe_write_ipa_ust_not_loaded): New.
11393 (struct collect_static_trace_data_action): New.
11394 (enum tracepoint_type) <static_tracepoint>: New.
11395 (struct tracepoint) <handle>: Mention static tracepoints.
11396 (struct static_tracepoint_ctx): New.
11397 (CMD_BUF_SIZE): New.
11398 (add_tracepoint_action): Handle static tracepoint actions.
11399 (unprobe_marker_at): New.
11400 (clear_installed_tracepoints): Handle static tracepoints.
11401 (cmd_qtdp): Handle static tracepoints.
11402 (probe_marker_at): New.
11403 (cmd_qtstart): Handle static tracepoints.
11404 (response_tracepoint): Handle static tracepoints.
11405 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11406 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11407 (get_context_regcache): Handle static tracepoints.
11408 (do_action_at_tracepoint): Handle static tracepoint actions.
11409 (traceframe_find_block_type): Handle static trace data blocks.
11410 (traceframe_read_sdata): New.
11411 (download_tracepoints): Download static tracepoint actions.
11412 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11413 (GDB_PROBE_NAME): New.
11414 (ust_ops): New.
11415 (GET_UST_SYM): New.
11416 (USTF): New.
11417 (dlsym_ust): New.
11418 (ust_marker_to_static_tracepoint): New.
11419 (gdb_probe): New.
11420 (collect_ust_data_at_tracepoint): New.
11421 (gdb_ust_probe): New.
11422 (UNIX_PATH_MAX, SOCK_DIR): New.
11423 (gdb_ust_connect_sync_socket): New.
11424 (resume_thread, stop_thread): New.
11425 (run_inferior_command): New.
11426 (init_named_socket): New.
11427 (gdb_ust_socket_init): New.
11428 (cstr_to_hexstr): New.
11429 (next_st): New.
11430 (first_marker, next_marker): New.
11431 (response_ust_marker): New.
11432 (cmd_qtfstm, cmd_qtsstm): New.
11433 (unprobe_marker_at, probe_marker_at): New.
11434 (cmd_qtstmat, gdb_ust_thread): New.
11435 (gdb_ust_init): New.
11436 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11437 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11438 (ST_REGENTRY): New.
11439 (x86_64_st_collect_regmap): New.
11440 (X86_64_NUM_ST_COLLECT_GREGS): New.
11441 (AMD64_RIP_REGNUM): New.
11442 (supply_static_tracepoint_registers): New.
11443 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11444 (ST_REGENTRY): New.
11445 (i386_st_collect_regmap): New.
11446 (i386_NUM_ST_COLLECT_GREGS): New.
11447 (supply_static_tracepoint_registers): New.
11448 * server.c (handle_query): Handle qXfer:statictrace:read.
11449 <qSupported>: Report support for StaticTracepoints, and
11450 qXfer:statictrace:read features.
11451 * server.h (traceframe_read_sdata)
11452 (supply_static_tracepoint_registers): Declare.
11453 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11454 (unpack_varlen_hex): Include in IPA build.
11455 * Makefile.in (ustlibs, ustinc): New.
11456 (IPA_OBJS): Add remote-utils-ipa.o.
11457 ($(IPA_LIB)): Link -ldl and -lpthread.
11458 (UST_CFLAGS): New.
11459 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11460 * config.in, configure: Regenerate.
11461
11462 2010-06-20 Ian Lance Taylor <iant@google.com>
11463 Pedro Alves <pedro@codesourcery.com>
11464
11465 * linux-x86-low.c (always_true): Delete.
11466 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11467 trying to fool the compiler with always_true.
11468
11469 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11470
11471 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11472 conditions in gdbserver.
11473
11474 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11475
11476 * spu-low.c (spu_read_memory): Wrap around local store limit.
11477 (spu_write_memory): Likewise.
11478
11479 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11480
11481 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11482 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11483 LONGEST uses.
11484 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11485 uses.
11486 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11487 uses with LONGEST uses.
11488
11489 2010-06-14 Stan Shebs <stan@codesourcery.com>
11490 Pedro Alves <pedro@codesourcery.com>
11491
11492 Bytecode compiler.
11493
11494 * linux-x86-low.c: Include limits.h.
11495 (add_insns): New.
11496 (always_true): New.
11497 (EMIT_ASM): New.
11498 (EMIT_ASM32): New.
11499 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11500 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11501 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11502 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11503 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11504 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11505 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11506 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11507 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11508 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11509 (amd64_emit_void_call_2): New.
11510 (amd64_emit_ops): New.
11511 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11512 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11513 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11514 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11515 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11516 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11517 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11518 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11519 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11520 (i386_emit_stack_adjust, i386_emit_int_call_1)
11521 (i386_emit_void_call_2): New.
11522 (i386_emit_ops): New.
11523 (x86_emit_ops): New.
11524 (the_low_target): Install x86_emit_ops.
11525 * server.h (struct emit_ops): New.
11526 (get_raw_reg_func_addr): Declare.
11527 (current_insn_ptr, emit_error): Declare.
11528 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11529 (set_trace_state_variable_value): New defines.
11530 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11531 addr_get_trace_state_variable_value and
11532 addr_set_trace_state_variable_value.
11533 (symbol_list): New fields for get_raw_reg,
11534 get_trace_state_variable_value and set_trace_state_variable_value.
11535 (condfn): New typedef.
11536 (struct tracepoint): New field `compiled_cond'.
11537 (do_action_at_tracepoint): Clear compiled_cond.
11538 (get_trace_state_variable_value, set_trace_state_variable_value):
11539 Export in the IPA.
11540 (condition_true_at_tracepoint): If there's a compiled condition,
11541 run that.
11542 (current_insn_ptr, emit_error): New globals.
11543 (struct bytecode_address): New.
11544 (get_raw_reg_func_addr): New.
11545 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11546 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11547 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11548 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11549 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11550 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11551 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11552 (compile_tracepoint_condition, compile_bytecodes): New.
11553 * target.h (emit_ops): Forward declare.
11554 (struct target_ops): New field emit_ops.
11555 (target_emit_ops): New.
11556 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11557 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11558 * linux-low.c (linux_emit_ops): New.
11559 (linux_target_ops): Install it.
11560 * linux-low.h (struct linux_target_ops): New field emit_ops.
11561
11562 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11563
11564 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11565 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11566
11567 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11568 Stan Shebs <stan@codesourcery.com>
11569
11570 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11571 (all): Depend on $(extra_libraries).
11572 (install-only): Install the IPA.
11573 (IPA_OBJS, IPA_LIB): New.
11574 (clean): Remove the IPA lib.
11575 (IPAGENT_CFLAGS): New.
11576 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11577 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11578 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11579 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11580 * configure.ac: Check for atomic builtins support in the compiler.
11581 (IPA_DEPFILES, extra_libraries): Define.
11582 * configure.srv (ipa_obj): Add description.
11583 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11584 (i[34567]86-*-linux*): Set ipa_obj.
11585 (x86_64-*-linux*): Set ipa_obj.
11586 * linux-low.c (stabilizing_threads): New.
11587 (supports_fast_tracepoints): New.
11588 (linux_detach): Stabilize threads before detaching.
11589 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11590 the lwp is either not stabilizing, or is moving out of a jump pad.
11591 (linux_fast_tracepoint_collecting): New.
11592 (maybe_move_out_of_jump_pad): New.
11593 (enqueue_one_deferred_signal): New.
11594 (dequeue_one_deferred_signal): New.
11595 (linux_wait_for_event_1): If moving out of a jump pad, defer
11596 pending signals to later.
11597 (linux_stabilize_threads): New.
11598 (linux_wait_1): Check if threads need moving out of jump pads, and
11599 do it if so.
11600 (stuck_in_jump_pad_callback): New.
11601 (move_out_of_jump_pad_callback): New.
11602 (lwp_running): New.
11603 (linux_resume_one_lwp): Handle moving out of jump pads.
11604 (linux_set_resume_request): Dequeue deferred signals.
11605 (need_step_over_p): Also step over fast tracepoint jumps.
11606 (start_step_over): Also uninsert fast tracepoint jumps.
11607 (finish_step_over): Also reinsert fast tracepoint jumps.
11608 (linux_install_fast_tracepoint_jump): New.
11609 (linux_target_ops): Install linux_stabilize_threads and
11610 linux_install_fast_tracepoint_jump_pad.
11611 * linux-low.h (linux_target_ops) <get_thread_area,
11612 install_fast_tracepoint_jump_pad>: New fields.
11613 (struct lwp_info) <collecting_fast_tracepoint,
11614 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11615 (linux_get_thread_area): Declare.
11616 * linux-x86-low.c (jump_insn): New.
11617 (x86_get_thread_area): New.
11618 (append_insns): New.
11619 (push_opcode): New.
11620 (amd64_install_fast_tracepoint_jump_pad): New.
11621 (i386_install_fast_tracepoint_jump_pad): New.
11622 (x86_install_fast_tracepoint_jump_pad): New.
11623 (the_low_target): Install x86_get_thread_area and
11624 x86_install_fast_tracepoint_jump_pad.
11625 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11626 (struct fast_tracepoint_jump): New.
11627 (fast_tracepoint_jump_insn): New.
11628 (fast_tracepoint_jump_shadow): New.
11629 (find_fast_tracepoint_jump_at): New.
11630 (fast_tracepoint_jump_here): New.
11631 (delete_fast_tracepoint_jump): New.
11632 (set_fast_tracepoint_jump): New.
11633 (uninsert_fast_tracepoint_jumps_at): New.
11634 (reinsert_fast_tracepoint_jumps_at): New.
11635 (set_breakpoint_at): Use write_inferior_memory.
11636 (uninsert_raw_breakpoint): Use write_inferior_memory.
11637 (check_mem_read): Mask out fast tracepoint jumps.
11638 (check_mem_write): Mask out fast tracepoint jumps.
11639 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11640 (set_fast_tracepoint_jump): Declare.
11641 (delete_fast_tracepoint_jump)
11642 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11643 (reinsert_fast_tracepoint_jumps_at): Declare.
11644 * regcache.c: Don't compile many functions when building the
11645 in-process agent library.
11646 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11647 the register buffer in the heap.
11648 (free_register_cache): If the register buffer isn't owned by the
11649 regcache, don't free it.
11650 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11651 pre-existing register caches.
11652 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11653 type.
11654 (convert_ascii_to_int): : Constify `from' parameter type.
11655 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11656 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11657 the needed buffer in-place.
11658 (relocate_instruction): New.
11659 * server.c (handle_query) <qSymbols>: If the target supports
11660 tracepoints, give it a chance of looking up symbols. Report
11661 support for fast tracepoints.
11662 (handle_status): Stabilize threads.
11663 (process_serial_event): Adjust.
11664 * server.h (struct fast_tracepoint_jump): Forward declare.
11665 (struct process_info) <fast_tracepoint_jumps>: New field.
11666 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11667 (decode_X_packet, decode_M_packet): Adjust.
11668 (relocate_instruction): Declare.
11669 (in_process_agent_loaded): Declare.
11670 (tracepoint_look_up_symbols): Declare.
11671 (struct fast_tpoint_collect_status): Declare.
11672 (fast_tracepoint_collecting): Declare.
11673 (force_unlock_trace_buffer): Declare.
11674 (handle_tracepoint_bkpts): Declare.
11675 (initialize_low_tracepoint)
11676 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11677 * target.h (struct target_ops) <stabilize_threads,
11678 install_fast_tracepoint_jump_pad>: New fields.
11679 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11680 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11681 [HAVE_STDINT_H]: Include stdint.h.
11682 (trace_debug_1): Rename to ...
11683 (trace_vdebug): ... this.
11684 (trace_debug): Rename to ...
11685 (trace_debug_1): ... this. Add `level' parameter.
11686 (trace_debug): New.
11687 (ATTR_USED, ATTR_NOINLINE): New.
11688 (IP_AGENT_EXPORT): New.
11689 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11690 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11691 (about_to_request_buffer_space, trace_buffer_is_full)
11692 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11693 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11694 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11695 (traceframe_write_count, traceframes_created)
11696 (trace_state_variables)
11697 New renaming defines.
11698 (struct ipa_sym_addresses): New.
11699 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11700 (symbol_list): New.
11701 (ipa_sym_addrs): New.
11702 (all_tracepoint_symbols_looked_up): New.
11703 (in_process_agent_loaded): New.
11704 (write_e_ipa_not_loaded): New.
11705 (maybe_write_ipa_not_loaded): New.
11706 (tracepoint_look_up_symbols): New.
11707 (debug_threads) [IN_PROCESS_AGENT]: New.
11708 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11709 (UNKNOWN_SIDE_EFFECTS): New.
11710 (stop_tracing): New.
11711 (flush_trace_buffer): New.
11712 (stop_tracing_bkpt): New.
11713 (flush_trace_buffer_bkpt): New.
11714 (read_inferior_integer): New.
11715 (read_inferior_uinteger): New.
11716 (read_inferior_data_pointer): New.
11717 (write_inferior_data_pointer): New.
11718 (write_inferior_integer): New.
11719 (write_inferior_uinteger): New.
11720 (struct collect_static_trace_data_action): Delete.
11721 (enum tracepoint_type): New.
11722 (struct tracepoint) <type>: New field `type'.
11723 <actions_str, step_actions, step_actions_str>: Only include in
11724 GDBserver.
11725 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11726 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11727 (tracepoints): Use IP_AGENT_EXPORT.
11728 (last_tracepoint): Don't include in the IPA.
11729 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11730 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11731 (alloced_trace_state_variables): New.
11732 (trace_state_variables): Use IP_AGENT_EXPORT.
11733 (traceframe_t): Delete unused variable.
11734 (circular_trace_buffer): Don't include in the IPA.
11735 (trace_buffer_start): Delete.
11736 (struct trace_buffer_control): New.
11737 (trace_buffer_free): Delete.
11738 (struct ipa_trace_buffer_control): New.
11739 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11740 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11741 New.
11742 (trace_buffer_ctrl): New.
11743 (TRACE_BUFFER_CTRL_CURR): New.
11744 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11745 Reimplement as macros.
11746 (trace_buffer_wrap): Delete.
11747 (traceframe_write_count, traceframe_read_count)
11748 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11749 (struct tracepoint_hit_ctx) <type>: New field.
11750 (struct fast_tracepoint_ctx): New.
11751 (memory_barrier): New.
11752 (cmpxchg): New.
11753 (record_tracepoint_error): Update atomically in the IPA.
11754 (clear_inferior_trace_buffer): New.
11755 (about_to_request_buffer_space): New.
11756 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11757 updating the same buffer.
11758 (add_tracepoint): Default the tracepoint's type to trap
11759 tracepoint, and orig_size to -1.
11760 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11761 internal variables.
11762 (create_trace_state_variable): New parameter `gdb'. Handle it.
11763 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11764 (cmd_qtdp): Handle fast tracepoints.
11765 (cmd_qtdv): Adjust.
11766 (max_jump_pad_size): New.
11767 (gdb_jump_pad_head): New.
11768 (get_jump_space_head): New.
11769 (claim_jump_space): New.
11770 (sort_tracepoints): New.
11771 (MAX_JUMP_SIZE): New.
11772 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11773 IPA.
11774 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11775 support. Upload fast traceframes, and delete internal IPA
11776 breakpoints.
11777 (stop_tracing_handler): New.
11778 (flush_trace_buffer_handler): New.
11779 (cmd_qtstop): Upload fast tracepoints.
11780 (response_tracepoint): Handle fast tracepoints.
11781 (tracepoint_finished_step): Upload fast traceframes. Set the
11782 tracepoint hit context's tracepoint type.
11783 (handle_tracepoint_bkpts): New.
11784 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11785 type. Add comment about fast tracepoints.
11786 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11787 non-existing action_str field.
11788 (get_context_regcache): Handle fast tracepoints.
11789 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11790 to the regcache.
11791 (fast_tracepoint_from_jump_pad_address): New.
11792 (fast_tracepoint_from_ipa_tpoint_address): New.
11793 (collecting_t): New.
11794 (force_unlock_trace_buffer): New.
11795 (fast_tracepoint_collecting): New.
11796 (collecting): New.
11797 (gdb_collect): New.
11798 (write_inferior_data_ptr): New.
11799 (target_tp_heap): New.
11800 (target_malloc): New.
11801 (download_agent_expr): New.
11802 (UALIGN): New.
11803 (download_tracepoints): New.
11804 (download_trace_state_variables): New.
11805 (upload_fast_traceframes): New.
11806 (IPA_FIRST_TRACEFRAME): New.
11807 (IPA_NEXT_TRACEFRAME_1): New.
11808 (IPA_NEXT_TRACEFRAME): New.
11809 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11810 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11811 (gdb_jump_pad_buffer_end): New.
11812 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11813 (initialize_tracepoint): Adjust.
11814 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11815 buffer. Initialize the low module.
11816 * utils.c (PREFIX, TOOLNAME): New.
11817 (malloc_failure): Use PREFIX.
11818 (error): In the IPA, an error causes an exit.
11819 (fatal, warning): Use PREFIX.
11820 (internal_error): Use TOOLNAME.
11821 (NUMCELLS): Increase to 10.
11822 * configure, config.in: Regenerate.
11823
11824 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11825
11826 * server.c (handle_query) <qSupported>: Do two passes over the
11827 qSupported string to avoid nesting strtok.
11828
11829 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11830
11831 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11832 (CDEPS): New.
11833 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11834 -Wl,--dynamic-list.
11835 * configure: Regenerate.
11836 * proc-service.list: New.
11837
11838 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11839
11840 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11841 New comment.
11842
11843 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11844
11845 * gdbreplay.c (remote_open): Check error return from socket() call by
11846 its equality to -1 not by it being negative.
11847 * remote-utils.c (remote_open): Likewise.
11848
11849 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11850
11851 * config.h: Regenerate.
11852
11853 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11854
11855 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11856 doesn't provide PTRACE_GET_THREAD_AREA.
11857
11858 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11859
11860 * linux-m68k-low.c: Include <asm/ptrace.h>
11861 (ps_get_thread_area): Implement.
11862
11863 2010-05-03 Doug Evans <dje@google.com>
11864
11865 * event-loop.c (struct callback_event): New struct.
11866 (callback_list): New global.
11867 (append_callback_event, delete_callback_event): New functions.
11868 (process_callback): New function.
11869 (start_event_loop): Call it.
11870 * remote-utils.c (NOT_SCHEDULED): Define.
11871 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11872 moved out of readchar.
11873 (readchar): Rewrite. Call reschedule before returning.
11874 (reset_readchar): New function.
11875 (remote_close): Call it.
11876 (process_remaining, reschedule): New functions.
11877 * server.h (callback_handler_func): New typedef.
11878 (append_callback_event, delete_callback_event): Declare.
11879
11880 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11881
11882 * proc-service.c (ps_pglobal_lookup): Use
11883 thread_db_look_up_one_symbol.
11884 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11885 parameter. Use it instead of all_symbols_looked_up.
11886 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11887 field.
11888 (all_symbols_looked_up): Don't declare.
11889 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11890 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11891 field.
11892 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11893 Set all_symbols_looked_up here.
11894 (thread_db_look_up_one_symbol): New.
11895 (thread_db_get_tls_address): Adjust.
11896 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11897 thread_db object on the heap, and tentatively set it in the
11898 process structure.
11899 (thread_db_init): Don't set all_symbols_looked_up here.
11900 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11901
11902 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11903
11904 * linux-low.c (linux_kill, linux_detach): Adjust.
11905 (status_pending_p_callback): Remove redundant statement. Check
11906 for !TARGET_WAITIKIND_IGNORE, instead of
11907 TARGET_WAITKIND_STOPPED.
11908 (handle_tracepoints): Make sure LWP is locked. Adjust.
11909 (linux_wait_for_event_1): Adjust.
11910 (linux_cancel_breakpoints): New.
11911 (unsuspend_one_lwp): New.
11912 (unsuspend_all_lwps): New.
11913 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11914 (send_sigstop_callback): Change return type to int, add new
11915 `except' parameter and handle it.
11916 (suspend_and_send_sigstop_callback): New.
11917 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11918 pass them down. If SUSPEND, also increment the lwp's suspend
11919 count.
11920 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11921 (need_step_over_p): Don't consider suspended LWPs.
11922 (start_step_over): Adjust.
11923 (proceed_one_lwp): Change return type to int, add new `except'
11924 parameter and handle it.
11925 (unsuspend_and_proceed_one_lwp): New.
11926 (proceed_all_lwps): Use find_inferior instead of
11927 for_each_inferior.
11928 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11929 also decrement the suspend count of LWPs. Pass `except' down,
11930 instead of hacking its suspend count.
11931 (linux_pause_all): Add `freeze' parameter. Adjust.
11932 (linux_unpause_all): New.
11933 (linux_target_ops): Install linux_unpause_all.
11934 * server.c (handle_status): Adjust.
11935 * target.h (struct target_ops): New fields `unpause_all' and
11936 `cancel_breakpoints'. Add new parameter to `pause_all'.
11937 (pause_all): Add new `freeze' parameter.
11938 (unpause_all): New.
11939 (cancel_breakpoints): New.
11940 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11941 cancel breakpoints.
11942 (cmd_qtstart): Pause threads.
11943 (stop_tracing): Pause threads, and cancel breakpoints.
11944 * win32-low.c (win32_target_ops): Adjust.
11945
11946 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11947
11948 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11949 the inferior right away from here...
11950 (linux_wait_1): ... to here, and adjust to check the thread's
11951 last_resume_kind instead of the lwp's step or stop_expected flags.
11952
11953 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11954
11955 * README: Use consistent `GDB' and `GDBserver' spellings.
11956
11957 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11958
11959 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11960 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11961 (linux_detach_one_lwp): Assume the lwp is stopped.
11962 (any_thread_of): Delete.
11963 (linux_detach): Stop all lwps here. Don't blindly delete all
11964 breakpoints.
11965 (delete_lwp_callback): New.
11966 (linux_mourn): Delete all lwps of the process that is gone.
11967 (linux_wait_1): Don't delete the last lwp of the process here.
11968 * mem-break.h (mark_breakpoints_out): Declare.
11969 * mem-break.c (mark_breakpoints_out): New.
11970 (free_all_breakpoints): Use it.
11971 * server.c (handle_target_event): If the process is gone, mark
11972 breakpoints out.
11973 * thread-db.c (struct thread_db) <create_bp>: New field.
11974 (thread_db_enable_reporting): Fix prototype. Store a thread event
11975 breakpoint reference in the thread_db struct.
11976 (thread_db_load_search): Clear the thread_db object.
11977 (try_thread_db_load_1): Ditto.
11978 (switch_to_process): New.
11979 (disable_thread_event_reporting): Use it.
11980 (remove_thread_event_breakpoints): New.
11981 (thread_db_detach, thread_db_mourn): Use it.
11982
11983 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11984
11985 * linux-low.c (linux_enable_event_reporting): New.
11986 (linux_wait_for_event_1, handle_extended_wait): Use it.
11987
11988 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11989
11990 * linux-low.c (linux_kill_one_lwp, linux_kill)
11991 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11992 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11993 SIGSTOP even if the LWP is stopped.
11994 (send_sigstop_callback): New.
11995 (stop_all_lwps): Use send_sigstop_callback instead.
11996 (linux_resume_one_thread): Adjust.
11997 (proceed_one_lwp): Still proceed an LWP that the client has
11998 requested to stop, if we haven't reported it as stopped yet. Make
11999 sure that LWPs the client want stopped, have a pending SIGSTOP.
12000
12001 2010-04-26 Doug Evans <dje@google.com>
12002
12003 * server.c (handle_general_set): Make static.
12004
12005 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12006 Print received char after testing for error/eof instead of before.
12007 (input_interrupt): Tweak comment.
12008
12009 2010-04-23 Doug Evans <dje@google.com>
12010
12011 * server.c (start_inferior): Print inferior argv if --debug.
12012
12013 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12014
12015 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12016 * nto-x86-low.c: Include server.h
12017
12018 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12019
12020 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12021 be consistent with other sources of this directory.
12022 (init_registers_amd64): Correct name of source file of this function
12023 in the comment.
12024
12025 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12026
12027 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12028 64-bit executables.
12029
12030 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12031
12032 * win32-i386-low.c: Add 64-bit support.
12033 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12034 (init_registers_amd64): Declare.
12035 (mappings): Add 64-bit version of array.
12036 (init_windows_x86): New function.
12037 (the_low_target): Change init_arch field to init_windows_x86.
12038
12039 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12040
12041 * win32-low.c: Adapt to support also 64-bit architecture.
12042 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12043 (get_image_name): Use SIZE_T type for local variable `done'.
12044 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12045 (toolhelp_get_dll_name): Idem.
12046 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12047 Use uintptr_t typecast to avoid warning.
12048 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12049 (handle_exception): Use phex_nz to avoid warning.
12050 (win32_wait): Remove unused local variable `process'.
12051
12052 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12053
12054 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12055 `amd64-avx.o'.
12056
12057 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12058
12059 * configure.ac: Use `ws2_32' library for srv_mingw.
12060 * configure: Regenerate.
12061 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12062 * remote-utils.c: Likewise.
12063
12064 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12065
12066 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12067 if __x86_64__ is defined.
12068
12069 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12070
12071 * configure: Regenerate.
12072
12073 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12074
12075 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12076 * target.h (target_ops): New get_tib_address field.
12077 * win32-low.h (win32_thread_info): Add thread_local_base field.
12078 * win32-low.c (child_add_thread): Add tlb argument.
12079 Set thread_local_base field to TLB.
12080 (get_child_debug_event): Adapt to child_add_thread change.
12081 (win32_get_tib_address): New function.
12082 (win32_target_ops): Set get_tib_address field to
12083 win32_get_tib_address.
12084 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12085
12086 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12087
12088 * linux-low.c (linux_mourn): Also remove the process.
12089 * server.c (handle_target_event): Don't remove the process here.
12090 * nto-low.c (nto_mourn): New.
12091 (nto_target_ops): Install it.
12092 * spu-low.c (spu_mourn): New.
12093 (spu_target_ops): Install it.
12094 * win32-low.c (win32_mourn): New.
12095 (win32_target_ops): Install it.
12096
12097 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12098
12099 * server.h (buffer_xml_printf): Remove redundant `;'.
12100
12101 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12102
12103 * regcache.c (set_register_cache): Invalidate regcaches before
12104 changing the register cache layout.
12105 (regcache_invalidate_one): Allow a NULL regcache.
12106 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12107 regcaches before changing the register cache layout or the target
12108 regsets.
12109
12110 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12111
12112 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12113 variable warning on Linux/x86-64.
12114
12115 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12116
12117 GDBserver disconnected tracing support.
12118
12119 * linux-low.c (linux_remove_process): Delete.
12120 (add_lwp): Don't set last_resume_kind here.
12121 (linux_kill): Use `mourn'.
12122 (linux_detach): Use `thread_db_detach', and `mourn'.
12123 (linux_mourn): New.
12124 (linux_attach_lwp_1): Adjust comment.
12125 (linux_attach): last_resume_kind moved the thread_info; adjust.
12126 (status_pending_p_callback): Adjust.
12127 (linux_wait_for_event_1): Adjust.
12128 (count_events_callback, select_singlestep_lwp_callback)
12129 (select_event_lwp_callback, cancel_breakpoints_callback)
12130 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12131 (proceed_one_lwp): Adjust.
12132 (linux_async): Add debug output.
12133 (linux_thread_stopped): New.
12134 (linux_pause_all): New.
12135 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12136 linux_pause_all.
12137 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12138 (thread_db_free): Delete declaration.
12139 (thread_db_detach, thread_db_mourn): Declare.
12140 * thread-db.c (thread_db_init): Use thread_db_mourn.
12141 (thread_db_free): Delete, split in two.
12142 (disable_thread_event_reporting): New.
12143 (thread_db_detach): New.
12144 (thread_db_mourn): New.
12145
12146 * server.h (struct thread_info) <last_resume_kind>: New field.
12147 <attached>: Add comment.
12148 <gdb_detached>: New field.
12149 (handler_func): Change return type to int.
12150 (handle_serial_event, handle_target_event): Ditto.
12151 (gdb_connected): Declare.
12152 (tracing): Delete.
12153 (disconnected_tracing): Declare.
12154 (stop_tracing): Declare.
12155
12156 * server.c (handle_query) <qSupported>: Report support for
12157 disconnected tracing.
12158 (queue_stop_reply_callback): Account for running threads.
12159 (gdb_wants_thread_stopped): New.
12160 (gdb_wants_all_threads_stopped): New.
12161 (gdb_reattached_process): New.
12162 (handle_status): Clear the `gdb_detached' flag of all processes.
12163 In all-stop, stop all threads.
12164 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12165 (process_serial_event): If the remote connection breaks, or if an
12166 exit was forced with "monitor exit", force an event loop exit.
12167 Handle disconnected tracing on detach.
12168 (handle_serial_event): Adjust.
12169 (handle_target_event): If GDB isn't connected, forward events back
12170 to the inferior, unless the last process exited, in which case,
12171 exit gdbserver. Adjust interface.
12172
12173 * remote-utils.c (remote_open): Don't block in accept. Instead
12174 register an event loop source on the listen socket file
12175 descriptor. Refactor bits into ...
12176 (listen_desc): ... this new global.
12177 (gdb_connected): ... this new function.
12178 (enable_async_notification): ... this new function.
12179 (handle_accept_event): ... this new function.
12180 (remote_close): Clear remote_desc.
12181
12182 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12183
12184 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12185 New fields.
12186 (mourn_inferior): Define.
12187 (target_process_qsupported): Avoid the dangling else problem.
12188 (thread_stopped): Define.
12189 (pause_all): Define.
12190 (target_waitstatus_to_string): Declare.
12191 * target.c (target_waitstatus_to_string): New.
12192
12193 * tracepoint.c (tracing): Make extern.
12194 (disconnected_tracing): New.
12195 (stop_tracing): Make extern. Handle tracing stops due to GDB
12196 disconnecting.
12197 (cmd_qtdisconnected): New.
12198 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12199 (handle_tracepoint_general_set): Handle QTDisconnected.
12200
12201 * event-loop.c (event_handler_func): Change return type to int.
12202 (process_event): Bail out if the event handler wants the event
12203 loop to stop.
12204 (handle_file_event): Ditto.
12205 (start_event_loop): Bail out if the event handler wants the event
12206 loop to stop.
12207
12208 * nto-low.c (nto_target_ops): Adjust.
12209 * spu-low.c (spu_wait): Don't remove the process here.
12210 (spu_target_ops): Adjust.
12211 * win32-low.c (win32_wait): Don't remove the process here.
12212 (win32_target_ops): Adjust.
12213
12214 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12215
12216 * regcache.c (realloc_register_cache): Invalidate inferior's
12217 regcache before recreating it.
12218
12219 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12220
12221 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12222
12223 2010-04-09 Stan Shebs <stan@codesourcery.com>
12224 Pedro Alves <pedro@codesourcery.com>
12225
12226 * server.h (LONGEST): New.
12227 (struct thread_info) <while_stepping>: New field.
12228 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12229 Declare.
12230 (initialize_tracepoint, handle_tracepoint_general_set)
12231 (handle_tracepoint_query, tracepoint_finished_step)
12232 (tracepoint_was_hit, release_while_stepping_state_list):
12233 (current_traceframe): Declare.
12234 * server.c (handle_general_set): Handle tracepoint packets.
12235 (read_memory): New.
12236 (write_memory): New.
12237 (handle_search_memory_1): Use read_memory.
12238 (handle_query): Report support for conditional tracepoints, trace
12239 state variables, and tracepoint sources. Handle tracepoint
12240 queries.
12241 (main): Initialize the tracepoints module.
12242 (process_serial_event): Handle traceframe reads/writes.
12243
12244 * linux-low.c (handle_tracepoints): New.
12245 (linux_wait_1): Call it.
12246 (linux_resume_one_lwp): Handle while-stepping.
12247 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12248 (linux_target_ops): Install them.
12249 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12250 New field.
12251 * linux-x86-low.c (x86_supports_tracepoints): New.
12252 (the_low_target). Install it.
12253
12254 * mem-break.h (delete_breakpoint): Declare.
12255 * mem-break.c (delete_breakpoint): Make external.
12256
12257 * target.h (struct target_ops): Add `supports_tracepoints',
12258 `read_pc', and `write_pc' fields.
12259 (target_supports_tracepoints): Define.
12260 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12261 (phex_nz): New.
12262
12263 * regcache.h (struct regcache) <registers_owned>: New field.
12264 (init_register_cache, regcache_cpy): Declare.
12265 (regcache_read_pc, regcache_write_pc): Declare.
12266 (register_cache_size): Declare.
12267 (supply_regblock): Declare.
12268 * regcache.c (init_register_cache): New.
12269 (new_register_cache): Use it.
12270 (regcache_cpy): New.
12271 (register_cache_size): New.
12272 (supply_regblock): New.
12273 (regcache_read_pc, regcache_write_pc): New.
12274
12275 * tracepoint.c: New.
12276
12277 * Makefile.in (OBS): Add tracepoint.o.
12278 (tracepoint.o): New rule.
12279
12280 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12281
12282 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12283 (i386-mmx.o): New.
12284 (i386-mmx.c): Likewise.
12285 (i386-mmx-linux.o): Likewise.
12286 (i386-mmx-linux.c): Likewise.
12287
12288 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12289 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12290 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12291 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12292
12293 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12294 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12295 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12296
12297 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12298
12299 * Makefile.in (clean): Updated.
12300 (i386-avx.o): New.
12301 (i386-avx.c): Likewise.
12302 (i386-avx-linux.o): Likewise.
12303 (i386-avx-linux.c): Likewise.
12304 (amd64-avx.o): Likewise.
12305 (amd64-avx.c): Likewise.
12306 (amd64-avx-linux.o): Likewise.
12307 (amd64-avx-linux.c): Likewise.
12308
12309 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12310 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12311 (srv_amd64_regobj): Add amd64-avx.o.
12312 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12313 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12314 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12315 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12316 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12317 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12318 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12319
12320 * i387-fp.c: Include "i386-xstate.h".
12321 (i387_xsave): New.
12322 (i387_cache_to_xsave): Likewise.
12323 (i387_xsave_to_cache): Likewise.
12324 (x86_xcr0): Likewise.
12325
12326 * i387-fp.h (i387_cache_to_xsave): Likewise.
12327 (i387_xsave_to_cache): Likewise.
12328 (x86_xcr0): Likewise.
12329
12330 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12331 * linux-crisv32-low.c (target_regsets): Likewise.
12332 * linux-m68k-low.c (target_regsets): Likewise.
12333 * linux-mips-low.c (target_regsets): Likewise.
12334 * linux-ppc-low.c (target_regsets): Likewise.
12335 * linux-s390-low.c (target_regsets): Likewise.
12336 * linux-sh-low.c (target_regsets): Likewise.
12337 * linux-sparc-low.c (target_regsets): Likewise.
12338 * linux-xtensa-low.c (target_regsets): Likewise.
12339
12340 * linux-low.c: Include <sys/uio.h>.
12341 (regsets_fetch_inferior_registers): Support nt_type.
12342 (regsets_store_inferior_registers): Likewise.
12343 (linux_process_qsupported): New.
12344 (linux_target_ops): Add linux_process_qsupported.
12345
12346 * linux-low.h (regset_info): Add nt_type.
12347 (linux_target_ops): Add process_qsupported.
12348
12349 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12350 and <sys/uio.h>.
12351 (init_registers_i386_avx_linux): New.
12352 (init_registers_amd64_avx_linux): Likewise.
12353 (xmltarget_i386_linux_no_xml): Likewise.
12354 (xmltarget_amd64_linux_no_xml): Likewise.
12355 (PTRACE_GETREGSET): Likewise.
12356 (PTRACE_SETREGSET): Likewise.
12357 (x86_fill_xstateregset): Likewise.
12358 (x86_store_xstateregset): Likewise.
12359 (use_xml): Likewise.
12360 (x86_linux_update_xmltarget): Likewise.
12361 (x86_linux_process_qsupported): Likewise.
12362 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12363 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12364 init_registers_i386_linux here. Call
12365 x86_linux_update_xmltarget.
12366 (the_low_target): Add x86_linux_process_qsupported.
12367
12368 * server.c (handle_query): Call target_process_qsupported.
12369
12370 * target.h (target_ops): Add process_qsupported.
12371 (target_process_qsupported): New.
12372
12373 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12374
12375 * inferiors.c (add_thread): Set last_status kind to
12376 TARGET_WAITKIND_IGNORE.
12377 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12378 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12379 (linux_wait_1): Move `thread' local definition to block that uses
12380 it. Don't NULL initialize `event_child'.
12381 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12382 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12383 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12384
12385 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12386
12387 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12388 an extended waitstatus, or by a watchpoint.
12389 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12390 thread was stepping or has been stopped by a watchpoint.
12391
12392 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12393
12394 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12395 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12396 of another, then delete the previous, and validate all
12397 breakpoints.
12398 (validate_inserted_breakpoint): New.
12399 (delete_disabled_breakpoints): New.
12400 (validate_breakpoints): New.
12401 (check_mem_read): Validate breakpoints before trusting their
12402 shadow. Delete disabled breakpoints.
12403 (check_mem_write): Validate breakpoints before trusting they
12404 should be inserted. Delete disabled breakpoints.
12405 * mem-break.h (validate_breakpoints):
12406 * server.c (handle_query): Validate breakpoints when we see a
12407 qSymbol query.
12408
12409 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12410
12411 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12412 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12413 if we could tell there's a GDB breakpoint at stop_pc.
12414 (need_step_over_p): Don't do a step over if we find a GDB
12415 breakpoint at the resume PC.
12416
12417 * mem-break.c (struct raw_breakpoint): New.
12418 (enum bkpt_type): New type `gdb_breakpoint'.
12419 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12420 fields. New field `raw'.
12421 (find_raw_breakpoint_at): New.
12422 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12423 breakpoint instead.
12424 (set_breakpoint_at): Adjust.
12425 (delete_raw_breakpoint): New.
12426 (release_breakpoint): New.
12427 (delete_breakpoint): Rename to...
12428 (delete_breakpoint_1): ... this. Add proc parameter. Use
12429 release_breakpoint. Return ENOENT.
12430 (delete_breakpoint): Reimplement.
12431 (find_breakpoint_at): Delete.
12432 (find_gdb_breakpoint_at): New.
12433 (delete_breakpoint_at): Delete.
12434 (set_gdb_breakpoint_at): New.
12435 (delete_gdb_breakpoint_at): New.
12436 (gdb_breakpoint_here): New.
12437 (set_reinsert_breakpoint): Use release_breakpoint.
12438 (uninsert_breakpoint): Rename to ...
12439 (uninsert_raw_breakpoint): ... this.
12440 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12441 (reinsert_raw_breakpoint): Change parameter type to
12442 raw_breakpoint.
12443 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12444 instead.
12445 (check_breakpoints): Adjust. Use release_breakpoint.
12446 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12447 (breakpoint_inserted_here): Ditto.
12448 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12449 Don't trust the breakpoint's shadow if it is not inserted.
12450 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12451 (delete_all_breakpoints): Adjust.
12452 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12453 use delete_breakpoint_1.
12454
12455 * mem-break.h (breakpoints_supported): Delete declaration.
12456 (set_gdb_breakpoint_at): Declare.
12457 (gdb_breakpoint_here): Declare.
12458 (delete_breakpoint_at): Delete.
12459 (delete_gdb_breakpoint_at): Declare.
12460
12461 * server.h (struct raw_breakpoint): Forward declare.
12462 (struct process_info): New field `raw_breakpoints'.
12463
12464 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12465 breakpoints.
12466
12467 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12468
12469 * linux-low.c (status_pending_p_callback): Fix comment.
12470 (linux_wait_for_event_1): Move most of the internal breakpoint
12471 handling from here...
12472 (linux_wait_1): ... to here.
12473 (count_events_callback): New.
12474 (select_singlestep_lwp_callback): New.
12475 (select_event_lwp_callback): New.
12476 (cancel_breakpoints_callback): New.
12477 (select_event_lwp): New.
12478 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12479 priority to all LWPs that have had events that should be reported
12480 to the client. Cancel breakpoints when about to reporting the
12481 event to the client, not while stopping lwps. No longer cancel
12482 finished single-steps here.
12483 (cancel_finished_single_step): Delete.
12484 (cancel_finished_single_steps): Delete.
12485
12486 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12487
12488 * mem-break.c (enum bkpt_type): New.
12489 (struct breakpoint): New field `type'.
12490 (set_breakpoint_at): Change return type to struct breakpoint
12491 pointer. Set type to `other_breakpoint' by default.
12492 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12493 in the breakpoint list.
12494 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12495 (reinsert_breakpoint): Rename to ...
12496 (reinsert_raw_breakpoint): ... this.
12497 (reinsert_breakpoints_at): Adjust.
12498 * mem-break.h (struct breakpoint): Declare.
12499 (set_breakpoint_at): Change return type to struct breakpoint
12500 pointer.
12501
12502 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12503
12504 * server.c (handle_query): Assign, not compare.
12505
12506 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12507
12508 Teach linux gdbserver to step-over-breakpoints.
12509
12510 * linux-low.c (can_hardware_single_step): New.
12511 (supports_breakpoints): New.
12512 (handle_extended_wait): If stopping threads, read the stop pc of
12513 the new cloned LWP.
12514 (get_pc): New.
12515 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12516 low target doesn't support retrieving the PC.
12517 (add_lwp): Set last_resume_kind to resume_continue.
12518 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12519 (linux_attach): Don't clear stop_expected. Set the lwp's
12520 last_resume_kind to resume_stop.
12521 (linux_detach_one_lwp): Don't check for removed breakpoints.
12522 (check_removed_breakpoint): Delete.
12523 (status_pending_p): Rename to ...
12524 (status_pending_p_callback): ... this. Don't check for removed
12525 breakpoints. Don't consider threads that are stopped from GDB's
12526 perspective.
12527 (linux_wait_for_lwp): Always read the stop_pc here.
12528 (cancel_breakpoint): New.
12529 (step_over_bkpt): New global.
12530 (linux_wait_for_event_1): Implement stepping over breakpoints.
12531 (gdb_wants_lwp_stopped): New.
12532 (gdb_wants_all_stopped): New.
12533 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12534 single-step traps here. Store the thread's last reported target
12535 wait status.
12536 (send_sigstop): Don't clear stop_expected. Always set it,
12537 instead.
12538 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12539 (cancel_finished_single_step): New.
12540 (cancel_finished_single_steps): New.
12541 (wait_for_sigstop): Don't cancel finished single-step traps here.
12542 (linux_resume_one_lwp): Don't check for removed breakpoints.
12543 Don't set `step' on non-hardware step archs.
12544 (linux_set_resume_request): Ignore resume_stop requests if already
12545 stopping or stopped. Set the lwp's last_resume_kind.
12546 (resume_status_pending_p): Don't check for removed breakpoints.
12547 (need_step_over_p): New.
12548 (start_step_over): New.
12549 (finish_step_over): New.
12550 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12551 requests. Clear the thread's last reported target waitstatus.
12552 Don't use the `suspended' flag. Don't consider pending breakpoints.
12553 (linux_resume): Start a step-over if necessary.
12554 (proceed_one_lwp): New.
12555 (proceed_all_lwps): New.
12556 (unstop_all_lwps): New.
12557 * linux-low.h (struct lwp_info): Rewrite comment for the
12558 `suspended' flag. Add the `stop_pc' field. Delete the
12559 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12560 Add `'last_resume_kind' and `need_step_over' fields.
12561 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12562 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12563 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12564 (set_raw_breakpoint_at): New.
12565 (set_breakpoint_at): Rewrite to use it.
12566 (reinsert_breakpoint_handler): Delete.
12567 (set_reinsert_breakpoint): New.
12568 (reinsert_breakpoint_by_bp): Delete.
12569 (delete_reinsert_breakpoints): New.
12570 (uninsert_breakpoint): Rewrite.
12571 (uninsert_breakpoints_at): New.
12572 (reinsert_breakpoint): Rewrite.
12573 (reinsert_breakpoints_at): New.
12574 (check_breakpoints): Rewrite.
12575 (breakpoint_here): New.
12576 (breakpoint_inserted_here): New.
12577 (check_mem_read): Adjust.
12578 * mem-break.h (breakpoints_supported, breakpoint_here)
12579 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12580 (reinsert_breakpoint_by_bp): Delete declaration.
12581 (delete_reinsert_breakpoints): Declare.
12582 (reinsert_breakpoint): Delete declaration.
12583 (reinsert_breakpoints_at): Declare.
12584 (uninsert_breakpoint): Delete declaration.
12585 (uninsert_breakpoints_at): Declare.
12586 (check_breakpoints): Adjust prototype.
12587 * server.h: Adjust include order.
12588 (struct thread_info): Declare here. Add a `last_status' field.
12589
12590 2010-03-23 Michael Snyder <msnyder@vmware.com>
12591
12592 * server.c (crc32): New function.
12593 (handle_query): Add handling for 'qCRC:' request.
12594
12595 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12596
12597 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12598 lwp had been stopped by a watchpoint.
12599
12600 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12601
12602 * server.h (internal_error): Declare.
12603 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12604 * utils.c (internal_error): New function.
12605
12606 2010-03-15 Andreas Schwab <schwab@redhat.com>
12607
12608 * configure.srv: Fix typo setting srv_regobj.
12609
12610 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12611
12612 * linux-low.c (fetch_register): Avoid passing a non string literal
12613 format to `error'.
12614 (usr_store_inferior_registers): Ditto.
12615
12616 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12617
12618 * linux-low.c (linux_write_memory): Bail out early if peeking
12619 memory failed.
12620
12621 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12622
12623 * linux-low.h (struct lwp_info): New fields
12624 `stopped_by_watchpoint' and `stopped_data_address'.
12625 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12626 here, and cache them in the lwp object.
12627 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12628 directly.
12629 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12630 field.
12631 (linux_stopped_by_watchpoint): Rewrite.
12632 (linux_stopped_data_address): Rewrite.
12633
12634 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12635
12636 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12637 switching the current inferior, not before.
12638
12639 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12640
12641 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12642 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12643 i386-linux.c and amd64-linux.c.
12644 (reg-i386.o): Removed.
12645 (reg-i386.c): Likewise.
12646 (reg-i386-linux.o): Likewise.
12647 (reg-i386-linux.c): Likewise.
12648 (reg-x86-64.o): Likewise.
12649 (reg-x86-64.c): Likewise.
12650 (reg-x86-64-linux.o): Likewise.
12651 (reg-x86-64-linux.c): Likewise.
12652 (i386.o): New.
12653 (i386.c): Likewise.
12654 (i386-linux.o): Likewise.
12655 (i386-linux.c): Likewise.
12656 (amd64.o): Likewise.
12657 (amd64.c): Likewise.
12658 (amd64-linux.o): Likewise.
12659 (amd64-linux.c): Likewise.
12660
12661 * configure.srv (srv_i386_regobj): New.
12662 (srv_i386_linux_regobj): Likewise.
12663 (srv_amd64_regobj): Likewise.
12664 (srv_amd64_linux_regobj): Likewise.
12665 (srv_i386_32bit_xmlfiles): Likewise.
12666 (srv_i386_64bit_xmlfiles): Likewise.
12667 (srv_i386_xmlfiles): Likewise.
12668 (srv_amd64_xmlfiles): Likewise.
12669 (srv_i386_linux_xmlfiles): Likewise.
12670 (srv_amd64_linux_xmlfiles): Likewise.
12671 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12672 srv_xmlfiles to $srv_i386_xmlfiles.
12673 (i[34567]86-*-mingw32ce*): Likewise.
12674 (i[34567]86-*-mingw*): Likewise.
12675 (i[34567]86-*-nto*): Likewise.
12676 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12677 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12678 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12679 (x86_64-*-linux*): Likewise.
12680
12681 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12682 (init_registers_amd64_linux): New.
12683 (x86_arch_setup): Replace init_registers_x86_64_linux with
12684 init_registers_amd64_linux.
12685
12686 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12687
12688 * configure.ac: Check for libdl. If it is not available link against
12689 static libthread_db.
12690 * configure: Regenerate.
12691
12692 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12693
12694 PR9605
12695
12696 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12697 handing a read watchpoint.
12698 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12699
12700 2010-02-12 Doug Evans <dje@google.com>
12701
12702 * linux-low.c (linux_supports_tracefork_flag): Document.
12703 (linux_look_up_symbols): Add comment.
12704
12705 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12706
12707 * regcache.c (supply_register): Clear regcache if buf is NULL.
12708
12709 2010-02-02 Nicolas Roche <roche@sourceware.org>
12710 Joel Brobecker <brobecker@adacore.com>
12711
12712 * inferiors.c (find_inferior): Add function documentation.
12713 (unloaded_dll): Handle the case where the unloaded dll has not
12714 been previously registered in the dll list.
12715
12716 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12717
12718 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12719 (thumb2_breakpoint): New.
12720 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12721
12722 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12723
12724 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12725 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12726 breakpoints.
12727
12728 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12729
12730 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12731
12732 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12733
12734 * linux-s390-low.c (s390_collect_ptrace_register)
12735 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12736
12737 2010-01-21 Doug Evans <dje@google.com>
12738
12739 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12740 (PTRACE_ARG4_TYPE): New macro.
12741 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12742 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12743 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12744 (usr_store_inferior_registers): Ditto.
12745 (linux_read_memory, linux_write_memory): Ditto.
12746 (linux_test_for_tracefork): Ditto.
12747
12748 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12749 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12750
12751 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12752
12753 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12754 target.
12755
12756 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12757
12758 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12759 prototype to take a regcache. Adjust.
12760
12761 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12762
12763 * regcache.h (struct thread_info): Forward declare.
12764 (struct regcache): New.
12765 (new_register_cache): Adjust prototype.
12766 (get_thread_regcache): Declare.
12767 (free_register_cache): Adjust prototype.
12768 (registers_to_string, registers_from_string): Ditto.
12769 (supply_register, supply_register_by_name, collect_register)
12770 (collect_register_as_string, collect_register_by_name): Ditto.
12771 * regcache.c (struct inferior_regcache_data): Delete.
12772 (get_regcache): Rename to ...
12773 (get_thread_regcache): ... this. Adjust. Switch inferior before
12774 fetching registers.
12775 (regcache_invalidate_one): Adjust.
12776 (regcache_invalidate): Fix prototype.
12777 (new_register_cache): Return the new register cache.
12778 (free_register_cache): Change prototype.
12779 (realloc_register_cache): Adjust.
12780 (registers_to_string): Change prototype to take a regcache. Adjust.
12781 (registers_from_string): Ditto.
12782 (register_data): Ditto.
12783 (supply_register): Ditto.
12784 (supply_register_by_name): Ditto.
12785 (collect_register): Ditto.
12786 (collect_register_as_string): Ditto.
12787 (collect_register_by_name): Ditto.
12788 * server.c (process_serial_event): Adjust.
12789 * linux-low.h (regset_fill_func, regset_store_func): Change
12790 prototype.
12791 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12792 Change prototype.
12793 * linux-low.c (get_stop_pc): Adjust.
12794 (check_removed_breakpoint): Adjust.
12795 (linux_wait_for_event): Adjust.
12796 (linux_resume_one_lwp): Adjust.
12797 (fetch_register): Add regcache parameter. Adjust.
12798 (usr_store_inferior_registers): Ditto.
12799 (regsets_fetch_inferior_registers): Ditto.
12800 (regsets_store_inferior_registers): Ditto.
12801 (linux_fetch_registers, linux_store_registers): Ditto.
12802 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12803 regcache. Adjust.
12804 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12805 Ditto.
12806 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12807 prototype to take a regcache.
12808 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12809 * remote-utils.c (convert_ascii_to_int, outreg)
12810 (prepare_resume_reply): Change prototype to take a regcache.
12811 Adjust.
12812 * target.h (struct target_ops) <fetch_registers, store_registers>:
12813 Change prototype to take a regcache.
12814 (fetch_inferior_registers, store_inferior_registers): Change
12815 prototype to take a regcache. Adjust.
12816 * proc-service.c (ps_lgetregs): Adjust.
12817 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12818 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12819 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12820 take a regcache. Adjust.
12821 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12822 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12823 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12824 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12825 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12826 (cris_cannot_fetch_register):
12827 (cris_breakpoint_at): Change prototype to take a regcache.
12828 Adjust.
12829 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12830 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12831 to take a regcache. Adjust.
12832 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12833 Adjust.
12834 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12835 take a regcache. Adjust.
12836 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12837 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12838 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12839 * linux-mips-low.c (mips_get_pc):
12840 (mips_set_pc): Change prototype to take a regcache. Adjust.
12841 (mips_reinsert_addr): Adjust.
12842 (mips_collect_register): Change prototype to take a regcache.
12843 Adjust.
12844 (mips_supply_register):
12845 (mips_collect_register_32bit, mips_supply_register_32bit)
12846 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12847 (mips_store_fpregset): Ditto.
12848 * linux-ppc-low.c (ppc_supply_ptrace_register)
12849 (ppc_supply_ptrace_register): Ditto.
12850 (parse_spufs_run): Adjust.
12851 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12852 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12853 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12854 take a regcache. Adjust.
12855 * linux-s390-low.c (s390_collect_ptrace_register)
12856 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12857 (s390_set_pc): Change prototype to take a regcache. Adjust.
12858 (s390_arch_setup): Adjust.
12859 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12860 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12861 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12862 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12863 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12864 regcache. Adjust.
12865 (sparc_breakpoint_at): Adjust.
12866 * linux-xtensa-low.c (xtensa_fill_gregset):
12867 (xtensa_store_gregset):
12868 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12869 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12870 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12871 prototype to take a regcache. Adjust.
12872 * win32-arm-low.c (arm_fetch_inferior_register)
12873 (arm_store_inferior_register): Change prototype to take a
12874 regcache. Adjust.
12875 * win32-i386-low.c (i386_fetch_inferior_register)
12876 (i386_store_inferior_register): Change prototype to take a
12877 regcache. Adjust.
12878 * win32-low.c (child_fetch_inferior_registers)
12879 (child_store_inferior_registers): Change prototype to take a
12880 regcache. Adjust.
12881 (win32_wait): Adjust.
12882 (win32_fetch_inferior_registers): Change prototype to take a
12883 regcache. Adjust.
12884 (win32_store_inferior_registers): Adjust.
12885 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12886 store_inferior_register>: Change prototype to take a regcache.
12887
12888 2010-01-20 Doug Evans <dje@google.com>
12889
12890 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12891 #ifdef.
12892 (linux_wait_for_event1, linux_init_signals): Ditto.
12893 (W_STOPCODE): Provide definition if missing.
12894
12895 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12896
12897 * linux-low.c (linux_core_of_thread): New.
12898 (compare_ints, show_process, list_threads): New.
12899 (linux_qxfer_osdata): Report threads and cores.
12900 (linux_target_op): Register linux_core_of_thread.
12901 * remote-utils.c (prepare_resume_reply): Report the core.
12902 (buffer_xml_printf): Support %d specifier.
12903 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12904 New.
12905 (handle_query): Handle qXfer:threads. Announce availability
12906 thereof.
12907 * target.h (struct target_ops): New field core_of_thread.
12908
12909 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12910
12911 * Makefile.in (clean): Remove new generated files.
12912 (reg-s390.o, reg-s390.c): Remove rules.
12913 (reg-s390x.o, reg-s390x.c): Likewise.
12914 (s390-linux32.o, s390-linux32.c): Add rules.
12915 (s390-linux64.o, s390-linux64.c): Likewise.
12916 (s390x-linux64.o, s390x-linux64.c): Likewise.
12917 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12918 * linux-s390-low.c: Include <elf.h>.
12919 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12920 (init_registers_s390): Remove prototype.
12921 (init_registers_s390x): Likewise.
12922 (init_registers_s390_linux32): Add prototype.
12923 (init_registers_s390_linux64): Likewise.
12924 (init_registers_s390x_linux64): Likewise.
12925 (s390_num_regs_3264): New define.
12926 (s390_regmap_3264): New global variable.
12927 (s390_cannot_fetch_register): Remove obsolete check.
12928 (s390_cannot_store_register): Likewise.
12929 (s390_collect_ptrace_register): Handle upper/lower register halves.
12930 (s390_supply_ptrace_register): Likewise.
12931 (s390_fill_gregset): Update to register number changes.
12932 (s390_get_hwcap): New routine.
12933 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12934 Install appropriate regmap and register set.
12935
12936 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12937
12938 * server.c (gdbserver_version): Update copyright year to 2010.
12939 * gdbreplay.c (gdbreplay_version): Likewise.
12940
12941 2009-12-28 Doug Evans <dje@google.com>
12942
12943 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12944 elf/external.h. Include <elf.h> instead but only if necessary.
12945
12946 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12947
12948 * linux-low.c (linux_remove_process): Remove `detaching'
12949 parameter. Don't release/detach from thread_db here.
12950 (linux_kill): Release/detach from thread_db here, ...
12951 (linux_detach): ... and here, before actually detaching.
12952 (linux_wait_1): ... and here, when a process exits.
12953 * thread-db.c (any_thread_of): New.
12954 (thread_db_free): Switch the current inferior to a thread of the
12955 passed in process.
12956
12957 2009-12-21 Doug Evans <dje@google.com>
12958
12959 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12960
12961 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12962 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12963 warning ifndef __NR_tkill. Move setting of errno there too.
12964 Delete unnecessary resetting of errno after syscall.
12965 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12966
12967 * configure.ac: Check for dladdr.
12968 * config.in: Regenerate.
12969 * configure: Regenerate.
12970 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12971 (try_thread_db_load): Update.
12972
12973 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12974
12975 2009-12-18 Doug Evans <dje@google.com>
12976
12977 * event-loop.c: Include unistd.h if it exists.
12978
12979 * linux-low.c (my_waitpid): Move definition away from being in
12980 between linux_tracefork_child/linux_test_for_tracefork.
12981
12982 * gdb_proc_service.h (psaddr_t): Fix type.
12983 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12984 signature to match glibc.
12985
12986 2009-12-16 Doug Evans <dje@google.com>
12987
12988 * linux-low.c (linux_read_memory): Fix argument to read.
12989
12990 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12991
12992 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12993 events, don't leave current_inferior pointing at null.
12994
12995 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12996
12997 * win32-low.c (LOG): Delete.
12998 (OUTMSG): Output to stderr.
12999 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13000 on compile time LOG macro.
13001 (win32_wait): Fix debug output.
13002
13003 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13004
13005 * win32-low.c (win32_add_one_solib): If the dll name is
13006 "ntdll.dll", prepend the system directory to the dll path.
13007
13008 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13009
13010 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13011
13012 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13013 Vladimir Prus <vladimir@codesourcery.com>
13014
13015 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13016 * configure.ac: Check for __mcoldfire__ and set
13017 gdb_cv_m68k_is_coldfire.
13018 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13019 reg-cf.o and reg-m68k.o.
13020 * configure: Regenerated.
13021
13022 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13023
13024 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13025 Pass it to thread_db_free.
13026 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13027 proper `detaching' argument to linux_remove_process.
13028 * linux-low.h (thread_db_free): Add `detaching' parameter.
13029 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13030 to thread_db_free.
13031 (thread_db_free): Add `detaching' parameter. Only
13032 call td_ta_clear_event if detaching from process.
13033
13034 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13035
13036 * thread-db.c (thread_db_free): Fix typo.
13037
13038 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13039
13040 PR gdb/10838
13041 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13042
13043 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13044
13045 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13046 with an i686 compiler.
13047 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13048 needed.
13049 * configure: Rebuilt.
13050
13051 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13052
13053 PR gdb/10783
13054
13055 * server.c (handle_search_memory_1): Correct read_addr initialization
13056 in loop for searching subsequent chunks.
13057
13058 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13059
13060 * configure.ac: New --with-libthread-db option.
13061 * thread-db.c: Allow direct dependence on libthread_db.
13062 (thread_db_free): Adjust.
13063 * config.in: Regenerate.
13064 * configure: Likewise.
13065
13066 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13067
13068 PR gdb/10757
13069 * thread-db.c (attach_thread): New function.
13070 (maybe_attach_thread): Return success/failure.
13071 (find_new_threads_callback): Adjust.
13072 (thread_db_find_new_threads): Loop until no new threads.
13073
13074 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13075
13076 * proc-service.c (ps_lgetregs): Formatting.
13077
13078 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13079
13080 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13081 * configure.ac: Adjust.
13082 * linux-low.h (struct process_info_private): Move members to struct
13083 thread_db.
13084 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13085 * linux-low.c (linux_remove_process): Adjust.
13086 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13087 * server.c (handle_query): Move code ...
13088 (handle_monitor_command): ... here. New function.
13089 * target.h (struct target_ops): New member.
13090 * thread-db.c (struct thread_db): New.
13091 (libthread_db_search_path): New variable.
13092 (thread_db_create_event, thread_db_enable_reporting)
13093 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13094 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13095 (try_thread_db_load_1, dladdr_to_soname): New functions.
13096 (try_thread_db_load, thread_db_load_search): New functions.
13097 (thread_db_init): Search for libthread_db.
13098 (thread_db_free): New function.
13099 (thread_db_handle_monitor_command): Likewise.
13100 * config.in: Regenerate.
13101 * configure: Regenerate.
13102
13103 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13104
13105 * spu-low.c (spu_kill): Wait for inferior to terminate.
13106 Call clear_inferiors.
13107 (spu_detach): Call clear_inferiors.
13108
13109 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13110
13111 * aclocal.m4: Regenerate.
13112 * config.in: Likewise.
13113 * configure: Likewise.
13114
13115 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13116
13117 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13118 (parse_spufs_run): New function.
13119 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13120 (ppc_breakpoint_at): Handle SPU breakpoints.
13121
13122 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13123
13124 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13125 (SPUFS_MAGIC): Define.
13126 (spu_enumerate_spu_ids): New function.
13127 (linux_qxfer_spu): New function.
13128 (linux_target_ops): Install linux_qxfer_spu.
13129
13130 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13131
13132 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13133 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13134 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13135 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13136 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13137 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13138 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13139 (init_registers_powerpc_cell32l): Add prototype.
13140 (init_registers_powerpc_cell64l): Likewise.
13141 (ppc_arch_setup): Detect Cell/B.E. architecture.
13142
13143 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13144
13145 * Makefile.in (datarootdir): New variable.
13146
13147 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13148
13149 * linux-low.c (linux_write_memory): Update debugging output.
13150 * Makefile.in (clean): Add new descriptions.
13151 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13152 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13153 * configure.srv: Add new files for arm*-*-linux*.
13154 * linux-arm-low.c: Add new declarations.
13155 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13156 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13157 (HWCAP_VFPv3D16): New.
13158 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13159 instead of __IWMMXT__.
13160 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13161 (arm_arch_setup): New.
13162 (target_regsets): Remove #ifdef. Add VFP regset.
13163 (the_low_target): Use arm_arch_setup.
13164
13165 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13166
13167 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13168 the main thread again.
13169
13170 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13171
13172 Adding Neutrino gdbserver.
13173 * configure: Regenerated.
13174 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13175 * configure.srv (i[34567]86-*-nto*): New target.
13176 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13177 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13178 (nto_comctrl) [__QNX__]: New function.
13179 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13180
13181 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13182
13183 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13184 srv_tgtobj.
13185
13186 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13187 Pedro Alves <pedro@codesourcery.com>
13188
13189 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13190 don't support CONTEXT_EXTENDED_REGISTERS.
13191 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13192 (the_low_target): Install them.
13193 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13194 failing with ERROR_PIPE_NOT_CONNECTED.
13195
13196 2009-06-30 Doug Evans <dje@google.com>
13197 Pierre Muller <muller@ics.u-strasbg.fr>
13198
13199 Add h/w watchpoint support to x86-linux, win32-i386.
13200 * Makefile.in (SFILES): Add i386-low.c
13201 (i386_low_h): Define.
13202 (i386-low.o): Add dependencies.
13203 (linux-x86-low.o): Add i386-low.h dependency.
13204 (win32-i386-low.o): Ditto.
13205 * i386-low.c: New file.
13206 * i386-low.h: New file.
13207 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13208 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13209 * linux-low.c (linux_add_process): Initialize arch_private.
13210 (linux_remove_process): Free arch_private.
13211 (add_lwp): Initialize arch_private.
13212 (delete_lwp): Free arch_private.
13213 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13214 provided.
13215 * linux-low.h (process_info_private): New member arch_private.
13216 (lwp_info): New member arch_private.
13217 (linux_target_ops): New members new_process, new_thread,
13218 prepare_to_resume.
13219 (ptid_of): New macro.
13220 * linux-x86-low.c: Include stddef.h, i386-low.h.
13221 (arch_process_info): New struct.
13222 (arch_lwp_info): New struct.
13223 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13224 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13225 (i386_dr_low_get_status): New function.
13226 (x86_insert_point, x86_remove_point): New functions.
13227 (x86_stopped_by_watchpoint): New function.
13228 (x86_stopped_data_address): New function.
13229 (x86_linux_new_process, x86_linux_new_thread): New functions.
13230 (x86_linux_prepare_to_resume): New function.
13231 (the_low_target): Add entries for insert_point, remove_point,
13232 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13233 prepare_to_resume.
13234 * server.c (debug_hw_points): New global.
13235 (monitor_show_help): Document set debug-hw-points.
13236 (handle_query): Process "set debug-hw-points".
13237 * server.h (debug_hw_points): Declare.
13238 (paddress): Declare.
13239 * utils.c (NUMCELLS, CELLSIZE): New macros.
13240 (get_sell, xsnprintf, paddress): New functions.
13241 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13242 remove_point, stopped_by_watchpoint, stopped_data_address.
13243 * win32-i386-low.c: Include i386-low.h.
13244 (debug_reg_state): Replaces dr.
13245 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13246 (i386_dr_low_get_status): New function.
13247 (i386_insert_point, i386_remove_point): New functions.
13248 (i386_stopped_by_watchpoint): New function.
13249 (i386_stopped_data_address): New function.
13250 (i386_initial_stuff): Update.
13251 (get_thread_context,set_thread_context,i386_thread_added): Update.
13252 (the_low_target): Add entries for insert_point,
13253 remove_point, stopped_by_watchpoint, stopped_data_address.
13254 * win32-low.c (win32_insert_watchpoint): New function.
13255 (win32_remove_watchpoint): New function.
13256 (win32_stopped_by_watchpoint): New function.
13257 (win32_stopped_data_address): New function.
13258 (win32_target_ops): Add entries for insert_watchpoint,
13259 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13260 * win32-low.h (win32_target_ops): New members insert_point,
13261 remove_point, stopped_by_watchpoint, stopped_data_address.
13262
13263 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13264
13265 * server.c (process_serial_event): Re-return unsupported, not
13266 error, if the type isn't recognized. Re-allow supporting only
13267 insert or remove packets. Also call require_running for
13268 breakpoints. Add missing break statement to default case. Tidy.
13269 * target.h (struct target_ops): Rename insert_watchpoint to
13270 insert_point, and remove_watchpoint to remove_point.
13271
13272 * linux-low.h (struct linux_target_ops): Likewise.
13273 * linux-low.c (linux_insert_watchpoint): Rename to ...
13274 (linux_insert_point): ... this. Adjust.
13275 (linux_remove_watchpoint): Rename to ...
13276 (linux_remove_point): ... this. Adjust.
13277 (linux_target_ops): Adjust.
13278 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13279 (cris_insert_point): ... this.
13280 (cris_remove_watchpoint): Rename to ...
13281 (cris_remove_point): ... this.
13282 (the_low_target): Adjust.
13283
13284 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13285
13286 * server.c (handle_v_kill): Pass signal_pid to
13287 kill_inferior if multi_process is zero.
13288
13289 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13290
13291 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13292 * target.h (target_ops): Comment for *_watchpoint to make it clear
13293 the functions can get types '0' and '1'.
13294
13295 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13296
13297 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13298 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13299 * regcache.c (get_regcache): Likewise.
13300 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13301 * win32-low.c (child_fetch_inferior_registers): Remove check for
13302 regno 0.
13303
13304 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13305 Pedro Alves <pedro@codesourcery.com>
13306
13307 * target.h (struct target_ops) <supports_multi_process>: New
13308 callback.
13309 (target_supports_multi_process): New.
13310 * server.c (handle_query): Even if GDB reports support, only
13311 enable multi-process if the target also supports it. Report
13312 multi-process support only if the target backend supports it.
13313 * linux-low.c (linux_supports_multi_process): New function.
13314 (linux_target_ops): Install it as target_supports_multi_process
13315 callback.
13316
13317 2009-05-24 Doug Evans <dje@google.com>
13318
13319 Global renaming of find_thread_pid to find_thread_ptid.
13320 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13321 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13322 All callers updated.
13323
13324 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13325 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13326 directly.
13327
13328 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13329 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13330 (linux_resume_one_lwp): Ditto.
13331
13332 2009-05-23 Doug Evans <dje@google.com>
13333
13334 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13335 from struct inferior_list_entry * to struct lwp_info *.
13336 All callers updated.
13337
13338 2009-05-13 Doug Evans <dje@google.com>
13339
13340 * linux-x86-low.c: Don't include assert.h.
13341 (x86_siginfo_fixup): Use fatal, not assert.
13342 (x86_arch_setup): Fix comment.
13343
13344 2009-05-12 Doug Evans <dje@google.com>
13345
13346 Biarch support for i386/amd64 gdbserver.
13347 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13348 Add linux-x86-low.c.
13349 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13350 (linux-x86-low.o): Add.
13351 * linux-x86-64-low.c: Delete.
13352 * linux-i386-low.c: Delete.
13353 * linux-x86-low.c: New file.
13354 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13355 linux-x86-low.o.
13356 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13357 linux-x86-low.o.
13358 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13359 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13360 (linux_child_pid_to_exec_file): New function.
13361 (elf_64_header_p, elf_64_file_p): New functions.
13362 (siginfo_fixup): New function.
13363 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13364 give target a chance to convert layout.
13365 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13366 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13367
13368 2009-05-07 Doug Evans <dje@google.com>
13369
13370 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13371 (regsets_store_inferior_registers): Ditto.
13372
13373 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13374
13375 PR server/10048
13376
13377 * linux-low.c (must_set_ptrace_flags): Delete.
13378 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13379 of the global.
13380 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13381 `lwp->must_set_ptrace_flags' instead.
13382 (linux_wait_for_event_1): Set ptrace options here.
13383 (linux_wait_1): ... not here.
13384
13385 2009-04-30 Doug Evans <dje@google.com>
13386
13387 * inferiors.c (started_inferior_callback): New function.
13388 (attached_inferior_callback): New function.
13389 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13390 * server.c (print_started_pid, print_attached_pid): New functions.
13391 (detach_or_kill_for_exit): New function.
13392 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13393 * server.h (have_started_inferiors_p): Declare.
13394 (have_attached_inferiors_p): Declare.
13395
13396 * inferiors.c (remove_process): Fix memory leak, free process.
13397 * linux-low.c (linux_remove_process): New function.
13398 (linux_kill): Call it instead of remove_process.
13399 (linux_detach, linux_wait_1): Ditto.
13400
13401 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13402
13403 * configure.srv: Add x86 Windows CE target.
13404
13405 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13406
13407 * inferiors.c (get_thread_process): Make global.
13408 * server.h (get_thread_process): Add prototype.
13409 * thread-db.c (find_one_thread): Use get_thread_process
13410 instead of current_process.
13411 (thread_db_get_tls_address): Do not crash if called when
13412 thread layer is not yet initialized.
13413
13414 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13415
13416 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13417 * spu-low.c (current_tid): Rename to ...
13418 (current_ptid): ... this.
13419 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13420 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13421 ptid_get_lwp (current_ptid) instead of current_tid.
13422 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13423 instead of current_tid. Use find_process_pid to verify pid
13424 argument is valid. Pass proper argument to remove_process.
13425 (spu_thread_alive): Compare current_ptid instead of current_tid.
13426 (spu_resume): Likewise.
13427
13428 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13429
13430 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13431 variable.
13432
13433 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13434
13435 Implement the multiprocess extensions, and add linux multiprocess
13436 support.
13437
13438 * server.h (ULONGEST): Declare.
13439 (struct ptid, ptid_t): New.
13440 (minus_one_ptid, null_ptid): Declare.
13441 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13442 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13443 (struct inferior_list_entry): Change `id' type from unsigned from
13444 to ptid_t.
13445 (struct sym_cache, struct breakpoint, struct
13446 process_info_private): Forward declare.
13447 (struct process_info): Declare.
13448 (current_process): Declare.
13449 (all_processes): Declare.
13450 (initialize_inferiors): Declare.
13451 (add_thread): Adjust to use ptid_t.
13452 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13453 (add_process, remove_process, find_thread_pid): Declare.
13454 (find_inferior_id): Adjust to use ptid_t.
13455 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13456 (multi_process): Declare.
13457 (push_event): Adjust to use ptid_t.
13458 (read_ptid, write_ptid): Declare.
13459 (prepare_resume_reply): Adjust to use ptid_t.
13460 (clear_symbol_cache): Declare.
13461 * inferiors.c (all_processes): New.
13462 (null_ptid, minus_one_ptid): New.
13463 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13464 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13465 (add_thread): Change unsigned long to ptid. Remove gdb_id
13466 parameter. Adjust.
13467 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13468 (gdb_id_to_thread): Rename to ...
13469 (find_thread_pid): ... this. Change unsigned long to ptid.
13470 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13471 (loaded_dll, pull_pid_from_list): Adjust.
13472 (add_process, remove_process, find_process_pid)
13473 (get_thread_process, current_process, initialize_inferiors): New.
13474 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13475 (struct target_waitstatus) <related_pid>: Ditto.
13476 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13477 return type to int.
13478 (struct target_ops) <join>: Add `pid' argument.
13479 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13480 (struct target_ops) <wait>: Add `ptid' field. Change return type
13481 to ptid.
13482 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13483 (mywait): Add `ptid' argument. Change return type to ptid_t.
13484 (target_pid_to_str): Declare.
13485 * target.c (set_desired_inferior): Adjust to use ptids.
13486 (mywait): Add new `ptid' argument. Adjust.
13487 (target_pid_to_str): New.
13488 * mem-break.h (free_all_breakpoints): Declare.
13489 * mem-break.c (breakpoints): Delelete.
13490 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13491 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13492 to use per-process breakpoint list.
13493 (free_all_breakpoints): New.
13494 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13495 (symbol_cache, all_symbols_looked_up): Delete.
13496 (hexchars): New.
13497 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13498 read_ptid): New.
13499 (prepare_resume_reply): Change ptid argument's type from unsigned
13500 long to ptid_t. Adjust. Implement W;process and X;process.
13501 (free_sym_cache, clear_symbol_cache): New.
13502 (look_up_one_symbol): Adjust to per-process symbol cache. *
13503 * server.c (cont_thread, general_thread, step_thread): Change type
13504 to ptid_t.
13505 (attached): Delete.
13506 (multi_process): New.
13507 (last_ptid): Change type to ptid_t.
13508 (struct vstop_notif) <ptid>: Change type to ptid_t.
13509 (queue_stop_reply, push_event): Change `ptid' argument's type to
13510 ptid_t.
13511 (discard_queued_stop_replies): Add `pid' argument.
13512 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13513 changes. Don't reference the `attached' global.
13514 (attach_inferior): Adjust to mywait interface changes.
13515 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13516 features. Handle and report "multiprocess+". Handle
13517 "qAttached:PID".
13518 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13519 changes.
13520 (handle_v_kill): New.
13521 (handle_v_stopped): Adjust to use target_pid_to_str.
13522 (handle_v_requests): Allow multiple attaches and runs when
13523 multiprocess extensions are in effect. Handle "vKill".
13524 (myresume): Adjust to use ptids.
13525 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13526 (handle_status): Adjust to discard_queued_stop_replies interface
13527 change.
13528 (first_thread_of, kill_inferior_callback)
13529 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13530 (main): Call initialize_inferiors. Adjust to use ptids, killing
13531 and detaching from all inferiors. Handle multiprocess packet
13532 variants.
13533 * linux-low.h: Include gdb_proc_service.h.
13534 (struct process_info_private): New.
13535 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13536 <lwpid_of>: Use ptid_get_lwp.
13537 (get_lwp_thread): Adjust.
13538 (struct lwp_info): Add `dead' member.
13539 (find_lwp_pid): Declare.
13540 * linux-low.c (thread_db_active): Delete.
13541 (new_inferior): Adjust comment.
13542 (inferior_pid): Delete.
13543 (linux_add_process): New.
13544 (handle_extended_wait): Adjust.
13545 (add_lwp): Change unsigned long to ptid.
13546 (linux_create_inferior): Add process to processes table. Adjust
13547 to use ptids. Don't set new_inferior here.
13548 (linux_attach_lwp): Rename to ...
13549 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13550 it. Adjust to use ptids.
13551 (linux_attach_lwp): New.
13552 (linux_attach): Add process to processes table. Don't set
13553 new_inferior here.
13554 (struct counter): New.
13555 (second_thread_of_pid_p, last_thread_of_process_p): New.
13556 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13557 multiple processes.
13558 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13559 processes. Remove process from process table.
13560 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13561 to multiple processes.
13562 (any_thread_of): New.
13563 (linux_detach): Add `pid' argument, and handle it. Remove process
13564 from processes table.
13565 (linux_join): Add `pid' argument. Handle it.
13566 (linux_thread_alive): Change unsighed long argument to ptid_t.
13567 Consider dead lwps as not being alive.
13568 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13569 threads we're not interested in.
13570 (same_lwp, find_lwp_pid): New.
13571 (linux_wait_for_lwp): Change `pid' argument's type from int to
13572 ptid_t. Adjust.
13573 (linux_wait_for_event): Rename to ...
13574 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13575 from int to ptid_t. Adjust.
13576 (linux_wait_for_event): New.
13577 (linux_wait_1): Add `ptid' argument. Change return type to
13578 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13579 that exit from the process table.
13580 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13581 Adjust.
13582 (mark_lwp_dead): New.
13583 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13584 stopping all threads, mark its main lwp as dead.
13585 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13586 ptids.
13587 (fetch_register, usr_store_inferior_registers)
13588 (regsets_fetch_inferior_registers)
13589 (regsets_store_inferior_registers, linux_read_memory)
13590 (linux_write_memory): Inline `inferior_pid'.
13591 (linux_look_up_symbols): Adjust to use per-process
13592 `thread_db_active'.
13593 (linux_request_interrupt): Adjust to use ptids.
13594 (linux_read_auxv): Inline `inferior_pid'.
13595 (initialize_low): Don't reference thread_db_active.
13596 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13597 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13598 (ps_getpid): Return the pid of the current inferior.
13599 * thread-db.c (proc_handle, thread_agent): Delete.
13600 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13601 per-process data.
13602 (find_one_thread): Change argument type to ptid_t. Adjust to
13603 per-process data.
13604 (maybe_attach_thread): Adjust to per-process data and ptids.
13605 (thread_db_find_new_threads): Ditto.
13606 (thread_db_init): Ditto.
13607 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13608 processes table. Adjust to use ptids.
13609 (spu_kill, spu_detach): Adjust interface. Remove process from
13610 processes table.
13611 (spu_join, spu_thread_alive): Adjust interface.
13612 (spu_wait): Adjust interface. Remove process from processes
13613 table. Adjust to use ptids.
13614 * win32-low.c (current_inferior_tid): Delete.
13615 (current_inferior_ptid): New.
13616 (debug_event_ptid): New.
13617 (thread_rec): Take a ptid. Adjust.
13618 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13619 (child_delete_thread): Ditto.
13620 (do_initial_child_stuff): Add `attached' argument. Add process to
13621 processes table.
13622 (child_fetch_inferior_registers, child_store_inferior_registers):
13623 Adjust.
13624 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13625 (win32_attach): Pass 1 to do_initial_child_stuff.
13626 (win32_kill): Adjust interface. Remove process from processes
13627 table.
13628 (win32_detach): Ditto.
13629 (win32_join): Adjust interface.
13630 (win32_thread_alive): Take a ptid.
13631 (win32_resume): Adjust to use ptids.
13632 (get_child_debug_event): Ditto.
13633 (win32_wait): Adjust interface. Remove exiting process from
13634 processes table.
13635
13636 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13637
13638 Non-stop mode support.
13639
13640 * server.h (non_stop): Declare.
13641 (gdb_client_data, handler_func): Declare.
13642 (delete_file_handler, add_file_handler, start_event_loop):
13643 Declare.
13644 (handle_serial_event, handle_target_event, push_event)
13645 (putpkt_notif): Declare.
13646 * target.h (enum resume_kind): New.
13647 (struct thread_resume): Replace `step' field by `kind' field.
13648 (TARGET_WNOHANG): Define.
13649 (struct target_ops) <wait>: Add `options' argument.
13650 <supports_non_stop, async, start_non_stop>: New fields.
13651 (target_supports_non_stop, target_async): New.
13652 (start_non_stop): Declare.
13653 (mywait): Add `options' argument.
13654 * target.c (mywait): Add `options' argument. Print child exit
13655 notifications here.
13656 (start_non_stop): New.
13657 * server.c (non_stop, own_buf, mem_buf): New globals.
13658 (struct vstop_notif): New.
13659 (notif_queue): New global.
13660 (queue_stop_reply, push_event, discard_queued_stop_replies)
13661 (send_next_stop_reply): New.
13662 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13663 interface changes.
13664 (attach_inferior): In non-stop mode, don't wait for the target
13665 here.
13666 (handle_general_set): Handle QNonStop.
13667 (handle_query): When handling qC, return the current general
13668 thread, instead of the first thread of the list.
13669 (handle_query): If the backend supports non-stop mode, include
13670 QNonStop+ in the qSupported query response.
13671 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13672 and non-stop mode.
13673 (handle_v_attach, handle_v_run): Handle non-stop mode.
13674 (handle_v_stopped): New.
13675 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13676 (myresume): Adjust to use resume_kind. Handle non-stop.
13677 (queue_stop_reply_callback): New.
13678 (handle_status): Handle non-stop mode.
13679 (main): Clear non_stop flag on reconnection. Use the event-loop.
13680 Refactor serial protocol handling from here ...
13681 (process_serial_event): ... to this new function. When GDB
13682 selects any thread, select one here. In non-stop mode, wait until
13683 GDB acks all pending events before exiting.
13684 (handle_serial_event, handle_target_event): New.
13685 * remote-utils.c (remote_open): Install remote_desc in the event
13686 loop.
13687 (remote_close): Remove remote_desc from the event loop.
13688 (putpkt_binary): Rename to...
13689 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13690 (putpkt_binary): New as wrapper around putpkt_binary_1.
13691 (putpkt_notif): New.
13692 (prepare_resume_reply): In non-stop mode, don't change the
13693 general_thread.
13694 * event-loop.c: New.
13695 * Makefile.in (OBJ): Add event-loop.o.
13696 (event-loop.o): New rule.
13697
13698 * linux-low.h (pid_of): Moved here.
13699 (lwpid_of): New.
13700 (get_lwp_thread): Use lwpid_of.
13701 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13702 * linux-low.c (pid_of): Delete.
13703 (inferior_pid): Use lwpid_of.
13704 (linux_event_pipe): New.
13705 (target_is_async_p): New.
13706 (delete_lwp): New.
13707 (handle_extended_wait): Use lwpid_of.
13708 (add_lwp): Don't set lwpid field.
13709 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13710 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13711 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13712 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13713 first. Adjust to linux_wait_for_event interface changes. Use
13714 lwpid_of.
13715 (linux_detach): Don't delete the main lwp here.
13716 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13717 (status_pending_p): Don't consider explicitly suspended lwps.
13718 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13719 pointer. Add OPTIONS argument. Change return type to int. Use
13720 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13721 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13722 pointer. Add status pointer argument. Return a pid instead of a
13723 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13724 changes. In non-stop mode, don't switch to a random thread.
13725 (linux_wait): Rename to...
13726 (linux_wait_1): ... this. Add target_options argument, and handle
13727 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13728 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13729 clean exit and signal exit code. Don't stop all threads in
13730 non-stop mode. In all-stop mode, only stop all threads when
13731 reporting a stop to GDB. Handle explicit thread stop requests.
13732 (async_file_flush, async_file_mark): New.
13733 (linux_wait): New.
13734 (send_sigstop): Use lwpid_of.
13735 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13736 interface changes. In non-stop mode, don't switch to a random
13737 thread.
13738 (linux_resume_one_lwp): Use lwpid_of.
13739 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13740 (linux_resume_one_thread): ... this. Handle resume_stop. In
13741 non-stop mode, don't look for pending flag in all threads.
13742 (resume_status_pending_p): Don't consider explicitly suspended
13743 threads.
13744 (my_waitpid): Reimplement. Emulate __WALL.
13745 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13746 Use lwpid_of.
13747 (sigchld_handler, linux_supports_non_stop, linux_async)
13748 (linux_start_non_stop): New.
13749 (linux_target_ops): Register linux_supports_non_stop, linux_async
13750 and linux_start_non_stop.
13751 (initialize_low): Install SIGCHLD handler.
13752 * thread-db.c (thread_db_create_event, find_one_thread)
13753 (thread_db_get_tls_address): Use lwpid_of.
13754 * win32-low.c (win32_detach): Adjust to use resume_kind.
13755 (win32_wait): Add `options' argument.
13756 * spu-low.c (spu_resume): Adjust to use resume_kind.
13757 (spu_wait): Add `options' argument.
13758
13759 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13760
13761 Decouple target code from remote protocol.
13762
13763 * target.h (enum target_waitkind): New.
13764 (struct target_waitstatus): New.
13765 (struct target_ops) <wait>: Return an unsigned long. Take a
13766 target_waitstatus pointer instead of a char pointer.
13767 (mywait): Likewise.
13768 * target.c (mywait): Change prototype to return an unsigned long.
13769 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13770 * server.h (thread_from_wait, old_thread_from_wait): Delete
13771 declarations.
13772 (prepare_resume_reply): Change prototype to take a
13773 target_waitstatus.
13774 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13775 (last_status, last_ptid): New.
13776 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13777 pid instead of a signal.
13778 (attach_inferior): Remove "status" and "signal" parameters.
13779 Adjust.
13780 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13781 not as an address.
13782 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13783 (handle_v_requests, myresume): Remove "status" and "signal"
13784 parameters. Adjust.
13785 (handle_status): New.
13786 (main): Delete local `status'. Adjust.
13787 * remote-utils.c: Include target.h.
13788 (prepare_resume_reply): Change prototype to take a
13789 target_waitstatus. Adjust.
13790
13791 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13792 interface.
13793 * spu-low.c (spu_wait): Adjust.
13794 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13795 Delete.
13796 (win32_wait): Adjust.
13797
13798 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13799
13800 * target.h (struct thread_resume): Delete leave_stopped member.
13801 (struct target_ops): Add a `n' argument to the `resume' callback.
13802 * server.c (start_inferior): Adjust.
13803 (handle_v_cont, myresume): Adjust.
13804 * linux-low.c (check_removed_breakpoint): Adjust to resume
13805 interface change, and to removed leave_stopped field.
13806 (resume_ptr): Delete.
13807 (struct thread_resume_array): New.
13808 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13809 resume interface change.
13810 (linux_continue_one_thread, linux_queue_one_thread)
13811 (resume_status_pending_p): Check if the resume field is NULL
13812 instead of checking the leave_stopped member.
13813 (linux_resume): Adjust to the target resume interface change.
13814 * spu-low.c (spu_resume): Adjust to the target resume interface
13815 change.
13816 * win32-low.c (win32_detach, win32_resume): Ditto.
13817
13818 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13819
13820 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13821 flag.
13822 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13823 pending.
13824 (linux_continue_one_thread): Only preserve the stepping flag if
13825 there's a pending breakpoint.
13826
13827 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13828
13829 * server.c (main): After the inferior having exited, call
13830 remote_close before exiting gdbserver.
13831
13832 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13833
13834 Fix size of FPSCR in Power 7 processors.
13835 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13836 (PPC_FEATURE_HAS_DFP): New #define.
13837 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13838 size of the FPSCR.
13839
13840 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13841
13842 * server.c (handle_query) Whitespace and formatting.
13843
13844 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13845
13846 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13847 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13848 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13849 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13850 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13851 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13852 Makefile.in, configure.ac: Fix whitespace throughout.
13853 * configure: Regenerate.
13854
13855 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13856
13857 * inferiors.c (find_inferior): Make it safe for the callback
13858 function to delete the currently iterated inferior.
13859
13860 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13861
13862 * Makefile.in (linuw_low_h): Move higher.
13863 (thread-db.o): Depend on $(linux_low_h).
13864
13865 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13866
13867 Rename "process" to "lwp" throughout.
13868
13869 * linux-low.c (all_processes): Rename to...
13870 (all_lwps): ... this.
13871 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13872 (add_process): Rename to ...
13873 (add_lwp): ... this. Adjust.
13874 (linux_create_inferior): Adjust.
13875 (linux_attach_lwp): Adjust.
13876 (linux_attach): Adjust.
13877 (linux_kill_one_process): Rename to ...
13878 (linux_kill_one_lwp): ... this. Adjust.
13879 (linux_kill): Adjust.
13880 (linux_detach_one_process): Rename to ...
13881 (linux_detach_one_lwp): ... this. Adjust.
13882 (linux_detach): Adjust.
13883 (check_removed_breakpoint): Adjust.
13884 (status_pending_p): Adjust.
13885 (linux_wait_for_process): Rename to ...
13886 (linux_wait_for_lwp): ... this. Adjust.
13887 (linux_wait_for_event): Adjust.
13888 (send_sigstop): Adjust.
13889 (wait_for_sigstop): Adjust.
13890 (stop_all_processes): Rename to ...
13891 (stop_all_lwps): ... this.
13892 (linux_resume_one_process): Rename to ...
13893 (linux_resume_one_lwp): ... this. Adjust.
13894 (linux_set_resume_request, linux_continue_one_thread)
13895 (linux_queue_one_thread, resume_status_pending_p)
13896 (usr_store_inferior_registers, regsets_store_inferior_registers)
13897 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13898 Adjust.
13899 * linux-low.h (get_process): Rename to ...
13900 (get_lwp): ... this. Adjust.
13901 (get_thread_process): Rename to ...
13902 (get_thread_lwp): ... this. Adjust.
13903 (get_process_thread): Rename to ...
13904 (get_lwp_thread): ... this. Adjust.
13905 (struct process_info): Rename to ...
13906 (struct lwp_info): ... this.
13907 (all_processes): Rename to ...
13908 (all_lwps): ... this.
13909 * proc-service.c (ps_lgetregs): Adjust.
13910 * thread-db.c (thread_db_create_event, find_one_thread)
13911 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13912
13913 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13914
13915 * server.c (handle_query): Handle "qAttached".
13916
13917 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13918
13919 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13920 GPLv3, update license URL.
13921
13922 2009-03-01 Doug Evans <dje@google.com>
13923
13924 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13925 (server_h): Add gdb_signals.h.
13926 (signals.o): Update.
13927 * server.h (target_signal_from_host,target_signal_to_host_p)
13928 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13929
13930 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13931
13932 * remote-utils.c (getpkt): Also generate remote-debug
13933 information if noack_mode is set.
13934
13935 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13936
13937 * server.c (handle_query): Report qXfer:siginfo:read and
13938 qXfer:siginfo:write as supported and handle them.
13939 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13940 * linux-low.c (linux_xfer_siginfo): New.
13941 (linux_target_ops): Set it.
13942
13943 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13944
13945 * server.c (gdbserver_usage): Mention --remote-debug.
13946 (main): Accept '--remote-debug' switch.
13947
13948 2009-01-18 Doug Evans <dje@google.com>
13949
13950 * regcache.c (new_register_cache): No need to check result of xcalloc.
13951 * server.c (handle_search_memory): Back out calls to xmalloc,
13952 result is checked and error is returned to user upon failure.
13953 (handle_query): Ditto. Add more checks for result of malloc.
13954 (handle_v_cont): Check result of malloc, report error back to
13955 user upon failure.
13956 (handle_v_run): Ditto. Call freeargv.
13957 * server.h (freeargv): Declare.
13958 * utils.c (freeargv): New fn.
13959
13960 2009-01-15 Doug Evans <dje@google.com>
13961
13962 * gdbreplay.c (perror_with_name): Make arg const char *.
13963 * server.h (target_signal_to_name): Make return type const char *.
13964 * thread-db.c (thread_db_err_str): Make return type const char *.
13965 * utils.c (perror_with_name): Make arg const char *.
13966
13967 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13968
13969 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13970 when handling a EXIT_PROCESS_DEBUG_EVENT.
13971
13972 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13973
13974 * gdbreplay.c (gdbreplay_version): Update copyright year.
13975 * server.c (gdbserver_version): Likewise.
13976
13977 2009-01-05 Doug Evans <dje@google.com>
13978
13979 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13980 (handle_extended_wait): Improve comment.
13981
13982 2008-12-13 Doug Evans <dje@google.com>
13983
13984 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13985 * server.h (ATTR_MALLOC): New macro.
13986 (xmalloc,xcalloc,xstrdup): Declare.
13987 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13988 * inferiors.c: Ditto.
13989 * linux-low.c: Ditto.
13990 * mem-break.c: Ditto.
13991 * regcache.c: Ditto.
13992 * remote-utils.c: Ditto.
13993 * server.c: Ditto.
13994 * target.c: Ditto.
13995 * win32-low.c: Ditto.
13996
13997 2008-12-12 Doug Evans <dje@google.com>
13998
13999 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14000 in debugging printf.
14001
14002 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14003
14004 2008-12-09 Doug Evans <dje@google.com>
14005
14006 * linux-low.h (struct process_info): Delete member tid, unused.
14007 * thread-db.c (find_one_thread): Update.
14008 (maybe_attach_thread): Update.
14009
14010 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14011
14012 * target.h (struct target_ops): Add qxfer_osdata member.
14013 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14014 and dirent.h.
14015 (linux_qxfer_osdata): New functions.
14016 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14017 callback.
14018 * server.c (handle_query): Handle "qXfer:osdata:read:".
14019 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14020 (buffer_xml_printf): New functions.
14021 * server.h (struct buffer): New.
14022 (buffer_grow_str, buffer_grow_str0): New macros.
14023 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14024 (buffer_xml_printf): Declare.
14025
14026 2008-11-24 Doug Evans <dje@google.com>
14027
14028 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14029
14030 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14031
14032 * server.c (handle_v_run): Always use the supplied argument list.
14033
14034 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14035
14036 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14037 (xtensa_regmap_table): Add entry for scompare1.
14038
14039 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14040
14041 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14042 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14043 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14044 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14045 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14046 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14047 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14048 XML target descriptions.
14049 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14050 when inferior is running on an ISA 2.05 or later processor. Add
14051 special case to return offset for full 64-bit slot of FPSCR when
14052 in 32-bits.
14053
14054 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14055
14056 * Makefile.in (SFILES, clean): Added sparc64 files.
14057 (reg-sparc64.o, reg-sparc64.c): New.
14058 * configure.srv (sparc*-*-linux*): New configuration.
14059 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14060 syscall arguments for SPARC.
14061 (regsets_store_inferior_registers): Likewise.
14062 * linux-sparc-low.c: New file.
14063
14064 2008-10-21 Doug Evans <dje@google.com>
14065
14066 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14067 (READLINE_DIR,READLINE_DEP): Delete.
14068 (INTERNAL_CFLAGS): Update.
14069 (LINTFLAGS): Update.
14070
14071 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14072
14073 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14074 whole argv from the last run, not just argv[0].
14075
14076 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14077
14078 * regcache.c (new_register_cache): Return NULL if the register
14079 cache size isn't known yet.
14080 (free_register_cache): Avoid dereferencing a NULL regcache.
14081
14082 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14083
14084 * configure.srv: Merge MIPS and MIPS64.
14085
14086 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14087
14088 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14089
14090 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14091
14092 * Makefile.in: Add required vsx dependencies.
14093
14094 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14095 Declare init_registers_powerpc_vsx32l.
14096 Declare init_registers_powerpc_vsx64l.
14097 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14098 (ppc_arch_setup): Check for VSX in hwcap.
14099 (ppc_fill_vsxregset): New function.
14100 (ppc_store_vsxregset): New function.
14101 Add new VSX entry in regset_info target_regsets.
14102
14103 * configure.srv: Add new VSX dependencies.
14104
14105 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14106
14107 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14108 (remote_open): Set or clear transport_is_reliable.
14109 (putpkt_binary): Don't expect acks in noack mode.
14110 (getpkt): Don't send ack/nac in noack mode.
14111 * server.c (handle_general_set): Handle QStartNoAckMode.
14112 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14113 qSupported.
14114 (main): Reset noack_mode on every connection.
14115 * server.h (noack_mode): Declare.
14116
14117 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14118
14119 * Makefile.in (GDBREPLAY_OBS): New variable.
14120 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14121
14122 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14123 Daniel Jacobowitz <dan@codesourcery.com>
14124
14125 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14126 (usr_store_inferior_registers): Likewise.
14127 (regsets_store_inferior_registers): Likewise.
14128
14129 2008-07-31 Rolf Jansen <rj@surtec.com>
14130 Pedro Alves <pedro@codesourcery.com>
14131
14132 * configure.ac: Check for memmem declaration.
14133 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14134 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14135 (disable_packet_qfThreadInfo): Unconditionally compile.
14136 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14137 * configure, config.in: Regenerate.
14138
14139 2008-07-28 Doug Kwan <dougkwan@google.com>
14140
14141 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14142 (linux_write_memory): Remove declaration of errno.
14143
14144 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14145
14146 * linux-low.c (handle_extended_wait): Do not use "status"
14147 variable uninitialized.
14148
14149 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14150
14151 * server.c (handle_v_attach): Inhibit reporting dll changes.
14152
14153 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14154
14155 * remote-utils.c (prepare_resume_reply): If requested, don't
14156 output "thread:TID" in the T stop reply.
14157
14158 * server.c (disable_packet_vCont, disable_packet_Tthread)
14159 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14160 (handle_query): If requested, disable support for qC, qfThreadInfo
14161 and qsThreadInfo.
14162 (handle_v_requests): If requested, disable support for vCont.
14163 (gdbserver_show_disableable): New.
14164 (main): Handle --disable-packet and --disable-packet=LIST.
14165
14166 * server.h (disable_packet_vCont, disable_packet_Tthread)
14167 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14168
14169 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14170
14171 * server.c (gdbserver_usage): Mention --version.
14172
14173 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14174
14175 * Makefile.in (gdbreplay.o): New rule.
14176
14177 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14178
14179 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14180 message, not gdbserver.
14181
14182 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14183 Nathan Sidwell <nathan@codesourcery.com>
14184 Joseph Myers <joseph@codesourcery.com>
14185
14186 * acinclude.m4: Include ../../config/acx.m4.
14187 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14188 * configure, config.in: Regenerate.
14189 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14190 * server.c (gdbserver_version): Print PKGVERSION.
14191 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14192 (main): Adjust gdbserver_usage calls.
14193 * gdbreplay.c (version, host_name): Add declarations.
14194 (gdbreplay_version, gdbreplay_usage): New.
14195 (main): Accept --version and --help options.
14196
14197 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14198
14199 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14200 (arm_breakpoint_at): Handle Thumb.
14201 (the_low_target): Add comment.
14202
14203 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14204
14205 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14206
14207 2008-05-09 Doug Evans <dje@google.com>
14208
14209 * server.h (decode_search_memory_packet): Declare.
14210 * remote-utils.c (decode_search_memory_packet): New fn.
14211 * server.c (handle_search_memory_1): New fn.
14212 (handle_search_memory): New fn.
14213 (handle_query): Process qSearch:memory packets.
14214
14215 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14216
14217 * regcache.c (registers_length): Remove.
14218 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14219 full register packet.
14220 * regcache.h (registers_length): Remove prototype.
14221 * server.h (PBUFSIZ): Define to 16384.
14222
14223 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14224
14225 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14226 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14227 powerpc-64l.o, and powerpc-altivec64l.o.
14228 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14229 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14230 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14231 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14232 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14233 to srv_xmlfiles.
14234
14235 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14236 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14237 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14238 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14239 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14240 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14241 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14242 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14243 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14244 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14245 (clean): Update.
14246
14247 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14248 (init_registers_powerpc_32l): ... this new prototype.
14249 (init_registers_powerpc_32): Remove, replace by ...
14250 (init_registers_powerpc_altivec32l): ... this new prototype.
14251 (init_registers_powerpc_e500): Remove, replace by ...
14252 (init_registers_powerpc_e500l): ... this new prototype.
14253 (init_registers_ppc64): Remove, replace by ...
14254 (init_registers_powerpc_64l): ... this new prototype.
14255 (init_registers_powerpc_64): Remove, replace by ...
14256 (init_registers_powerpc_altivec64l): ... this new prototype.
14257 (ppc_num_regs): Set to 73.
14258 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14259 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14260 (ppc_cannot_store_register): Handle orig_r3 and trap.
14261 (ppc_arch_setup): Update init_registers_... calls.
14262 (ppc_fill_gregset): Handle orig_r3 and trap.
14263
14264 * inferiors.c (clear_inferiors): Reset current_inferior.
14265
14266 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14267
14268 * acinclude.m4: Add override.m4.
14269 * configure: Regenerate.
14270
14271 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14272
14273 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14274 initial call to init_register_ppc64.
14275
14276 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14277
14278 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14279 single powerpc*-*-linux* case.
14280 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14281
14282 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14283
14284 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14285 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14286 from reg_xmlfiles.
14287 * linux-ppc-low.c: Include <elf.h>.
14288 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14289 (ppc_hwcap): New global variable.
14290 (ppc_regmap): Remove __SPE__ #ifdef sections.
14291 (ppc_regmap_e500): New global variable.
14292 (ppc_cannot_store_register): Update __SPE__ special case.
14293 (ppc_get_hwcap): New function.
14294 (ppc_arch_setup): Use it to determine whether inferior supports
14295 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14296 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14297 Do not access registers if target does not support AltiVec.
14298 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14299 Do not access registers if target does not support SPE.
14300 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14301
14302 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14303
14304 * linux-low.c (disabled_regsets, num_regsets): New.
14305 (use_regsets_p): Delete.
14306 (linux_wait_for_process): Clear disabled_regsets.
14307 (regsets_fetch_inferior_registers): Check and set it.
14308 (regsets_store_inferior_registers): Likewise.
14309 (linux_fetch_registers, linux_store_registers): Do not use
14310 use_regsets_p.
14311 (initialize_low): Allocate disabled_regsets.
14312
14313 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14314
14315 * Makefile.in (LIBOBJS): New.
14316 (OBS): Use LIBOBJS.
14317 (memmem.o): New rule.
14318 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14319 * configure: Regenerated.
14320
14321 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14322
14323 * server.c (handle_query): Never return "unsupported" for
14324 qXfer:features:read queries.
14325
14326 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14327
14328 * server.c (get_features_xml): Fix inverted condition.
14329 (handle_query): Always support qXfer:feature:read.
14330
14331 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14332
14333 * server.c (wrapper_argv): New.
14334 (start_inferior): Handle wrapper_argv. If set, expect an extra
14335 trap.
14336 (gdbserver_usage): Document --wrapper.
14337 (main): Parse --wrapper.
14338
14339 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14340
14341 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14342 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14343 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14344 (ppc_set_pc): Likewise.
14345 (ppc_arch_setup): New function.
14346 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14347 of collect_register.
14348 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14349
14350 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14351
14352 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14353 instead of linux-ppc64-low.o.
14354 * linux-ppc64-low.c: Remove file.
14355 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14356 (linux-ppc64-low.o): Remove rule.
14357
14358 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14359 (init_registers_powerpc_64): Likewise.
14360 (ppc_regmap): Conditionally define depending on __powerpc64__.
14361 (ppc_cannot_store_register): Do not special-case "fpscr" when
14362 compiled on __powerpc64__.
14363 (ppc_collect_ptrace_register): New function.
14364 (ppc_supply_ptrace_register): New function.
14365 (ppc_breakpoint): Change type to "unsigned int".
14366 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14367 (the_low_target): Conditionally provide initializers for the
14368 arch_setup member depending on __powerpc64__. Install
14369 collect_ptrace_register and supply_ptrace_register members.
14370
14371 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14372
14373 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14374 * server.c (gdbserver_xmltarget): Define.
14375 (get_features_xml): Use it to replace "target.xml" and arch_string.
14376
14377 * configure.srv: Remove srv_xmltarget. Add XML files that were
14378 mentioned there to srv_xmlfiles instead. Remove conditional tests
14379 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14380 srv_xmlfiles and srv_regobj to include all possible choices.
14381 * configure.ac (srv_xmltarget): Remove.
14382 (srv_xmlfiles): Do not add "target.xml".
14383 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14384 checks for supplementary target information.
14385 * configure: Regenerate.
14386 * Makefile.in (XML_TARGET): Remove.
14387 (target.xml): Remove rule.
14388 (clean): Do not clean up target.xml.
14389 (.PRECIOUS): Do not mention target.xml.
14390
14391 * target.h (struct target_ops): Remove arch_string member.
14392 * linux-low.c (linux_arch_string): Remove.
14393 (linux_target_ops): Remove arch_string initializer.
14394 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14395 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14396 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14397 * spu-low.c (spu_arch_string): Remove.
14398 (spu_target_ops): Remove arch_string initializer.
14399 * win32-low.c (win32_arch_string): Remove.
14400 (win32_target_ops): Remove arch_string initializer.
14401 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14402 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14403 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14404
14405 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14406
14407 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14408 by collect_ptrace_register and supply_ptrace_register hooks.
14409 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14410 instead of checking for the_low_target.left_pad_xfer.
14411 (usr_store_inferior_registers): Use collect_ptrace_register callback
14412 instead of checking for the_low_target.left_pad_xfer.
14413
14414 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14415 (s390_supply_ptrace_register): Likewise.
14416 (s390_fill_gregset): Call s390_collect_ptrace_register.
14417 (the_low_target): Update.
14418
14419 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14420 (ppc_supply_ptrace_register): Likewise.
14421 (the_low_target): Update.
14422
14423 * linux-i386-low.c (the_low_target): Update.
14424 * linux-x86-64-low.c (the_low_target): Update.
14425
14426 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14427
14428 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14429 reg-s390.o and reg-s390x.o.
14430
14431 * linux-low.c (new_inferior): New global variable.
14432 (linux_create_inferior, linux_attach): Set it.
14433 (linux_wait_for_process): Call the_low_target.arch_setup after the
14434 target has stopped for the first time.
14435 (initialize_low): Do not call the_low_target.arch_setup.
14436
14437 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14438 (s390_set_pc): Likewise.
14439 (s390_arch_setup): New function.
14440 (the_low_target): Use s390_arch_setup as arch_setup routine.
14441
14442 * regcache.c (realloc_register_cache): New function.
14443 (set_register_cache): Call it for each existing regcache.
14444
14445 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14446
14447 * server.h (init_registers): Remove prototype.
14448
14449 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14450 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14451 instead of init_registers ().
14452 * linux-arm-low.c (init_registers_arm): Add prototype.
14453 (init_registers_arm_with_iwmmxt): Likewise.
14454 (the_low_target): Add initializer for arch_setup field.
14455 * linux-cris-low.c (init_registers_cris): Add prototype.
14456 (the_low_target): Add initializer for arch_setup field.
14457 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14458 (the_low_target): Add initializer for arch_setup field.
14459 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14460 (the_low_target): Add initializer for arch_setup field.
14461 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14462 (the_low_target): Add initializer for arch_setup field.
14463 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14464 (the_low_target): Add initializer for arch_setup field.
14465 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14466 (the_low_target): Add initializer for arch_setup field.
14467 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14468 (init_registers_mips64_linux): Likewise.
14469 (the_low_target): Add initializer for arch_setup field.
14470 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14471 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14472 (the_low_target): Add initializer for arch_setup field.
14473 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14474 (init_registers_powerpc_64): Likewise.
14475 (the_low_target): Add initializer for arch_setup field.
14476 * linux-s390-low.c (init_registers_s390): Add prototype.
14477 (init_registers_s390x): Likewise.
14478 (the_low_target): Add initializer for arch_setup field.
14479 * linux-sh-low.c (init_registers_sh): Add prototype.
14480 (the_low_target): Add initializer for arch_setup field.
14481 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14482 (the_low_target): Add initializer for arch_setup field.
14483 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14484 (the_low_target): Add initializer for arch_setup field.
14485
14486 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14487 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14488 instead of init_registers ().
14489 * win32-arm-low.c (init_registers_arm): Add prototype.
14490 (the_low_target): Add initializer for arch_setup field.
14491 * win32-i386-low.c (init_registers_i386): Add prototype.
14492 (the_low_target): Add initializer for arch_setup field.
14493
14494 * spu-low.c (init_registers_spu): Add prototype.
14495 (initialize_low): Call initialie_registers_spu () instead of
14496 initialize_registers ().
14497
14498 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14499
14500 * server.c (handle_v_requests): When handling the vRun and vAttach
14501 packets, if already debugging a process, don't kill it. Return an
14502 error instead.
14503
14504 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14505
14506 * server.c (handle_query): Correct length check.
14507
14508 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14509
14510 * win32-low.c (do_initial_child_stuff): Add process handle
14511 parameter. Set current_process_handle and current_process_id from the
14512 parameters. Clear globals.
14513 (win32_create_inferior): Don't set current_process_handle and
14514 current_process_id here. Instead pass them on the call to
14515 do_initial_child_stuff.
14516 (win32_attach): Likewise.
14517 (win32_clear_inferiors): New.
14518 (win32_kill): Don't close the current process handle or the
14519 current thread handle here. Instead call win32_clear_inferiors.
14520 (win32_detach): Don't open a new handle to the process. Call
14521 win32_clear_inferiors.
14522 (win32_join): Don't rely on current_process_handle; open a new
14523 handle using the process id.
14524 (win32_wait): Call win32_clear_inferiors when the inferior process
14525 has exited.
14526
14527 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14528
14529 * server.c (monitor_show_help): Add "exit".
14530
14531 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14532
14533 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14534 (clean): Add reg-xtensa.c.
14535 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14536 * configure.srv (xtensa*-*-linux*) New target.
14537 * linux-xtensa-low.c: New.
14538 * xtensa-xtregs.c: New.
14539
14540 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14541
14542 * hostio.c: Don't include errno.h.
14543 (errno_to_fileio_errno): Move to hostio-errno.
14544 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14545 error number outputting to the target->hostio_last_error callback.
14546 (hostio_packet_error): Use FILEIO_EINVAL directly.
14547 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14548 calls to hostio_error.
14549 * hostio-errno.c: New.
14550 * server.h (hostio_last_error_from_errno): Declare.
14551 * target.h (target_ops): Add hostio_last_error member.
14552 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14553 as hostio_last_error handler.
14554 * spu-low.c (spu_target_ops): Likewise.
14555 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14556 (wince_hostio_last_error): New functions.
14557 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14558 as hostio_last_error handler.
14559 (win32_target_ops) [!_WIN32_WCE]: Register
14560 hostio_last_error_from_errno as hostio_last_error handler.
14561 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14562 (hostio-errno.o): New rule.
14563 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14564 * configure.srv (srv_hostio_err_objs): New variable. Default to
14565 hostio-errno.o.
14566 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14567 * configure: Regenerate.
14568
14569 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14570
14571 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14572 (linux_kill, linux_detach): Clean up the process list.
14573 * remote-utils.c (remote_open): Improve port number parsing.
14574 (putpkt_binary, input_interrupt): Only send interrupts if the target
14575 is running.
14576 * server.c (extended_protocol): Make static.
14577 (attached): Define earlier.
14578 (exit_requested, response_needed, program_argv): New variables.
14579 (target_running): New.
14580 (start_inferior): Clear attached here.
14581 (attach_inferior): Set attached here.
14582 (require_running): Define.
14583 (handle_query): Use require_running and target_running. Implement
14584 "monitor exit".
14585 (handle_v_attach, handle_v_run): New.
14586 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14587 (gdbserver_usage): Update.
14588 (main): Redo argument parsing. Handle --debug and --multi. Handle
14589 --attach along with other options or after the port. Save
14590 program_argv. Support no initial program. Resynchronize
14591 communication with GDB after an error. Handle "monitor exit".
14592 Use require_running and target_running. Always allow the extended
14593 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14594 restart in extended mode.
14595 * README: Refer to the GDB manual. Update --attach usage.
14596
14597 2007-12-20 Andreas Schwab <schwab@suse.de>
14598
14599 * linux-low.c (STACK_SIZE): Define.
14600 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14601 (linux_test_for_tracefork): Likewise.
14602
14603 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14604
14605 * linux-low.c (linux_wait_for_event): Update messages. Do not
14606 reinsert auto-delete breakpoints.
14607 * mem-break.c (struct breakpoint): Change return type of handler to
14608 int.
14609 (set_breakpoint_at): Update handler type.
14610 (reinsert_breakpoint_handler): Return 1 instead of calling
14611 delete_breakpoint.
14612 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14613 setting a new one.
14614 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14615 * mem-break.h (set_breakpoint_at): Update handler type.
14616 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14617 * win32-low.c (auto_delete_breakpoint): New.
14618 (get_child_debug_event): Use it.
14619
14620 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14621
14622 * configure.ac: Check for pread and pwrite.
14623 * hostio.c (handle_pread): Fall back to lseek and read.
14624 (handle_pwrite): Fall back to lseek and write.
14625 * config.in, configure: Regenerated.
14626
14627 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14628
14629 * server.c (myresume): Add own_buf argument.
14630 (main): Update calls.
14631
14632 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14633
14634 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14635 * remote-utils.c (remote_open): Do not call disable_async_io.
14636 (block_async_io): Delete.
14637 (unblock_async_io): Make static.
14638 (initialize_async_io): New.
14639 * server.c (handle_v_cont): Handle async I/O here.
14640 (myresume): Likewise. Move other common resume tasks here...
14641 (main): ... from here. Call initialize_async_io. Disable async
14642 I/O before the main loop.
14643 * server.h (initialize_async_io): Declare.
14644 (block_async_io, unblock_async_io): Delete prototypes.
14645 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14646
14647 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14648
14649 * remote-utils.c (readchar): Allow binary data in received messages.
14650
14651 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14652
14653 * win32-low.c (attaching): New global.
14654 (win32_create_inferior): Clear the `attaching' global.
14655 (win32_attach): Set the `attaching' global.
14656 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14657 attaching. Only set a breakpoint at the entry point if not
14658 attaching.
14659
14660 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14661
14662 * server.c (main): Don't report dll events on the initial
14663 connection on attaches.
14664
14665 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14666
14667 * server.c (main): Relax numerical bases supported for the pid of
14668 the --attach command line argument.
14669
14670 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14671
14672 * win32-low.c (win32_attach): Call OpenProcess before
14673 DebugActiveProcess, not after. Add last error output to error
14674 call.
14675
14676 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14677
14678 * win32-low.c (win32_get_thread_context)
14679 (win32_set_thread_context): New functions.
14680 (thread_rec): Use win32_get_thread_context.
14681 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14682 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14683 field.
14684
14685 2007-12-03 Leo Zayas
14686 Pedro Alves <pedro_alves@portugalmail.pt>
14687
14688 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14689 global variables.
14690 (child_add_thread): Minor cleanup.
14691 (child_continue): Resume artificially suspended threads before
14692 calling ContinueDebugEvent.
14693 (suspend_one_thread): New.
14694 (fake_breakpoint_event): New.
14695 (get_child_debug_event): Change return type to int. Check here if
14696 gdb sent an interrupt request. If a soft interrupt was requested,
14697 fake a breakpoint event. Return 0 if there is no event to handle,
14698 and 1 otherwise.
14699 (win32_wait): Don't check here if gdb sent an interrupt request.
14700 Ensure there is a valid event to handle.
14701 (win32_request_interrupt): Add soft interruption method as last
14702 resort.
14703
14704 2007-12-03 Leo Zayas
14705 Pedro Alves <pedro_alves@portugalmail.pt>
14706
14707 * win32-low.h (win32_thread_info): Add descriptions to the
14708 structure members. Replace `suspend_count' counter by a
14709 `suspended' flag.
14710 * win32-low.c (thread_rec): Update condition of when to get the
14711 context from the inferior. Rely on ContextFlags being set if it
14712 has already been retrieved. Only suspend the inferior thread if
14713 we haven't already. Warn if that fails.
14714 (continue_one_thread): s/suspend_count/suspended/. Only call
14715 ResumeThread once. Warn if that fails.
14716
14717 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14718
14719 * win32-low.c (win32_wait): Don't read from the inferior when it
14720 has already exited.
14721
14722 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14723
14724 * Makefile.in (win32_low_h): New variable.
14725 (win32-low.o): Add dependency on $(win32_low_h).
14726 (win32-arm-low.o, win32-i386-low.o): New rules.
14727
14728 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * hostio.c: Correct copyright year.
14731
14732 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14733
14734 * Makefile.in (OBS): Add hostio.o.
14735 (hostio.o): New rule.
14736 * server.h (handle_vFile): Declare.
14737 * hostio.c: New file.
14738 * server.c (handle_v_requests): Take packet_len and new_packet_len
14739 for binary packets. Call handle_vFile.
14740 (main): Update call to handle_v_requests.
14741
14742 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14743
14744 * linux-low.c: Include <sched.h>.
14745
14746 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14747
14748 * linux-low.c (linux_tracefork_grandchild): New.
14749 (linux_tracefork_child): Use clone.
14750 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14751
14752 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14753
14754 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14755
14756 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14757
14758 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14759
14760 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14761
14762 * inferiors.c (change_inferior_id): Delete.
14763 (add_pid_to_list, pull_pid_from_list): New.
14764 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14765 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14766 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14767 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14768 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14769 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14770 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14771 (using_threads): Always set to 1.
14772 (handle_extended_wait): New.
14773 (add_process): Do not set TID.
14774 (linux_create_inferior): Set must_set_ptrace_flags.
14775 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14776 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14777 (linux_thread_alive): Rename TID argument to LWPID.
14778 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14779 (linux_wait_for_event): Do not use TID or check using_threads. Update
14780 call to dead_thread_notify. Call handle_extended_wait.
14781 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14782 (send_sigstop): Delete sigstop_sent.
14783 (wait_for_sigstop): Avoid TID.
14784 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14785 (linux_test_for_tracefork): New.
14786 (linux_lookup_signals): Use thread_db_active and
14787 linux_supports_tracefork_flag.
14788 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14789 * linux-low.h (get_process_thread): Avoid TID.
14790 (struct process_ifo): Move thread_known and tid to the end. Remove
14791 sigstop_sent.
14792 (linux_attach_lwp, thread_db_init): Update prototypes.
14793 * server.h (change_inferior_id): Delete prototype.
14794 (add_pid_to_list, pull_pid_from_list): New prototypes.
14795 * thread-db.c (thread_db_use_events): New.
14796 (find_first_thread): Rename to...
14797 (find_one_thread): ...this. Update callers and messages. Do not
14798 call fatal. Check thread_db_use_events. Do not call
14799 change_inferior_id or new_thread_notify.
14800 (maybe_attach_thread): Update. Do not call new_thread_notify.
14801 (thread_db_init): Set thread_db_use_events. Check use_events.
14802 * utils.c (fatal, warning): Correct message prefix.
14803
14804 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14805
14806 * Makefile.in (clean): Remove new files.
14807 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14808 (powerpc-64.o, powerpc-64.c): New rules.
14809 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14810 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14811 with SPE.
14812 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14813 SPE targets.
14814 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14815 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14816 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14817 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14818 (target_regsets): Add AltiVec and SPE register sets.
14819 * configure.ac: Check for AltiVec and SPE.
14820 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14821 (ppc_fill_vrregset, ppc_store_vrregset): New.
14822 (target_regsets): Add AltiVec register set.
14823 * configure: Regenerated.
14824
14825 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14826
14827 * linux-low.c (O_LARGEFILE): Define.
14828 (linux_read_memory): Use /proc/PID/mem.
14829 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14830 * configure, config.in: Regenerated.
14831
14832 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14833
14834 * linux-low.c (linux_wait_for_event): Do not pass signals while
14835 single-stepping.
14836
14837 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14838
14839 * win32-low.c (create_process): New.
14840 (win32_create_inferior): Use create_process instead of
14841 CreateProcess. If create_process failed retry appending an ".exe"
14842 suffix. Store the GetLastError result immediatelly after
14843 create_process calls and use it on the call to error.
14844
14845 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14846
14847 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14848
14849 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14850
14851 * configure.ac: Switch license to GPLv3.
14852
14853 2007-08-01 Michael Snyder <msnyder@access-company.com>
14854
14855 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14856
14857 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14858
14859 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14860 typedef.
14861 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14862 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14863 CloseToolhelp32Snapshot.
14864 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14865 CloseToolhelp32Snapshot.
14866
14867 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14868
14869 * server.c (main): Check for inferior exit before main loop.
14870
14871 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14872
14873 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14874 instead of on tmp_desc.
14875
14876 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14877 Daniel Jacobowitz <dan@codesourcery.com>
14878
14879 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14880 (add_thread): Minor cleanups.
14881 (clear_inferiors): Move lower in the file. Clear the DLL
14882 list.
14883 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14884 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14885 (xml_escape_text): New.
14886 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14887 for qSupported.
14888 (handle_v_cont): Report errors.
14889 (gdbserver_version): Update.
14890 (main): Correct size of own_buf. Do not report initial DLL events.
14891 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14892 (unloaded_dll, xml_escape_text): New.
14893 * win32-low.c (enum target_waitkind): Update comments.
14894 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14895 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14896 (win32_EnumProcessModules, win32_GetModuleInformation)
14897 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14898 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14899 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14900 (win32_Module32First, win32_Module32Next, load_toolhelp)
14901 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14902 (get_child_debug_event): Handle DLL events.
14903 (win32_wait): Likewise.
14904
14905 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14906
14907 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14908 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14909
14910 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14911
14912 * win32-low.c (handle_output_debug_string): Ignore event if not
14913 waiting.
14914
14915 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14916
14917 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14918
14919 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14920
14921 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14922
14923 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14924
14925 * inferiors.c (change_inferior_id): Add comment.
14926 * linux-low.c (check_removed_breakpoint): Add an early
14927 prototype. Improve debug output.
14928 (linux_attach): Doc update.
14929 (linux_detach_one_process, linux_detach): Clean up before releasing
14930 each process.
14931 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14932 * linux-low.h (struct process_info): Doc improvement.
14933 * mem-break.c (delete_all_breakpoints): New.
14934 * mem-break.h (delete_all_breakpoints): New prototype.
14935 * thread-db.c (find_first_thread): New.
14936 (thread_db_create_event): Call it instead of
14937 thread_db_find_new_threads. Clean up unused variables.
14938 (maybe_attach_thread): Remove first thread handling.
14939 (thread_db_find_new_threads): Use find_first_thread.
14940 (thread_db_get_tls_address): Likewise.
14941
14942 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14943
14944 * thread-db.c (thread_db_find_new_threads): Add prototype.
14945 (thread_db_create_event): Check for the main thread before adding
14946 a new thread.
14947 (maybe_attach_thread): Only enable event reporting if TID == 0.
14948 (thread_db_get_tls_address): Check for new threads.
14949
14950 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14951
14952 * linux-low.c (linux_create_inferior): Try execv before execvp.
14953 * spu-low.c (spu_create_inferior): Likewise.
14954
14955 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14956
14957 * linux-low.c (linux_create_inferior): Change execv to execvp.
14958 * spu-low.c (spu_create_inferior): Likewies.
14959
14960 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14961
14962 * Makefile.in (clean): Clean new files instead of deleted ones.
14963 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14964 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14965 rules.
14966 * configure.srv: Specify XML files and new regformats for MIPS and
14967 MIPS64 GNU/Linux.
14968 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14969 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14970 an entry for the restart register.
14971 (mips_cannot_fetch_register, mips_cannot_store_register)
14972 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14973 register names to match the XML descriptions.
14974 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14975 restart register instead of $0.
14976
14977 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14978 Markus Deuling <deuling@de.ibm.com>
14979
14980 * remote-utils.c (decode_xfer_write): New function.
14981 * server.h (decode_xfer_write): Add prototype.
14982 * server.c (handle_query): Add PACKET_LEN argument. Support
14983 qXfer:spu:read and qXfer:spu:write packets.
14984 (main): Pass packet_len to handle_query.
14985 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14986 * target.h (target_ops): Add qxfer_spu.
14987
14988 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14989
14990 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14991 accessing non-seekable spufs files.
14992
14993 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14994
14995 * server.c (handle_query): Add reply for qC packet.
14996
14997 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14998 Leo Zayas <lerele@champenstudios@com>
14999
15000 * server.h (check_remote_input_interrupt_request): New function.
15001 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15002 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15003 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15004 (check_remote_input_interrupt_request): New function.
15005 * server.h (check_remote_input_interrupt_request): Declare.
15006 * win32-low.c (winapi_DebugBreakProcess,
15007 winapi_GenerateConsoleCtrlEvent): New typedefs.
15008 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15009 to 250 ms.
15010 (win32_wait): Check for remote interrupt request
15011 with check_remote_input_interrupt_request.
15012 (win32_request_interrupt): New function.
15013 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15014
15015 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15016
15017 * win32-low.c (debug_registers_changed,
15018 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15019 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15020 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15021 (thread_rec): Get context using the low target.
15022 (child_add_thread): Call thread_added on the low target,
15023 which does the same thing.
15024 (regptr): Delete.
15025 (do_initial_child_stuff): Remove debug registers references.
15026 Set context using the low target. Resume threads after
15027 setting the contexts.
15028 (child_continue): Remove dead variable. Remove debug
15029 registers references.
15030 (child_fetch_inferior_registers): Go through the low target.
15031 (do_child_store_inferior_registers): Remove.
15032 (child_store_inferior_registers): Go through the low target.
15033 (win32_resume): Remove debug registers references.
15034 Set context using the low target.
15035 (handle_exception): Change return type to void. Don't record
15036 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15037 first chance exception.
15038 (get_child_debug_event): Change return type to void. Remove
15039 goto loop. Always return after waiting for debug event.
15040 (win32_wait): Convert to switch statement. Handle spurious
15041 events.
15042
15043 * win32-i386-low.c (debug_registers_changed,
15044 debug_registers_used): New.
15045 (initial_stuff): Rename to ...
15046 (i386_initial_stuff): ... this. Clear debug registers
15047 state variables.
15048 (store_debug_registers): Delete.
15049 (i386_get_thread_context): New.
15050 (load_debug_registers): Delete.
15051 (i386_set_thread_context): New.
15052 (i386_thread_added): New.
15053 (single_step): Rename to ...
15054 (i386_single_step): ... this.
15055 (do_fetch_inferior_registers): Rename to ...
15056 (i386_fetch_inferior_register): ... this.
15057 (i386_store_inferior_register): New.
15058 (the_low_target): Adapt to new interface.
15059
15060 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15061 (arm_get_thread_context): New.
15062 (arm_set_thread_context): New.
15063 (regptr): New.
15064 (do_fetch_inferior_registers): Rename to ...
15065 (arm_fetch_inferior_register): ... this.
15066 (arm_store_inferior_register): New.
15067 (arm_wince_breakpoint): Reimplement as unsigned long.
15068 (arm_wince_breakpoint_len): Define.
15069 (the_low_target): Adapt to new interface.
15070
15071 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15072 load_debug_registers. Add get_thread_context, set_thread_context,
15073 thread_added and store_inferior_register. Rename
15074 fetch_inferior_registers to fetch_inferior_register.
15075 (regptr): Remove declaration.
15076
15077 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15078
15079 * linux-low.c (linux_detach): Change return type to int. Return 0.
15080 * spu-low.c (spu_detach): Likewise.
15081
15082 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15083
15084 * target.h (target_ops): Change return type of detach to int.
15085 Add join.
15086 (join_inferior): New.
15087 * server.c (main): Don't skip detach support on mingw32.
15088 If the inferior doesn't support detaching return error.
15089 Call join_inferior instead of using waitpid.
15090 * linux-low.c (linux_join): New.
15091 (linux_target_op): Add linux_join.
15092 * spu-low.c (spu_join): New.
15093 (spu_target_ops): Add spu_join.
15094 * win32-low.c (win32_detach): Adapt to new interface.
15095 Reopen current_process_handle before detaching. Issue a child
15096 resume before detaching.
15097 (win32_join): New.
15098 (win32_target_op): Add win32_join.
15099
15100 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15101
15102 * win32-low.c (win32-attach): Fix return value.
15103 * target.h (target_ops): Describe ATTACH return values.
15104
15105 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15106
15107 * win32-low.c (GETPROCADDRESS): Define.
15108 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15109 (winapi_DebugSetProcessKillOnExit): Likewise.
15110 (win32_create_inferior): Force usage of ansi CreateProcessA.
15111 (win32_attach): Use GETPROCADDRESS.
15112 (win32_detach): Likewise.
15113
15114 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15115
15116 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15117
15118 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15119
15120 * win32-low.c: Commit leftover changes from 2007-03-29.
15121
15122 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15123
15124 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15125 fields short instead of int. Add explicit padding.
15126 (i387_cache_to_fsave): Remove unnecessary casts.
15127 (i387_fsave_to_cache): Doc fix.
15128 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15129
15130 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15131
15132 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15133 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15134
15135 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15136
15137 * configure.srv (arm*-*-mingw32ce*): Move near the other
15138 arm targets.
15139
15140 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15141
15142 * configure.ac: Add errno checking.
15143 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15144 sys/file.h and malloc.h.
15145 (AC_CHECK_DECLS): Add perror.
15146 (srv_mingwce): Handle.
15147 * configure.srv (i[34567]86-*-cygwin*): Add
15148 win32-i386-low.o to srv_tgtobj.
15149 (i[34567]86-*-mingw*): Likewise.
15150 (arm*-*-mingw32ce*): Add case.
15151 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15152 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15153 [__MINGW32CE__] (strerror): New function.
15154 [__MINGW32CE__] (errno): Define to GetLastError.
15155 [__MINGW32CE__] (COUNTOF): New macro.
15156 (remote_open): Remove extra close call.
15157 * mem-break.c (delete_breakpoint_at): New function.
15158 * mem-break.h (delete_breakpoint_at): Declare.
15159 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15160 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15161 [USE_WIN32API] (read, write): Add char* casts.
15162 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15163 * server.h: Include wincecompat.h on Windows CE.
15164 [HAVE_ERRNO_H]: Check.
15165 (perror): Declare if not declared.
15166 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15167 (perror_with_name): Remove errno declaration.
15168 * wincecompat.h: New.
15169 * wincecompat.c: New.
15170 * win32-low.h: New.
15171 * win32-arm-low.c: New.
15172 * win32-i386-low.c: New.
15173 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15174 (OUTMSG2): Make it safe.
15175 (_T): New macro.
15176 (COUNTOF): New macro.
15177 (NUM_REGS): Get it from the low target.
15178 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15179 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15180 (thread_rec): Let low target handle debug registers.
15181 (child_add_thread): Likewise.
15182 (child_init_thread_list): Likewise.
15183 (continue_one_thread): Likewise.
15184 (regptr): New.
15185 (do_child_fetch_inferior_registers): Move to ...
15186 * win32-i386-low.c: ... here, and rename to ...
15187 (do_fetch_inferior_registers): ... this.
15188 * win32-low.c (child_fetch_inferior_registers):
15189 Go through the low target.
15190 (do_child_store_inferior_registers): Use regptr.
15191 (strwinerror): New function.
15192 (win32_create_inferior): Handle Windows CE.
15193 Use strwinerror instead of strerror on Windows error
15194 codes. Add program to the error output.
15195 Don't close the main thread handle on Windows CE.
15196 (win32_attach): Use coredll.dll on Windows CE.
15197 (win32_kill): Close current process and current
15198 thread handles.
15199 (win32_detach): Use coredll.dll on Windows CE.
15200 (win32_resume): Let low target handle debug registers, and
15201 step request.
15202 (handle_exception): Add/Remove initial breakpoint. Avoid
15203 non-existant WSTOPSIG on Windows CE.
15204 (win32_read_inferior_memory): Cast to remove warning.
15205 (win32_arch_string): Go through the low target.
15206 (initialize_low): Call set_breakpoint_data with the low
15207 target's breakpoint.
15208 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15209 FOP_REGNUM, mappings): Move to ...
15210 * win32-i386-low.c: ... here.
15211 * win32-low.c (win32_thread_info): Move to ...
15212 * win32-low.h: ... here.
15213 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15214 win32-arm-low.c and wincecompat.c.
15215 (all:): Add $EXEEXT.
15216 (install-only:): Likewise.
15217 (gdbserver:): Likewise.
15218 (gdbreplay:): Likewise.
15219 * config.in: Regenerate.
15220 * configure: Regenerate.
15221
15222 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15223
15224 * win32-low.c: Rename typedef thread_info to
15225 win32_thread_info throughout.
15226
15227 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15228
15229 * win32-i386-low.c: Rename to ...
15230 * win32-low.c: ... this.
15231 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15232 * Makefile.in: Likewise.
15233
15234 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15235
15236 * remote-utils.c (monitor_output): Constify msg parameter.
15237 * server.h (monitor_output): Likewise.
15238 * win32-i386-low.c (handle_output_debug_string): New.
15239 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15240 handle_output_debug_string.
15241 (get_child_debug_event): Likewise.
15242
15243 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15244
15245 * server.c (main): Correct strtoul check.
15246
15247 2007-03-27 Jon Ringle <jon@ringle.org>
15248
15249 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15250
15251 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15252
15253 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15254
15255 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15256
15257 * terminal.h: Check HAVE_SGTTY_H.
15258
15259 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15260
15261 * remote-utils.c (remote_open): Print out the assigned port number.
15262
15263 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15264
15265 * remote-utils.c (monitor_output): New function.
15266 * server.c (debug_threads): Define here.
15267 (monitor_show_help): New function.
15268 (handle_query): Handle qRcmd.
15269 (main): Do not handle 'd' packet.
15270 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15271 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15272 of debug_threads.
15273
15274 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15275
15276 * Makefile.in (EXEEXT): New.
15277 (clean): Use $(EXEEXT).
15278
15279 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15280
15281 * target.h (target_ops): Rename send_signal to request_interrupt,
15282 and remove enum target_signal parameter.
15283 * linux-low.c (linux_request_interrupt): Rename from
15284 linux_send_signal, and always send SIGINT.
15285 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15286 and always send SIGINT.
15287 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15288 of send_signal.
15289 (input_interrupt): Likewise.
15290
15291 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15292
15293 * server.c (get_features_xml): Check if target implemented
15294 arch_string.
15295 * win32-i386-low.c (win32_arch_string): New.
15296 (win32_target_ops): Add win32_arch_string as arch_string member.
15297
15298 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15299
15300 * spu-low.c (spu_arch_string): New.
15301 (spu_target_ops): Add spu_arch_string.
15302
15303 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15304
15305 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15306 * configure.ac: Do not check for terminal.h.
15307 * configure, config.in: Regenerated.
15308
15309 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15310
15311 * Makefile.in (OBS): Add $(XML_BUILTIN).
15312 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15313 (clean): Update.
15314 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15315 (arm-with-iwmmxt.c): New.
15316 * config.in, configure: Regenerate.
15317 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15318 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15319 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15320 (arm*-*-linux*): Add iWMMXt and regset support.
15321 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15322 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15323 (arm_store_wmmxregset, target_regsets): New.
15324 * server.c (get_features_xml): Take annex argument. Check builtin
15325 XML documents.
15326 (handle_query): Handle multiple annexes.
15327
15328 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15329
15330 * remote-utils.c [USE_WIN32API] (read, write): Define.
15331 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15332 write.
15333
15334 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15335
15336 * linux-i386-low.c (the_low_target): Set arch_string.
15337 * linux-x86-64-low.c (the_low_target): Likewise.
15338 * linux-low.c (linux_arch_string): New.
15339 (linux_target_ops): Add it.
15340 * linux-low.h (struct linux_target_ops): Add arch_string.
15341 * server.c (write_qxfer_response): Use const void * for DATA.
15342 (get_features_xml): New.
15343 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15344 * target.h (struct target_ops): Add arch_string method.
15345
15346 2007-01-03 Denis Pilat <denis.pilat@st.com>
15347 Daniel Jacobowitz <dan@codesourcery.com>
15348
15349 * linux-low.c (linux_kill): Handle being called with no threads.
15350 * win32-i386-low.c (win32_kill): Likewise.
15351 (get_child_debug_event): Clear current_process_handle.
15352
15353 2006-12-30 Denis PILAT <denis.pilat@st.com>
15354 Daniel Jacobowitz <dan@codesourcery.com>
15355
15356 * remote-utils.c (remote_open): Check the type of specified
15357 serial port devices before opening them.
15358 * server.c (main): Kill the inferior if an error occurs during
15359 the first remote_open.
15360
15361 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15362
15363 * README: Update supported targets.
15364
15365 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15366
15367 * Makefile.in (clean): Remove reg-mips64.c.
15368 (reg-mips64.c, reg-mips64.o): New rules.
15369 * configure.srv: Handle mips64. Include regset support for mips.
15370 * linux-mips-low.c (union mips_register): New.
15371 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15372 (mips_breakpoint, mips_breakpoint_at): Use int.
15373 (mips_collect_register, mips_supply_register)
15374 (mips_collect_register_32bit, mips_supply_register_32bit)
15375 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15376 (mips_store_fpregset, target_regsets): New.
15377 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15378
15379 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15380
15381 * configure.srv: Add target "spu*-*-*".
15382 * Makefile.in (clean): Remove reg-spu.c.
15383 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15384 * spu-low.c: New file.
15385
15386 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15387
15388 * configure.ac: Correct td_thr_tls_get_addr test.
15389 * configure: Regenerated.
15390
15391 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15392
15393 * linux-low.c (linux_wait_for_event): Reformat. Use the
15394 pass_signals array.
15395 * remote-utils.c (decode_address_to_semicolon): New.
15396 * server.c (pass_signals, handle_general_set): New.
15397 (handle_query): Mention QPassSignals for qSupported.
15398 (main): Call handle_general_set.
15399 * server.h (pass_signals, decode_address_to_semicolon): New.
15400
15401 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15402
15403 * server.c (handle_query): Correct error handling for read_auxv.
15404
15405 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15406
15407 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15408 and srv_linux_thread_db to yes.
15409 * linux-s390-low.c (s390_fill_gregset): New function.
15410 (target_regsets): Define data structure.
15411
15412 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15413
15414 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15415 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15416 * config.in, configure: Regenerated.
15417 * inferiors.c (gdb_id_to_thread): New function.
15418 (gdb_id_to_thread_id): Use it.
15419 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15420 * linux-low.h (struct process_info): Add th member.
15421 (thread_db_get_tls_address): New prototype.
15422 * remote-utils.c (decode_address): Make non-static.
15423 * server.c (handle_query): Handle qGetTLSAddr.
15424 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15425 * target.h (struct target_ops): Add get_tls_address.
15426 * thread-db.c (maybe_attach_thread): Save the thread handle.
15427 (thread_db_get_tls_address): New.
15428
15429 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15430
15431 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15432 (linux_resume_one_process): Take a siginfo_t *. Update all
15433 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15434 (struct pending_signals): Add a siginfo_t.
15435 (linux_wait_for_process): Always set last_status.
15436 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15437 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15438 * linux-low.h (struct process_info): Add last_status.
15439
15440 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15441
15442 * remote-utils.c (try_rle): New function.
15443 (putpkt_binary): Use it.
15444
15445 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15446
15447 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15448 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15449 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15450 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15451 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15452 point registers.
15453
15454 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15455
15456 * server.c (terminal_fd): New variable.
15457 (old_foreground_pgrp): Likewise.
15458 (restore_old_foreground_pgrp): New function.
15459 (start_inferior): Record the terminal file descriptor in terminal_fd
15460 and its original foreground group in old_foreground_pgrp. Register
15461 restore_old_foreground_pgrp with atexit().
15462
15463 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15464
15465 * server.c (handle_query): Correct qPart to qXfer.
15466
15467 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15468
15469 * configure.ac: Check for more headers which are missing on
15470 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15471 * configure.srv: Add Cygwin and mingw32.
15472 * remote-utils.c: Don't include headers unconditionally which
15473 are missing on mingw32. Include <winsock.h> for mingw32.
15474 (remote_open): Adjust for mingw32 support. Flush
15475 standard error after writing to it.
15476 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15477 (unblock_async_io, enable_async_io, disable_async_io)
15478 (readchar, getpkt): Update for Winsock support.
15479 (prepare_resume_reply): Expect a protocol signal number.
15480 * server.c: Disable <sys/wait.h> on mingw32.
15481 (start_inferior): Adjust for mingw32 support. Flush
15482 standard error after writing to it.
15483 (attach_inferior): Likewise. Use protocol signal
15484 numbers.
15485 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15486 and names.
15487 * win32-i386-low.c: New file.
15488 * Makefile.in (XM_CLIBS): Set.
15489 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15490 (win32-i386-low.o): New dependency rule.
15491 * linux-low.c (linux_wait): Use target signal numbers.
15492 * target.h (struct target_ops): Doc fix.
15493 * server.h (target_signal_to_name): New prototype.
15494 * gdbreplay.c: Don't include headers unconditionally which
15495 are missing on mingw32. Include <winsock.h> for mingw32.
15496 (remote_close, remote_open): Adjust for Winsock support.
15497 * configure, config.in: Regenerated.
15498
15499 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15500
15501 * server.c (decode_xfer_read, write_qxfer_response): New.
15502 (handle_query): Take a packet length argument. Handle
15503 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15504 the qSupported response.
15505 (main): Update call to handle_query.
15506
15507 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15508
15509 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15510 (putpkt_binary): Renamed from putpkt and adjusted for binary
15511 data.
15512 (putpkt): New wrapper for putpkt_binary.
15513 (readchar): Don't mask off the high bit.
15514 (decode_X_packet): New function.
15515 * server.c (main): Call putpkt_binary if a handler sets the packet
15516 length. Save the length of the incoming packet. Handle 'X'.
15517 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15518
15519 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15520
15521 * server.c (handle_query): Handle qSupported.
15522
15523 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15524
15525 * remote-utils.c (all_symbols_looked_up): New variable.
15526 (look_up_one_symbol): Check it.
15527 * server.h (look_up_one_symbol): New declaration.
15528 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15529
15530 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15531
15532 * Makefile.in (linux-arm-low.o): Update dependencies.
15533 * linux-arm-low.c: Include "gdb_proc_service.h".
15534 (PTRACE_GET_THREAD_AREA): Define.
15535 (ps_get_thread_area): New function.
15536
15537 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15538
15539 * configure.srv (m68k*-*-uclinux*): New target.
15540 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15541 (linux_resume_one_process): Remove extraneous cast.
15542 (linux_read_offsets): New.
15543 (linux_target_op): Add linux_read_offsets on mmuless systems.
15544 * server.c (handle_query): Add qOffsets logic.
15545 * target.h (struct target_ops): Add read_offsets.
15546
15547 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15548
15549 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15550 (PTRACE_GET_THREAD_AREA): Define.
15551 (ps_get_thread_area): New function.
15552 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15553 (linux-x86-64-low.o): Update.
15554
15555 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15556
15557 * configure.ac: Remove checks for prfpregset_t.
15558 * gdb_proc_service.h: New file.
15559 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15560 new "gdb_proc_service.h".
15561 * proc-service.c: Likewise.
15562 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15563 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15564 * Makefile.in (gdb_proc_service_h): Updated.
15565 * configure, config.in: Regenerated.
15566
15567 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15568
15569 * remote-utils.c (prepare_resume_reply): Move declaration
15570 of gdb_id_from_wait to the top of the block.
15571
15572 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15573
15574 * linux-low.c (regsets_store_inferior_registers): Read the regset
15575 from the target before filling it.
15576
15577 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15578
15579 * server.c (attach_inferior): Return SIGTRAP for a successful
15580 attach.
15581
15582 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15583
15584 * Makefile.in (OBS): Add version.o.
15585 (STAGESTUFF): Delete.
15586 (version.o): Add dependencies.
15587 (version.c): Replace rule.
15588 (clean): Remove version.c.
15589 * server.c (gdbserver_version): New.
15590 (gdbserver_usage): Use printf.
15591 (main): Handle --version and --help.
15592 * server.h (version, host_name): Add declarations.
15593
15594 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15595
15596 * linux-arm-low.c:
15597 * linux-arm-low.c:
15598 * inferiors.c:
15599 * i387-fp.h:
15600 * i387-fp.c:
15601 * gdbreplay.c:
15602 * regcache.c:
15603 * proc-service.c:
15604 * mem-break.h:
15605 * mem-break.c:
15606 * linux-x86-64-low.c:
15607 * linux-sh-low.c:
15608 * linux-s390-low.c:
15609 * linux-ppc64-low.c:
15610 * linux-ppc-low.c:
15611 * linux-mips-low.c:
15612 * linux-m68k-low.c:
15613 * linux-m32r-low.c:
15614 * linux-low.h:
15615 * linux-low.c:
15616 * linux-ia64-low.c:
15617 * linux-i386-low.c:
15618 * linux-crisv32-low.c:
15619 * thread-db.c:
15620 * terminal.h:
15621 * target.h:
15622 * target.c:
15623 * server.h:
15624 * server.c:
15625 * remote-utils.c:
15626 * regcache.h:
15627 * utils.c:
15628 * Makefile.in:
15629 * configure.ac:
15630 * gdbserver.1: Add (C) after Copyright. Update the FSF
15631 address.
15632
15633 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15634
15635 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15636 (arm_breakpoint_at): Recognize both breakpoints.
15637 (the_low_target): Use the correct breakpoint instruction.
15638
15639 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15640
15641 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15642 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15643 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15644 (the_low_target): Update.
15645
15646 2005-10-25 Andreas Schwab <schwab@suse.de>
15647
15648 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15649
15650 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15651 (ia64_num_regs): Reduce to 462.
15652
15653 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15654
15655 * acinclude.m4: Correct quoting.
15656 * aclocal.m4: Regenerated.
15657
15658 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15659 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15660 (thread_db_init): Call thread_db_err_str.
15661 * configure.ac: Check for TD_VERSION.
15662 * config.in, configure: Regenerated.
15663
15664 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15665
15666 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15667
15668 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15669
15670 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15671 is not available. Define HAVE_PTRACE_GETREGS if it is.
15672 * config.in, configure: Regenerated.
15673 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15674 * linux-i386-low.c, linux-m68k-low.c: Update to use
15675 HAVE_PTRACE_GETREGS.
15676 * linux-low.c (regsets_fetch_inferior_registers)
15677 (regsets_store_inferior_registers): Only return 0 if we processed
15678 GENERAL_REGS.
15679 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15680 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15681
15682 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15683
15684 * inferiors.c (struct thread_info): Add gdb_id.
15685 (add_thread): Add gdb_id argument.
15686 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15687 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15688 calls to add_thread.
15689 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15690 * server.c (handle_query): Use thread_to_gdb_id.
15691 (handle_v_cont, main): Use gdb_id_to_thread_id.
15692 * server.h (add_thread): Update prototype.
15693 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15694 prototypes.
15695
15696 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15697
15698 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15699 left-padded registers.
15700 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15701 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15702
15703 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15704
15705 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15706 * configure: Regenerate.
15707 * config.in: Regenerate.
15708 * server.h (NEED_DECLARATION_STRERROR):
15709 Replace with !HAVE_DECL_STRERROR.
15710
15711 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15712
15713 * linux-low.c (linux_wait, linux_send_signal): Don't test
15714 an unsigned long variable for > 0 if it could be MAX_ULONG.
15715 * server.c (myresume): Likewise.
15716 * target.c (set_desired_inferior): Likewise.
15717
15718 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15719
15720 * configure.ac: Simplify and improve check for socklen_t.
15721 * configure, config.in: Regenerate.
15722
15723 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15724
15725 * acconfig.h: Remove.
15726 * configure.ac: Add a test for socklen_t. Use three-argument
15727 AC_DEFINE throughout.
15728 * config.in: Regenerated using autoheader 2.59.
15729 * configure: Regenerated.
15730
15731 * gdbreplay.c (socklen_t): Provide a default.
15732 (remote_open): Use socklen_t.
15733 * remote-utils.c (socklen_t): Provide a default.
15734 (remote_open): Use socklen_t.
15735 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15736 unsigned char.
15737
15738 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15739 char for buffers.
15740 * linux-low.c (linux_read_memory, linux_write_memory)
15741 (linux_read_auxv): Likewise.
15742 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15743 (check_mem_write): Likewise.
15744 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15745 Likewise.
15746 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15747 (registers_from_string, register_data): Likewise.
15748 * server.c (handle_query, main): Likewise.
15749 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15750 (decode_M_packet): Likewise.
15751 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15752 * target.h (struct target_ops): Update read_memory, write_memory,
15753 and read_auxv.
15754 (read_inferior_memory, write_inferior_memory): Update.
15755 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15756 to unsigned char *.
15757 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15758 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15759 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15760 linux-s390-low.c, linux-sh-low.c: Update for changes in
15761 read_inferior_memory and the_low_target->breakpoint.
15762
15763 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15764
15765 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15766 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15767 * configure.srv: Add powerpc64-*-linux*.
15768 * linux-ppc64-low.c: New file.
15769
15770 2005-05-23 Orjan Friberg <orjanf@axis.com>
15771
15772 * linux-cris-low.c: New file with support for CRIS.
15773 * linux-crisv32-low.c: Ditto for CRISv32.
15774 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15775 (clean): Add reg-cris.c and reg-crisv32.c.
15776 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15777 reg-crisv32.o, and reg-crisv32.c to make rules.
15778 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15779 recognized targets.
15780
15781 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15782
15783 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15784 of sizeof (PTRACE_XFER_TYPE).
15785 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15786
15787 2005-05-12 Orjan Friberg <orjanf@axis.com>
15788
15789 * target.h (struct target_ops): Add insert_watchpoint,
15790 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15791 pointers for hardware watchpoint support.
15792 * linux-low.h (struct linux_target_ops): Ditto.
15793 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15794 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15795 to linux_target_ops.
15796 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15797 reply packet.
15798 * server.c (main): Recognize 'Z' and 'z' packets.
15799
15800 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15801
15802 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15803 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15804 (the_low_target): Add new members.
15805
15806 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15807
15808 * proc-service.c (ps_lgetregs): Search all_processes instead of
15809 all_threads.
15810
15811 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15812
15813 * server.c (start_inferior): Change return type to int.
15814 (attach_inferior): Change sigptr to int *.
15815 (handle_v_cont, handle_v_requests): Change signal to int *.
15816 (main): Change signal to int.
15817
15818 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15819
15820 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15821 * configure.srv: Add m32r*-*-linux*.
15822 * linux-m32r-low.c: New file.
15823
15824 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15825
15826 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15827
15828 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15829
15830 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15831 Take unsigned long arguments for PIDs.
15832 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15833 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15834 (wait_for_sigstop, linux_resume_one_process)
15835 (regsets_fetch_inferior_registers, linux_send_signal)
15836 (linux_read_auxv): Likewise. Update the types of variables holding
15837 PIDs. Update format string specifiers.
15838 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15839 * remote-utils.c (prepare_resume_reply): Likewise.
15840 * server.c (cont_thread, general_thread, step_thread)
15841 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15842 unsigned long.
15843 (handle_query): Update format specifiers.
15844 (handle_v_cont, main): Use strtoul for thread IDs.
15845 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15846 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15847 (general_thread, step_thread, thread_from_wait)
15848 (old_thread_from_wait): Update.
15849 * target.h (struct thread_resume): Use unsigned long for THREAD.
15850 (struct target_ops): Use unsigned long for arguments to attach and
15851 thread_alive.
15852
15853 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15854
15855 * acinclude.m4: Include bfd/bfd.m4 directly.
15856 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15857 <agriffis@toolchain.org>.
15858 * aclocal.m4, configure: Regenerated.
15859
15860 2005-01-07 Andrew Cagney <cagney@gnu.org>
15861
15862 * configure.ac: Rename configure.in, require autoconf 2.59.
15863 * configure: Re-generate.
15864
15865 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15866
15867 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15868 LIBS when finished.
15869 * aclocal.m4: Regenerated.
15870 * configure: Regenerated.
15871
15872 2004-11-21 Andreas Schwab <schwab@suse.de>
15873
15874 * linux-m68k-low.c (m68k_num_gregs): Define.
15875 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15876 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15877 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15878 (m68k_breakpoint_at): New. Add to the_low_target.
15879
15880 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15881 srv_linux_thread_db to yes.
15882
15883 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15884
15885 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15886 (ARCH_SET_FS): Likewise.
15887 (ARCH_GET_FS): Likewise.
15888 (ARCH_GET_GS): Likewise.
15889
15890 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15891
15892 * linux-i386-low.c (ps_get_thread_area): New.
15893 * linux-x86-64-low.c (ps_get_thread_area): New.
15894 * linux-low.c: Include <sys/syscall.h>.
15895 (linux_kill_one_process): Don't kill the first thread here.
15896 (linux_kill): Kill the first thread here.
15897 (kill_lwp): New function.
15898 (send_sigstop, linux_send_signal): Use it.
15899 * proc-service.c: Clean up #ifdefs.
15900 (fpregset_info): Delete.
15901 (ps_lgetregs): Update and enable implementation.
15902 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15903 implementations.
15904 * remote-utils.c (struct sym_cache, symbol_cache): New.
15905 (input_interrupt): Print a clearer message.
15906 (async_io_enabled): New variable.
15907 (enable_async_io, disable_async_io): Use it. Update comments.
15908 (look_up_one_symbol): Use the symbol cache.
15909 * thread-db.c (thread_db_look_up_symbols): New function.
15910 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15911
15912 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15913
15914 * configure.in: Test for -rdynamic.
15915 * configure: Regenerated.
15916 * Makefile (INTERNAL_LDFLAGS): New.
15917 (gdbserver, gdbreplay): Use it.
15918
15919 2004-09-02 Andrew Cagney <cagney@gnu.org>
15920
15921 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15922
15923 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15924
15925 * linux-low.c (linux_wait): Clear all_processes list also.
15926
15927 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15928
15929 * linux-low.c: Include <errno.h>. Remove extern declaration of
15930 errno.
15931
15932 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15933
15934 * gdbreplay.c, server.h, utils.c: Update copyright years.
15935
15936 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15937
15938 * server.c (main): Print child status or termination signal from
15939 variable 'signal', not 'sig'.
15940
15941 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15942
15943 * linux-low.c (linux_read_memory): Change return type to
15944 int. Check for and return error from ptrace().
15945 * target.c (read_inferior_memory): Change return type to int. Pass
15946 back return status from the_target->read_memory().
15947 * target.h (struct target_ops): Adapt *read_memory() prototype.
15948 Update comment.
15949 (read_inferior_memory): Adapt prototype.
15950 * server.c (main): Return an error packet if
15951 read_inferior_memory() returns an error.
15952
15953 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15954
15955 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15956 Unify with other clean targets.
15957
15958 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15959
15960 * server.c (handle_v_cont): Call set_desired_inferior.
15961
15962 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15963
15964 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15965
15966 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15967
15968 * linux-low.c (linux_wait): Unblock async I/O.
15969 (linux_resume): Block and enable async I/O.
15970 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15971 * server.h (block_async_io, unblock_async_io): Add prototypes.
15972
15973 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15974
15975 * remote-utils.c (remote_open): Print a status notice after
15976 opening a TCP port.
15977 * server.c (attach_inferior): Print a status notice after
15978 attaching.
15979
15980 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15981
15982 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15983
15984 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15985
15986 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15987 error packet.
15988 * server.c, target.h: Update copyright years.
15989
15990 2004-02-25 Roland McGrath <roland@redhat.com>
15991
15992 * target.h (struct target_ops): New member `read_auxv'.
15993 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15994 * linux-low.c (linux_read_auxv): New function.
15995 (linux_target_ops): Initialize `read_auxv' member to that.
15996
15997 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15998
15999 Committed by Jim Blandy <jimb@redhat.com>.
16000
16001 * linux-s390-low.c (s390_num_regs): Update.
16002 (s390_regmap): Remove control registers. Use __s390x__ predefine
16003 instead of GPR_SIZE to distiguish s390 and s390x targets.
16004
16005 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16006
16007 * linux-low.c: Update copyright year.
16008 (check_removed_breakpoint): Clear pending_is_breakpoint.
16009 (linux_set_resume_request, linux_queue_one_thread)
16010 (resume_status_pending_p): New functions.
16011 (linux_continue_one_thread): Use process->resume.
16012 (linux_resume): Only resume threads if there are no pending events.
16013 * linux-low.h (struct process_info): Add resume request
16014 pointer.
16015
16016 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16017
16018 * regcache.c (new_register_cache): Clear the allocated register
16019 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16020
16021 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16022
16023 * linux-low.c (linux_resume): Take a struct thread_resume *
16024 argument.
16025 (linux_wait): Update call.
16026 (resume_ptr): New static variable.
16027 (linux_continue_one_thread): Renamed from
16028 linux_continue_one_process. Use resume_ptr.
16029 (linux_resume): Use linux_continue_one_thread.
16030 * server.c (handle_v_cont, handle_v_requests): New functions.
16031 (myresume): New function.
16032 (main): Handle 'v' case.
16033 * target.h (struct thread_resume): New type.
16034 (struct target_ops): Change argument of "resume" to struct
16035 thread_resume *.
16036 (myresume): Delete macro.
16037
16038 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16039
16040 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16041 (uninstall): Support DESTDIR.
16042
16043 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16044
16045 * configure.srv: Add xscale*linux copy of arm*linux entry.
16046
16047 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16048
16049 * linux-arm-low.c (arm_reinsert_addr): New function.
16050 (the_low_target): Add arm_reinsert_addr.
16051
16052 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16053
16054 * mem-break.c: Remove whitespace at end of file.
16055
16056 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16057
16058 * configure.in: Check whether we need to prototype strerror.
16059 * server.h: Optionally prototype strerror.
16060 * gdbreplay.c (perror_with_name): Use strerror.
16061 * linux-low.c (linux_attach_lwp): Use strerror.
16062 * utils.c (perror_with_name): Use strerror.
16063 * config.in, configure: Regenerated.
16064
16065 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16066
16067 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16068 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16069
16070 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16071
16072 * Makefile.in (SFILES): Update.
16073 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16074 low-sun3.c: Remove files.
16075
16076 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16077
16078 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16079 (linux_detach_one_process, linux_detach): New functions.
16080 (linux_target_ops): Add linux_detach.
16081 * server.c (main): Handle 'D' packet.
16082 * target.h (struct target_ops): Add "detach" member.
16083 (detach_inferior): Define.
16084
16085 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16086
16087 From Kelley Cook <kelleycook@wideopenwest.com>:
16088 * configure.srv: Accept i[34567]86 variants.
16089
16090 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16091
16092 * linux-low.c (linux_wait_for_event): Correct comment typos.
16093 (linux_resume_one_process): Call check_removed_breakpoint.
16094 (linux_send_signal): New function.
16095 (linux_target_ops): Add linux_send_signal.
16096 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16097 of kill.
16098 * target.h (struct target_ops): Add send_signal.
16099
16100 2003-05-29 Jim Blandy <jimb@redhat.com>
16101
16102 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16103 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16104 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16105 away part of the register's value.
16106
16107 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16108
16109 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16110 (linux_wait_for_event, linux_init_signals): Likewise.
16111
16112 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16113
16114 * configure.in: Check for stdlib.h.
16115 * configure: Regenerated.
16116 * config.in: Regenerated.
16117
16118 2003-01-04 Andreas Schwab <schwab@suse.de>
16119
16120 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16121
16122 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16123
16124 * Makefile.in: Remove obsolete code.
16125
16126 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16127
16128 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16129 defined(PT_FPR0_HI).
16130
16131 2002-11-17 Stuart Hughes <seh@zee2.com>
16132
16133 * linux-arm-low.c (arm_num_regs): Increase.
16134 (arm_regmap): Include status register.
16135
16136 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16137
16138 * linux-low.c (register_addr): Remove incorrect -1 check.
16139
16140 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16141
16142 * linux-low.c (linux_create_inferior): Call setpgid. Return
16143 the new PID.
16144 (unstopped_p, linux_signal_pid): Remove.
16145 (linux_target_ops): Remove linux_signal_pid.
16146 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16147 global instead of target method.
16148 * target.h (struct target_ops): Remove signal_pid. Update comment
16149 for create_inferior.
16150 * server.c (signal_pid): New variable.
16151 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16152 gdbserver. Set the child to be the foreground process group.
16153 (attach_inferior): Set signal_pid.
16154
16155 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16156
16157 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16158
16159 2002-08-20 Jim Blandy <jimb@redhat.com>
16160
16161 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16162 default for this.
16163
16164 2002-08-01 Andrew Cagney <cagney@redhat.com>
16165
16166 * Makefile.in: Make chill references obsolete.
16167
16168 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16169
16170 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16171 * configure: Regenerate.
16172 * config.in: Regenerate.
16173
16174 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16175
16176 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16177 (perror_with_name, remote_close, remote_open, expect, play): Static.
16178
16179 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16180
16181 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16182 byte offsets instead of an array of indexes.
16183 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16184
16185 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16186
16187 * regcache.c: Add comment.
16188
16189 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16190
16191 * thread-db.c: New file.
16192 * proc-service.c: New file.
16193 * acinclude.m4: New file.
16194 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16195 proc-service.o, and thread-db.o.
16196 (linux-low.o): Add USE_THREAD_DB.
16197 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16198 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16199 * aclocal.m4: Regenerated.
16200 * config.in: Regenerated.
16201 * configure: Regenerated.
16202 * configure.in: Check for proc_service.h, sys/procfs.h,
16203 thread_db.h, and linux/elf.h headrs.
16204 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16205 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16206 Check for -lthread_db and thread support.
16207 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16208 PowerPC, and SuperH.
16209 * i387-fp.c: Constify arguments.
16210 * i387-fp.h: Likewise.
16211 * inferiors.c: (struct thread_info): Renamed from
16212 `struct inferior_info'. Remove PID member. Use generic inferior
16213 list header. All uses updated.
16214 (inferiors, signal_pid): Removed.
16215 (all_threads): New variable.
16216 (get_thread): Define.
16217 (add_inferior_to_list): New function.
16218 (for_each_inferior): New function.
16219 (change_inferior_id): New function.
16220 (add_inferior): Removed.
16221 (remove_inferior): New function.
16222 (add_thread): New function.
16223 (free_one_thread): New function.
16224 (remove_thread): New function.
16225 (clear_inferiors): Use for_each_inferior and free_one_thread.
16226 (find_inferior): New function.
16227 (find_inferior_id): New function.
16228 (inferior_target_data): Update argument type.
16229 (set_inferior_target_data): Likewise.
16230 (inferior_regcache_data): Likewise.
16231 (set_inferior_regcache_data): Likewise.
16232 * linux-low.c (linux_bp_reinsert): Remove.
16233 (all_processes, stopping_threads, using_thrads)
16234 (struct pending_signals, debug_threads, pid_of): New.
16235 (inferior_pid): Replace with macro.
16236 (struct inferior_linux_data): Remove.
16237 (get_stop_pc, add_process): New functions.
16238 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16239 Use add_process and add_thread.
16240 (linux_attach_lwp): New function, based on old linux_attach. Use
16241 add_process and add_thread. Set stop_expected for new threads.
16242 (linux_attach): New function.
16243 (linux_kill_one_process): New function.
16244 (linux_kill): Kill all LWPs.
16245 (linux_thread_alive): Use find_inferior_id.
16246 (check_removed_breakpoints, status_pending_p): New functions.
16247 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16248 Update. Use WNOHANG. Wait for cloned processes also. Update process
16249 struct for the found process.
16250 (linux_wait_for_event): New function.
16251 (linux_wait): Use it. Support LWPs.
16252 (send_sigstop, wait_for_sigstop, stop_all_processes)
16253 (linux_resume_one_process, linux_continue_one_process): New functions.
16254 (linux_resume): Support LWPs.
16255 (REGISTER_RAW_SIZE): Remove.
16256 (fetch_register): Use register_size instead. Call supply_register.
16257 (usr_store_inferior_registers): Likewise. Call collect_register.
16258 Fix recursive case.
16259 (regsets_fetch_inferior_registers): Improve error message.
16260 (regsets_store_inferior_registers): Add debugging.
16261 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16262 (unstopped_p, linux_signal_pid): New functions.
16263 (linux_target_ops): Add linux_signal_pid.
16264 (linux_init_signals): New function.
16265 (initialize_low): Call it. Initialize using_threads.
16266 * regcache.c (inferior_regcache_data): Add valid
16267 flag.
16268 (get_regcache): Fetch registers lazily. Add fetch argument
16269 and update all callers.
16270 (regcache_invalidate_one, regcache_invalidate): New
16271 functions.
16272 (new_register_cache): Renamed from create_register_cache.
16273 Return the new regcache.
16274 (free_register_cache): Change argument to a void *.
16275 (registers_to_string, registers_from_string): Call get_regcache
16276 with fetch flag set.
16277 (register_data): Make static. Pass fetch flag to get_regcache.
16278 (supply_register): Call get_regcache with fetch flag clear.
16279 (collect_register): Call get_regcache with fetch flag set.
16280 (collect_register_as_string): New function.
16281 * regcache.h: Update.
16282 * remote-utils.c (putpkt): Flush after debug output and use
16283 stderr.
16284 Handle input interrupts while waiting for an ACK.
16285 (input_interrupt): Use signal_pid method.
16286 (getpkt): Flush after debug output and use stderr.
16287 (outreg): Use collect_register_as_string.
16288 (new_thread_notify, dead_thread_notify): New functions.
16289 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16290 and general_thread.
16291 (look_up_one_symbol): Flush after debug output.
16292 * server.c (step_thread, server_waiting): New variables.
16293 (start_inferior): Don't use signal_pid. Update call to mywait.
16294 (attach_inferior): Update call to mywait.
16295 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16296 (main): Don't fetch/store registers explicitly. Use
16297 set_desired_inferior. Support proposed ``Hs'' packet. Update
16298 calls to mywait.
16299 * server.h: Update.
16300 (struct inferior_list, struct_inferior_list_entry): New.
16301 * target.c (set_desired_inferior): New.
16302 (write_inferior_memory): Constify.
16303 (mywait): New function.
16304 * target.h: Update.
16305 (struct target_ops): New signal_pid method.
16306 (mywait): Removed macro, added prototype.
16307
16308 * linux-low.h (regset_func): Removed.
16309 (regset_fill_func, regset_store_func): New.
16310 (enum regset_type): New.
16311 (struct regset_info): Add type field. Use new operation types.
16312 (struct linux_target_ops): stop_pc renamed to get_pc.
16313 Add decr_pc_after_break and breakpoint_at.
16314 (get_process, get_thread_proess, get_process_thread)
16315 (strut process_info, all_processes, linux_attach_lwp)
16316 (thread_db_init): New.
16317
16318 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16319 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16320 (the_low_target): Add new members.
16321 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16322 (i386_store_fpxregset): Constify.
16323 (target_regsets): Add new kind identifier.
16324 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16325 (i386_set_pc): Add debugging.
16326 (i386_breakpoint_at): New function.
16327 (the_low_target): Add new members.
16328 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16329 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16330 (mips_breakpoint_at): New.
16331 (the_low_target): Add new members.
16332 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16333 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16334 (the_low_target): Add new members.
16335 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16336 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16337 (the_low_target): Add new members.
16338 * linux-x86-64-low.c (target_regsets): Add new kind
16339 identifier.
16340
16341 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16342
16343 From Martin Pool <mbp@samba.org>:
16344 * server.c (gdbserver_usage): New function.
16345 (main): Call it.
16346
16347 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16348
16349 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16350 stop_at -> stop_pc.
16351
16352 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16353
16354 * Makefile.in: Remove obsolete code.
16355
16356 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16357
16358 * linux-low.c (regsets_fetch_inferior_registers),
16359 (regsets_store_inferior_registers): Removed cast to int from
16360 ptrace() calls.
16361 * regcache.h: Added declaration of struct inferior_info.
16362
16363 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16364
16365 * inferiors.c (struct inferior_info): Add regcache_data.
16366 (add_inferior): Call create_register_cache.
16367 (clear_inferiors): Call free_register_cache.
16368 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16369 * regcache.c (struct inferior_regcache_data): New.
16370 (registers): Remove.
16371 (get_regcache): New function.
16372 (create_register_cache, free_register_cache): New functions.
16373 (set_register_cache): Don't initialize the register cache here.
16374 (registers_to_string, registers_from_string, register_data): Call
16375 get_regcache.
16376 * regcache.h: Add prototypes.
16377 * server.h: Likewise.
16378
16379 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16380
16381 * mem-break.c: New file.
16382 * mem-break.h: New file.
16383 * Makefile.in: Add mem-break.o rule; update server.h
16384 dependencies.
16385 * inferiors.c (struct inferior_info): Add target_data
16386 member.
16387 (clear_inferiors): Free target_data member if set.
16388 (inferior_target_data, set_inferior_target_data): New functions.
16389 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16390 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16391 * linux-low.c (linux_bp_reinsert): New variable.
16392 (struct inferior_linux_data): New.
16393 (linux_create_inferior): Use set_inferior_target_data.
16394 (linux_attach): Likewise. Call add_inferior.
16395 (linux_wait_for_one_inferior): New function.
16396 (linux_wait): Call it.
16397 (linux_write_memory): Add const.
16398 (initialize_low): Call set_breakpoint_data.
16399 * linux-low.h (struct linux_target_ops): Add breakpoint
16400 handling members.
16401 * server.c (attach_inferior): Remove extra add_inferior
16402 call.
16403 * server.h: Include mem-break.h. Update inferior.c
16404 prototypes.
16405 * target.c (read_inferior_memory)
16406 (write_inferior_memory): New functions.
16407 * target.h (read_inferior_memory)
16408 (write_inferior_memory): Change macros to prototypes.
16409 (struct target_ops): Update comments. Add const to write_memory
16410 definition.
16411
16412 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16413
16414 * linux-low.c (usr_store_inferior_registers): Support
16415 registers which are allowed to fail to store.
16416 * linux-low.h (linux_target_ops): Likewise.
16417 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16418 (ppc_cannot_store_register): FPSCR may not be storable.
16419
16420 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16421
16422 * server.h: Include <string.h> if HAVE_STRING_H.
16423 * ChangeLog: Correct paths in last ChangeLog entry.
16424
16425 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16426
16427 * linux-low.h: Remove obsolete prototypes.
16428 (struct linux_target_ops): New.
16429 (extern the_low_target): New.
16430 * linux-low.c (num_regs, regmap): Remove declarations.
16431 (register_addr): Use the_low_target explicitly.
16432 (fetch_register): Likewise.
16433 (usr_fetch_inferior_registers): Likewise.
16434 (usr_store_inferior_registers): Likewise.
16435 * linux-arm-low.c (num_regs): Remove.
16436 (arm_num_regs): Define.
16437 (arm_regmap): Renamed from regmap, made static.
16438 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16439 made static.
16440 (arm_cannot_store_register): Renamed from cannot_store_register,
16441 made static.
16442 (the_low_target): New.
16443 * linux-i386-low.c (num_regs): Remove.
16444 (i386_num_regs): Define.
16445 (i386_regmap): Renamed from regmap, made static.
16446 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16447 made static.
16448 (i386_cannot_store_register): Renamed from cannot_store_register,
16449 made static.
16450 (the_low_target): New.
16451 * linux-ia64-low.c (num_regs): Remove.
16452 (ia64_num_regs): Define.
16453 (ia64_regmap): Renamed from regmap, made static.
16454 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16455 made static.
16456 (ia64_cannot_store_register): Renamed from cannot_store_register,
16457 made static.
16458 (the_low_target): New.
16459 * linux-m68k-low.c (num_regs): Remove.
16460 (m68k_num_regs): Define.
16461 (m68k_regmap): Renamed from regmap, made static.
16462 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16463 made static.
16464 (m68k_cannot_store_register): Renamed from cannot_store_register,
16465 made static.
16466 (the_low_target): New.
16467 * linux-mips-low.c (num_regs): Remove.
16468 (mips_num_regs): Define.
16469 (mips_regmap): Renamed from regmap, made static.
16470 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16471 made static.
16472 (mips_cannot_store_register): Renamed from cannot_store_register,
16473 made static.
16474 (the_low_target): New.
16475 * linux-ppc-low.c (num_regs): Remove.
16476 (ppc_num_regs): Define.
16477 (ppc_regmap): Renamed from regmap, made static.
16478 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16479 made static.
16480 (ppc_cannot_store_register): Renamed from cannot_store_register,
16481 made static.
16482 (the_low_target): New.
16483 * linux-s390-low.c (num_regs): Remove.
16484 (s390_num_regs): Define.
16485 (s390_regmap): Renamed from regmap, made static.
16486 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16487 made static.
16488 (s390_cannot_store_register): Renamed from cannot_store_register,
16489 made static.
16490 (the_low_target): New.
16491 * linux-sh-low.c (num_regs): Remove.
16492 (sh_num_regs): Define.
16493 (sh_regmap): Renamed from regmap, made static.
16494 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16495 made static.
16496 (sh_cannot_store_register): Renamed from cannot_store_register,
16497 made static.
16498 (the_low_target): New.
16499 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16500 (the_low_target): New.
16501
16502 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16503
16504 * Makefile.in: Add stamp-h target.
16505 * configure.in: Create stamp-h.
16506 * configure: Regenerated.
16507
16508 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16509
16510 * inferiors.c: New file.
16511 * target.c: New file.
16512 * target.h: New file.
16513 * Makefile.in: Add target.o and inferiors.o. Update
16514 dependencies.
16515 * linux-low.c (inferior_pid): New static variable,
16516 moved from server.c.
16517 (linux_create_inferior): Renamed from create_inferior.
16518 Call add_inferior. Return 0 on success instead of a PID.
16519 (linux_attach): Renamed from myattach.
16520 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16521 (linux_thread_alive): Renamed from mythread_alive.
16522 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16523 child dies.
16524 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16525 (regsets_store_inferior_registers): Correct error message.
16526 Add missing ``return 0''.
16527 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16528 (linux_store_registers): Renamed from store_inferior_registers.
16529 (linux_read_memory): Renamed from read_inferior_memory.
16530 (linux_write_memory): Renamed from write_inferior_memory.
16531 (linux_target_ops): New structure.
16532 (initialize_low): Call set_target_ops ().
16533 * remote-utils.c (unhexify): New function.
16534 (hexify): New function.
16535 (input_interrupt): Send signals to ``signal_pid''.
16536 * server.c (inferior_pid): Remove.
16537 (start_inferior): Update create_inferior call.
16538 (attach_inferior): Call add_inferior.
16539 (handle_query): New function.
16540 (main): Call handle_query for `q' packets.
16541 * server.h: Include "target.h". Remove obsolete prototypes.
16542 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16543
16544 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16545
16546 * Makefile.in: Add WARN_CFLAGS. Update configury
16547 dependencies.
16548 * configure.in: Check for <string.h>
16549 * configure: Regenerate.
16550 * config.in: Regenerate.
16551 * gdbreplay.c: Include needed system headers.
16552 (remote_open): Remove strchr prototype.
16553 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16554 * regcache.c (supply_register): Change buf argument to const void *.
16555 (supply_register_by_name): Likewise.
16556 (collect_register): Change buf argument to void *.
16557 (collect_register_by_name): Likewise.
16558 * regcache.h: Add missing prototypes.
16559 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16560 * server.c (handle_query): New function.
16561 (attached): New static variable, moved out of main.
16562 (main): Quiet longjmp clobber warnings.
16563 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16564 * utils.c (error): Remove NORETURN.
16565 (fatal): Likewise.