MIPS/Linux: Disable n32 USR `ptrace' accesses to 64-bit registers
[binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2
3 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
4 width of the requested register exceeds the width of the
5 `ptrace' data type.
6 (mips_cannot_store_register): Likewise.
7
8 2018-05-21 Maciej W. Rozycki <macro@mips.com>
9
10 * linux-mips-low.c (mips_fetch_register): New function. Update
11 preceding comment.
12 (mips_store_gregset): Supply 0 rather than $restart for $zero.
13 (the_low_target): Wire `mips_fetch_register'.
14
15 2018-05-10 Joel Brobecker <brobecker@adacore.com>
16
17 * lynx-i386-low.c (LYNXOS_178): New macro.
18 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
19 the layout on LynxOS-178.
20 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
21 handle floating point registers that are not supported by
22 LynxOS-178.
23
24 2018-05-10 Tom Tromey <tom@tromey.com>
25
26 * configure: Rebuild.
27
28 2018-05-10 Joel Brobecker <brobecker@adacore.com>
29
30 PR server/23158:
31 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
32 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
33 Use it to set the expedite_regs field in the given tdesc.
34 * x86-tdesc.h: New file.
35 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
36 Adjust following the addition of the new expedite_regs parameter
37 to init_target_desc.
38 * linux-tic6x-low.c (tic6x_read_description): Likewise.
39 * linux-x86-tdesc.c: #include "x86-tdesc.h".
40 (i386_linux_read_description, amd64_linux_read_description):
41 Adjust following the addition of the new expedite_regs parameter
42 to init_target_desc.
43 * lynx-i386-low.c: #include "x86-tdesc.h".
44 (lynx_i386_arch_setup): Adjust following the addition of the new
45 expedite_regs parameter to init_target_desc.
46 * nto-x86-low.c: #include "x86-tdesc.h".
47 (nto_x86_arch_setup): Adjust following the addition of the new
48 expedite_regs parameter to init_target_desc.
49 * win32-i386-low.c: #include "x86-tdesc.h".
50 (i386_arch_setup): Adjust following the addition of the new
51 expedite_regs parameter to init_target_desc.
52
53 2018-05-10 Joel Brobecker <brobecker@adacore.com>
54
55 PR server/23158:
56 * win32-low.c (win32_create_inferior): Add call to my_wait
57 setting last_status global.
58
59 2018-05-10 Joel Brobecker <brobecker@adacore.com>
60
61 PR server/23158:
62 * win32-low.c (create_process): Only call gdb_tilde_expand if
63 inferior_cwd is not NULL.
64
65 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
66
67 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
68 registers to the cache if their values have changed.
69 (i387_xsave_to_cache): Provide default values for x87 control
70 registers when these features are available, but disabled.
71 * regcache.c (supply_register_by_name_zeroed): New function.
72 * regcache.h (supply_register_by_name_zeroed): Declare new
73 function.
74
75 2018-05-07 Tom Tromey <tom@tromey.com>
76
77 * configure: Rebuild.
78
79 2018-05-04 Tom Tromey <tom@tromey.com>
80
81 * configure: Rebuild.
82
83 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
84 Pedro Alves <palves@redhat.com>
85
86 * linux-aarch64-low.c (aarch64_stopped_data_address):
87 Likewise.
88
89 2018-04-27 Tom Tromey <tom@tromey.com>
90
91 * configure: Rebuild.
92
93 2018-04-23 Tom Tromey <tom@tromey.com>
94
95 * configure: Rebuild.
96
97 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
98
99 * Makefile.in (depcomp): Add "..".
100 (all_deps_files): New and use it.
101
102 2018-04-18 Alan Hayward <alan.hayward@arm.com>
103
104 * configure.srv (aarch64*-*-linux*): Don't include xml.
105 (i[34567]86-*-cygwin*): Likewise.
106 (i[34567]86-*-linux*): Likewise.
107 (i[34567]86-*-lynxos*): Likewise.
108 (i[34567]86-*-mingw32ce*): Likewise.
109 (i[34567]86-*-mingw*): Likewise.
110 (i[34567]86-*-nto*): Likewise.
111 (tic6x-*-uclinux): Likewise.
112 (x86_64-*-linux*): Likewise.
113 (x86_64-*-mingw*): Likewise.
114 (x86_64-*-cygwin*): Likewise.
115
116 2018-04-18 Alan Hayward <alan.hayward@arm.com>
117
118 * tdesc.c: Remove xml parameter.
119
120 2018-04-18 Alan Hayward <alan.hayward@arm.com>
121
122 * server.c (get_features_xml): Remove cast.
123 * tdesc.c (void target_desc::accept): Fill in function.
124 (tdesc_get_features_xml): Remove old xml creation.
125 (print_xml_feature::visit_pre): Add xml vistor.
126 * tdesc.h (struct target_desc): Make xmltarget mutable.
127 (tdesc_get_features_xml): Remove declaration.
128
129 2018-04-18 Alan Hayward <alan.hayward@arm.com>
130
131 * tdesc.c (tdesc_architecture_name): Add new function.
132 (tdesc_osabi_name): Likewise.
133 (tdesc_get_features_xml): Use new functions.
134
135 2018-04-18 Alan Hayward <alan.hayward@arm.com>
136
137 * tdesc.c (tdesc_create_flags): Remove.
138 (tdesc_add_flag): Likewise.
139 (tdesc_named_type): Likewise.
140 (tdesc_create_union): Likewise.
141 (tdesc_create_struct): Likewise.
142 (tdesc_create_vector): Likewise.
143 (tdesc_add_bitfield): Likewise.
144 (tdesc_add_field): Likewise.
145 (tdesc_set_struct_size): Likewise.
146
147 2018-04-18 Alan Hayward <alan.hayward@arm.com>
148
149 * tdesc.c (~target_desc): Remove implictly deleted items.
150 (init_target_desc): Iterate all features.
151 (tdesc_get_features_xml): Use vector.
152 (tdesc_create_feature): Create feature.
153 * tdesc.h (tdesc_feature) Remove
154 (target_desc): Add features.
155
156 2018-04-18 Alan Hayward <alan.hayward@arm.com>
157
158 * Makefile.in: Add common/tdesc.c
159 * tdesc.c (init_target_desc): init all reg_defs from register
160 vector.
161 (tdesc_create_reg): Create tdesc_reg.
162 * tdesc.h (tdesc_feature): Add register vector.
163
164 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
165
166 * tdesc.h (struct target_desc) <features>: Change type to
167 std::vector<std::string>.
168 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
169 changes.
170 (tdesc_get_features_xml): Likewise.
171 (tdesc_create_feature): Likewise.
172
173 2018-03-26 Alan Hayward <alan.hayward@arm.com>
174
175 * regcache.c (find_register_by_number): Return a ref.
176 (find_regno): Use references.
177 (register_size): Likewise.
178 (register_data): Likewise.
179 * tdesc.c (target_desc::~target_desc): Remove free calls.
180 (target_desc::operator==): Use std::vector compare.
181 (init_target_desc): Use reference.
182 (tdesc_create_reg): Use reg constructors.
183 * tdesc.h (struct target_desc): Replace pointer with object.
184
185 2018-03-23 Alan Hayward <alan.hayward@arm.com>
186
187 * regcache.c (find_register_by_number): Make static.
188 (find_regno): Use find_register_by_number
189 * regcache.h (struct reg): Remove declaration.
190
191 2018-03-23 Alan Hayward <alan.hayward@arm.com>
192
193 * tdesc.c (target_desc::~target_desc): Move to here.
194 (target_desc::operator==): Likewise.
195 * tdesc.h (target_desc::~target_desc): Move from here.
196 (target_desc::operator==): Likewise.
197
198 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
199
200 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
201
202 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
203
204 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
205 S390_TDESC_GS.
206 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
207 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
208 and init_registers_s390_gs_linux64.
209
210 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
211
212 * linux-s390-low.c (s390_fill_gs): Remove function.
213 (s390_fill_gsbc): Remove function.
214 (s390_regsets): Set fill functions for the guarded storage regsets
215 to NULL.
216
217 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
218
219 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
220 the word size. Add comment.
221 (s390_get_wordsize): New function.
222 (s390_arch_setup): No longer select a temporary tdesc to fetch the
223 pswm with it. Instead, use s390_get_wordsize to determine the
224 word size first and derive the correct tdesc from that directly.
225
226 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
227
228 * Makefile.in: Include silent-rules.mk.
229 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
230 (COMPILE): Add ECHO_CXX.
231 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
232 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
233 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
234 (version-generated.c): Add ECHO_GEN.
235 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
236 (IPAGENT_COMPILE): Add ECHO_CXX.
237 (%-generated.c): Add ECHO_REGDAT.
238
239 2018-03-14 Tom Tromey <tom@tromey.com>
240
241 PR cli/14977:
242 * ax.c (ax_printf): Special case for NULL.
243
244 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
245
246 * linux-low.c (linux_qxfer_libraries_svr4): Use
247 xml_escape_text_append.
248
249 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
250
251 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
252
253 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
254
255 * server.c (handle_general_set): Remove unnecessary xstrdup.
256
257 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
258
259 * server.c (parse_debug_format_options): Adjust to
260 delim_string_to_char_ptr_vec changes.
261 * thread-db.c (thread_db_load_search): Adjust to
262 dirnames_to_char_ptr_vec changes.
263
264 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
265
266 * target.h (target_enable_btrace, target_disable_btrace)
267 (target_read_btrace, target_read_btrace_conf): Turn macro into
268 inline function. Throw error if target method is not defined.
269 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
270 check for btrace target method. Be prepared to handle exceptions
271 from btrace target methods.
272
273 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
274
275 * server.c (captured_main): Change order of error message printed
276 when the current working directory cannot be found.
277
278 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
279
280 * server.c: Include "filenames.h" and "pathstuff.h".
281 (program_name): Delete variable.
282 (program_path): New anonymous class.
283 (get_exec_wrapper): Use "program_path" instead of
284 "program_name".
285 (handle_v_run): Likewise.
286 (captured_main): Likewise.
287 (process_serial_event): Likewise.
288
289 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
290
291 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
292 (OBJS): Add "pathstuff.o".
293 * server.c (current_directory): New global variable.
294 (captured_main): Initialize "current_directory".
295
296 2018-02-26 Alan Hayward <alan.hayward@arm.com>
297
298 * tdesc.c: Use common/tdesc.h.
299 * tdesc.h: Likewise.
300
301 2018-02-20 Alan Hayward <alan.hayward@arm.com>
302 Simon Marchi <simon.marchi@ericsson.com>
303
304 * Makefile.in: Switch order of make rules.
305
306 2018-02-19 Alan Hayward <alan.hayward@arm.com>
307
308 * Makefile.in: Add common directory in build.
309 * configure.ac: Add common reference.
310 * configure: Regenerate.
311
312 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
313
314 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
315 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
316 * spu-low.c (spu_target_ops): Likewise.
317 * win32-low.c (win32_target_ops): Likewise.
318 * server.c (supported_btrace_packets): Report packets unconditionally.
319 * target.h (target_ops) <supports_btrace>: Remove.
320 (target_supports_btrace): Remove.
321
322 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
323
324 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
325 (handle_btrace_disable): Change return type to void. Use exceptions
326 to report errors.
327 (handle_btrace_general_set): Catch exception and copy message to
328 return message.
329
330 2018-02-08 Tom Tromey <tom@tromey.com>
331
332 * linux-low.c (install_software_single_step_breakpoints): Use
333 make_scoped_restore.
334 * inferiors.c (make_cleanup_restore_current_thread): Remove.
335 (do_restore_current_thread_cleanup): Remove.
336 * gdbthread.h (make_cleanup_restore_current_thread): Don't
337 declare.
338
339 2018-02-08 Tom Tromey <tom@tromey.com>
340
341 * mem-break.c (set_raw_breakpoint_at): Use
342 gdb::unique_xmalloc_ptr.
343
344 2018-01-30 Pedro Alves <palves@redhat.com>
345
346 PR gdb/13211
347 * target.c (target_terminal::terminal_state): Rename to ...
348 (target_terminal::m_terminal_state): ... this.
349
350 2018-01-19 James Clarke <jrtc27@jrtc27.com>
351
352 * linux-low.c (handle_extended_wait): Surround call to
353 thread_db_notice_clone with #ifdef USE_THREAD_DB.
354
355 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
356
357 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
358 linux_ptrace_attach_fail_reason_string now returning an
359 std::string.
360 (linux_attach): Likewise.
361 * thread-db.c (attach_thread): Likewise.
362
363 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
364
365 PR gdb/21559
366 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
367 checking for fs_base/gs_base fields in struct user_regs_struct.
368 * configure: Regenerate.
369
370 2018-01-16 Yao Qi <yao.qi@linaro.org>
371
372 PR gdb/18749
373 * linux-low.c (fetch_register): Call supply_register instead of
374 error.
375
376 2018-01-08 Yao Qi <yao.qi@linaro.org>
377 Simon Marchi <simon.marchi@ericsson.com>
378
379 * Makefile.in (OBS): Remove selftest.o.
380 * configure.ac: Set srv_selftest_objs if $development is true.
381 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
382 * configure: Re-generated.
383 * server.c (captured_main): Wrap variable selftest_filter with
384 GDB_SELF_TEST.
385
386 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
387
388 * server.c (parse_debug_format_options): Return std::string.
389 (handle_monitor_command, captured_main): Adjust.
390
391 2018-01-05 Pedro Alves <palves@redhat.com>
392
393 PR gdb/18653
394 * server.c (captured_main): Pass quiet=false to
395 save_original_signals_state.
396
397 2018-01-01 Joel Brobecker <brobecker@adacore.com>
398
399 * gdbreplay.c (gdbreplay_version): Update copyright year in
400 version message.
401 * server.c (gdbserver_version): Likewise.
402
403 2017-12-08 Tom Tromey <tom@tromey.com>
404
405 * ax.c (ax_printf): Update.
406
407 2017-12-07 Yao Qi <yao.qi@linaro.org>
408
409 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
410 aarch64_linux_read_description.
411 * linux-amd64-ipa.c (idx2mask): New array.
412 (get_ipa_tdesc): Move idx2mask out.
413 (initialize_low_tracepoint): Initialize target descriptions.
414 * linux-i386-ipa.c (idx2mask): New array.
415 (get_ipa_tdesc): Move idx2mask out.
416 (initialize_low_tracepoint): Initialize target descriptions.
417
418 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
419
420 * tdesc.c (struct tdesc_type): Change return type.
421 (tdesc_add_flag): Change parameter type.
422 (tdesc_add_bitfield): Likewise.
423 (tdesc_add_field): Likewise.
424 (tdesc_set_struct_size): Likewise.
425
426 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
427
428 * regcache.c (registers_to_string): Remove unused variable.
429
430 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
431
432 * inferiors.c (for_each_inferior_with_data): Remove.
433 * inferiors.h (for_each_inferior_with_data): Remove.
434 * server.c (handle_qxfer_threads_worker): Change parameter type.
435 (handle_qxfer_threads_proper): Use for_each_thread.
436
437 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
438
439 * inferiors.c (for_each_inferior): Remove.
440 (clear_inferiors): Use for_each_thread.
441 * inferiors.h (for_each_inferior): Remove.
442 * linux-low.c (linux_wait_for_event_filtered): Use
443 for_each_thread.
444 (linux_stabilize_threads): Likewise.
445 * regcache.c (regcache_release): Likewise.
446 * server.c (gdb_wants_all_threads_stopped): Likewise.
447 (clear_pending_status_callback): Remove.
448 (handle_status): Use for_each_thread.
449 (captured_main): Likewise.
450 * win32-low.c (child_init_thread_list): Likewise.
451 (win32_clear_inferiors): Likewise.
452 (fake_breakpoint_event): Likewise.
453
454 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
455
456 * inferiors.h (find_inferior): Remove.
457 * inferiors.c (find_inferior): Remove.
458
459 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
460
461 * linux-low.c (resume_status_pending_p): Update comment.
462 (need_step_over_p): Update comment.
463
464 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
465
466 * linux-low.c (proceed_one_lwp): Return void, change parameter
467 type.
468 (unsuspend_and_proceed_one_lwp): Likewise.
469 (proceed_all_lwps): Use for_each_thread.
470 (unstop_all_lwps): Likewise.
471
472 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
473
474 * linux-low.c (linux_resume_one_thread): Return void, take
475 parameter directly.
476 (linux_resume): Use for_each_thread.
477
478 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
479
480 * linux-low.c (send_sigstop_callback): Return void, change
481 parameter type. Rename to...
482 (send_sigstop): ... this.
483 (suspend_and_send_sigstop_callback): Return void, change parameter
484 type. Rename to...
485 (suspend_and_send_sigstop): ... this.
486 (stop_all_lwps): Use for_each_thread.
487
488 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
489
490 * linux-low.c (lwp_running): Return bool, remove unused
491 argument.
492 (linux_stabilize_threads): Use find_thread.
493
494 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
495
496 * linux-low.c (select_singlestep_lwp_callback): Remove.
497 (count_events_callback): Remove.
498 (select_event_lwp_callback): Remove.
499 (select_event_lwp): Use find_thread/for_each_thread.
500
501 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
502
503 * linux-low.c (not_stopped_callback): Return bool, take filter
504 argument directly.
505 (linux_wait_for_event_filtered): Use find_thread.
506 (linux_wait_1): Likewise.
507
508 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
509
510 * linux-low.c (same_lwp): Remove.
511 (find_lwp_pid): Use find_thread.
512
513 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
514
515 * linux-low.c (delete_lwp_callback): Remove.
516 (linux_mourn): Use for_each_thread.
517
518 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
519
520 * linux-low.c (linux_detach_lwp_callback): Return void, remove
521 args parameter, don't check for pid.
522 (linux_detach): Use for_each_thread.
523
524 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
525
526 * linux-low.c (struct counter): Remove.
527 (second_thread_of_pid_p): Remove.
528 (last_thread_of_process_p): Use find_thread.
529
530 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
531
532 * inferiors.c (find_inferior_in_random): Remove.
533 * inferiors.h (find_inferior_in_random): Remove.
534 * linux-low.c (status_pending_p_callback): Return bool, accept
535 parameter ptid directly.
536 (linux_wait_for_event_filtered): Use find_thread_in_random.
537 (linux_wait_1): Likewise.
538
539 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
540
541 * inferiors.c (find_inferior_id): Remove.
542 (find_thread_ptid): Move implemention from find_inferior_id to
543 here.
544 * inferiors.h (find_inferior_id): Remove.
545 * server.c (handle_status): Use find_thread_ptid.
546 (process_serial_event): Likewise.
547 * thread-db.c (find_one_thread): Likewise.
548 (thread_db_thread_handle): Likewise.
549 * win32-low.c (thread_rec): Likewise.
550 (child_delete_thread): Likewise.
551 (win32_thread_alive): Likewise.
552 (get_child_debug_event): Likewise.
553
554 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
555
556 * linux-mips-low.c (update_watch_registers_callback): Return
557 void, remove pid_p parameter, don't check for pid.
558 (mips_insert_point, mips_remove_point): Use for_each_thread.
559
560 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
561
562 * lynx.low (lynx_delete_thread_callback): Remove.
563 (lynx_mourn): Use for_each_thread.
564
565 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
566
567 * regcache.c (regcache_invalidate_one): Remove.
568 (regcache_invalidate_pid): use for_each_thread.
569
570 2017-11-26 Tom Tromey <tom@tromey.com>
571
572 * linux-low.c (linux_create_inferior): Update.
573
574 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
575
576 * spu-low.c (spu_create_inferior): Fix typo in argument name.
577
578 2017-11-24 Alan Hayward <alan.hayward@arm.com>
579
580 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
581 * linux-aarch64-low.c (initialize_low_arch): Call init func.
582 * linux-aarch64-tdesc-selftest.c: New file.
583 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
584
585 2017-11-24 Alan Hayward <alan.hayward@arm.com>
586
587 * configure.srv: Add new file.
588 * linux-aarch64-low.c (initialize_low_arch): Call init func.
589 * linux-aarch64-tdesc-selftest.c: New file.
590 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
591
592 2017-11-24 Alan Hayward <alan.hayward@arm.com>
593
594 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
595 * linux-aarch64-low.c (initialize_low_arch): Remove init.
596 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
597
598 2017-11-24 Alan Hayward <alan.hayward@arm.com>
599
600 * configure.srv: Add new files.
601 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
602 aarch64_linux_read_description.
603 * linux-aarch64-low.c (aarch64_linux_read_description):
604 Merge with aarch64_arch_setup.
605 (aarch64_arch_setup): Call aarch64_linux_read_description.
606 * linux-aarch64-tdesc.c: New file.
607 * linux-aarch64-tdesc.h: New file.
608
609 2017-11-24 Yao Qi <yao.qi@linaro.org>
610
611 * configure.srv: Set $srv_regobj for tic6x-linux.
612 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
613 (tic6x_read_description): Move some code to tic6x_arch_setup.
614 (tic6x_tdesc_test): New function.
615 (initialize_low_arch): Call selftests::register_test.
616
617 2017-11-22 Yao Qi <yao.qi@linaro.org>
618
619 * remote-utils.c (prepare_resume_reply): Use memcpy.
620
621 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
622
623 * linux-low.c (kill_one_lwp_callback): Return void, take
624 argument directly, don't filter on pid.
625 (linux_kill): Use for_each_thread.
626
627 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
628
629 * linux-low.c (need_step_over_p): Return bool, remove dummy
630 argument.
631 (linux_resume, proceed_all_lwps): Use find_thread.
632
633 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
634
635 * linux-low.c (resume_status_pending_p): Return bool, remove
636 flag_p argument.
637 (linux_resume): Use find_thread.
638
639 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
640
641 * linux-low.c (struct thread_resume_array): Remove.
642 (linux_set_resume_request): Return void, take arguments
643 directly.
644 (linux_resume): Use for_each_thread.
645
646 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
647
648 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
649 return bool, remove data argument.
650 (linux_stabilize_threads): Use find_thread.
651
652 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
653
654 * linux-low.c (unsuspend_one_lwp): Remove.
655 (unsuspend_all_lwps): Use for_each_thread, inline code from
656 unsuspend_one_lwp.
657
658 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
659
660 * gdbthread.h (find_thread): Add overload with ptid_t filter.
661 * linux-low.c (struct iterate_over_lwps_args): Remove.
662 (iterate_over_lwps_filter): Remove.
663 (iterate_over_lwps): Use find_thread.
664
665 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
666
667 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
668 (linux_handle_new_gdb_connection): Use for_each_thread, inline
669 code from reset_lwp_ptrace_options_callback.
670
671 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
672
673 * linux-arm-low.c (struct update_registers_data): Remove.
674 (update_registers_callback): Return void, take arguments
675 directly, don't check thread's pid.
676 (arm_insert_point, arm_remove_point): Use for_each_thread.
677
678 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
679
680 * win32-low.c (continue_one_thread): Return void, take argument
681 directly.
682 (child_continue): Use for_each_thread.
683
684 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
685
686 * win32-i386-low.c (update_debug_registers_callback): Rename
687 to ...
688 (update_debug_registers): ... this, return void, remove pid_p arg.
689 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
690
691 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
692
693 * inferiors.h (struct process_info): Add constructor, initialize
694 fields..
695 <syscalls_to_catch>: Change type to std::vector<int>.
696 * inferiors.c (add_process): Allocate process_info with new.
697 (remove_process): Free process_info with delete.
698 * linux-low.c (handle_extended_wait): Adjust.
699 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
700 * server.c (handle_general_set): Adjust.
701
702 2017-11-16 Pedro Alves <palves@redhat.com>
703
704 * remote-utils.c (remote_close): Block SIGIO signals instead of
705 uninstalling the SIGIO handler.
706
707 2017-11-16 Alan Hayward <alan.hayward@arm.com>
708
709 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
710
711 2017-11-16 Yao Qi <yao.qi@linaro.org>
712
713 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
714 (tic6x_store_gregset): Likewise.
715 (tic6x_usrregs_info): Move it up.
716
717 2017-11-15 Alan Hayward <alan.hayward@arm.com>
718
719 * Makefile.in: Update arch rules.
720 * configure.srv: Explicitly mark arch/ files.
721
722 2017-11-13 Andreas Schwab <schwab@suse.de>
723
724 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
725 function.
726 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
727
728 2017-11-06 Pedro Alves <palves@redhat.com>
729
730 * config.in, configure: Regenerate.
731
732 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
733
734 * target.c (struct thread_search): Remove.
735 (thread_search_callback): Remove.
736 (prepare_to_access_memory): Use for_each_thread instead of
737 find_inferior. Inline code from thread_search_callback.
738
739 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
740
741 * server.c (struct visit_actioned_threads_data): Remove.
742 (visit_actioned_threads): Change prototype to take arguments
743 directly.
744 (resume): Use find_thread instead of find_inferior.
745
746 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
747
748 * server.c (queue_stop_reply_callback): Change prototype, return
749 void.
750 (find_status_pending_thread_callback): Remove.
751 (handle_status): Replace find_inferior with find_thread and
752 for_each_thread.
753
754 2017-10-25 Alan Hayward <alan.hayward@arm.com>
755
756 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
757 with REGNO.
758 (aarch64_store_gregset): Likewise.
759 (aarch64_fill_fpregset): Likewise.
760 (aarch64_store_fpregset): Likewise.
761
762 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
763
764 * gdbthread.h (find_thread, for_each_thread): New functions.
765 * inferiors.c (thread_of_pid): Remove.
766 (find_any_thread_of_pid): Use find_thread.
767 * linux-low.c (num_lwps): Use for_each_thread.
768
769 2017-10-17 Yao Qi <yao.qi@linaro.org>
770
771 * Makefile.in: Remove one rule.
772 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
773
774 2017-10-17 Yao Qi <yao.qi@linaro.org>
775
776 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
777 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
778
779 2017-10-17 Yao Qi <yao.qi@linaro.org>
780
781 * configure.srv: Rename arm.o with arch/arm.o.
782
783 2017-10-17 Yao Qi <yao.qi@linaro.org>
784
785 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
786 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
787 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
788 (arch-i386.o, arch-amd64.o): Remove rules.
789 (arch/%.o): New rule.
790 Update POSTCOMPILE and COMPILE.pre.
791 * configure.ac: Invoke AC_CONFIG_COMMANDS.
792 * configure: Re-generated.
793 * configure.srv: Replace arch-i386.o with arch/i386.o.
794 Replace arch-amd64.o with arch/amd64.o.
795
796 2017-10-16 Yao Qi <yao.qi@linaro.org>
797
798 * configure: Regenerated.
799
800 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
801
802 * inferiors.h: (struct inferior_list): Remove.
803 (struct inferior_list_entry); Remove.
804 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
805 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
806 get_first_inferior): Remove.
807 (for_each_inferior, for_each_inferior_with_data, find_inferior,
808 find_inferior_id, find_inferior_in_random): Change signature.
809 * inferiors.c (all_threads): Change type to
810 std::list<thread_info *>.
811 (get_thread): Remove macro.
812 (find_inferior, find_inferior_id): Change signature, implement
813 using find_thread.
814 (find_inferior_in_random): Change signature, implement using
815 find_thread_in_random.
816 (for_each_inferior, for_each_inferior_with_data): Change
817 signature, implement using for_each_thread.
818 (add_inferior_to_list, remove_inferior): Remove.
819 (add_thread, get_first_thread, thread_of_pid,
820 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
821 (get_first_inferior, one_inferior_p, clear_inferior_list):
822 Remove.
823 (clear_inferiors, get_thread_process): Update.
824 * gdbthread.h: Include <list>.
825 (struct thread_info) <entry>: Remove field.
826 <id>: New field.
827 (all_threads): Change type to std::list<thread_info *>.
828 (get_first_inferior): Add doc.
829 (find_thread, for_each_thread, find_thread_in_random): New
830 functions.
831 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
832 * linux-arm-low.c (update_registers_callback): Update.
833 * linux-low.c (second_thread_of_pid_p): Update.
834 (kill_one_lwp_callback, linux_detach_lwp_callback,
835 delete_lwp_callback, status_pending_p_callback, same_lwp,
836 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
837 iterate_over_lwps, not_stopped_callback,
838 resume_stopped_resumed_lwps, count_events_callback,
839 select_singlestep_lwp_callback, select_event_lwp_callback,
840 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
841 suspend_and_send_sigstop_callback, wait_for_sigstop,
842 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
843 lwp_running, linux_set_resume_request, resume_status_pending_p,
844 need_step_over_p, start_step_over, linux_resume_one_thread,
845 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
846 reset_lwp_ptrace_options_callback): Update.
847 * linux-mips-low.c (update_watch_registers_callback): Update.
848 * regcache.c (regcache_invalidate_one, regcache_invalidate):
849 Update.
850 (free_register_cache_thread_one): Remove.
851 (regcache_release): Update.
852 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
853 handle_qxfer_threads_worker): Update.
854 (handle_query): Update, use list iterator.
855 (visit_actioned_threads, handle_pending_status,
856 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
857 clear_pending_status_callback, set_pending_status_callback,
858 find_status_pending_thread_callback, handle_status,
859 process_serial_event): Update.
860 * target.c (thread_search_callback): Update.
861 * thread-db.c (thread_db_get_tls_address): Update.
862 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
863 Update.
864 * win32-i386-low.c (update_debug_registers_callback): Update.
865 * win32-low.c (delete_thread_info, child_delete_thread,
866 continue_one_thread, suspend_one_thread,
867 get_child_debug_event): Adjust.
868
869 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
870
871 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
872 * inferiors.h: Include <list>.
873 (struct process_info) <entry>: Remove field.
874 <pid>: New field.
875 (pid_of): Change macro to function.
876 (ptid_of, lwpid_of): Remove macro.
877 (all_processes): Change type to std::list<process_info *>.
878 (ALL_PROCESSES): Remove macro.
879 (for_each_process, find_process): New function.
880 * inferiors.c (all_processes): Change type to
881 std::list<process_info *>.
882 (find_thread_process): Adjust.
883 (add_process): Likewise.
884 (remove_process): Likewise.
885 (find_process_pid): Likewise.
886 (get_first_process): Likewise.
887 (started_inferior_callback): Remove.
888 (have_started_inferiors_p): Adjust.
889 (attached_inferior_callback): Remove.
890 (have_attached_inferiors_p): Adjust.
891 * linux-low.c (check_zombie_leaders): Likewise.
892 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
893 (x86_linux_update_xmltarget): Adjust.
894 * server.c (handle_query): Likewise.
895 (gdb_reattached_process): Remove.
896 (handle_status): Adjust.
897 (kill_inferior_callback): Likewise.
898 (detach_or_kill_inferior): Remove.
899 (print_started_pid): Likewise.
900 (print_attached_pid): Likewise.
901 (detach_or_kill_for_exit): Update.
902 (process_serial_event): Likewise.
903 * linux-arm-low.c (arm_new_fork): Likewise.
904
905 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
906
907 * dll.h: Include <list>.
908 (struct dll_info): Add constructor.
909 <entry>: Remove field.
910 (all_dlls): Change type to std::list<dll_info>.
911 * dll.c: Include <algorithm>.
912 (get_dll): Remove macro.
913 (all_dlls): Change type to std::list<dll_info *>.
914 (free_one_dll): Remove.
915 (match_dll): Likewise.
916 (loaded_dll): Adjust.
917 (unloaded_dll): Adjust to all_dlls type change, use
918 std::find_if. Inline code from match_dll.
919 (clear_dlls): Adjust to all_dlls type change.
920 * server.c (emit_dll_description): Remove.
921 (handle_qxfer_libraries): Adjust to all_dlls type change,
922 integrate emit_dll_description's functionality.
923
924 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
925
926 * linux-low.h (struct linux_target_ops) <delete_process>: New
927 field.
928 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
929 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
930 (struct linux_target_ops): Add delete_process callback.
931 * linux-arm-low.c (arm_delete_process): New.
932 (struct linux_target_ops): Add delete_process callback.
933 * linux-bfin-low.c (struct linux_target_ops): Likewise.
934 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
935 * linux-m32r-low.c (struct linux_target_ops): Likewise.
936 * linux-mips-low.c (mips_linux_delete_process): New.
937 (struct linux_target_ops): Add delete_process callback.
938 * linux-ppc-low.c (struct linux_target_ops): Likewise.
939 * linux-s390-low.c (struct linux_target_ops): Likewise.
940 * linux-sh-low.c (struct linux_target_ops): Likewise.
941 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
942 * linux-tile-low.c (struct linux_target_ops): Likewise.
943 * linux-x86-low.c (x86_linux_delete_process): New.
944 (struct linux_target_ops): Add delete_process callback.
945 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
946
947 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
948
949 * linux-aarch64-low.c (the_low_target): Add thread delete
950 callback.
951 * linux-arm-low.c (arm_delete_thread): New function.
952 (the_low_target): Add thread delete callback.
953 * linux-bfin-low.c (the_low_target): Likewise.
954 * linux-crisv32-low.c (the_low_target): Likewise.
955 * linux-low.c (delete_lwp): Invoke delete_thread callback if
956 set.
957 * linux-low.h (struct linux_target_ops) <delete_thread>: New
958 field.
959 * linux-m32r-low.c (the_low_target): Add thread delete callback.
960 * linux-mips-low.c (mips_linux_delete_thread): New function.
961 (the_low_target): Add thread delete callback.
962 * linux-ppc-low.c (the_low_target): Likewise.
963 * linux-s390-low.c (the_low_target): Likewise.
964 * linux-sh-low.c (the_low_target): Likewise.
965 * linux-tic6x-low.c (the_low_target): Likewise.
966 * linux-tile-low.c (the_low_target): Likewise.
967 * linux-x86-low.c (the_low_target): Likewise.
968 * linux-xtensa-low.c (the_low_target): Likewise.
969
970 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
971
972 * win32-low.c: Include "common-inferior.h".
973
974 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
975
976 * inferiors.c (set_inferior_cwd): New function.
977 * server.c (handle_general_set): Handle QSetWorkingDir packet.
978 (handle_query): Inform that QSetWorkingDir is supported.
979 * win32-low.c (create_process): Pass the inferior's cwd to
980 CreateProcess.
981
982 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
983
984 * inferiors.c (current_inferior_cwd): New global variable.
985 (get_inferior_cwd): New function.
986 * inferiors.h (struct process_info) <cwd>: New field.
987
988 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
989
990 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
991 (OBS): Add gdb_tilde_expand.o.
992
993 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
994
995 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
996 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
997
998 2017-09-29 Pedro Alves <palves@redhat.com>
999
1000 * ax.c (gdb_parse_agent_expr): Constify.
1001 * ax.h (gdb_parse_agent_expr): Constify.
1002 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1003 Constify.
1004 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1005 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1006 * remote-utils.h (read_ptid): Constify.
1007 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1008 (process_point_options, process_serial_event): Constify.
1009 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1010 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1011 (cmd_qtbuffer): Constify.
1012
1013 2017-09-29 Pedro Alves <palves@redhat.com>
1014
1015 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1016 fails.
1017
1018 2017-09-29 Pedro Alves <palves@redhat.com>
1019
1020 * linux-low.c (handle_extended_wait): Pass parent thread instead
1021 of process to thread_db_notice_clone.
1022 * linux-low.h (thread_db_notice_clone): Replace parent process
1023 parameter with parent thread parameter.
1024 * thread-db.c (find_one_thread): Add comment.
1025 (thread_db_notice_clone): Replace parent process parameter with
1026 parent thread parameter. Temporarily switch to the parent thread.
1027
1028 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1029
1030 * gdbthread.h: Include "common-gdbthread.h".
1031 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1032 "if" when validating the ptid.
1033 * remote-utils.c: Include "gdbthread.h".
1034 (prepare_resume_reply): Use "switch_to_thread".
1035 * target.c (done_accessing_memory): Likewise.
1036
1037 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1038
1039 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1040 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1041 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1042 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1043 s390x-gs-linux64-ipa.o to ipa_obj.
1044 * linux-s390-low.c (HWCAP_S390_GS): New define.
1045 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1046 New functions.
1047 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1048 (s390_arch_setup): Check for guarded-storage support and choose
1049 appropriate tdesc.
1050 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1051 init_registers_s390x_gs_linux64.
1052 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1053 enum value.
1054 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1055 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1056
1057 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1058
1059 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1060
1061 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1062
1063 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1064 (thread_db_thread_handle): Declare.
1065 * linux-low.c (linux_target_ops): Initialize thread_handle.
1066 * server.c (handle_qxfer_threads_worker): Add support for
1067 "handle" attribute.
1068 * target.h (struct target_ops): Add new function pointer,
1069 thread_handle.
1070 (target_thread_handle): Define.
1071 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1072 field in lwp.
1073 (thread_db_thread_handle): New function.
1074
1075 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1076
1077 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1078 * linux-low.h (thread_db_notice_clone): Declare.
1079 * thread-db.c (thread_db_notice_clone): New function.
1080
1081 2017-09-21 Pedro Alves <palves@redhat.com>
1082
1083 * server.c (gdb_read_memory, handle_status, process_serial_event)
1084 (handle_serial_event, handle_target_event): Adjust to
1085 set_desired_thread prototype change.
1086 * target.c (set_desired_thread): Remove 'use_general' parameter
1087 and adjust.
1088 * target.h (set_desired_thread): Remove 'use_general' parameter.
1089
1090 2017-09-20 Tom Tromey <tom@tromey.com>
1091
1092 * target.c (target_terminal::terminal_state): Define.
1093 (target_terminal::init): Rename from target_terminal_init.
1094 (target_terminal::inferior): Rename from
1095 target_terminal_inferior.
1096 (target_terminal::ours): Rename from target_terminal_ours.
1097 (target_terminal::ours_for_output, target_terminal::info): New.
1098
1099 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1100
1101 * server.c (accumulate_file_name_length): Remove.
1102 (emit_dll_description): Adjust to std::string change.
1103 (handle_qxfer_libraries): Use std::string to hold document.
1104
1105 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1106
1107 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1108 return type of xml_escape_text.
1109 * server.c (emit_dll_description): Likewise.
1110
1111 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1112
1113 * server.c (captured_main): Accept argument for --selftest.
1114 Update run_tests call.
1115 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1116 when registering selftests.
1117
1118 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1119
1120 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1121 instead of "VEC" for "target_desc.reg_defs".
1122 (regcache_cpy): Likewise.
1123 (registers_to_string): Likewise.
1124 (registers_from_string): Likewise.
1125 (find_regno): Likewise.
1126 (supply_regblock): Likewise.
1127 (regcache_raw_read_unsigned): Likewise.
1128 * tdesc.c (init_target_desc): Likewise.
1129 (tdesc_create_reg): Likewise.
1130 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1131 (struct target_desc) <reg_defs>: Convert to "std::vector".
1132 (target_desc): Do not initialize "reg_defs".
1133 (~target_desc): Update code to use "std::vector" instead of "VEC"
1134 for "target_desc.reg_defs".
1135 (operator==): Likewise.
1136
1137 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1138
1139 * inferiors.h (thread_to_gdb_id): Remove.
1140 * inferiors.c (thread_to_gdb_id): Remove.
1141 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1142 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1143 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1144 Likewise.
1145 * nto-low.c (nto_fetch_registers, nto_store_registers,
1146 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1147
1148 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1149
1150 * inferiors.h (gdb_id_to_thread_id): Remove.
1151 * inferiors.c (gdb_id_to_thread_id): Remove.
1152 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1153 removal. Move pid declaration closer to where it's used.
1154
1155 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1156
1157 * server.c (handle_detach): New function.
1158 (process_serial_event): Move code out, call handle_detach.
1159
1160 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1161
1162 * server.c (require_running): Rename to ...
1163 (require_running_or_return): ... this ...
1164 (require_running_or_break): ... and this.
1165 (handle_query, process_serial_event): Adjust.
1166
1167 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1168
1169 * linux-low.c (linux_set_resume_request): Remove unused
1170 variables.
1171
1172 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1173
1174 * server.c (first_thread_of): Remove.
1175 (process_serial_event): Replace usage of first_thread_of with
1176 find_any_thread_of_pid.
1177 * tracepoint.c (same_process_p): Remove.
1178 (gdb_agent_about_to_close): Replace usage of same_process_p with
1179 find_any_thread_of_pid.
1180 * linux-x86-low.c (same_process_callback): Remove.
1181 (x86_arch_setup_process_callback): Replace usage of
1182 same_process_callback with find_any_thread_of_pid.
1183 * thread-db.c (any_thread_of): Remove.
1184 (switch_to_process): Replace usage of any_thread_of with
1185 find_any_thread_of_pid.
1186 * inferiors.c (thread_pid_matches_callback): Remove.
1187 (find_thread_process): Adjust to use find_any_thread_of_pid.
1188
1189 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1190
1191 * regcache.c (get_thread_regcache): Guard calls to "memset"
1192 with "!VEC_empty".
1193
1194 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1195
1196 * linux-low.c (handle_extended_wait): Use
1197 "allocate_target_description" instead of "XNEW".
1198 * linux-x86-low.c (initialize_low_arch): Likewise.
1199
1200 2017-09-05 Yao Qi <yao.qi@linaro.org>
1201
1202 * configure.srv (srv_i386_regobj): Remove.
1203 (srv_amd64_regobj): Remove.
1204 (srv_regobj): Set it to "" for x86 non-linux targets.
1205 * linux-x86-tdesc.c (i386_linux_read_description):
1206 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1207 (init_registers_i386): Remove the declaration.
1208 (tdesc_i386): Remove the declaration.
1209 (lynx_i386_arch_setup): Call i386_create_target_description.
1210 * nto-x86-low.c: Likewise.
1211 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1212 [!__x86_64__]: include arch/i386.h.
1213 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1214
1215 2017-09-05 Yao Qi <yao.qi@linaro.org>
1216
1217 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1218 i386/amd64-XXX-linux from it.
1219
1220 2017-09-05 Yao Qi <yao.qi@linaro.org>
1221
1222 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1223 false.
1224 (ipa_amd64_linux_regobj): Remove.
1225 (ipa_x32_linux_regobj): Remove.
1226
1227 2017-09-05 Yao Qi <yao.qi@linaro.org>
1228
1229 * Makefile.in (arch-amd64.o): New rule.
1230 * configure.srv: Append arch-amd64.o.
1231 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1232 (get_ipa_tdesc): Call amd64_linux_read_description.
1233 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1234 and init_registers_amd64_XXX.
1235 * linux-x86-low.c (x86_linux_read_description): Call
1236 amd64_linux_read_description.
1237 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1238 (initialize_low_arch): Don't call init_registers_x32_XXX and
1239 init_registers_amd64_XXX.
1240 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1241 and tdesc_amd64_XXX.
1242 [__x86_64__] (amd64_tdesc_test): New function.
1243 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1244 and init_registers_amd64_XXX.
1245 * linux-x86-tdesc.c: Include arch/amd64.h.
1246 (xcr0_to_tdesc_idx): New function.
1247 (i386_linux_read_description): New function.
1248 (amd64_get_ipa_tdesc_idx): New function.
1249 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1250 (amd64_get_ipa_tdesc): Declare.
1251
1252 2017-09-05 Yao Qi <yao.qi@linaro.org>
1253
1254 * configure.srv (srv_i386_linux_xmlfiles): Remove
1255 i386/i386-XXX-linux.xml from it.
1256
1257 2017-09-05 Yao Qi <yao.qi@linaro.org>
1258
1259 * configure.srv: Set srv_i386_linux_regobj empty if $development
1260 is false.
1261 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1262 initialize_low_tdesc.
1263 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1264 with #if initialize_low_tdesc.
1265 * linux-x86-tdesc-selftest.c: New file.
1266 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1267
1268 2017-09-05 Yao Qi <yao.qi@linaro.org>
1269
1270 * Makefile.in (arch-i386.o): New rule.
1271 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1272 (x86_64-*-linux*): Likewise.
1273 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1274 include arch/i386.h.
1275 (i386_linux_read_description): Remove code and call
1276 i386_create_target_description.
1277 * tdesc.c (allocate_target_description): New function.
1278 * tdesc.h (set_tdesc_architecture): Remove declaration.
1279 (set_tdesc_osabi): Likewise.
1280
1281 2017-09-05 Yao Qi <yao.qi@linaro.org>
1282
1283 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1284 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1285 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1286 .xmltarget.
1287 * server.c (get_features_xml): Call tdesc_get_features_xml.
1288 * tdesc.c (set_tdesc_architecture): New function.
1289 (set_tdesc_osabi): New function.
1290 (tdesc_get_features_xml): New function.
1291 (tdesc_create_feature): Add an argument.
1292 * tdesc.h (struct target_desc) <features>: New field.
1293 <arch, osabi>: New field.
1294 (~target_desc): xfree features, arch, and osabi.
1295 (target_desc::oerator==): Don't compare .xmltarget.
1296 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1297 (set_tdesc_osabi): Likewise.
1298 (tdesc_get_features_xml): Likewise.
1299
1300 2017-09-05 Yao Qi <yao.qi@linaro.org>
1301
1302 * linux-x86-tdesc.c: Include selftest.h.
1303 (i386_tdesc_test): New function.
1304 (initialize_low_tdesc): Call selftests::register_test.
1305 * tdesc.h: Include regdef.h.
1306 (target_desc): Override operator == and !=.
1307
1308 2017-09-05 Yao Qi <yao.qi@linaro.org>
1309
1310 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1311 (ipa_obj): Likewise.
1312 * linux-i386-ipa.c: Include common/x86-xstate.h
1313 (get_ipa_tdesc): Call i386_linux_read_description.
1314 (initialize_low_tracepoint): Don't call init_registers_XXX
1315 functions, call initialize_low_tdesc instead.
1316 * linux-x86-low.c (x86_linux_read_description): Call
1317 i386_linux_read_description.
1318 (initialize_low_arch): Don't call init_registers_i386_XXX
1319 functions, call initialize_low_tdesc.
1320 * linux-x86-tdesc.c: New file.
1321 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1322 (i386_get_ipa_tdesc_idx): Declare.
1323 (i386_get_ipa_tdesc): Declare.
1324 (initialize_low_tdesc): Declare.
1325
1326 2017-09-05 Yao Qi <yao.qi@linaro.org>
1327
1328 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1329 instead of 0.
1330
1331 2017-09-05 Yao Qi <yao.qi@linaro.org>
1332
1333 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1334 * regcache.c (get_thread_regcache): Use VEC_length.
1335 (init_register_cache): Likewise.
1336 (regcache_cpy): Likewise.
1337 (registers_to_string): Iterate reg_defs via VEC_iterate.
1338 (find_regno): Likewise.
1339 (find_register_by_number): Use VEC_index.
1340 (register_size): Call find_register_by_number.
1341 (register_data): Call find_register_by_number.
1342 (supply_regblock): Use VEC_length.
1343 (regcache_raw_read_unsigned): Likewise.
1344 * tdesc.c (init_target_desc): Iterate reg_defs via
1345 VEC_iterate.
1346 (default_description): Update initializer.
1347 (copy_target_description): Don't update field num_registers.
1348 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1349 <num_registers>: Remove.
1350
1351 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1352
1353 * Makefile.in (.SECONDARY): Define target.
1354
1355 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1356
1357 * linux-low.c (linux_wait_1): Adjust.
1358 * server.c (queue_stop_reply_callback): Adjust.
1359
1360 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1361
1362 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1363 QEnvironmentUnset and QEnvironmentReset packets.
1364 (handle_query): Inform remote that QEnvironmentHexEncoded,
1365 QEnvironmentUnset and QEnvironmentReset are supported.
1366
1367 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1368
1369 * inferiors.h (inferior_target_data): Rename to ...
1370 (thread_target_data): ... this.
1371 (inferior_regcache_data): Rename to ...
1372 (thread_regcache_data): ... this.
1373 (set_inferior_regcache_data): Rename to ...
1374 (set_thread_regcache_data): ... this.
1375 * inferiors.c (inferior_target_data): Rename to ...
1376 (thread_target_data): ... this.
1377 (inferior_regcache_data): Rename to ...
1378 (thread_regcache_data): ... this.
1379 (set_inferior_regcache_data): Rename to ...
1380 (set_thread_regcache_data): ... this.
1381 (free_one_thread): Update.
1382 * linux-low.h (get_thread_lwp): Update.
1383 * regcache.c (get_thread_regcache): Update.
1384 (regcache_invalidate_thread): Update.
1385 (free_register_cache_thread): Update.
1386 * win32-i386-low.c (update_debug_registers_callback): Update.
1387 (win32_get_current_dr): Update.
1388 * win32-low.c (thread_rec): Update.
1389 (delete_thread_info): Update.
1390 (continue_one_thread): Update.
1391 (suspend_one_thread): Update.
1392
1393 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1394
1395 * inferiors.c (set_inferior_target_data): Remove.
1396 * inferiors.h (set_inferior_target_data): Remove.
1397
1398 2017-08-18 Yao Qi <yao.qi@linaro.org>
1399
1400 * Makefile.in (OBS): Add selftest.o.
1401 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1402 * configure, config.in: Re-generated.
1403 * server.c: Include common/sefltest.h.
1404 (captured_main): Handle option --selftest.
1405
1406 2017-08-09 Yao Qi <yao.qi@linaro.org>
1407
1408 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1409 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1410 i386-avx-mpx.o and i386-mmx.o.
1411 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1412 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1413 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1414 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1415 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1416 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1417 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1418 i386/amd64-avx-mpx.xml.
1419
1420 2017-08-09 Yao Qi <yao.qi@linaro.org>
1421
1422 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1423 and x32-avx-avx512.o.
1424 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1425 i386/x32-avx-avx512.xml.
1426
1427 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1428
1429 * tracepoint.h (enum class fast_tpoint_collect_result): New
1430 enumeration.
1431 (fast_tracepoint_collecting): Change return type to
1432 fast_tpoint_collect_result.
1433 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1434 * linux-low.h: Include tracepoint.h.
1435 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1436 fast_tpoint_collect_result.
1437 * linux-low.c (handle_tracepoints): Adjust.
1438 (linux_fast_tracepoint_collecting): Change return type to
1439 fast_tpoint_collect_result.
1440 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1441 linux_wait_1, stuck_in_jump_pad_callback,
1442 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1443 proceed_one_lwp): Adjust to type change.
1444
1445 2017-07-10 Yao Qi <yao.qi@linaro.org>
1446
1447 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1448
1449 2017-06-29 Yao Qi <yao.qi@linaro.org>
1450
1451 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1452 Remove.
1453 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1454
1455 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1456
1457 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1458
1459 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1460
1461 * linux-low.c (linux_create_inferior): Adjust code to access the
1462 environment information via 'gdb_environ' class.
1463 * lynx-low.c (lynx_create_inferior): Likewise.
1464 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1465 (get_environ): Return a pointer to 'our_environ'.
1466 (captured_main): Initialize 'our_environ'.
1467 * server.h (get_environ): Adjust prototype.
1468 * spu-low.c (spu_create_inferior): Adjust code to access the
1469 environment information via 'gdb_environ' class.
1470
1471 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1472
1473 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1474 usage of "register" keyword.
1475
1476 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1477
1478 * configure: Re-generate.
1479
1480 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1481
1482 * configure: Re-generate.
1483
1484 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1485
1486 * Makefile.in (COMPILE.pre): Add "-x c++".
1487
1488 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1489
1490 * fork-child.c: Conditionally include <signal.h>.
1491
1492 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1493
1494 * server.c (handle_general_set): Handle new packet
1495 "QStartupWithShell".
1496 (handle_query): Add "QStartupWithShell" to the list of supported
1497 packets.
1498 (gdbserver_usage): Add help text explaining the
1499 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1500 options.
1501 (captured_main): Recognize and act upon the presence of the new
1502 CLI options.
1503
1504 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1505 Pedro Alves <palves@redhat.com>
1506
1507 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1508 * configure: Regenerate.
1509 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1510 "fork-inferior.o".
1511 (i[34567]86-*-lynxos*): Likewise.
1512 (spu*-*-*): Likewise.
1513 * fork-child.c: New file.
1514 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1515 and "environ.h".
1516 (linux_ptrace_fun): New function.
1517 (linux_create_inferior): Adjust function prototype to reflect
1518 change on "target.h". Adjust function code to use
1519 "fork_inferior".
1520 (linux_request_interrupt): Delete "signal_pid".
1521 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1522 (lynx_ptrace_fun): New function.
1523 (lynx_create_inferior): Adjust function prototype to reflect
1524 change on "target.h". Adjust function code to use
1525 "fork_inferior".
1526 * nto-low.c (nto_create_inferior): Adjust function prototype and
1527 code to reflect change on "target.h". Update comments.
1528 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1529 "common-terminal.h" and "environ.h".
1530 (terminal_fd): Moved to fork-child.c.
1531 (old_foreground_pgrp): Likewise.
1532 (restore_old_foreground_pgrp): Likewise.
1533 (last_status): Make it global.
1534 (last_ptid): Likewise.
1535 (our_environ): New variable.
1536 (startup_with_shell): Likewise.
1537 (program_name): Likewise.
1538 (program_argv): Rename to...
1539 (program_args): ...this.
1540 (wrapper_argv): New variable.
1541 (start_inferior): Delete function.
1542 (get_exec_wrapper): New function.
1543 (get_exec_file): Likewise.
1544 (get_environ): Likewise.
1545 (prefork_hook): Likewise.
1546 (post_fork_inferior): Likewise.
1547 (postfork_hook): Likewise.
1548 (postfork_child_hook): Likewise.
1549 (handle_v_run): Update code to deal with arguments coming from the
1550 remote host. Update calls from "start_inferior" to
1551 "create_inferior".
1552 (captured_main): Likewise. Initialize environment variable. Call
1553 "have_job_control".
1554 * server.h (post_fork_inferior): New prototype.
1555 (get_environ): Likewise.
1556 (last_status): Declare.
1557 (last_ptid): Likewise.
1558 (signal_pid): Likewise.
1559 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1560 (spu_ptrace_fun): New function.
1561 (spu_create_inferior): Adjust function prototype to reflect change
1562 on "target.h". Adjust function code to use "fork_inferior".
1563 * target.c (target_terminal_init): New function.
1564 (target_terminal_inferior): Likewise.
1565 (target_terminal_ours): Likewise.
1566 * target.h: Include <vector>.
1567 (struct target_ops) <create_inferior>: Update prototype.
1568 (create_inferior): Update macro.
1569 * utils.c (gdb_flush_out_err): New function.
1570 * win32-low.c (win32_create_inferior): Adjust function prototype
1571 and code to reflect change on "target.h".
1572
1573 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1574
1575 * inferiors.c (switch_to_thread): New function.
1576
1577 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1578
1579 * Makefile.in (SFILE): Add "common/job-control.c".
1580 (OBS): Add "job-control.o".
1581
1582 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1583
1584 * Makefile: Remove "@host_makefile_frag@".
1585
1586 2017-05-05 Pedro Alves <palves@redhat.com>
1587
1588 * configure: Regenerate.
1589
1590 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1591
1592 * configure: Regenerate.
1593
1594 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1595
1596 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1597 software_single_step change of return type to
1598 std::vector<CORE_ADDR>.
1599 * linux-low.c (install_software_single_step_breakpoints):
1600 Likewise.
1601 * linux-low.h (install_software_single_step_breakpoints):
1602 Likewise.
1603
1604 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1605
1606 * remote-utils.c: Include "gdb_termios.h" instead of
1607 "terminal.h".
1608 * terminal.h: Delete file.
1609
1610 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1611
1612 * server.c: Include <vector>.
1613 <program_argv, wrapper_argv>: Convert to std::vector.
1614 (start_inferior): Rewrite function to use C++.
1615 (handle_v_run): Likewise. Update code that calculates the argv
1616 based on the vRun packet; use C++.
1617 (captured_main): Likewise.
1618
1619 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1620
1621 * server.c (handle_v_cont): Initialize thread_resume::thread
1622 with null_ptid.
1623
1624 2017-04-05 Pedro Alves <palves@redhat.com>
1625
1626 * configure: Regenerate.
1627
1628 2017-04-05 Pedro Alves <palves@redhat.com>
1629
1630 * gdbreplay.c (sync_error): Constify.
1631 * linux-x86-low.c (push_opcode): Constify.
1632
1633 2017-04-05 Pedro Alves <palves@redhat.com>
1634
1635 * win32-low.c (get_child_debug_event)
1636 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1637 Report TARGET_WAITKIND_SPURIOUS instead.
1638
1639 2017-04-05 Pedro Alves <palves@redhat.com>
1640
1641 * remote-utils.c (remote_prepare, remote_open): Constify.
1642 * remote-utils.h (remote_prepare, remote_open): Constify.
1643 * server.c (captured_main): Constify 'port' handling.
1644
1645 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1646
1647 * Makefile.in (clean): Clear .deps.
1648
1649 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1650
1651 * .gitignore: Remove generated files, replace with wildcard.
1652 * (clean): Replace removal of generated files with wildcard.
1653 (version.c): Replace with...
1654 (version-generated.c): ...this.
1655 (xml-builtin.c): Replace with...
1656 (xml-builtin-generated.c): ...this.
1657 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1658 (%.c: *regformats*): Replace with...
1659 (%-generated.c: *regformats*): ...this.
1660
1661 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1662
1663 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1664 (xtensa_fill_gregset): Call collect_register_by_name for
1665 threadptr register.
1666 (xtensa_store_gregset): Call supply_register_by_name for
1667 threadptr register.
1668
1669 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1670
1671 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1672 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1673 (xtensa_store_gregset): Call supply_register for all registers in
1674 a0_regnum..a0_regnum + C0_NREGS range.
1675
1676 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1677
1678 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1679 (ax-ipa.o: ax.c): Remove.
1680 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1681 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1682 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1683 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1684 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1685
1686 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1687
1688 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1689 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1690 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1691 (errors-ipa.o: ../common/errors.c): Remove.
1692 (format-ipa.o: ../common/format.c): Remove.
1693 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1694
1695 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1696
1697 * Makefile.in (%-ipa.o: %.c): New rule.
1698 (tracepoint-ipa.o: tracepoint.c): Remove.
1699 (utils-ipa.o: utils.c): Remove.
1700 (remote-utils-ipa.o: remote-utils.c): Remove.
1701 (regcache-ipa.o: regcache.c): Remove.
1702 (i386-linux-ipa.o: i386-linux.c): Remove.
1703 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1704 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1705 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1706 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1707 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1708 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1709 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1710 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1711 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1712 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1713 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1714 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1715 (aarch64-ipa.o: aarch64.c): Remove.
1716 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1717 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1718 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1719 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1720 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1721 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1722 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1723 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1724 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1725 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1726 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1727 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1728 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1729 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1730 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1731 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1732 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1733 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1734 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1735 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1736 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1737 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1738 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1739 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1740 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1741 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1742 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1743 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1744 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1745 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1746 (tdesc-ipa.o: tdesc.c): Remove.
1747 (x32-linux-ipa.o: x32-linux.c): Remove.
1748 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1749 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1750
1751 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1752
1753 * Makefile.in (%.o: ../arch/%.c): New rule.
1754 (arm.o: ../arch/arm.c): Remove.
1755 (arm-linux.o: ../arch/arm-linux.c): Remove.
1756 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1757 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1758
1759 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1760
1761 * Makefile.in (%.o: ../nat/%.c): New rule.
1762 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1763 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1764 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1765 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1766 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1767 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1768 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1769 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1770 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1771 (linux-personality.o: ../nat/linux-personality.c): Remove.
1772 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1773 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1774 (x86-linux.o: ../nat/x86-linux.c): Remove.
1775 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1776 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1777
1778 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1779
1780 * Makefile.in (%.o: ../common/%.c): New rule.
1781 (signals.o: ../common/signals.c): Remove.
1782 (print-utils.o: ../common/print-utils.c): Remove.
1783 (rsp-low.o: ../common/rsp-low.c): Remove.
1784 (common-utils.o: ../common/common-utils.c): Remove.
1785 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1786 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1787 (vec.o: ../common/vec.c): Remove.
1788 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1789 (xml-utils.o: ../common/xml-utils.c): Remove.
1790 (ptid.o: ../common/ptid.c): Remove.
1791 (buffer.o: ../common/buffer.c): Remove.
1792 (format.o: ../common/format.c): Remove.
1793 (filestuff.o: ../common/filestuff.c): Remove.
1794 (agent.o: ../common/agent.c): Remove.
1795 (errors.o: ../common/errors.c): Remove.
1796 (environ.o: ../common/environ.c): Remove.
1797 (common-debug.o: ../common/common-debug.c): Remove.
1798 (cleanups.o: ../common/cleanups.c): Remove.
1799 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1800 (fileio.o: ../common/fileio.c): Remove.
1801 (common-regcache.o: ../common/common-regcache.c): Remove.
1802 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1803 (new-op.o: ../common/new-op.c): Remove.
1804 (btrace-common.o: ../common/btrace-common.c): Remove.
1805
1806 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1807
1808 * Makefile.in (%.o: ../target/%.c): New rule.
1809 (waitstatus.o: ../target/waitstatus.c): Remove.
1810
1811 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1812
1813 * Makefile.in
1814 (%.c: ../regformats/%.dat,
1815 (%.c: ../regformats/arm/%.dat,
1816 (%.c: ../regformats/i386/%.dat,
1817 (%.c: ../regformats/rs6000/%.dat): New rules.
1818 (aarch64.c): Remove.
1819 (reg-arm.c): Remove.
1820 (arm-with-iwmmxt.c): Remove.
1821 (arm-with-vfpv2.c): Remove.
1822 (arm-with-vfpv3.c): Remove.
1823 (arm-with-neon.c): Remove.
1824 (reg-bfin.c): Remove.
1825 (reg-cris.c): Remove.
1826 (reg-crisv32.c): Remove.
1827 (i386.c): Remove.
1828 (i386-linux.c): Remove.
1829 (i386-avx.c): Remove.
1830 (i386-avx-linux.c): Remove.
1831 (i386-avx-avx512.c): Remove.
1832 (i386-avx-avx512-linux.c): Remove.
1833 (i386-mpx.c): Remove.
1834 (i386-mpx-linux.c): Remove.
1835 (i386-avx-mpx-avx512-pku.c): Remove.
1836 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1837 (i386-avx-mpx.c): Remove.
1838 (i386-avx-mpx-linux.c): Remove.
1839 (i386-mmx.c): Remove.
1840 (i386-mmx-linux.c): Remove.
1841 (reg-ia64.c): Remove.
1842 (reg-m32r.c): Remove.
1843 (reg-m68k.c): Remove.
1844 (reg-cf.c): Remove.
1845 (mips-linux.c): Remove.
1846 (mips-dsp-linux.c): Remove.
1847 (mips64-linux.c): Remove.
1848 (mips64-dsp-linux.c): Remove.
1849 (nios2-linux.c): Remove.
1850 (powerpc-32.c): Remove.
1851 (powerpc-32l.c): Remove.
1852 (powerpc-altivec32l.c): Remove.
1853 (powerpc-cell32l.c): Remove.
1854 (powerpc-vsx32l.c): Remove.
1855 (powerpc-isa205-32l.c): Remove.
1856 (powerpc-isa205-altivec32l.c): Remove.
1857 (powerpc-isa205-vsx32l.c): Remove.
1858 (powerpc-e500l.c): Remove.
1859 (powerpc-64l.c): Remove.
1860 (powerpc-altivec64l.c): Remove.
1861 (powerpc-cell64l.c): Remove.
1862 (powerpc-vsx64l.c): Remove.
1863 (powerpc-isa205-64l.c): Remove.
1864 (powerpc-isa205-altivec64l.c): Remove.
1865 (powerpc-isa205-vsx64l.c): Remove.
1866 (s390-linux32.c): Remove.
1867 (s390-linux32v1.c): Remove.
1868 (s390-linux32v2.c): Remove.
1869 (s390-linux64.c): Remove.
1870 (s390-linux64v1.c): Remove.
1871 (s390-linux64v2.c): Remove.
1872 (s390-te-linux64.c): Remove.
1873 (s390-vx-linux64.c): Remove.
1874 (s390-tevx-linux64.c): Remove.
1875 (s390x-linux64.c): Remove.
1876 (s390x-linux64v1.c): Remove.
1877 (s390x-linux64v2.c): Remove.
1878 (s390x-te-linux64.c): Remove.
1879 (s390x-vx-linux64.c): Remove.
1880 (s390x-tevx-linux64.c): Remove.
1881 (tic6x-c64xp-linux.c): Remove.
1882 (tic6x-c64x-linux.c): Remove.
1883 (tic6x-c62x-linux.c): Remove.
1884 (reg-sh.c): Remove.
1885 (reg-sparc64.c): Remove.
1886 (reg-spu.c): Remove.
1887 (amd64.c): Remove.
1888 (amd64-linux.c): Remove.
1889 (amd64-avx.c): Remove.
1890 (amd64-avx-linux.c): Remove.
1891 (amd64-avx-avx512.c): Remove.
1892 (amd64-avx-avx512-linux.c): Remove.
1893 (amd64-mpx.c): Remove.
1894 (amd64-mpx-linux.c): Remove.
1895 (amd64-avx-mpx-avx512-pku.c): Remove.
1896 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1897 (amd64-avx-mpx.c): Remove.
1898 (amd64-avx-mpx-linux.c): Remove.
1899 (x32.c): Remove.
1900 (x32-linux.c): Remove.
1901 (x32-avx.c): Remove.
1902 (x32-avx-linux.c): Remove.
1903 (x32-avx-avx512.c): Remove.
1904 (x32-avx-avx512-linux.c): Remove.
1905 (reg-xtensa.c): Remove.
1906 (reg-tilegx.c): Remove.
1907 (reg-tilegx32.c): Remove.
1908
1909 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1910
1911 * Makefile.in (SFILES): Add "common/environ.c".
1912 (OBJS): Add "common/environ.h".
1913
1914 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1915
1916 * configure.ac: Check if the fs_base and gs_base members of
1917 `struct user_regs_struct' exist.
1918 * config.in: Regenerated.
1919 * configure: Likewise.
1920
1921 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1922
1923 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1924 target_read_memory.
1925 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1926 (get_next_pcs_syscall_next_pc): Likewise.
1927
1928 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1929
1930 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1931 * nto-x86-low.c: Likewise.
1932
1933 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1934
1935 * Makefile.in: Include disable-implicit-rules.mk.
1936
1937 2016-11-23 Pedro Alves <palves@redhat.com>
1938
1939 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1940 (debug_vprintf): Use std::chrono::steady_clock instead of
1941 gettimeofday. Use '.' instead of ':'.
1942 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1943 (get_timestamp): Use std::chrono::steady_clock instead of
1944 gettimeofday.
1945
1946 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1947
1948 * Makefile.in: Fix whitespace formatting.
1949
1950 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1951
1952 * Makefile.in (SFILES, OBS): Flatten list and order
1953 alphabetically.
1954
1955 2016-11-23 Pedro Alves <palves@redhat.com>
1956
1957 * event-loop.c (handle_file_event): Use warning.
1958 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1959 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1960 Use warning.
1961
1962 2016-11-23 Pedro Alves <palves@redhat.com>
1963
1964 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1965 output.
1966 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1967 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1968 debug_printf and debug_flush for debug output.
1969 * server.c (handle_general_set): Likewise.
1970 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1971 output.
1972
1973 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1974
1975 * Makefile.in (.c.o): Replace rule with ...
1976 (%.o: %.c): ... this one.
1977
1978 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1979
1980 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1981 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1982 make.
1983 * configure.ac: Remove checks for the make program.
1984 * configure: Re-generate.
1985
1986 2016-10-28 Pedro Alves <palves@redhat.com>
1987
1988 * Makefile.in (CXX_DIALECT): Get from configure.
1989 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1990 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1991 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1992 * config.in: Regenerate.
1993 * configure: Regenerate.
1994
1995 2016-10-27 Yao Qi <yao.qi@linaro.org>
1996
1997 * linux-low.c (linux_supports_range_stepping): Return true if
1998 can_software_single_step return true.
1999
2000 2016-10-27 Yao Qi <yao.qi@linaro.org>
2001
2002 * inferiors.c (find_inferior_in_random): New function.
2003 * inferiors.h (find_inferior_in_random): Declare.
2004 * linux-low.c (linux_wait_for_event_filtered): Call
2005 find_inferior_in_random instead of find_inferior.
2006
2007 2016-10-27 Yao Qi <yao.qi@linaro.org>
2008
2009 * linux-low.c (linux_wait_1): If single-step breakpoints are
2010 inserted, remove them.
2011
2012 2016-10-26 Pedro Alves <palves@redhat.com>
2013
2014 * linux-low.c (handle_extended_wait): Link parent/child fork
2015 threads.
2016 (linux_wait_1): Unlink them.
2017 (linux_set_resume_request): Ignore resume requests for
2018 already-resumed and unhandled fork child threads.
2019 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2020 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2021 New functions.
2022 (handle_v_requests) <vCont>: Don't call require_running.
2023 * server.h (in_queued_stop_replies): New declaration.
2024
2025 2016-10-24 Yao Qi <yao.qi@linaro.org>
2026
2027 PR server/20733
2028 * linux-aarch64-low.c (append_insns): Cast the return value to
2029 'uint32_t *'.
2030
2031 2016-10-10 Yao Qi <yao.qi@linaro.org>
2032
2033 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2034
2035 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2036
2037 * target.c (target_supports_multi_process): New function, moved
2038 from...
2039 * target.h (target_supports_multi_process): ... here. Remove
2040 macro.
2041
2042 2016-10-05 Tom Tromey <tom@tromey.com>
2043
2044 PR remote/20655:
2045 * tracepoint.c (handle_tracepoint_bkpts): Check
2046 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2047
2048 2016-10-05 Yao Qi <yao.qi@linaro.org>
2049
2050 * configure.srv: Update the path of arm-*.xml files.
2051
2052 2016-10-05 Terry Guo <terry.guo@arm.com>
2053 Yao Qi <yao.qi@linaro.org>
2054
2055 * Makefile.in: Adjust the path of rules.
2056 * configure.srv: Update the path of xml files.
2057 * regformats/arm-with-iwmmxt.dat: Regenerated.
2058 * regformats/arm-with-neon.dat: Likewise.
2059 * regformats/arm-with-vfpv2.dat: Likewise.
2060 * regformats/arm-with-vfpv3.dat Likewise.
2061
2062 2016-09-30 Yao Qi <yao.qi@linaro.org>
2063
2064 PR gdbserver/20627
2065 * target.c (target_stop_and_wait): Don't call
2066 target_continue_no_signal, use resume_stop instead.
2067
2068 2016-09-26 Yao Qi <yao.qi@linaro.org>
2069
2070 * linux-low.c (linux_wait_1): Call debug_exit.
2071
2072 2016-09-23 Pedro Alves <palves@redhat.com>
2073
2074 * Makefile.in (SFILES): Add common/new-op.c.
2075 (OBS): Add common/new-op.o.
2076 (new-op.o): New rule.
2077
2078 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2079
2080 * .gitinore: Ignore more files.
2081
2082 2016-09-21 Yao Qi <yao.qi@linaro.org>
2083
2084 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2085 23.
2086
2087 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2088
2089 * server.c (start_inferior): Call target_mourn_inferior instead of
2090 mourn_inferior; pass ptid_t argument to it.
2091 (resume): Likewise.
2092 (handle_target_event): Likewise.
2093 * target.c (target_mourn_inferior): New function.
2094 * target.h (mourn_inferior): Delete macro.
2095
2096 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2097
2098 * linux-low.c (lwp_is_stepping): New function.
2099
2100 2016-09-06 Carl Love <cel@us.ibm.com>
2101
2102 * server.c (start_inferior): Fixed comment, requested comment change
2103 didn't get updated correctly. Removed reference to ptrace () call as
2104 it is only true on Linux systems.
2105
2106 2016-09-06 Carl Love <cel@us.ibm.com>
2107
2108 * server.c (start_inferior): Do not call
2109 function target_post_create_inferior () if the
2110 inferior process has already exited.
2111
2112 2016-09-05 Pedro Alves <palves@redhat.com>
2113
2114 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2115 (COMPILE.pre, CC_LD): Use CXX directly.
2116 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2117 * acinclude.m4: Don't include build-with-cxx.m4.
2118 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2119 * configure: Regenerate.
2120
2121 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2122
2123 PR gdb/19495
2124 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2125 call writing data to own_buf.
2126
2127 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2128
2129 * target.c (mywait): Call target_wait instead of
2130 the_target->wait.
2131 (target_wait): New function.
2132
2133 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2134
2135 * server.c (start_inferior): New variable 'ptid'. Replace calls
2136 to the_target->resume by target_continue{,_no_signal}, depending
2137 on the case.
2138 * target.c (target_stop_and_wait): Call target_continue_no_signal
2139 instead of the_target->resume.
2140 (target_continue): New function.
2141
2142 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2143
2144 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2145
2146 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2147
2148 PR server/20491
2149 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2150 ps_prochandle.
2151 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2152 * linux-arm-low.c (ps_get_thread_area): Likewise.
2153 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2154 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2155 * linux-mips-low.c (ps_get_thread_area): Likewise.
2156 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2157 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2158 * linux-x86-low.c (ps_get_thread_area): Likewise.
2159 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2160
2161 2016-08-19 Pedro Alves <palves@redhat.com>
2162
2163 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2164
2165 2016-08-19 Pedro Alves <palves@redhat.com>
2166
2167 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2168 comment. Use memcpy instead of casting through unsigned long.
2169
2170 2016-08-19 Pedro Alves <palves@redhat.com>
2171
2172 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2173 allocating around 0x80000000.
2174
2175 2016-08-19 Pedro Alves <palves@redhat.com>
2176
2177 PR gdb/20415
2178 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2179 (x32-avx512-linux-ipa.o): New rules.
2180 * configure.ac (x86_64-*-linux*): New x32 check.
2181 * configure.srv (ipa_x32_linux_regobj): New.
2182 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2183 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2184 descriptions.
2185 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2186 descriptions.
2187 * configure: Regenerate.
2188
2189 2016-08-09 Pedro Alves <palves@redhat.com>
2190
2191 PR gdb/18653
2192 * Makefile.in (OBS): Add signals-state-save-restore.o.
2193 (signals-state-save-restore.o): New rule.
2194 * config.in: Regenerate.
2195 * configure: Regenerate.
2196 * linux-low.c: Include "signals-state-save-restore.h".
2197 (linux_create_inferior): Call
2198 restore_original_signals_state.
2199 * server.c: Include "dispositions-save-restore.h".
2200 (captured_main): Call save_original_signals_state.
2201
2202 2016-08-05 Pedro Alves <palves@redhat.com>
2203
2204 * configure: Regenerate.
2205
2206 2016-08-04 Yao Qi <yao.qi@linaro.org>
2207
2208 * linux-low.c (regsets_fetch_inferior_registers): Check
2209 errno is ESRCH or not.
2210
2211 2016-08-02 Yao Qi <yao.qi@linaro.org>
2212
2213 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2214 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2215 (thread_db_load_search): Update.
2216 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2217 td_ta_set_event and td_ta_event_getmsg.
2218
2219 2016-07-26 Pedro Alves <palves@redhat.com>
2220
2221 PR server/20414
2222 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2223 of unsigned long for 64-bit registers and use uint32_t instead of
2224 unsigned int for 32-bit registers.
2225
2226 2016-07-26 Pedro Alves <palves@redhat.com>
2227
2228 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2229 to 'ptrace'.
2230
2231 2016-07-21 Tom Tromey <tom@tromey.com>
2232
2233 * configure: Rebuild.
2234
2235 2016-07-21 Yao Qi <yao.qi@linaro.org>
2236
2237 * mem-break.c (find_gdb_breakpoint): Cast bp to
2238 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2239
2240 2016-07-21 Yao Qi <yao.qi@linaro.org>
2241
2242 * server.c (handle_v_requests): Support s and S actions
2243 if target_supports_software_single_step return true.
2244
2245 2016-07-21 Yao Qi <yao.qi@linaro.org>
2246
2247 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2248 is resume_step, call maybe_hw_step.
2249 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2250 and unstop them.
2251 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2252 breakpoints or not.
2253 (proceed_one_lwp): If resume request is resume_step, install
2254 reinsert breakpoints and call maybe_hw_step.
2255
2256 2016-07-21 Yao Qi <yao.qi@linaro.org>
2257
2258 * linux-low.c (proceed_one_lwp): Declare.
2259 (linux_resume_one_thread): Remove local variable 'step'.
2260 Lift code enqueue signal. Call proceed_one_lwp instead of
2261 linux_resume_one_lwp.
2262
2263 2016-07-21 Yao Qi <yao.qi@linaro.org>
2264
2265 * linux-low.c (linux_resume_one_thread): Call
2266 enqueue_pending_signal.
2267
2268 2016-07-21 Yao Qi <yao.qi@linaro.org>
2269
2270 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2271 * inferiors.c (do_restore_current_thread_cleanup): New function.
2272 (make_cleanup_restore_current_thread): Likewise.
2273 * linux-low.c (install_software_single_step_breakpoints): Call
2274 make_cleanup_restore_current_thread. Switch current_thread to
2275 thread.
2276
2277 2016-07-21 Yao Qi <yao.qi@linaro.org>
2278
2279 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2280 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2281 (clone_one_breakpoint): Likewise.
2282 (delete_reinsert_breakpoints): Change parameter to thread.
2283 Callers updated.
2284 (has_reinsert_breakpoints): Likewise.
2285 (uninsert_reinsert_breakpoints): Likewise.
2286 (reinsert_reinsert_breakpoints): Likewise.
2287 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2288 (delete_reinsert_breakpoints): Likewise.
2289 (reinsert_reinsert_breakpoints): Likewise.
2290 (uninsert_reinsert_breakpoints): Likewise.
2291 (has_reinsert_breakpoints): Likewise.
2292
2293 2016-07-21 Yao Qi <yao.qi@linaro.org>
2294
2295 * inferiors.c (get_thread_process): Make parameter const.
2296 * inferiors.h (get_thread_process): Update declaration.
2297 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2298 Add new parameters child_thread and parent_thread. Callers
2299 updated.
2300 * mem-break.h (clone_all_breakpoints): Update declaration.
2301
2302 2016-07-21 Yao Qi <yao.qi@linaro.org>
2303
2304 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2305 <command_list, handler>: Remove.
2306 (struct gdb_breakpoint): New.
2307 (struct other_breakpoint): New.
2308 (struct reinsert_breakpoint): New.
2309 (is_gdb_breakpoint): New function.
2310 (any_persistent_commands): Update command_list if
2311 is_gdb_breakpoint returns true.
2312 (set_breakpoint): Create breakpoints according to their types.
2313 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2314 (set_gdb_breakpoint_1): Likewise.
2315 (set_gdb_breakpoint): Likewise.
2316 (clear_breakpoint_conditions): Change parameter type to
2317 'struct gdb_breakpoint *'.
2318 (clear_breakpoint_commands): Likewise.
2319 (clear_breakpoint_conditions_and_commands): Likewise.
2320 (add_condition_to_breakpoint): Likewise.
2321 (add_breakpoint_condition): Likewise.
2322 (add_commands_to_breakpoint): Likewise.
2323 (check_breakpoints): Check other_breakpoint.
2324 (clone_one_breakpoint): Clone breakpopint according to its type.
2325 * mem-break.h (struct gdb_breakpoint): Declare.
2326 (set_gdb_breakpoint): Update declaration.
2327 (clear_breakpoint_conditions_and_commands): Likewise.
2328 (add_breakpoint_condition): Likewise.
2329 (add_breakpoint_commands): Likewise.
2330 * server.c (process_point_options): Change parameter type to
2331 'struct gdb_breakpoint *'.
2332
2333 2016-07-21 Yao Qi <yao.qi@linaro.org>
2334
2335 * mem-break.c (set_breakpoint_at): Rename it to ...
2336 (set_breakpoint_type_at): ... it.
2337 (set_breakpoint_at): Call set_breakpoint_type_at.
2338 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2339 * mem-break.h (set_breakpoint_at): Update comments.
2340
2341 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2342
2343 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2344 to buf parameter.
2345 (nios2_store_gregset): Likewise.
2346
2347 2016-07-01 Pedro Alves <palves@redhat.com>
2348 Antoine Tremblay <antoine.tremblay@ericsson.com>
2349
2350 * linux-low.c: Change interface to take the target lwp_info
2351 pointer directly and return void. Handle detaching from a zombie
2352 thread.
2353 (linux_detach_lwp_callback): New function.
2354 (linux_detach): Detach from the leader thread after detaching from
2355 the clone threads.
2356
2357 2016-06-28 Yao Qi <yao.qi@linaro.org>
2358
2359 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2360 for variable new_offset.
2361 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2362 (aarch64_ftrace_insn_reloc_cb): Likewise.
2363 (aarch64_ftrace_insn_reloc_tb): Likewise.
2364 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2365 PRIx64 instead of PRIx32.
2366
2367 2016-06-28 Yao Qi <yao.qi@linaro.org>
2368
2369 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2370 (the_low_target): Install arm_get_syscall_trapinfo.
2371
2372 2016-06-28 Yao Qi <yao.qi@linaro.org>
2373
2374 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2375 function.
2376 (the_low_target): Install aarch64_get_syscall_trapinfo.
2377
2378 2016-06-28 Yao Qi <yao.qi@linaro.org>
2379
2380 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2381 Callers updated.
2382 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2383 Remove parameter sysno.
2384 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2385 sysret.
2386
2387 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2388
2389 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2390 (s390_emit_ne_goto): Likewise.
2391 (s390_emit_lt_goto): Likewise.
2392 (s390_emit_le_goto): Likewise.
2393 (s390_emit_gt_goto): Likewise.
2394 (s390_emit_ge_goto): Likewise.
2395 (s390x_emit_eq_goto): Likewise.
2396 (s390x_emit_ne_goto): Likewise.
2397 (s390x_emit_lt_goto): Likewise.
2398 (s390x_emit_le_goto): Likewise.
2399 (s390x_emit_gt_goto): Likewise.
2400 (s390x_emit_ge_goto): Likewise.
2401 (s390_emit_ops_impl): Mark variable static.
2402 (s390x_emit_ops): Likewise.
2403
2404 2016-06-17 Yao Qi <yao.qi@linaro.org>
2405
2406 * linux-low.c (handle_extended_wait): Call
2407 uninsert_reinsert_breakpoints for the parent process. Remove
2408 reinsert breakpoints from the child process. Reinsert them to
2409 the parent process when vfork is done.
2410 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2411 (reinsert_reinsert_breakpoints): New function.
2412 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2413 (reinsert_reinsert_breakpoints): Declare.
2414
2415 2016-06-17 Yao Qi <yao.qi@linaro.org>
2416
2417 * linux-low.c (handle_extended_wait): If the parent is doing
2418 step-over, remove the reinsert breakpoints from the forked child.
2419
2420 2016-06-17 Yao Qi <yao.qi@linaro.org>
2421
2422 * linux-low.c (unsuspend_all_lwps): Declare.
2423 (linux_low_filter_event): If thread exited, call finish_step_over.
2424 If step-over is finished, unsuspend other threads.
2425
2426 2016-06-17 Yao Qi <yao.qi@linaro.org>
2427
2428 * linux-low.c (linux_resume_one_lwp_throw): Assert
2429 has_reinsert_breakpoints returns false.
2430 * mem-break.c (delete_disabled_breakpoints): Assert
2431 bp type isn't reinsert_breakpoint.
2432
2433 2016-06-17 Yao Qi <yao.qi@linaro.org>
2434
2435 * linux-low.c (maybe_hw_step): New function.
2436 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2437 (finish_step_over): Switch current_thread to lwp temporarily,
2438 and assert has_reinsert_breakpoints returns true.
2439 (proceed_one_lwp): Call maybe_hw_step.
2440 * mem-break.c (has_reinsert_breakpoints): New function.
2441 * mem-break.h (has_reinsert_breakpoints): Declare.
2442
2443 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2444
2445 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2446
2447 2016-05-17 Yao Qi <yao.qi@linaro.org>
2448
2449 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2450 instead of find_inferior.
2451
2452 2016-05-05 Yao Qi <yao.qi@linaro.org>
2453
2454 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2455 Initialize res to zero.
2456
2457 2016-05-05 Yao Qi <yao.qi@linaro.org>
2458
2459 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2460 to uint32_t.
2461
2462 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2463
2464 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2465 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2466 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2467
2468 2016-04-28 Par Olsson <par.olsson@windriver.com>
2469 Simon Marchi <simon.marchi@ericsson.com>
2470
2471 * tracepoint.c (write_inferior_int8): New function.
2472 (cmd_qtenable_disable): Write enable flag using
2473 write_inferior_int8.
2474
2475 2016-04-25 Yao Qi <yao.qi@linaro.org>
2476
2477 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2478 (need_step_over_p): Return zero if the LWP has pending signals
2479 can be delivered on software single step target.
2480
2481 2016-04-25 Yao Qi <yao.qi@linaro.org>
2482
2483 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2484 return instead of error.
2485
2486 2016-04-22 Yao Qi <yao.qi@linaro.org>
2487
2488 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2489 to 23.
2490
2491 2016-04-22 Yao Qi <yao.qi@linaro.org>
2492
2493 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2494 signal when stepping over breakpoint with software single
2495 step.
2496
2497 2016-04-21 Pedro Alves <palves@redhat.com>
2498
2499 * linux-s390-low.c (s390_collect_ptrace_register)
2500 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2501 add casts.
2502 (s390_check_regset): Use void * instead of gdb_byte *.
2503
2504 2016-04-20 Pedro Alves <palves@redhat.com>
2505
2506 * configure: Renegerate.
2507
2508 2016-04-20 Yao Qi <yao.qi@linaro.org>
2509
2510 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2511 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2512 number 16.
2513 (arm_store_gregset): Likewise.
2514
2515 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2516
2517 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2518 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2519 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2520 (amd64-avx-mpx-linux.c): New rules.
2521 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2522 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2523 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2524 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2525 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2526 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2527 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2528 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2529 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2530 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2531 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2532 * linux-x86-low.c (x86_linux_read_description): Add case for
2533 X86_XSTATE_AVX_MPX_MASK.
2534 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2535 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2536 init_registers_i386_avx_mpx_linux.
2537 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2538 (initialize_low_tracepoint): Call
2539 init_registers_i386_avx_mpx_linux.
2540 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2541 (initialize_low_tracepoint): Call
2542 init_registers_amd64_avx_mpx_linux.
2543 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2544 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2545 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2546 declarations.
2547
2548 2016-04-18 Pedro Alves <palves@redhat.com>
2549
2550 * configure: Regenerate.
2551
2552 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2553
2554 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2555 (aarch64_emit_sub): Likewise.
2556
2557 2016-04-12 Pedro Alves <palves@redhat.com>
2558
2559 * utils.c (prepare_to_throw_exception): Delete.
2560
2561 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2562
2563 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2564
2565 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2566
2567 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2568
2569 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2570
2571 * linux-aarch64-ipa.c: Add <elf.h> include.
2572 * linux-ppc-ipa.c: Add <elf.h> include.
2573 * linux-s390-ipa.c: Add <elf.h> include.
2574
2575 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2576
2577 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2578 (get_raw_reg_ptr): Likewise.
2579 (get_trace_state_variable_value_ptr): Likewise.
2580 (set_trace_state_variable_value_ptr): Likewise.
2581 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2582 char *.
2583
2584 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2585 Marcin Kościelnicki <koriakin@0x04.net>
2586
2587 PR/17221
2588 * linux-ppc-low.c (emit_insns): New function.
2589 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2590 (ppc_emit_prologue): New function.
2591 (ppc_emit_epilogue): New function.
2592 (ppc_emit_add): New function.
2593 (ppc_emit_sub): New function.
2594 (ppc_emit_mul): New function.
2595 (ppc_emit_lsh): New function.
2596 (ppc_emit_rsh_signed): New function.
2597 (ppc_emit_rsh_unsigned): New function.
2598 (ppc_emit_ext): New function.
2599 (ppc_emit_zero_ext): New function.
2600 (ppc_emit_log_not): New function.
2601 (ppc_emit_bit_and): New function.
2602 (ppc_emit_bit_or): New function.
2603 (ppc_emit_bit_xor): New function.
2604 (ppc_emit_bit_not): New function.
2605 (ppc_emit_equal): New function.
2606 (ppc_emit_less_signed): New function.
2607 (ppc_emit_less_unsigned): New function.
2608 (ppc_emit_ref): New function.
2609 (ppc_emit_const): New function.
2610 (ppc_emit_reg): New function.
2611 (ppc_emit_pop): New function.
2612 (ppc_emit_stack_flush): New function.
2613 (ppc_emit_swap): New function.
2614 (ppc_emit_stack_adjust): New function.
2615 (ppc_emit_call): New function.
2616 (ppc_emit_int_call_1): New function.
2617 (ppc_emit_void_call_2): New function.
2618 (ppc_emit_if_goto): New function.
2619 (ppc_emit_goto): New function.
2620 (ppc_emit_eq_goto): New function.
2621 (ppc_emit_ne_goto): New function.
2622 (ppc_emit_lt_goto): New function.
2623 (ppc_emit_le_goto): New function.
2624 (ppc_emit_gt_goto): New function.
2625 (ppc_emit_ge_goto): New function.
2626 (ppc_write_goto_address): New function.
2627 (ppc_emit_ops_impl): New static variable.
2628 (ppc64v1_emit_prologue): New function.
2629 (ppc64v2_emit_prologue): New function.
2630 (ppc64_emit_epilogue): New function.
2631 (ppc64_emit_add): New function.
2632 (ppc64_emit_sub): New function.
2633 (ppc64_emit_mul): New function.
2634 (ppc64_emit_lsh): New function.
2635 (ppc64_emit_rsh_signed): New function.
2636 (ppc64_emit_rsh_unsigned): New function.
2637 (ppc64_emit_ext): New function.
2638 (ppc64_emit_zero_ext): New function.
2639 (ppc64_emit_log_not): New function.
2640 (ppc64_emit_bit_and): New function.
2641 (ppc64_emit_bit_or): New function.
2642 (ppc64_emit_bit_xor): New function.
2643 (ppc64_emit_bit_not): New function.
2644 (ppc64_emit_equal): New function.
2645 (ppc64_emit_less_signed): New function.
2646 (ppc64_emit_less_unsigned): New function.
2647 (ppc64_emit_ref): New function.
2648 (ppc64_emit_const): New function.
2649 (ppc64v1_emit_reg): New function.
2650 (ppc64v2_emit_reg): New function.
2651 (ppc64_emit_pop): New function.
2652 (ppc64_emit_stack_flush): New function.
2653 (ppc64_emit_swap): New function.
2654 (ppc64v1_emit_call): New function.
2655 (ppc64v2_emit_call): New function.
2656 (ppc64v1_emit_int_call_1): New function.
2657 (ppc64v2_emit_int_call_1): New function.
2658 (ppc64v1_emit_void_call_2): New function.
2659 (ppc64v2_emit_void_call_2): New function.
2660 (ppc64_emit_if_goto): New function.
2661 (ppc64_emit_eq_goto): New function.
2662 (ppc64_emit_ne_goto): New function.
2663 (ppc64_emit_lt_goto): New function.
2664 (ppc64_emit_le_goto): New function.
2665 (ppc64_emit_gt_goto): New function.
2666 (ppc64_emit_ge_goto): New function.
2667 (ppc64v1_emit_ops_impl): New static variable.
2668 (ppc64v2_emit_ops_impl): New static variable.
2669 (ppc_emit_ops): New function.
2670 (linux_low_target): Wire in ppc_emit_ops.
2671
2672 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2673 Marcin Kościelnicki <koriakin@0x04.net>
2674
2675 PR/17221
2676 * Makefile.in: Add powerpc-*-ipa.o
2677 * configure.srv: Add ipa_obj for powerpc*-linux.
2678 * linux-ppc-ipa.c: New file.
2679 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2680 includes.
2681 (PPC_FIELD): New macro.
2682 (PPC_SEXT): New macro.
2683 (PPC_OP6): New macro.
2684 (PPC_BO): New macro.
2685 (PPC_LI): New macro.
2686 (PPC_BD): New macro.
2687 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2688 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2689 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2690 (ppc_get_thread_area): New function.
2691 (is_elfv2_inferior): New function.
2692 (gen_ds_form): New function.
2693 (GEN_STD): New macro.
2694 (GEN_STDU): New macro.
2695 (GEN_LD): New macro.
2696 (GEN_LDU): New macro.
2697 (gen_d_form): New function.
2698 (GEN_ADDI): New macro.
2699 (GEN_ADDIS): New macro.
2700 (GEN_LI): New macro.
2701 (GEN_LIS): New macro.
2702 (GEN_ORI): New macro.
2703 (GEN_ORIS): New macro.
2704 (GEN_LWZ): New macro.
2705 (GEN_STW): New macro.
2706 (GEN_STWU): New macro.
2707 (gen_xfx_form): New function.
2708 (GEN_MFSPR): New macro.
2709 (GEN_MTSPR): New macro.
2710 (GEN_MFCR): New macro.
2711 (GEN_MTCR): New macro.
2712 (GEN_SYNC): New macro.
2713 (GEN_LWSYNC): New macro.
2714 (gen_x_form): New function.
2715 (GEN_OR): New macro.
2716 (GEN_MR): New macro.
2717 (GEN_LWARX): New macro.
2718 (GEN_STWCX): New macro.
2719 (GEN_CMPW): New macro.
2720 (gen_md_form): New function.
2721 (GEN_RLDICL): New macro.
2722 (GEN_RLDICR): New macro.
2723 (gen_i_form): New function.
2724 (GEN_B): New macro.
2725 (GEN_BL): New macro.
2726 (gen_b_form): New function.
2727 (GEN_BNE): New macro.
2728 (GEN_LOAD): New macro.
2729 (GEN_STORE): New macro.
2730 (gen_limm): New function.
2731 (gen_atomic_xchg): New function.
2732 (gen_call): New function.
2733 (ppc_relocate_instruction): New function.
2734 (ppc_install_fast_tracepoint_jump_pad): New function.
2735 (ppc_get_min_fast_tracepoint_insn_len): New function.
2736 (ppc_get_ipa_tdesc_idx): New function.
2737 (the_low_target): Wire in the new functions.
2738 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2739 tdescs.
2740 * linux-ppc-tdesc.h: New file.
2741
2742 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2743
2744 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2745 (alloc_jump_pad_buffer): New function.
2746 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2747 (alloc_jump_pad_buffer): New function.
2748 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2749 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2750 (alloc_jump_pad_buffer): New function.
2751 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2752 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2753 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2754 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2755
2756 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2757
2758 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2759 * linux-amd64-ipa.c: Likewise.
2760 * linux-i386-ipa.c: Likewise.
2761 * linux-s390-ipa.c: Likewise.
2762 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2763 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2764 set_trace_state_variable_value_ptr.
2765 (struct ipa_sym_addresses): Likewise.
2766 (symbol_list): Likewise.
2767 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2768 accessing gdb_collect directly.
2769 (gdb_collect_ptr_type): New typedef.
2770 (get_raw_reg_ptr_type): New typedef.
2771 (get_trace_state_variable_value_ptr_type): New typedef.
2772 (set_trace_state_variable_value_ptr_type): New typedef.
2773 (gdb_collect_ptr): New global.
2774 (get_raw_reg_ptr): New global.
2775 (get_trace_state_variable_value_ptr): New global.
2776 (set_trace_state_variable_value_ptr): New global.
2777 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2778 accessing get_raw_reg directly.
2779 (get_get_tsv_func_addr): Likewise for
2780 get_trace_state_variable_value_ptr.
2781 (get_set_tsv_func_addr): Likewise for
2782 set_trace_state_variable_value_ptr.
2783 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2784
2785 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2786
2787 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2788
2789 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2790
2791 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2792 packets.
2793 (relocate_instruction): Remove own_buf.
2794 * server.c (own_buf): Make global.
2795 (handle_v_requests): Make global.
2796 * server.h (own_buf): New declaration.
2797 (handle_v_requests): New prototype.
2798
2799 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2800
2801 PR 18377
2802 * linux-s390-low.c (add_insns): New function.
2803 (s390_emit_prologue): New function.
2804 (s390_emit_epilogue): New function.
2805 (s390_emit_add): New function.
2806 (s390_emit_sub): New function.
2807 (s390_emit_mul): New function.
2808 (s390_emit_lsh): New function.
2809 (s390_emit_rsh_signed): New function.
2810 (s390_emit_rsh_unsigned): New function.
2811 (s390_emit_ext): New function.
2812 (s390_emit_log_not): New function.
2813 (s390_emit_bit_and): New function.
2814 (s390_emit_bit_or): New function.
2815 (s390_emit_bit_xor): New function.
2816 (s390_emit_bit_not): New function.
2817 (s390_emit_equal): New function.
2818 (s390_emit_less_signed): New function.
2819 (s390_emit_less_unsigned): New function.
2820 (s390_emit_ref): New function.
2821 (s390_emit_if_goto): New function.
2822 (s390_emit_goto): New function.
2823 (s390_write_goto_address): New function.
2824 (s390_emit_litpool): New function.
2825 (s390_emit_const): New function.
2826 (s390_emit_call): New function.
2827 (s390_emit_reg): New function.
2828 (s390_emit_pop): New function.
2829 (s390_emit_stack_flush): New function.
2830 (s390_emit_zero_ext): New function.
2831 (s390_emit_swap): New function.
2832 (s390_emit_stack_adjust): New function.
2833 (s390_emit_set_r2): New function.
2834 (s390_emit_int_call_1): New function.
2835 (s390_emit_void_call_2): New function.
2836 (s390_emit_eq_goto): New function.
2837 (s390_emit_ne_goto): New function.
2838 (s390_emit_lt_goto): New function.
2839 (s390_emit_le_goto): New function.
2840 (s390_emit_gt_goto): New function.
2841 (s390_emit_ge_goto): New function.
2842 (s390x_emit_prologue): New function.
2843 (s390x_emit_epilogue): New function.
2844 (s390x_emit_add): New function.
2845 (s390x_emit_sub): New function.
2846 (s390x_emit_mul): New function.
2847 (s390x_emit_lsh): New function.
2848 (s390x_emit_rsh_signed): New function.
2849 (s390x_emit_rsh_unsigned): New function.
2850 (s390x_emit_ext): New function.
2851 (s390x_emit_log_not): New function.
2852 (s390x_emit_bit_and): New function.
2853 (s390x_emit_bit_or): New function.
2854 (s390x_emit_bit_xor): New function.
2855 (s390x_emit_bit_not): New function.
2856 (s390x_emit_equal): New function.
2857 (s390x_emit_less_signed): New function.
2858 (s390x_emit_less_unsigned): New function.
2859 (s390x_emit_ref): New function.
2860 (s390x_emit_if_goto): New function.
2861 (s390x_emit_const): New function.
2862 (s390x_emit_call): New function.
2863 (s390x_emit_reg): New function.
2864 (s390x_emit_pop): New function.
2865 (s390x_emit_stack_flush): New function.
2866 (s390x_emit_zero_ext): New function.
2867 (s390x_emit_swap): New function.
2868 (s390x_emit_stack_adjust): New function.
2869 (s390x_emit_int_call_1): New function.
2870 (s390x_emit_void_call_2): New function.
2871 (s390x_emit_eq_goto): New function.
2872 (s390x_emit_ne_goto): New function.
2873 (s390x_emit_lt_goto): New function.
2874 (s390x_emit_le_goto): New function.
2875 (s390x_emit_gt_goto): New function.
2876 (s390x_emit_ge_goto): New function.
2877 (s390_emit_ops): New function.
2878 (struct linux_target_ops): Fill in emit_ops hook.
2879
2880 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2881
2882 PR 18377
2883 * Makefile.in: Add s390 IPA files.
2884 * configure.srv: Build IPA for s390.
2885 * linux-s390-ipa.c: New file.
2886 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2887 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2888 (tdesc_s390_linux32): Likewise.
2889 (init_registers_s390_linux32v1): Likewise.
2890 (tdesc_s390_linux32v1): Likewise.
2891 (init_registers_s390_linux32v2): Likewise.
2892 (tdesc_s390_linux32v2): Likewise.
2893 (init_registers_s390_linux64): Likewise.
2894 (tdesc_s390_linux64): Likewise.
2895 (init_registers_s390_linux64v1): Likewise.
2896 (tdesc_s390_linux64v1): Likewise.
2897 (init_registers_s390_linux64v2): Likewise.
2898 (tdesc_s390_linux64v2): Likewise.
2899 (init_registers_s390_te_linux64): Likewise.
2900 (tdesc_s390_te_linux64): Likewise.
2901 (init_registers_s390_vx_linux64): Likewise.
2902 (tdesc_s390_vx_linux64): Likewise.
2903 (init_registers_s390_tevx_linux64): Likewise.
2904 (tdesc_s390_tevx_linux64): Likewise.
2905 (init_registers_s390x_linux64): Likewise.
2906 (tdesc_s390x_linux64): Likewise.
2907 (init_registers_s390x_linux64v1): Likewise.
2908 (tdesc_s390x_linux64v1): Likewise.
2909 (init_registers_s390x_linux64v2): Likewise.
2910 (tdesc_s390x_linux64v2): Likewise.
2911 (init_registers_s390x_te_linux64): Likewise.
2912 (tdesc_s390x_te_linux64): Likewise.
2913 (init_registers_s390x_vx_linux64): Likewise.
2914 (tdesc_s390x_vx_linux64): Likewise.
2915 (init_registers_s390x_tevx_linux64): Likewise.
2916 (tdesc_s390x_tevx_linux64): Likewise.
2917 (have_hwcap_s390_vx): New static variable.
2918 (s390_arch_setup): Fill have_hwcap_s390_vx.
2919 (s390_get_thread_area): New function.
2920 (s390_ft_entry_gpr_esa): New const.
2921 (s390_ft_entry_gpr_zarch): New const.
2922 (s390_ft_entry_misc): New const.
2923 (s390_ft_entry_fr): New const.
2924 (s390_ft_entry_vr): New const.
2925 (s390_ft_main_31): New const.
2926 (s390_ft_main_64): New const.
2927 (s390_ft_exit_fr): New const.
2928 (s390_ft_exit_vr): New const.
2929 (s390_ft_exit_misc): New const.
2930 (s390_ft_exit_gpr_esa): New const.
2931 (s390_ft_exit_gpr_zarch): New const.
2932 (append_insns): New function.
2933 (s390_relocate_instruction): New function.
2934 (s390_install_fast_tracepoint_jump_pad): New function.
2935 (s390_get_min_fast_tracepoint_insn_len): New function.
2936 (s390_get_ipa_tdesc_idx): New function.
2937 (struct linux_target_ops): Wire in the above functions.
2938 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2939 * linux-s390-tdesc.h: New file.
2940
2941 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2942
2943 * linux-s390-low.c (s390_supports_tracepoints): New function.
2944 (struct linux_target_ops): Fill supports_tracepoints hook.
2945
2946 2016-03-18 Yao Qi <yao.qi@linaro.org>
2947
2948 * linux-low.c (lwp_signal_can_be_delivered): New function.
2949 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2950
2951 2016-03-18 Yao Qi <yao.qi@linaro.org>
2952
2953 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2954 0 if signal is enqueued. Remove 'signal' from one debugging
2955 message. Move one debugging message to some lines below.
2956 Remove code setting 'signal' to 0.
2957
2958 2016-03-18 Yao Qi <yao.qi@linaro.org>
2959
2960 * linux-low.c (linux_low_filter_event): Remove redundant
2961 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2962
2963 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2964
2965 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2966 (struct linux_target_ops): Wire in the above.
2967
2968 2016-03-03 Yao Qi <yao.qi@linaro.org>
2969
2970 * linux-low.c: Update comments to start_step_over.
2971
2972 2016-03-03 Yao Qi <yao.qi@linaro.org>
2973
2974 PR server/19736
2975 * linux-low.c (handle_extended_wait): Set child suspended
2976 if event_lwp->bp_reinsert isn't zero.
2977
2978 2016-03-02 Yao Qi <yao.qi@linaro.org>
2979
2980 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2981 enqueue_pending_signal.
2982
2983 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2984
2985 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2986 is actually loaded.
2987
2988 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2989
2990 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2991 (s390_regmap_3264) [!__s390x__]: New global.
2992 (s390_collect_ptrace_register): Skip map entries containing -1.
2993 (s390_supply_ptrace_register): Ditto.
2994 (s390_fill_gprs_high): New function.
2995 (s390_store_gprs_high): New function.
2996 (s390_regsets): Add NT_S390_HIGH_GPRS.
2997 (s390_get_hwcap): Enable on 31-bit.
2998 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2999 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3000 Detect NT_S390_HIGH_GPRS.
3001 (s390_usrregs_info_3264): Enable on 31-bit.
3002 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3003 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3004
3005 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3006
3007 PR gdb/13808
3008 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3009 * configure.srv: Ditto.
3010 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3011 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3012 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3013 (init_registers_amd64_linux): Remove prototype.
3014 (tdesc_amd64_linux): Remove declaration.
3015 (get_ipa_tdesc): New function.
3016 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3017 initialize remaining tdescs.
3018 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3019 (init_registers_i386_linux): Remove prototype.
3020 (tdesc_i386_linux): Remove declaration.
3021 (get_ipa_tdesc): New function.
3022 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3023 initialize remaining tdescs.
3024 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3025 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3026 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3027 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3028 (x86_get_ipa_tdesc_idx): New function.
3029 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3030 * linux-x86-tdesc.h: New file.
3031 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3032 (target_get_ipa_tdesc_idx): New macro.
3033 * tracepoint.c (ipa_tdesc_idx): New macro.
3034 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3035 (symbol_list): Add ipa_tdesc_idx.
3036 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3037 (ipa_tdesc): Remove.
3038 (ipa_tdesc_idx): New variable.
3039 (get_context_regcache): Use get_ipa_tdesc.
3040 (gdb_collect): Ditto.
3041 (gdb_probe): Ditto.
3042 * tracepoint.h (get_ipa_tdesc): New prototype.
3043 (ipa_tdesc): Remove.
3044
3045 2016-02-24 Pedro Alves <palves@redhat.com>
3046
3047 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3048 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3049 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3050 Factor out common code between the USE_SIGTRAP_SIGINFO and
3051 !USE_SIGTRAP_SIGINFO blocks.
3052 (linux_low_filter_event): Call save_stop_reason instead of
3053 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3054 Update comments.
3055 (linux_wait_1): Update comments.
3056
3057 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3058
3059 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3060 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3061 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3062 ppc_insert_point, ppc_remove_point.
3063
3064 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3065
3066 * linux-s390-low.c (s390_supports_z_point_type): New function.
3067 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3068
3069 2016-02-16 Yao Qi <yao.qi@linaro.org>
3070
3071 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3072 PC. Get pc from regcache_read_pc.
3073
3074 2016-02-12 Yao Qi <yao.qi@linaro.org>
3075
3076 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3077 or linux_get_pc_32bit.
3078 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3079
3080 2016-02-12 Yao Qi <yao.qi@linaro.org>
3081
3082 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3083 arm_linux_get_next_pcs_fixup.
3084
3085 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3086
3087 * tracepoint.c (x_tracepoint_action_download): Change
3088 write_inferior_data_ptr to write_inferior_data_pointer.
3089 (cmd_qtstart): Likewise.
3090 (write_inferior_data_ptr): Remove.
3091 (download_agent_expr): Change write_inferior_data_ptr to
3092 write_inferior_data_pointer.
3093 (download_tracepoint_1): Likewise.
3094 (download_tracepoint): Likewise.
3095 (download_trace_state_variables): Likewise.
3096
3097 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3098 Marcin Kościelnicki <koriakin@0x04.net>
3099
3100 * tracepoint.c (struct tracepoint_action_ops): Remove.
3101 (struct tracepoint_action): Remove ops.
3102 (m_tracepoint_action_download, r_tracepoint_action_download)
3103 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3104 size and offset accordingly.
3105 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3106 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3107 (tracepoint_action_send, tracepoint_action_download): New functions.
3108 Helpers for trace action handlers.
3109 (add_tracepoint_action): Remove setup actions ops.
3110 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3111
3112 2016-02-10 Yao Qi <yao.qi@linaro.org>
3113
3114 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3115
3116 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3117
3118 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3119 to AC_OUTPUT.
3120 * configure: Regenerate.
3121
3122 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3123
3124 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3125 void * to gdb_byte *.
3126 * linux-low.c (siginfo_fixup): Likewise.
3127 (linux_xfer_siginfo): Likewise.
3128 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3129 Likewise.
3130 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3131
3132 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3133
3134 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3135 to srv_tgtobj.
3136 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3137 to srv_tgtobj.
3138 * linux-x86-low.c [__x86_64__]: Include
3139 "nat/amd64-linux-siginfo.h".
3140 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3141 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3142 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3143 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3144 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3145 (cpt_si_fd, si_timerid, si_overrun): Move from
3146 nat/amd64-linux-siginfo.c.
3147 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3148
3149 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3150
3151 * server.c (skip_to_semicolon): Remove.
3152 (process_point_options): Use strchrnul instead of
3153 skip_to_semicolon.
3154
3155 2016-01-26 Yao Qi <yao.qi@linaro.org>
3156
3157 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3158 * linux-low.c (install_software_single_step_breakpoints): Don't
3159 call regcache_read_pc.
3160 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3161 argument pc.
3162
3163 2016-01-26 Yao Qi <yao.qi@linaro.org>
3164
3165 * linux-low.c (install_software_single_step_breakpoints): Call
3166 regcache_read_pc instead of get_pc.
3167
3168 2016-01-26 Yao Qi <yao.qi@linaro.org>
3169
3170 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3171 (unblock_async_io): Rename to ...
3172 (block_unblock_async_io): ... it. New function.
3173 (enable_async_io): Don't install SIGIO handler. Unblock it
3174 instead.
3175 (disable_async_io): Don't ignore SIGIO. Block it instead.
3176 (initialize_async_io): Install SIGIO handler. Don't call
3177 unblock_async_io.
3178
3179 2016-01-26 Yao Qi <yao.qi@linaro.org>
3180
3181 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3182 first character is '\003', call *the_target->request_interrupt.
3183
3184 2016-01-25 Yao Qi <yao.qi@linaro.org>
3185
3186 * remote-utils.c (new_thread_notify): Remove.
3187 (dead_thread_notify): Likewise.
3188 * remote-utils.h (new_thread_notify): Remove declaration.
3189 (dead_thread_notify): Likewise.
3190
3191 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3192
3193 * gdb.trace/pending.exp: Fix expected message on continue.
3194
3195 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3196
3197 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3198 it works properly on big-endian machines where sizeof (CORE_ADDR)
3199 != sizeof (void *).
3200
3201 2016-01-21 Pedro Alves <palves@redhat.com>
3202
3203 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3204 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3205 * configure: Regenerate.
3206
3207 2016-01-21 Yao Qi <yao.qi@linaro.org>
3208
3209 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3210 is_thumb and set it according to CPSR saved on the stack.
3211 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3212 arm_sigreturn_next_pc.
3213
3214 2016-01-18 Yao Qi <yao.qi@linaro.org>
3215
3216 * linux-low.c (linux_set_pc_64bit): New function.
3217 (linux_get_pc_64bit): New function.
3218 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3219 Declare.
3220 * linux-sparc-low.c (debug_threads): Remove declaration.
3221 (sparc_get_pc): Remove.
3222 (the_low_target): Use linux_get_pc_64bit instead of
3223 sparc_get_pc.
3224 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3225 (the_low_target): Use linux_get_pc_64bit and
3226 linux_set_pc_64bit.
3227
3228 2016-01-18 Yao Qi <yao.qi@linaro.org>
3229
3230 * linux-arm-low.c (debug_threads): Remove declaration.
3231 (arm_get_pc, arm_set_pc): Remove.
3232 (the_low_target): Use linux_get_pc_32bit and
3233 linux_set_pc_32bit.
3234 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3235 (the_low_target): Use linux_get_pc_32bit and
3236 linux_set_pc_32bit.
3237 * linux-cris-low.c (debug_threads): Remove declaration.
3238 (cris_get_pc, cris_set_pc,): Remove.
3239 (the_low_target): Use linux_get_pc_32bit and
3240 linux_set_pc_32bit.
3241 * linux-crisv32-low.c (debug_threads): Remove declaration.
3242 (cris_get_pc, cris_set_pc): Remove.
3243 (the_low_target): Use linux_get_pc_32bit and
3244 linux_set_pc_32bit.
3245 * linux-low.c: Include inttypes.h.
3246 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3247 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3248 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3249 (the_low_target): Use linux_get_pc_32bit and
3250 linux_set_pc_32bit.
3251 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3252 (the_low_target): Use linux_get_pc_32bit and
3253 linux_set_pc_32bit.
3254 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3255 (the_low_target): Use linux_get_pc_32bit and
3256 linux_set_pc_32bit.
3257 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3258 (the_low_target): Use linux_get_pc_32bit and
3259 linux_set_pc_32bit.
3260 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3261 (the_low_target): Use linux_get_pc_32bit and
3262 linux_set_pc_32bit.
3263
3264 2016-01-18 Gary Benson <gbenson@redhat.com>
3265
3266 * configure.ac (AC_FUNC_FORK): New check.
3267 * config.in: Regenerate.
3268 * configure: Likewise.
3269
3270 2016-01-14 Yao Qi <yao.qi@linaro.org>
3271
3272 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3273 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3274 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3275 arm_get_next_pcs_ctor.
3276
3277 2016-01-12 Josh Stone <jistone@redhat.com>
3278 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3279
3280 * inferiors.h: Include "gdb_vecs.h".
3281 (struct process_info): Add syscalls_to_catch.
3282 * inferiors.c (remove_process): Free syscalls_to_catch.
3283 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3284 syscall_return stops.
3285 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3286 * server.c (handle_general_set): Handle QCatchSyscalls.
3287 (handle_query): Report support for QCatchSyscalls.
3288 * target.h (struct target_ops): Add supports_catch_syscall.
3289 (target_supports_catch_syscall): New macro.
3290 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3291 (struct lwp_info): Add syscall_state.
3292 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3293 Maintain syscall_state and syscalls_to_catch across exec.
3294 (get_syscall_trapinfo): New function, proxy to the_low_target.
3295 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3296 (linux_low_filter_event): Toggle syscall_state entry/return for
3297 syscall traps, and set it ignored for all others.
3298 (gdb_catching_syscalls_p): New function.
3299 (gdb_catch_this_syscall_p): New function.
3300 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3301 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3302 (linux_supports_catch_syscall): New function.
3303 (linux_target_ops): Install it.
3304 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3305 (the_low_target): Install it.
3306
3307 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3308
3309 * acinclude.m4: Include new ../warning.m4 file.
3310 * configure: Regenerated.
3311 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3312
3313 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3314
3315 * ax.c (is_goto_target): Mark static.
3316 * linux-low.c (register_addr): Likewise.
3317 (linux_fetch_registers, linux_store_registers): Likewise.
3318 * mem-break.c (any_persistent_commands): Fix old prototype.
3319 (add_commands_to_breakpoint): Mark static.
3320 * regcache.c (find_register_by_name): Delete unused func.
3321 * remote-utils.c (hex_or_minus_one): Mark static.
3322 * server.c (monitor_show_help): Mark static.
3323 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3324 handle_v_requests): Likewise.
3325
3326 2016-01-12 Pedro Alves <palves@redhat.com>
3327
3328 Remove use of the registered trademark symbol throughout.
3329
3330 2016-01-08 Yao Qi <yao.qi@linaro.org>
3331
3332 * remote-utils.c (getpkt): If c is '\003', call target hook
3333 request_interrupt.
3334
3335 2016-01-06 Yao Qi <yao.qi@linaro.org>
3336
3337 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3338 linux-aarch32-low.c.
3339 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3340 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3341 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3342 (thumb2_breakpoint): Declare.
3343 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3344 linux-aarch32-low.h.
3345 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3346 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3347 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3348
3349 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3350
3351 * gdbreplay.c (gdbreplay_version): Change copyright year in
3352 version message.
3353 * server.c (gdbserver_version): Likewise.
3354
3355 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3356
3357 * server.c (crc32_table): Delete.
3358 (crc32): Use libiberty's xcrc32 function.
3359
3360 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3361
3362 * lynx-low.c (lynx_delete_thread_callback): New function.
3363 (lynx_mourn): Properly delete our process and all of its
3364 threads. Remove call to clear_inferiors.
3365
3366 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3367
3368 * target.c (thread_search_callback): Add check that
3369 the thread_stopped target callback is not NULL before
3370 calling it.
3371
3372 2015-12-21 Yao Qi <yao.qi@linaro.org>
3373
3374 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3375 arm breakpoint.
3376
3377 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3378
3379 * server.c (handle_query): Call target_supports_software_single_step.
3380
3381 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3382
3383 * linux-low.c (single_step): New function.
3384 (linux_resume_one_lwp_throw): Call single_step.
3385 (start_step_over): Likewise.
3386
3387 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3388
3389 * Makefile.in (SFILES): Append arch/arm-linux.c,
3390 arch/arm-get-next-pcs.c.
3391 (arm-linux.o): New rule.
3392 (arm-get-next-pcs.o): New rule.
3393 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3394 arm-linux.o.
3395 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3396 to linux-aarch32-low.c.
3397 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3398 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3399 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3400 (thumb2_breakpoint_len): Likewise.
3401 (arm_is_thumb_mode): Make non-static.
3402 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3403 from linux-aarch32-low.c.
3404 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3405 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3406 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3407 (thumb2_breakpoint_len): Likewise.
3408 (arm_is_thumb_mode): New declaration.
3409 * linux-arm-low.c: Include arch/arm-linux.h
3410 aarch/arm-get-next-pcs.h, sys/syscall.h.
3411 (get_next_pcs_ops): New struct.
3412 (get_next_pcs_addr_bits_remove): New function.
3413 (get_next_pcs_is_thumb): New function.
3414 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3415 (arm_sigreturn_next_pc): Likewise.
3416 (get_next_pcs_syscall_next_pc): Likewise.
3417 (arm_gdbserver_get_next_pcs): Likewise.
3418 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3419 Initialize.
3420 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3421 * server.h: Include gdb_vecs.h.
3422
3423 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3424
3425 * Makefile.in (SFILES): Append common/common-regcache.c.
3426 (OBS): Append common-regcache.o.
3427 (common-regcache.o): New rule.
3428 * regcache.c (init_register_cache): Initialize cache to
3429 REG_UNAVAILABLE.
3430 (regcache_raw_read_unsigned): New function.
3431 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3432 register_status enum.
3433
3434 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3435
3436 * linux-aarch64-low.c (the_low_targets): Rename
3437 breakpoint_reinsert_addr to get_next_pcs.
3438 * linux-arm-low.c (the_low_targets): Likewise.
3439 * linux-bfin-low.c (the_low_targets): Likewise.
3440 * linux-cris-low.c (the_low_targets): Likewise.
3441 * linux-crisv32-low.c (the_low_targets): Likewise.
3442 * linux-low.c (can_software_single_step): Likewise.
3443 (install_software_single_step_breakpoints): New function.
3444 (start_step_over): Use install_software_single_step_breakpoints.
3445 * linux-low.h: New CORE_ADDR vector.
3446 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3447 get_next_pcs.
3448 * linux-mips-low.c (the_low_targets): Likewise.
3449 * linux-nios2-low.c (the_low_targets): Likewise.
3450 * linux-sparc-low.c (the_low_targets): Likewise.
3451
3452 2015-12-17 Pedro Alves <palves@redhat.com>
3453
3454 * linux-low.c (linux_kill_one_lwp): Remove references to
3455 LinuxThreads.
3456 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3457 to 'kill'.
3458 (linux_init_signals): Delete.
3459 (initialize_low): Adjust.
3460 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3461
3462 2015-12-16 Pedro Alves <palves@redhat.com>
3463
3464 * configure.ac (compiler warning flags): When testing a
3465 -Wno-foo option, check whether -Wfoo works instead.
3466 * configure: Regenerate.
3467
3468 2015-12-11 Don Breazeal <donb@codesourcery.com>
3469
3470 * server.c (process_serial_event): Don't exit from gdbserver
3471 in remote mode if there are still active inferiors.
3472
3473 2015-12-11 Yao Qi <yao.qi@linaro.org>
3474
3475 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3476 arm_breakpoint_at if the process is 32-bit.
3477
3478 2015-12-11 Yao Qi <yao.qi@linaro.org>
3479
3480 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3481 arm breakpoint.
3482
3483 2015-12-07 Yao Qi <yao.qi@linaro.org>
3484
3485 * configure.srv: Append arm.o to srv_tgtobj for
3486 aarch64*-*-linux* target.
3487 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3488 from linux-arm-low.c.
3489 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3490 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3491 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3492 (thumb2_breakpoint_len): Likewise.
3493 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3494 (arm_breakpoint_kinds): Likewise.
3495 (arm_breakpoint_kind_from_pc): Likewise.
3496 (arm_sw_breakpoint_from_kind): Likewise.
3497 (arm_breakpoint_kind_from_current_state): Likewise.
3498 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3499 (arm_sw_breakpoint_from_kind): Declare.
3500 (arm_breakpoint_kind_from_current_state): Declare.
3501 (arm_breakpoint_at): Declare.
3502 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3503 arm_sw_breakpoint_from_kind if process is 32-bit.
3504 (aarch64_breakpoint_kind_from_pc): New function.
3505 (aarch64_breakpoint_kind_from_current_state): New function.
3506 (the_low_target): Initialize fields breakpoint_kind_from_pc
3507 and breakpoint_kind_from_current_state.
3508 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3509 linux-aarch32-low.c.
3510 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3511 (arm_breakpoint, arm_breakpoint_len): Likewise.
3512 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3513 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3514 (arm_is_thumb_mode): Likewise.
3515 (arm_breakpoint_at): Likewise.
3516 (arm_breakpoint_kind_from_pc): Likewise.
3517 (arm_sw_breakpoint_from_kind): Likewise.
3518 (arm_breakpoint_kind_from_current_state): Likewise.
3519
3520 Revert:
3521 2015-08-04 Yao Qi <yao.qi@linaro.org>
3522
3523 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3524 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3525 * server.c (extended_protocol): Remove "static".
3526 * server.h (extended_protocol): Declare it.
3527
3528 2015-12-04 Josh Stone <jistone@redhat.com>
3529
3530 * target.h (struct target_ops) <arch_setup>: Rename to ...
3531 (struct target_ops) <post_create_inferior>: ... this.
3532 (target_arch_setup): Rename to ...
3533 (target_post_create_inferior): ... this, calling post_create_inferior.
3534 * server.c (start_inferior): Update target_arch_setup calls to
3535 target_post_create_inferior.
3536 * linux-low.c (linux_low_ptrace_options): Forward declare.
3537 (linux_arch_setup): Update its comment for general use.
3538 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3539 (struct linux_target_ops): Use linux_post_create_inferior.
3540 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3541 to post_create_inferior.
3542 * nto-low.c (struct nto_target_ops): Likewise.
3543 * spu-low.c (struct spu_target_ops): Likewise.
3544 * win32-low.c (struct win32_target_ops): Likewise.
3545
3546 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3547
3548 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3549
3550 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3551
3552 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3553 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3554 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3555 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3556 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3557 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3558 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3559 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3560 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3561 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3562 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3563 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3564
3565 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3566
3567 * linux-low.c (linux_look_up_symbols): Don't call
3568 linux_supports_traceclone.
3569 * linux-low.h (thread_db_init): Remove use_events argument.
3570 * thread-db.c (thread_db_use_event): Remove global variable.
3571 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3572 (struct thread_db) <td_create_bp>: Remove field.
3573 (thread_db_create_event): Remove function.
3574 (thread_db_enable_reporting): Likewise.
3575 (find_one_thread): Don't check for thread_db_use_events.
3576 (attach_thread): Likewise.
3577 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3578 (try_thread_db_load_1): Don't check for thread_db_use_events.
3579 (thread_db_init): Remove use_events argument and thread events
3580 handling.
3581 (remove_thread_event_breakpoints): Remove function.
3582 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3583
3584 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3585
3586 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3587 New function.
3588 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3589 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3590 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3591 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3592 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3593 Initialize.
3594 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3595 New function.
3596 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3597 * linux-low.c (can_hardware_single_step): Use
3598 supports_hardware_single_step.
3599 (can_software_single_step): New function.
3600 (start_step_over): Call can_software_single_step.
3601 (linux_supports_hardware_single_step): New function.
3602 (struct target_ops) <supports_software_single_step>: Initialize.
3603 * linux-low.h (struct linux_target_ops)
3604 <supports_hardware_single_step>: Initialize.
3605 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3606 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3607 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3608 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3609 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3610 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3611 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3612 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3613 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3614 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3615 Initialize.
3616 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3617 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3618 Initialize.
3619 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3620 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3621 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3622 New function.
3623 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3624 * target.h (struct target_ops): <supports_software_single_step>:
3625 New field.
3626 (target_supports_software_single_step): New macro.
3627
3628 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3629
3630 * linux-low.c (linux_wait_1): Fix pc advance condition.
3631 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3632 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3633
3634 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3635
3636 * linux-arm-low.c (arm_is_thumb_mode): New function.
3637 (arm_breakpoint_at): Use arm_is_thumb_mode.
3638 (arm_breakpoint_kind_from_current_state): New function.
3639 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3640 Initialize.
3641 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3642 (linux_breakpoint_kind_from_current_state): New function.
3643 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3644 * linux-low.h (struct linux_target_ops)
3645 <breakpoint_kind_from_current_state>: New field.
3646 * target.h (struct target_ops): Likewise.
3647 (target_breakpoint_kind_from_current_state): New macro.
3648
3649 2015-11-30 Pedro Alves <palves@redhat.com>
3650
3651 * linux-low.c (linux_resume): Wake up the event loop before
3652 returning.
3653
3654 2015-11-30 Pedro Alves <palves@redhat.com>
3655
3656 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3657 check.
3658 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3659 to -1.
3660 * target.c (struct thread_search): New structure.
3661 (thread_search_callback): New function.
3662 (prev_general_thread): New global.
3663 (prepare_to_access_memory, done_accessing_memory): New functions.
3664 * target.h (prepare_to_access_memory, done_accessing_memory):
3665 Replace macros with function declarations.
3666
3667 2015-11-30 Pedro Alves <palves@redhat.com>
3668
3669 PR 14618
3670 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3671 report TARGET_WAITKIND_NO_RESUMED.
3672 * remote-utils.c (prepare_resume_reply): Handle
3673 TARGET_WAITKIND_NO_RESUMED.
3674 * server.c (report_no_resumed): New global.
3675 (handle_query) <qSupported>: Handle "no-resumed+". Report
3676 "no-resumed+" support.
3677 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3678 return error if the client doesn't support no-resumed events.
3679 (push_stop_notification): New function.
3680 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3681 events if the client supports them.
3682
3683 2015-11-30 Pedro Alves <palves@redhat.com>
3684
3685 * linux-low.c (thread_still_has_status_pending_p): Don't check
3686 vCont;t here.
3687 (lwp_resumed): New function.
3688 (status_pending_p_callback): Return early if the LWP is not
3689 supposed to be resumed.
3690
3691 2015-11-30 Pedro Alves <palves@redhat.com>
3692
3693 * linux-low.c (handle_extended_wait): Assert that the LWP's
3694 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3695 thread create events, leave the new child's status pending.
3696 (linux_low_filter_event): If GDB wants to hear about thread exit
3697 events, leave the LWP marked dead and don't delete it.
3698 (linux_wait_for_event_filtered): Don't check for thread exit.
3699 (filter_exit_event): New function.
3700 (linux_wait_1): Use it, when returning an exit event.
3701 (linux_resume_one_lwp_throw): Assert that the LWP's
3702 waitstatus is TARGET_WAITKIND_IGNORE.
3703 * remote-utils.c (prepare_resume_reply): Handle
3704 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3705 * server.c (report_thread_events): New global.
3706 (handle_general_set): Handle QThreadEvents.
3707 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3708 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3709 TARGET_WAITKIND_THREAD_EXITED.
3710 * server.h (report_thread_events): Declare.
3711
3712 2015-11-30 Pedro Alves <palves@redhat.com>
3713
3714 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3715 the thread's last_resume_kind was resume_stop.
3716
3717 2015-11-30 Pedro Alves <palves@redhat.com>
3718
3719 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3720 before returning.
3721
3722 2015-11-30 Pedro Alves <palves@redhat.com>
3723
3724 * server.c (handle_v_requests): Handle vCtrlC.
3725
3726 2015-11-30 Pedro Alves <palves@redhat.com>
3727
3728 * gdbthread.h (find_any_thread_of_pid): Declare.
3729 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3730 functions.
3731 * server.c (handle_query): If current_thread is NULL, look for
3732 another thread of the selected process.
3733
3734 2015-11-26 Daniel Colascione <dancol@dancol.org>
3735 Simon Marchi <simon.marchi@ericsson.com>
3736
3737 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3738 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3739 name in reply.
3740 * target.h (struct target_ops) <thread_name>: New field.
3741 (target_thread_name): New macro.
3742
3743 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3744
3745 * regcache.h (regcache_invalidate_pid): Add declaration.
3746 * regcache.c (regcache_invalidate_pid): New function, extracted
3747 from regcache_invalidate.
3748 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3749 Add trivial documentation comment.
3750 * lynx-low.c: Use regcache_invalidate_pid instead of
3751 regcache_invalidate.
3752
3753 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3754
3755 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3756 and Elf64_auxv_t if the target is Android.
3757
3758 2015-11-22 Doug Evans <xdje42@gmail.com>
3759
3760 * target.h: #include <sys/types.h>.
3761
3762 2015-11-19 Pedro Alves <palves@redhat.com>
3763
3764 * linux-low.c (linux_process_qsupported): Change prototype.
3765 Adjust.
3766 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3767 Change prototype.
3768 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3769 and adjust to loop over all features.
3770 * server.c (handle_query) <qSupported>: Adjust to call
3771 target_process_qsupported once, passing it a vector of unprocessed
3772 features.
3773 * target.h (struct target_ops) <process_qsupported>: Change
3774 prototype.
3775 (target_process_qsupported): Adjust.
3776
3777 2015-11-19 Pedro Alves <palves@redhat.com>
3778
3779 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3780 mode.
3781 * configure: Regenerate.
3782
3783 2015-11-19 Pedro Alves <palves@redhat.com>
3784
3785 * configure: Regenerate.
3786
3787 2015-11-19 Yao Qi <yao.qi@linaro.org>
3788
3789 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3790 type to uint32_t.
3791
3792 2015-11-19 Yao Qi <yao.qi@linaro.org>
3793
3794 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3795 (struct aarch64_operand): Move enum out.
3796
3797 2015-11-19 Yao Qi <yao.qi@linaro.org>
3798
3799 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3800 struct user_fpsimd_state *.
3801 (aarch64_store_fpregset): Likewise.
3802
3803 2015-11-19 Yao Qi <yao.qi@linaro.org>
3804
3805 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3806 struct user_pt_regs *.
3807 (aarch64_store_gregset): Likewise.
3808
3809 2015-11-18 Pedro Alves <palves@redhat.com>
3810
3811 * Makefile.in (all_object_files): Add $IPA_OBJS.
3812
3813 2015-11-17 Pedro Alves <palves@redhat.com>
3814
3815 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3816 GDB_SIGNAL_0 and gdb_signal_to_string.
3817
3818 2015-11-17 Pedro Alves <palves@redhat.com>
3819
3820 * win32-low.c (handle_output_debug_string): Remove parameter.
3821 (win32_kill): Remove our_status local and adjust call to
3822 handle_output_debug_string.
3823 (get_child_debug_event): Adjust call to
3824 handle_output_debug_string.
3825
3826 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3827
3828 * linux-mips-low.c (mips_fill_gregset): Add cast.
3829 (mips_store_gregset): Likewise.
3830 (mips_fill_fpregset): Likewise.
3831 (mips_store_fpregset): Likewise.
3832
3833 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3834
3835 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3836 priv.
3837
3838 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3839
3840 * linux-mips-low.c (mips_linux_new_thread): Change type of
3841 watch_type to enum target_hw_bp_type.
3842
3843 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3844
3845 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3846 Change return type to arm_hwbp_type.
3847
3848 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3849
3850 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3851 (arm_store_gregset): Likewise.
3852 * linux-arm-low.c (arm_get_hwcap): Likewise.
3853 (arm_read_description): Likewise.
3854
3855 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3856
3857 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3858
3859 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3860
3861 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3862 (ppc_fill_vsxregset): Likewise.
3863 (ppc_store_vsxregset): Likewise.
3864 (ppc_fill_vrregset): Likewise.
3865 (ppc_store_vrregset): Likewise.
3866 (ppc_fill_evrregset): Likewise.
3867 (ppc_store_evrregset): Likewise.
3868
3869 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3870
3871 * linux-ppc-low.c (ppc_usrregs_info): Remove
3872 forward-declaration.
3873 (ppc_arch_setup): Move lower in file.
3874
3875 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3876
3877 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3878 (ps_pdwrite): Likewise.
3879
3880 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3881
3882 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3883 to after assert checks.
3884
3885 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3886
3887 * proc-service.c (ps_pdread): Add/adjust casts.
3888 (ps_pdwrite): Add/adjust casts.
3889
3890 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3891
3892 * server.c (handle_search_memory_1): Cast return value of
3893 memmem.
3894
3895 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3896
3897 * server.c (write_qxfer_response): Change type of data to
3898 gdb_byte *.
3899
3900 2015-10-29 Pedro Alves <palves@redhat.com>
3901
3902 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3903
3904 2015-10-29 Pedro Alves <palves@redhat.com>
3905
3906 * tracepoint.c (clear_installed_tracepoints): Add casts.
3907
3908 2015-10-29 Pedro Alves <palves@redhat.com>
3909
3910 * server.c (handle_v_cont, process_serial_event): Add enum
3911 gdb_signal casts to signal parsing code.
3912
3913 2015-10-29 Pedro Alves <palves@redhat.com>
3914
3915 * linux-low.h (NULL_REGSET): Define.
3916 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3917 * linux-arm-low.c (arm_regsets): Likewise.
3918 * linux-crisv32-low.c (cris_regsets): Likewise.
3919 * linux-m68k-low.c (m68k_regsets): Likewise.
3920 * linux-mips-low.c (mips_regsets): Likewise.
3921 * linux-nios2-low.c (nios2_regsets): Likewise.
3922 * linux-ppc-low.c (ppc_regsets): Likewise.
3923 * linux-s390-low.c (s390_regsets): Likewise.
3924 * linux-sh-low.c (sh_regsets): Likewise.
3925 * linux-sparc-low.c (sparc_regsets): Likewise.
3926 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3927 * linux-tile-low.c (tile_regsets): Likewise.
3928 * linux-x86-low.c (x86_regsets): Likewise.
3929 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3930
3931 2015-10-29 Pedro Alves <palves@redhat.com>
3932
3933 * linux-low.h (NULL_REGSET): Define.
3934 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3935 * linux-arm-low.c (arm_regsets): Likewise.
3936 * linux-crisv32-low.c (cris_regsets): Likewise.
3937 * linux-m68k-low.c (m68k_regsets): Likewise.
3938 * linux-mips-low.c (mips_regsets): Likewise.
3939 * linux-nios2-low.c (nios2_regsets): Likewise.
3940 * linux-ppc-low.c (ppc_regsets): Likewise.
3941 * linux-s390-low.c (s390_regsets): Likewise.
3942 * linux-sh-low.c (sh_regsets): Likewise.
3943 * linux-sparc-low.c (sparc_regsets): Likewise.
3944 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3945 * linux-tile-low.c (tile_regsets): Likewise.
3946 * linux-x86-low.c (x86_regsets): Likewise.
3947 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3948
3949 2015-10-26 Doug Evans <dje@google.com>
3950
3951 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3952
3953 2015-10-26 Doug Evans <dje@google.com>
3954
3955 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3956
3957 2015-10-26 Doug Evans <dje@google.com>
3958
3959 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3960 for debug_printf.
3961 (attach_thread, find_new_threads_callback): Ditto.
3962
3963 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3964
3965 * mem-break.h (set_breakpoint_data): Remove.
3966
3967 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3968
3969 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3970 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3971 (initialize_low): Remove set_breakpoint_data call.
3972 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3973 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3974 (initialize_low): Remove set_breakpoint_data call.
3975 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3976 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3977 (initialize_low): Remove set_breakpoint_data call.
3978
3979 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3980
3981 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3982 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3983 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3984 * target.h (target_breakpoint_kind_from_pc): New macro.
3985
3986 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3987
3988 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3989 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3990 the default breakpoint kind.
3991
3992 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3993
3994 * linux-arm-low.c (arm_supports_z_point_type): Add software
3995 breakpoint support.
3996
3997 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3998
3999 * linux-arm-low.c: Refactor breakpoint definitions.
4000 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4001 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4002
4003 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4004
4005 * Makefile.in: Add arm.c/o.
4006 * configure.srv: Likewise.
4007 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4008 (arm_breakpoint_kind_from_pc): New function.
4009 (arm_sw_breakpoint_from_kind): Return proper kind.
4010 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4011
4012 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4013
4014 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4015 removal.
4016 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4017 (struct raw_breakpoint) <size>: Remove.
4018 (struct raw_breakpoint) <kind>: Add.
4019 (bp_size): New function.
4020 (bp_opcode): Likewise.
4021 (find_raw_breakpoint_at): Adjust for kind.
4022 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4023 (remove_memory_breakpoint): Adjust for kind call bp_size.
4024 (set_raw_breakpoint_at): Adjust for kind.
4025 (set_breakpoint): Likewise.
4026 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4027 (delete_raw_breakpoint): Adjust for kind.
4028 (delete_breakpoint): Likewise.
4029 (find_gdb_breakpoint): Likewise.
4030 (set_gdb_breakpoint_1): Likewise.
4031 (set_gdb_breakpoint): Likewise.
4032 (delete_gdb_breakpoint_1): Likewise.
4033 (delete_gdb_breakpoint): Likewise.
4034 (uninsert_raw_breakpoint): Likewise.
4035 (reinsert_raw_breakpoint): Likewise.
4036 (set_breakpoint_data): Remove.
4037 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4038 (check_mem_read): Adjust for kind call bp_size.
4039 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4040 (clone_one_breakpoint): Adjust for kind.
4041 * mem-break.h (set_gdb_breakpoint): Likewise.
4042 (delete_gdb_breakpoint): Likewise.
4043 * server.c (process_serial_event): Likewise.
4044
4045 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4046
4047 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4048 (struct linux_target_ops) <breakpoint>: Remove.
4049 (struct linux_target_ops) <breakpoint_len>: Remove.
4050 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4051 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4052 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4053 (arm_sw_breakpoint_from_kind): New function.
4054 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4055 (struct linux_target_ops) <breakpoint>: Remove.
4056 (struct linux_target_ops) <breakpoint_len>: Remove.
4057 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4058 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4059 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4060 (struct linux_target_ops) <breakpoint>: Remove.
4061 (struct linux_target_ops) <breakpoint_len>: Remove.
4062 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4063 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4064 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4065 (struct linux_target_ops) <breakpoint>: Remove.
4066 (struct linux_target_ops) <breakpoint_len>: Remove.
4067 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4068 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4069 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4070 and sw_breakpoint_from_kind to increment the pc.
4071 (linux_breakpoint_kind_from_pc): New function.
4072 (linux_sw_breakpoint_from_kind): New function.
4073 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4074 (initialize_low): Call breakpoint_kind_from_pc and
4075 sw_breakpoint_from_kind to replace breakpoint_data/len.
4076 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4077 New field.
4078 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4079 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4080 (struct linux_target_ops) <breakpoint>: Remove.
4081 (struct linux_target_ops) <breakpoint_len>: Remove.
4082 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4083 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4084 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4085 (struct linux_target_ops) <breakpoint>: Remove.
4086 (struct linux_target_ops) <breakpoint_len>: Remove.
4087 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4088 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4089 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4090 (struct linux_target_ops) <breakpoint>: Remove.
4091 (struct linux_target_ops) <breakpoint_len>: Remove.
4092 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4093 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4094 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4095 (struct linux_target_ops) <breakpoint>: Remove.
4096 (struct linux_target_ops) <breakpoint_len>: Remove.
4097 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4098 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4099 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4100 (struct linux_target_ops) <breakpoint>: Remove.
4101 (struct linux_target_ops) <breakpoint_len>: Remove.
4102 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4103 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4104 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4105 (struct linux_target_ops) <breakpoint>: Remove.
4106 (struct linux_target_ops) <breakpoint_len>: Remove.
4107 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4108 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4109 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4110 (struct linux_target_ops) <breakpoint>: Remove.
4111 (struct linux_target_ops) <breakpoint_len>: Remove.
4112 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4113 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4114 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4115 (struct linux_target_ops) <breakpoint>: Remove.
4116 (struct linux_target_ops) <breakpoint_len>: Remove.
4117 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4118 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4119 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4120 (struct linux_target_ops) <breakpoint>: Remove.
4121 (struct linux_target_ops) <breakpoint_len>: Remove.
4122 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4123 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4124 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4125 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4126 (struct linux_target_ops) <breakpoint>: Remove.
4127 (struct linux_target_ops) <breakpoint_len>: Remove.
4128 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4129 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4130 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4131 (struct linux_target_ops) <breakpoint>: Remove.
4132 (struct linux_target_ops) <breakpoint_len>: Remove.
4133 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4134 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4135
4136 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4137
4138 * linux-cris-low.c (cris_get_pc): Remove void arg.
4139
4140 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4141
4142 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4143 variable name.
4144
4145 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4146
4147 * inferiors.c (thread_pid_matches_callback): New function.
4148 (find_thread_process): New function.
4149 (remove_thread): Reset current_thread.
4150 (remove_process): Assert threads have been removed first.
4151
4152 2015-10-15 Yao Qi <yao.qi@linaro.org>
4153
4154 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4155 if it is 3.
4156 (aarch64_remove_point): Likewise.
4157 * regcache.c (regcache_register_size): New function.
4158
4159 2015-10-12 Yao Qi <yao.qi@linaro.org>
4160
4161 * linux-aarch64-low.c: Update all callers as emit_load_store
4162 is renamed to aarch64_emit_load_store.
4163
4164 2015-10-12 Yao Qi <yao.qi@linaro.org>
4165
4166 * linux-aarch64-low.c: Update all callers of function renaming
4167 from emit_insn to aarch64_emit_insn.
4168
4169 2015-10-12 Yao Qi <yao.qi@linaro.org>
4170
4171 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4172 arch/aarch64-insn.h.
4173 (struct aarch64_memory_operand): Likewise.
4174 (ENCODE): Likewise.
4175 (emit_insn): Move to arch/aarch64-insn.c.
4176 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4177 (emit_load_store): Move to arch/aarch64-insn.c.
4178 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4179 (can_encode_int32): Remove.
4180
4181 2015-10-12 Yao Qi <yao.qi@linaro.org>
4182
4183 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4184 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4185 (aarch64_relocate_instruction): Likewise.
4186 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4187 (struct aarch64_insn_visitor): Likewise.
4188
4189 2015-10-12 Yao Qi <yao.qi@linaro.org>
4190
4191 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4192 (struct aarch64_insn_visitor): New.
4193 (struct aarch64_insn_relocation_data): New.
4194 (aarch64_ftrace_insn_reloc_b): New function.
4195 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4196 (aarch64_ftrace_insn_reloc_cb): Likewise.
4197 (aarch64_ftrace_insn_reloc_tb): Likewise.
4198 (aarch64_ftrace_insn_reloc_adr): Likewise.
4199 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4200 (aarch64_ftrace_insn_reloc_others): Likewise.
4201 (visitor): New.
4202 (aarch64_relocate_instruction): Use visitor.
4203
4204 2015-10-12 Yao Qi <yao.qi@linaro.org>
4205
4206 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4207 int. Add argument buf.
4208 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4209 aarch64_relocate_instruction.
4210
4211 2015-10-12 Yao Qi <yao.qi@linaro.org>
4212
4213 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4214 argument insn. Remove local variable insn. Don't call
4215 target_read_uint32.
4216 (aarch64_install_fast_tracepoint_jump_pad): Call
4217 target_read_uint32.
4218
4219 2015-09-30 Yao Qi <yao.qi@linaro.org>
4220
4221 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4222 (emit_load_store_pair): Likewise.
4223
4224 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4225
4226 * dll.c (match_dll): Add cast(s).
4227 (unloaded_dll): Likewise.
4228 * linux-low.c (second_thread_of_pid_p): Likewise.
4229 (delete_lwp_callback): Likewise.
4230 (count_events_callback): Likewise.
4231 (select_event_lwp_callback): Likewise.
4232 (linux_set_resume_request): Likewise.
4233 * server.c (accumulate_file_name_length): Likewise.
4234 (emit_dll_description): Likewise.
4235 (handle_qxfer_threads_worker): Likewise.
4236 (visit_actioned_threads): Likewise.
4237 * thread-db.c (any_thread_of): Likewise.
4238 * tracepoint.c (same_process_p): Likewise.
4239 (match_blocktype): Likewise.
4240 (build_traceframe_info_xml): Likewise.
4241
4242 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4243
4244 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4245 assignment.
4246 (gdb_unparse_agent_expr): Likewise.
4247 * hostio.c (require_data): Likewise.
4248 (handle_pread): Likewise.
4249 * linux-low.c (disable_regset): Likewise.
4250 (fetch_register): Likewise.
4251 (store_register): Likewise.
4252 (get_dynamic): Likewise.
4253 (linux_qxfer_libraries_svr4): Likewise.
4254 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4255 (set_fast_tracepoint_jump): Likewise.
4256 (uninsert_fast_tracepoint_jumps_at): Likewise.
4257 (reinsert_fast_tracepoint_jumps_at): Likewise.
4258 (validate_inserted_breakpoint): Likewise.
4259 (clone_agent_expr): Likewise.
4260 * regcache.c (init_register_cache): Likewise.
4261 * remote-utils.c (putpkt_binary_1): Likewise.
4262 (decode_M_packet): Likewise.
4263 (decode_X_packet): Likewise.
4264 (look_up_one_symbol): Likewise.
4265 (relocate_instruction): Likewise.
4266 (monitor_output): Likewise.
4267 * server.c (handle_search_memory): Likewise.
4268 (handle_qxfer_exec_file): Likewise.
4269 (handle_qxfer_libraries): Likewise.
4270 (handle_qxfer): Likewise.
4271 (handle_query): Likewise.
4272 (handle_v_cont): Likewise.
4273 (handle_v_run): Likewise.
4274 (captured_main): Likewise.
4275 * target.c (write_inferior_memory): Likewise.
4276 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4277 * tracepoint.c (init_trace_buffer): Likewise.
4278 (add_tracepoint_action): Likewise.
4279 (add_traceframe): Likewise.
4280 (add_traceframe_block): Likewise.
4281 (cmd_qtdpsrc): Likewise.
4282 (cmd_qtdv): Likewise.
4283 (cmd_qtstatus): Likewise.
4284 (response_source): Likewise.
4285 (response_tsv): Likewise.
4286 (cmd_qtnotes): Likewise.
4287 (gdb_collect): Likewise.
4288 (initialize_tracepoint): Likewise.
4289
4290 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4291
4292 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4293 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4294 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4295 <NOP>: New.
4296 (enum aarch64_condition_codes): New enum.
4297 (w0): New static global.
4298 (fp): Likewise.
4299 (lr): Likewise.
4300 (struct aarch64_memory_operand) <type>: New
4301 MEMORY_OPERAND_POSTINDEX type.
4302 (postindex_memory_operand): New helper function.
4303 (emit_ret): New function.
4304 (emit_load_store_pair): New function, factored out of emit_stp
4305 with support for MEMORY_OPERAND_POSTINDEX.
4306 (emit_stp): Rewrite using emit_load_store_pair.
4307 (emit_ldp): New function.
4308 (emit_load_store): Likewise.
4309 (emit_ldr): Mention post-index instruction in comment.
4310 (emit_ldrh): New function.
4311 (emit_ldrb): New function.
4312 (emit_ldrsw): Mention post-index instruction in comment.
4313 (emit_str): Likewise.
4314 (emit_subs): New function.
4315 (emit_cmp): Likewise.
4316 (emit_and): Likewise.
4317 (emit_orr): Likewise.
4318 (emit_orn): Likewise.
4319 (emit_eor): Likewise.
4320 (emit_mvn): Likewise.
4321 (emit_lslv): Likewise.
4322 (emit_lsrv): Likewise.
4323 (emit_asrv): Likewise.
4324 (emit_mul): Likewise.
4325 (emit_sbfm): Likewise.
4326 (emit_sbfx): Likewise.
4327 (emit_ubfm): Likewise.
4328 (emit_ubfx): Likewise.
4329 (emit_csinc): Likewise.
4330 (emit_cset): Likewise.
4331 (emit_nop): Likewise.
4332 (emit_ops_insns): New helper function.
4333 (emit_pop): Likewise.
4334 (emit_push): Likewise.
4335 (aarch64_emit_prologue): New function.
4336 (aarch64_emit_epilogue): Likewise.
4337 (aarch64_emit_add): Likewise.
4338 (aarch64_emit_sub): Likewise.
4339 (aarch64_emit_mul): Likewise.
4340 (aarch64_emit_lsh): Likewise.
4341 (aarch64_emit_rsh_signed): Likewise.
4342 (aarch64_emit_rsh_unsigned): Likewise.
4343 (aarch64_emit_ext): Likewise.
4344 (aarch64_emit_log_not): Likewise.
4345 (aarch64_emit_bit_and): Likewise.
4346 (aarch64_emit_bit_or): Likewise.
4347 (aarch64_emit_bit_xor): Likewise.
4348 (aarch64_emit_bit_not): Likewise.
4349 (aarch64_emit_equal): Likewise.
4350 (aarch64_emit_less_signed): Likewise.
4351 (aarch64_emit_less_unsigned): Likewise.
4352 (aarch64_emit_ref): Likewise.
4353 (aarch64_emit_if_goto): Likewise.
4354 (aarch64_emit_goto): Likewise.
4355 (aarch64_write_goto_address): Likewise.
4356 (aarch64_emit_const): Likewise.
4357 (aarch64_emit_call): Likewise.
4358 (aarch64_emit_reg): Likewise.
4359 (aarch64_emit_pop): Likewise.
4360 (aarch64_emit_stack_flush): Likewise.
4361 (aarch64_emit_zero_ext): Likewise.
4362 (aarch64_emit_swap): Likewise.
4363 (aarch64_emit_stack_adjust): Likewise.
4364 (aarch64_emit_int_call_1): Likewise.
4365 (aarch64_emit_void_call_2): Likewise.
4366 (aarch64_emit_eq_goto): Likewise.
4367 (aarch64_emit_ne_goto): Likewise.
4368 (aarch64_emit_lt_goto): Likewise.
4369 (aarch64_emit_le_goto): Likewise.
4370 (aarch64_emit_gt_goto): Likewise.
4371 (aarch64_emit_ge_got): Likewise.
4372 (aarch64_emit_ops_impl): New static global variable.
4373 (aarch64_emit_ops): New target function, return
4374 &aarch64_emit_ops_impl.
4375 (struct linux_target_ops): Install it.
4376
4377 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4378
4379 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4380 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4381 aarch64-ipa.o.
4382 * linux-aarch64-ipa.c: New file.
4383 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4384 and endian.h.
4385 (aarch64_get_thread_area): New target method.
4386 (extract_signed_bitfield): New helper function.
4387 (aarch64_decode_ldr_literal): New function.
4388 (enum aarch64_opcodes): New enum.
4389 (struct aarch64_register): New struct.
4390 (struct aarch64_operand): New struct.
4391 (x0): New static global.
4392 (x1): Likewise.
4393 (x2): Likewise.
4394 (x3): Likewise.
4395 (x4): Likewise.
4396 (w2): Likewise.
4397 (ip0): Likewise.
4398 (sp): Likewise.
4399 (xzr): Likewise.
4400 (aarch64_register): New helper function.
4401 (register_operand): Likewise.
4402 (immediate_operand): Likewise.
4403 (struct aarch64_memory_operand): New struct.
4404 (offset_memory_operand): New helper function.
4405 (preindex_memory_operand): Likewise.
4406 (enum aarch64_system_control_registers): New enum.
4407 (ENCODE): New macro.
4408 (emit_insn): New helper function.
4409 (emit_b): New function.
4410 (emit_bcond): Likewise.
4411 (emit_cb): Likewise.
4412 (emit_tb): Likewise.
4413 (emit_blr): Likewise.
4414 (emit_stp): Likewise.
4415 (emit_ldp_q_offset): Likewise.
4416 (emit_stp_q_offset): Likewise.
4417 (emit_load_store): Likewise.
4418 (emit_ldr): Likewise.
4419 (emit_ldrsw): Likewise.
4420 (emit_str): Likewise.
4421 (emit_ldaxr): Likewise.
4422 (emit_stxr): Likewise.
4423 (emit_stlr): Likewise.
4424 (emit_data_processing_reg): Likewise.
4425 (emit_data_processing): Likewise.
4426 (emit_add): Likewise.
4427 (emit_sub): Likewise.
4428 (emit_mov): Likewise.
4429 (emit_movk): Likewise.
4430 (emit_mov_addr): Likewise.
4431 (emit_mrs): Likewise.
4432 (emit_msr): Likewise.
4433 (emit_sevl): Likewise.
4434 (emit_wfe): Likewise.
4435 (append_insns): Likewise.
4436 (can_encode_int32_in): New helper function.
4437 (aarch64_relocate_instruction): New function.
4438 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4439 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4440 (struct linux_target_ops): Install aarch64_get_thread_area,
4441 aarch64_install_fast_tracepoint_jump_pad and
4442 aarch64_get_min_fast_tracepoint_insn_len.
4443
4444 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4445
4446 * Makefile.in (aarch64-insn.o): New rule.
4447 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4448
4449 2015-09-21 Yao Qi <yao.qi@linaro.org>
4450
4451 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4452
4453 2015-09-21 Yao Qi <yao.qi@linaro.org>
4454
4455 * tracepoint.c (max_jump_pad_size): Remove.
4456
4457 2015-09-18 Yao Qi <yao.qi@linaro.org>
4458
4459 * linux-aarch64-low.c: Don't include sys/uio.h.
4460 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4461
4462 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4463
4464 * tracepoint.c (eval_result_type): Change prototype.
4465 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4466
4467 2015-09-15 Pedro Alves <palves@redhat.com>
4468
4469 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4470 Check whether to report exec events instead of checking whether
4471 multiprocess is enabled.
4472
4473 2015-09-15 Pedro Alves <palves@redhat.com>
4474
4475 PR remote/18965
4476 * remote-utils.c (prepare_resume_reply): Merge
4477 TARGET_WAITKIND_VFORK_DONE switch case with the
4478 TARGET_WAITKIND_FORKED case.
4479
4480 2015-09-15 Yao Qi <yao.qi@linaro.org>
4481
4482 * server.c (handle_query): Check string comparison using
4483 "else if" instead of "if".
4484
4485 2015-09-15 Yao Qi <yao.qi@linaro.org>
4486
4487 * server.c (vCont_supported): New global variable.
4488 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4489 matches. Append ";vContSupported+" to own_buf.
4490 (handle_v_requests): Append ";s;S" to own_buf if target supports
4491 hardware single step or vCont_supported is false.
4492 (capture_main): Set vCont_supported to zero.
4493
4494 2015-09-15 Yao Qi <yao.qi@linaro.org>
4495
4496 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4497 it to ...
4498 (linux_supports_hardware_single_step): ... New function.
4499 (linux_target_ops): Update.
4500 * lynx-low.c (lynx_target_ops): Set field
4501 supports_hardware_single_step to target_can_do_hardware_single_step.
4502 * nto-low.c (nto_target_ops): Likewise.
4503 * spu-low.c (spu_target_ops): Likewise.
4504 * win32-low.c (win32_target_ops): Likewise.
4505 * target.c (target_can_do_hardware_single_step): New function.
4506 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4507 Remove. <supports_hardware_single_step>: New field.
4508 (target_supports_conditional_breakpoints): Remove.
4509 (target_supports_hardware_single_step): New macro.
4510 (target_can_do_hardware_single_step): Declare.
4511 * server.c (handle_query): Use target_supports_hardware_single_step
4512 instead of target_supports_conditional_breakpoints.
4513
4514 2015-09-15 Yao Qi <yao.qi@linaro.org>
4515
4516 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4517 function.
4518 (struct linux_target_ops the_low_target): Install
4519 aarch64_linux_siginfo_fixup.
4520
4521 2015-09-11 Don Breazeal <donb@codesourcery.com>
4522 Luis Machado <lgustavo@codesourcery.com>
4523
4524 * linux-low.c (linux_mourn): Static declaration.
4525 (linux_arch_setup): Move in front of
4526 handle_extended_wait.
4527 (linux_arch_setup_thread): New function.
4528 (handle_extended_wait): Handle exec events. Call
4529 linux_arch_setup_thread. Make event_lwp argument a
4530 pointer-to-a-pointer.
4531 (check_zombie_leaders): Do not check stopped threads.
4532 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4533 (linux_low_filter_event): Add lwp and thread for exec'ing
4534 non-leader thread if leader thread has been deleted.
4535 Refactor code into linux_arch_setup_thread and call it.
4536 Pass child lwp pointer by reference to handle_extended_wait.
4537 (linux_wait_for_event_filtered): Update comment.
4538 (linux_wait_1): Prevent clobbering exec event status.
4539 (linux_supports_exec_events): New function.
4540 (linux_target_ops) <supports_exec_events>: Initialize new member.
4541 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4542 new member.
4543 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4544 * server.c (report_exec_events): New global variable.
4545 (handle_query): Handle qSupported query for exec-events feature.
4546 (captured_main): Initialize report_exec_events.
4547 * server.h (report_exec_events): Declare new global variable.
4548 * target.h (struct target_ops) <supports_exec_events>: New
4549 member.
4550 (target_supports_exec_events): New macro.
4551 * win32-low.c (win32_target_ops) <supports_exec_events>:
4552 Initialize new member.
4553
4554 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4555
4556 * linux-low.c (linux_low_enable_btrace): Remove.
4557 (linux_target_ops): Replace linux_low_enable_btrace with
4558 linux_enable_btrace.
4559
4560 2015-09-03 Yao Qi <yao.qi@linaro.org>
4561
4562 * linux-aarch64-low.c (aarch64_insert_point): Call
4563 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4564 returns true.
4565
4566 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4567
4568 * linux-low.c (check_stopped_by_breakpoint): Use
4569 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4570
4571 2015-08-27 Pedro Alves <palves@redhat.com>
4572
4573 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4574
4575 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4576
4577 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4578 the XNEW-family equivalent.
4579 (compile_bytecodes): Likewise.
4580 * dll.c (loaded_dll): Likewise.
4581 * event-loop.c (append_callback_event): Likewise.
4582 (create_file_handler): Likewise.
4583 (create_file_event): Likewise.
4584 * hostio.c (handle_open): Likewise.
4585 * inferiors.c (add_thread): Likewise.
4586 (add_process): Likewise.
4587 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4588 * linux-arm-low.c (arm_new_process): Likewise.
4589 (arm_new_thread): Likewise.
4590 * linux-low.c (add_to_pid_list): Likewise.
4591 (linux_add_process): Likewise.
4592 (handle_extended_wait): Likewise.
4593 (add_lwp): Likewise.
4594 (enqueue_one_deferred_signal): Likewise.
4595 (enqueue_pending_signal): Likewise.
4596 (linux_resume_one_lwp_throw): Likewise.
4597 (linux_resume_one_thread): Likewise.
4598 (linux_read_memory): Likewise.
4599 (linux_write_memory): Likewise.
4600 * linux-mips-low.c (mips_linux_new_process): Likewise.
4601 (mips_linux_new_thread): Likewise.
4602 (mips_add_watchpoint): Likewise.
4603 * linux-x86-low.c (initialize_low_arch): Likewise.
4604 * lynx-low.c (lynx_add_process): Likewise.
4605 * mem-break.c (set_raw_breakpoint_at): Likewise.
4606 (set_breakpoint): Likewise.
4607 (add_condition_to_breakpoint): Likewise.
4608 (add_commands_to_breakpoint): Likewise.
4609 (clone_agent_expr): Likewise.
4610 (clone_one_breakpoint): Likewise.
4611 * regcache.c (new_register_cache): Likewise.
4612 * remote-utils.c (look_up_one_symbol): Likewise.
4613 * server.c (queue_stop_reply): Likewise.
4614 (start_inferior): Likewise.
4615 (queue_stop_reply_callback): Likewise.
4616 (handle_target_event): Likewise.
4617 * spu-low.c (fetch_ppc_memory): Likewise.
4618 (store_ppc_memory): Likewise.
4619 * target.c (set_target_ops): Likewise.
4620 * thread-db.c (thread_db_load_search): Likewise.
4621 (try_thread_db_load_1): Likewise.
4622 * tracepoint.c (add_tracepoint): Likewise.
4623 (add_tracepoint_action): Likewise.
4624 (create_trace_state_variable): Likewise.
4625 (cmd_qtdpsrc): Likewise.
4626 (cmd_qtro): Likewise.
4627 (add_while_stepping_state): Likewise.
4628 * win32-low.c (child_add_thread): Likewise.
4629 (get_image_name): Likewise.
4630
4631 2015-08-25 Yao Qi <yao.qi@linaro.org>
4632
4633 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4634
4635 2015-08-25 Yao Qi <yao.qi@linaro.org>
4636
4637 * Makefile.in (aarch64-linux.o): New rule.
4638 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4639 srv_tgtobj.
4640 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4641 (aarch64_init_debug_reg_state): Make it extern.
4642 (aarch64_linux_prepare_to_resume): Remove.
4643
4644 2015-08-25 Yao Qi <yao.qi@linaro.org>
4645
4646 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4647 lwp_arch_private_info and ptid_of_lwp.
4648
4649 2015-08-25 Yao Qi <yao.qi@linaro.org>
4650
4651 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4652 Find proc_info by find_process_pid. All callers updated.
4653
4654 2015-08-25 Yao Qi <yao.qi@linaro.org>
4655
4656 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4657 Remove.
4658 (debug_reg_change_callback): Remove.
4659 (aarch64_notify_debug_reg_change): Remove.
4660
4661 2015-08-25 Yao Qi <yao.qi@linaro.org>
4662
4663 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4664 Call current_lwp_ptid.
4665
4666 2015-08-25 Yao Qi <yao.qi@linaro.org>
4667
4668 * linux-aarch64-low.c (debug_reg_change_callback): Use
4669 debug_printf.
4670
4671 2015-08-25 Yao Qi <yao.qi@linaro.org>
4672
4673 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4674
4675 2015-08-25 Yao Qi <yao.qi@linaro.org>
4676
4677 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4678
4679 2015-08-25 Yao Qi <yao.qi@linaro.org>
4680
4681 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4682 the code.
4683
4684 2015-08-25 Yao Qi <yao.qi@linaro.org>
4685
4686 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4687 Remove.
4688 (debug_reg_change_callback): Remove argument entry and add argument
4689 lwp. Remove local variable thread. Don't print thread id in the
4690 debugging output. Don't check whether pid of thread equals to pid.
4691 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4692 iterate_over_lwps instead find_inferior.
4693
4694 2015-08-24 Pedro Alves <palves@redhat.com>
4695
4696 * inferiors.c (get_first_process): New function.
4697 * inferiors.h (get_first_process): New declaration.
4698 * remote-utils.c (read_ptid): Default to the first process in the
4699 list, instead of to the current thread's process.
4700
4701 2015-08-24 Pedro Alves <palves@redhat.com>
4702
4703 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4704 * event-loop.c: Likewise.
4705 * remote-utils.c: Likewise.
4706 * tracepoint.c: Likewise.
4707
4708 2015-08-24 Pedro Alves <palves@redhat.com>
4709
4710 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4711 ptid_get_lwp.
4712
4713 2015-08-21 Pedro Alves <palves@redhat.com>
4714
4715 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4716 instead of literal 1.
4717
4718 2015-08-21 Pedro Alves <palves@redhat.com>
4719
4720 * tdesc.c (default_description): Explicitly zero-initialize.
4721
4722 2015-08-21 Pedro Alves <palves@redhat.com>
4723
4724 PR gdb/18749
4725 * inferiors.c (remove_thread): Discard any pending stop reply for
4726 this thread.
4727 * server.c (remove_all_on_match_pid): Rename to ...
4728 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4729 instead of a pid.
4730 (discard_queued_stop_replies): Change parameter to a ptid. Now
4731 extern.
4732 (handle_v_kill, kill_inferior_callback, captured_main)
4733 (process_serial_event): Adjust.
4734 * server.h (discard_queued_stop_replies): Declare.
4735
4736 2015-08-21 Pedro Alves <palves@redhat.com>
4737
4738 * linux-low.c (wait_for_sigstop): Always switch to no thread
4739 selected if the previously current thread dies.
4740 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4741 process instead of the current thread's.
4742 * remote-utils.c (input_interrupt): Don't check if there's no
4743 current thread.
4744 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4745 current thread to the general thread fails, error out.
4746 (handle_qxfer_auxv, handle_qxfer_libraries)
4747 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4748 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4749 (handle_query): Check if there's a thread selected instead of
4750 checking whether there's any thread in the thread list.
4751 (handle_qxfer_threads, handle_qxfer_btrace)
4752 (handle_qxfer_btrace_conf): Don't error out early if there's no
4753 thread in the thread list.
4754 (handle_v_cont, myresume): Don't set the current thread to the
4755 continue thread.
4756 (process_serial_event) <Hg handling>: Also set thread_id if the
4757 previous general thread is still alive.
4758 (process_serial_event) <g/G handling>: If setting the current
4759 thread to the general thread fails, error out.
4760 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4761 thread's lwp instead of the current thread's.
4762 * target.c (set_desired_thread): If the desired thread was not
4763 found, leave the current thread pointing to NULL. Return an int
4764 (boolean) indicating success.
4765 * target.h (set_desired_thread): Change return type to int.
4766
4767 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4768
4769 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4770 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4771 #includes.
4772 (ps_get_thread_area): New function.
4773
4774 2015-08-19 Gary Benson <gbenson@redhat.com>
4775
4776 * hostio.c (handle_pread): Do not attempt to read more data
4777 than hostio_reply_with_data can fit in a packet.
4778
4779 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4780
4781 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4782
4783 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4784
4785 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4786
4787 2015-08-06 Pedro Alves <palves@redhat.com>
4788
4789 * tracepoint.c (expr_eval_result): Now an int.
4790
4791 2015-08-06 Pedro Alves <palves@redhat.com>
4792
4793 * gdbthread.h (struct regcache): Forward declare.
4794 (struct thread_info) <regcache_data>: Now a struct regcache
4795 pointer.
4796 * inferiors.c (inferior_regcache_data)
4797 (set_inferior_regcache_data): Now work with struct regcache
4798 pointers.
4799 * inferiors.h (struct regcache): Forward declare.
4800 (inferior_regcache_data, set_inferior_regcache_data): Now work
4801 with struct regcache pointers.
4802 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4803 (free_register_cache_thread): Remove struct regcache pointer
4804 casts.
4805
4806 2015-08-06 Pedro Alves <palves@redhat.com>
4807
4808 * server.c (captured_main): On error, print the exception message
4809 to stderr, and if run_once is set, throw a quit.
4810
4811 2015-08-06 Pedro Alves <palves@redhat.com>
4812
4813 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4814 the current thread.
4815
4816 2015-08-06 Pedro Alves <palves@redhat.com>
4817
4818 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4819 reading beyond the passed in buffer length.
4820
4821 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4822
4823 * tracepoint.c (symbol_list) <required>: Remove.
4824
4825 2015-08-06 Pedro Alves <palves@redhat.com>
4826
4827 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4828 count if stopping and suspending threads.
4829 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4830 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4831 (linux_detach): Complete an ongoing step-over.
4832 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4833 throughout.
4834 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4835 (linux_wait_1): If passing a signal to the inferior after
4836 finishing a step-over, unsuspend and re-resume all lwps. If we
4837 see a single-step event but the thread should be continuing, don't
4838 pass the trap to gdb.
4839 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4840 internal_error instead of gdb_assert.
4841 (enqueue_pending_signal): New function.
4842 (check_ptrace_stopped_lwp_gone): Add debug output.
4843 (start_step_over): Use internal_error instead of gdb_assert.
4844 (complete_ongoing_step_over): New function.
4845 (linux_resume_one_thread): Don't resume a suspended thread.
4846 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4847 it stepping.
4848
4849 2015-08-06 Pedro Alves <palves@redhat.com>
4850
4851 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4852 (linux_thread_alive): Use lwp_is_marked_dead.
4853 (extended_event_reported): Delete.
4854 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4855 instead of extended_event_reported.
4856 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4857 as well.
4858 (lwp_is_marked_dead): New function.
4859 (lwp_running): Use lwp_is_marked_dead.
4860 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4861 comment.
4862
4863 2015-08-06 Pedro Alves <palves@redhat.com>
4864
4865 * linux-low.c (linux_wait_1): Move fork event output out of the
4866 !report_to_gdb check. Pass event_child->waitstatus to
4867 target_waitstatus_to_string instead of ourstatus.
4868
4869 2015-08-04 Yao Qi <yao.qi@linaro.org>
4870
4871 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4872 if current_thread is 32 bit.
4873
4874 2015-08-04 Yao Qi <yao.qi@linaro.org>
4875
4876 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4877 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4878 * server.c (extended_protocol): Remove "static".
4879 * server.h (extended_protocol): Declare it.
4880
4881 2015-08-04 Yao Qi <yao.qi@linaro.org>
4882
4883 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4884 both aarch64 and aarch32.
4885 (aarch64_set_pc): Likewise.
4886
4887 2015-08-04 Yao Qi <yao.qi@linaro.org>
4888
4889 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4890 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4891 arm-with-neon.xml to srv_xmlfiles.
4892 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4893 (is_64bit_tdesc): New function.
4894 (aarch64_linux_read_description): New function.
4895 (aarch64_arch_setup): Call aarch64_linux_read_description.
4896 (regs_info): Rename to regs_info_aarch64.
4897 (aarch64_regs_info): Return right regs_info.
4898 (initialize_low_arch): Call initialize_low_arch_aarch32.
4899
4900 2015-08-04 Yao Qi <yao.qi@linaro.org>
4901
4902 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4903 * linux-aarch32-low.c: New file.
4904 * linux-aarch32-low.h: New file.
4905 * linux-arm-low.c (arm_fill_gregset): Move it to
4906 linux-aarch32-low.c.
4907 (arm_store_gregset): Likewise.
4908 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4909 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4910 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4911 (regs_info): Rename to regs_info_arm.
4912 (arm_regs_info): Return regs_info_aarch32 if
4913 have_ptrace_getregset is 1 and target description is
4914 arm_with_neon or arm_with_vfpv3.
4915 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4916 Call initialize_low_arch_aarch32 instead.
4917
4918 2015-08-04 Yao Qi <yao.qi@linaro.org>
4919
4920 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4921 * linux-low.c: ... here.
4922 * linux-low.h (have_ptrace_getregset): Declare it.
4923
4924 2015-08-04 Pedro Alves <palves@redhat.com>
4925
4926 * thread-db.c (struct thread_db): Use new typedefs.
4927 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4928 CHK calls.
4929 (disable_thread_event_reporting): Cast result of dlsym to
4930 destination function pointer type.
4931 (thread_db_mourn): Use td_ta_delete_ftype.
4932
4933 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4934
4935 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4936 arch variant.
4937 (CDX_BREAKPOINT): Define for R2.
4938 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4939 (the_low_target): Add comments.
4940
4941 2015-07-30 Yao Qi <yao.qi@linaro.org>
4942
4943 * linux-arm-low.c (arm_hwcap): Remove it.
4944 (arm_read_description): New local variable arm_hwcap. Don't
4945 set arm_hwcap to zero.
4946
4947 2015-07-30 Yao Qi <yao.qi@linaro.org>
4948
4949 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4950 Use regcache->tdesc instead.
4951 (arm_store_wmmxregset): Likewise.
4952 (arm_fill_vfpregset): Likewise.
4953 (arm_store_vfpregset): Likewise.
4954
4955 2015-07-30 Yao Qi <yao.qi@linaro.org>
4956
4957 * linux-arm-low.c: Include arch/arm.h.
4958 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4959 (arm_store_gregset): Likewise.
4960
4961 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4962
4963 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4964 ptrace's 4th parameter.
4965
4966 2015-07-27 Yao Qi <yao.qi@linaro.org>
4967
4968 * configure.srv (case aarch64*-*-linux*): Don't set
4969 srv_linux_usrregs.
4970
4971 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4972
4973 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4974 sys/ptrace.h.
4975 * linux-arm-low.c: Likewise.
4976 * linux-cris-low.c: Likewise.
4977 * linux-crisv32-low.c: Likewise.
4978 * linux-low.c: Likewise.
4979 * linux-m68k-low.c: Likewise.
4980 * linux-mips-low.c: Likewise.
4981 * linux-nios2-low.c: Likewise.
4982 * linux-s390-low.c: Likewise.
4983 * linux-sparc-low.c: Likewise.
4984 * linux-tic6x-low.c: Likewise.
4985 * linux-tile-low.c: Likewise.
4986 * linux-x86-low.c: Likewise.
4987
4988 2015-07-24 Pedro Alves <palves@redhat.com>
4989
4990 * config.in: Regenerate.
4991 * configure: Regenerate.
4992
4993 2015-07-24 Pedro Alves <palves@redhat.com>
4994
4995 * acinclude.m4: Include ../ptrace.m4.
4996 * configure.ac: Call GDB_AC_PTRACE.
4997 * config.in, configure: Regenerate.
4998
4999 2015-07-24 Yao Qi <yao.qi@linaro.org>
5000
5001 * linux-low.c (linux_create_inferior): Remove setting to
5002 proc->priv->new_inferior.
5003 (linux_attach): Likewise.
5004 (linux_low_filter_event): Likewise.
5005 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5006
5007 2015-07-24 Yao Qi <yao.qi@linaro.org>
5008
5009 * linux-low.c (linux_arch_setup): New function.
5010 (linux_low_filter_event): If proc->tdesc is NULL and
5011 proc->attached is true, call the_low_target.arch_setup.
5012 Otherwise, keep status pending, and return.
5013 (linux_resume_one_lwp_throw): Don't call get_pc if
5014 thread->while_stepping isn't NULL. Don't call
5015 get_thread_regcache if proc->tdesc is NULL.
5016 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5017 (linux_target_ops): Install arch_setup.
5018 * server.c (start_inferior): Call the_target->arch_setup.
5019 * target.h (struct target_ops) <arch_setup>: New field.
5020 (target_arch_setup): New marco.
5021 * lynx-low.c (lynx_target_ops): Update.
5022 * nto-low.c (nto_target_ops): Update.
5023 * spu-low.c (spu_target_ops): Update.
5024 * win32-low.c (win32_target_ops): Update.
5025
5026 2015-07-24 Yao Qi <yao.qi@linaro.org>
5027
5028 * linux-low.c (linux_add_process): Don't set
5029 proc->priv->new_inferior.
5030 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5031 (linux_attach): Likewise.
5032
5033 2015-07-24 Yao Qi <yao.qi@linaro.org>
5034
5035 * server.c (start_inferior): Code refactor.
5036
5037 2015-07-24 Yao Qi <yao.qi@linaro.org>
5038
5039 * server.c (process_serial_event): Set general_thread.
5040
5041 2015-07-21 Yao Qi <yao.qi@linaro.org>
5042
5043 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5044 aarch64_linux_get_debug_reg_capacity.
5045
5046 2015-07-17 Yao Qi <yao.qi@linaro.org>
5047
5048 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5049 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5050 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5051 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5052 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5053 (AARCH64_HWP_ALIGNMENT): Likewise.
5054 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5055 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5056 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5057 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5058 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5059 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5060 (struct aarch64_debug_reg_state): Likewise.
5061 (struct arch_lwp_info): Likewise.
5062 (aarch64_align_watchpoint): Likewise.
5063 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5064 (aarch64_watchpoint_length): Likewise.
5065 (aarch64_point_encode_ctrl_reg): Likewise
5066 (aarch64_point_is_aligned): Likewise.
5067 (aarch64_align_watchpoint): Likewise.
5068 (aarch64_linux_set_debug_regs):
5069 (aarch64_dr_state_insert_one_point): Likewise.
5070 (aarch64_dr_state_remove_one_point): Likewise.
5071 (aarch64_handle_breakpoint): Likewise.
5072 (aarch64_handle_aligned_watchpoint): Likewise.
5073 (aarch64_handle_unaligned_watchpoint): Likewise.
5074 (aarch64_handle_watchpoint): Likewise.
5075
5076 2015-07-17 Yao Qi <yao.qi@linaro.org>
5077
5078 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5079 and don't aarch64_get_debug_reg_state. All callers update.
5080 (aarch64_handle_aligned_watchpoint): Likewise.
5081 (aarch64_handle_unaligned_watchpoint): Likewise.
5082 (aarch64_handle_watchpoint): Likewise.
5083 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5084 (aarch64_remove_point): Likewise.
5085
5086 2015-07-17 Yao Qi <yao.qi@linaro.org>
5087
5088 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5089 debug_printf.
5090 (aarch64_handle_unaligned_watchpoint): Likewise.
5091
5092 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5093
5094 Revert the previous 3 commits:
5095 Move gdb_regex* to common/
5096 Move linux_find_memory_regions_full & co.
5097 gdbserver build-id attribute generator
5098
5099 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5100 Jan Kratochvil <jan.kratochvil@redhat.com>
5101
5102 gdbserver build-id attribute generator.
5103 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5104 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5105 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5106 (find_phdr): New.
5107 (get_dynamic): Use find_pdhr to traverse program headers.
5108 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5109 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5110 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5111 (get_hex_build_id): New.
5112 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5113 to reply XML document.
5114
5115 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5116 Jan Kratochvil <jan.kratochvil@redhat.com>
5117
5118 * target.c: Include target/target-utils.h and fcntl.h.
5119 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5120 (target_fileio_read_stralloc): New functions.
5121
5122 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5123
5124 * Makefile.in (OBS): Add gdb_regex.o.
5125 (gdb_regex.o): New.
5126 * config.in: Rebuilt.
5127 * configure: Rebuilt.
5128
5129 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5130 Jan Kratochvil <jan.kratochvil@redhat.com>
5131
5132 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5133 * Makefile.in (OBS): Add target-utils.o.
5134 (linux-maps.o, target-utils.o): New.
5135 * configure.srv (srv_linux_obj): Add linux-maps.o.
5136
5137 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5138
5139 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5140 function, return 1.
5141 (the_low_target): Install it.
5142
5143 2015-07-14 Pedro Alves <palves@redhat.com>
5144
5145 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5146 Instead, ignore ECHILD, and throw an error for other errnos.
5147
5148 2015-07-10 Pedro Alves <palves@redhat.com>
5149
5150 * event-loop.c (struct callback_event) <data>: Change type to
5151 gdb_client_data instance instead of gdb_client_data pointer.
5152 (append_callback_event): Adjust.
5153
5154 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5155
5156 * linux-aarch64-low.c: Add comments for each linux_target_ops
5157 method. Remove comments already covered in target_ops and
5158 linux_target_ops definitions.
5159 (the_low_target): Add comments for each unimplemented method.
5160
5161 2015-07-09 Yao Qi <yao.qi@linaro.org>
5162
5163 * linux-aarch64-low.c (aarch64_regmap): Remove.
5164 (aarch64_usrregs_info): Remove.
5165 (regs_info): Set field usrregs to NULL.
5166
5167 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5168
5169 * linux-low.c: Include "rsp-low.h"
5170 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5171 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5172 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5173 (handle_btrace_enable_pt): New.
5174 (handle_btrace_general_set): Support "pt".
5175 (handle_btrace_conf_general_set): Support "pt:size".
5176
5177 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5178
5179 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5180 Z_PACKET_SW_BP.
5181
5182 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5183
5184 * linux-aarch64-low.c: Remove comment about endianness.
5185 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5186 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5187 memcmp.
5188
5189 2015-06-24 Gary Benson <gbenson@redhat.com>
5190
5191 * linux-i386-ipa.c (stdint.h): Do not include.
5192 * lynx-i386-low.c (stdint.h): Likewise.
5193 * lynx-ppc-low.c (stdint.h): Likewise.
5194 * mem-break.c (stdint.h): Likewise.
5195 * thread-db.c (stdint.h): Likewise.
5196 * tracepoint.c (stdint.h): Likewise.
5197 * win32-low.c (stdint.h): Likewise.
5198
5199 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5200
5201 * server.c (write_qxfer_response): Update call to
5202 remote_escape_output.
5203
5204 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5205 Jan Kratochvil <jan.kratochvil@redhat.com>
5206
5207 Merge multiple hex conversions.
5208 * gdbreplay.c (tohex): Rename to 'fromhex'.
5209 (logchar): Use fromhex.
5210
5211 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5212
5213 * server.c (handle_qxfer_libraries): Set `version' attribute for
5214 <library-list>.
5215
5216 2015-06-10 Gary Benson <gbenson@redhat.com>
5217
5218 * target.h (struct target_ops) <multifs_open>: New field.
5219 <multifs_unlink>: Likewise.
5220 <multifs_readlink>: Likewise.
5221 * linux-low.c (nat/linux-namespaces.h): New include.
5222 (linux_target_ops): Initialize the_target->multifs_open,
5223 the_target->multifs_unlink and the_target->multifs_readlink.
5224 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5225 * hostio.c (hostio_fs_pid): New static variable.
5226 (hostio_handle_new_gdb_connection): New function.
5227 (handle_setfs): Likewise.
5228 (handle_open): Use the_target->multifs_open as appropriate.
5229 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5230 (handle_readlink): Use the_target->multifs_readlink as
5231 appropriate.
5232 (handle_vFile): Handle vFile:setfs packets.
5233 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5234 after target_handle_new_gdb_connection.
5235
5236 2015-06-10 Gary Benson <gbenson@redhat.com>
5237
5238 * configure.ac (AC_CHECK_FUNCS): Add setns.
5239 * config.in: Regenerate.
5240 * configure: Likewise.
5241 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5242 (linux-namespaces.o): New rule.
5243 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5244
5245 2015-06-09 Gary Benson <gbenson@redhat.com>
5246
5247 * hostio.c (handle_open): Process mode argument with
5248 fileio_to_host_mode.
5249
5250 2015-06-01 Yao Qi <yao.qi@linaro.org>
5251
5252 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5253 * linux-x86-low.c: Likewise.
5254
5255 2015-05-28 Don Breazeal <donb@codesourcery.com>
5256
5257 * linux-low.c (handle_extended_wait): Initialize
5258 thread_info.last_resume_kind for new fork children.
5259
5260 2015-05-15 Pedro Alves <palves@redhat.com>
5261
5262 * target.h (target_handle_new_gdb_connection): Rewrite using if
5263 wrapped in do/while.
5264
5265 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5266
5267 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5268 * configure, config.in: Regenerate.
5269 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5270 Declare typedef.
5271
5272 2015-05-12 Don Breazeal <donb@codesourcery.com>
5273
5274 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5275 PTRACE_EVENT_VFORK_DONE.
5276 (linux_low_ptrace_options, extended_event_reported): Add vfork
5277 events.
5278 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5279 and "vforkdone" for RSP 'T' Stop Reply Packet.
5280 * server.h (report_vfork_events): Declare
5281 global variable.
5282
5283 2015-05-12 Don Breazeal <donb@codesourcery.com>
5284
5285 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5286 (the_low_target) <new_fork>: Initialize new member.
5287 * linux-arm-low.c (arm_new_fork): New function.
5288 (the_low_target) <new_fork>: Initialize new member.
5289 * linux-low.c (handle_extended_wait): Call new target function
5290 new_fork.
5291 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5292 * linux-mips-low.c (mips_add_watchpoint): New function
5293 extracted from mips_insert_point.
5294 (the_low_target) <new_fork>: Initialize new member.
5295 (mips_linux_new_fork): New function.
5296 (mips_insert_point): Call mips_add_watchpoint.
5297 * linux-x86-low.c (x86_linux_new_fork): New function.
5298 (the_low_target) <new_fork>: Initialize new member.
5299
5300 2015-05-12 Don Breazeal <donb@codesourcery.com>
5301
5302 * linux-low.c (handle_extended_wait): Implement return value,
5303 rename argument 'event_child' to 'event_lwp', handle
5304 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5305 (linux_low_ptrace_options): New function.
5306 (linux_low_filter_event): Call linux_low_ptrace_options,
5307 use different argument fo linux_enable_event_reporting,
5308 use return value from handle_extended_wait.
5309 (extended_event_reported): New function.
5310 (linux_wait_1): Call extended_event_reported and set
5311 status to report fork events.
5312 (linux_write_memory): Add pid to debug message.
5313 (reset_lwp_ptrace_options_callback): New function.
5314 (linux_handle_new_gdb_connection): New function.
5315 (linux_target_ops): Initialize new structure member.
5316 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5317 * lynx-low.c: Initialize new structure member.
5318 * remote-utils.c (prepare_resume_reply): Implement stop reason
5319 "fork" for "T" stop message.
5320 * server.c (handle_query): Call handle_new_gdb_connection.
5321 * server.h (report_fork_events): Declare global flag.
5322 * target.h (struct target_ops) <handle_new_gdb_connection>:
5323 New member.
5324 (target_handle_new_gdb_connection): New macro.
5325 * win32-low.c: Initialize new structure member.
5326
5327 2015-05-12 Don Breazeal <donb@codesourcery.com>
5328
5329 * mem-break.c (APPEND_TO_LIST): Define macro.
5330 (clone_agent_expr): New function.
5331 (clone_one_breakpoint): New function.
5332 (clone_all_breakpoints): New function.
5333 * mem-break.h: Declare new functions.
5334
5335 2015-05-12 Don Breazeal <donb@codesourcery.com>
5336
5337 * linux-low.c (linux_supports_fork_events): New function.
5338 (linux_supports_vfork_events): New function.
5339 (linux_target_ops): Initialize new structure members.
5340 (initialize_low): Call linux_check_ptrace_features.
5341 * lynx-low.c (lynx_target_ops): Initialize new structure
5342 members.
5343 * server.c (report_fork_events, report_vfork_events):
5344 New global flags.
5345 (handle_query): Add new features to qSupported packet and
5346 response.
5347 (captured_main): Initialize new global variables.
5348 * target.h (struct target_ops) <supports_fork_events>:
5349 New member.
5350 <supports_vfork_events>: New member.
5351 (target_supports_fork_events): New macro.
5352 (target_supports_vfork_events): New macro.
5353 * win32-low.c (win32_target_ops): Initialize new structure
5354 members.
5355
5356 2015-05-12 Gary Benson <gbenson@redhat.com>
5357
5358 * server.c (handle_qxfer_exec_file): Use current process
5359 if annex is empty.
5360
5361 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5362
5363 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5364 Remove HAVE_PTRACE_GETREGS conditionals.
5365 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5366 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5367
5368 2015-05-08 Yao Qi <yao.qi@linaro.org>
5369
5370 * linux-low.c (linux_supports_conditional_breakpoints): New
5371 function.
5372 (linux_target_ops): Install new target method.
5373 * lynx-low.c (lynx_target_ops): Install NULL hook for
5374 supports_conditional_breakpoints.
5375 * nto-low.c (nto_target_ops): Likewise.
5376 * spu-low.c (spu_target_ops): Likewise.
5377 * win32-low.c (win32_target_ops): Likewise.
5378 * server.c (handle_query): Check
5379 target_supports_conditional_breakpoints.
5380 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5381 New field.
5382 (target_supports_conditional_breakpoints): New macro.
5383
5384 2015-05-06 Pedro Alves <palves@redhat.com>
5385
5386 PR server/18081
5387 * server.c (start_inferior): If the process exits, mourn it.
5388
5389 2015-04-21 Gary Benson <gbenson@redhat.com>
5390
5391 * hostio.c (fileio_open_flags_to_host): Factored out to
5392 fileio_to_host_openflags in common/fileio.c. Single use
5393 updated.
5394
5395 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5396
5397 * linux-xtensa-low.c (xtensa_fill_gregset)
5398 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5399 XCHAL_HAVE_LOOP.
5400
5401 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5402
5403 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5404 (regs_info): Replace usrregs pointer with NULL.
5405
5406 2015-04-17 Gary Benson <gbenson@redhat.com>
5407
5408 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5409 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5410 * server.c (handle_qxfer_exec_file): New function.
5411 (qxfer_packets): Add exec-file entry.
5412 (handle_query): Report qXfer:exec-file:read as supported packet.
5413
5414 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5415
5416 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5417
5418 2015-04-09 Gary Benson <gbenson@redhat.com>
5419
5420 * hostio-errno.c (errno_to_fileio_error): Remove function.
5421 Update caller to use remote_fileio_to_fio_error.
5422
5423 2015-04-09 Yao Qi <yao.qi@linaro.org>
5424
5425 * linux-low.c (linux_insert_point): Call
5426 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5427 (linux_remove_point): Call remove_memory_breakpoint if type is
5428 raw_bkpt_type_sw.
5429 * linux-x86-low.c (x86_insert_point): Don't call
5430 insert_memory_breakpoint.
5431 (x86_remove_point): Don't call remove_memory_breakpoint.
5432
5433 2015-04-01 Pedro Alves <palves@redhat.com>
5434 Cleber Rosa <crosa@redhat.com>
5435
5436 * server.c (gdbserver_usage): Reorganize and extend the usage
5437 message.
5438
5439 2015-03-24 Pedro Alves <palves@redhat.com>
5440
5441 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5442 output. Also dump TRAP_TRACE.
5443 (linux_low_filter_event): In debug output, distinguish a
5444 resume_stop SIGSTOP from a delayed SIGSTOP.
5445
5446 2015-03-24 Gary Benson <gbenson@redhat.com>
5447
5448 * linux-x86-low.c (x86_linux_new_thread): Moved to
5449 nat/x86-linux.c.
5450 (x86_linux_prepare_to_resume): Likewise.
5451
5452 2015-03-24 Gary Benson <gbenson@redhat.com>
5453
5454 * Makefile.in (x86-linux-dregs.o): New rule.
5455 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5456 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5457 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5458 (x86_linux_dr_get): Likewise.
5459 (x86_linux_dr_set): Likewise.
5460 (update_debug_registers_callback): Likewise.
5461 (x86_linux_dr_set_addr): Likewise.
5462 (x86_linux_dr_get_addr): Likewise.
5463 (x86_linux_dr_set_control): Likewise.
5464 (x86_linux_dr_get_control): Likewise.
5465 (x86_linux_dr_get_status): Likewise.
5466 (x86_linux_update_debug_registers): Likewise.
5467
5468 2015-03-24 Gary Benson <gbenson@redhat.com>
5469
5470 * linux-x86-low.c (x86_linux_update_debug_registers):
5471 New function, factored out from...
5472 (x86_linux_prepare_to_resume): ...this.
5473
5474 2015-03-24 Gary Benson <gbenson@redhat.com>
5475
5476 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5477 (x86_linux_dr_set): Likewise.
5478 (update_debug_registers_callback): Likewise.
5479 (x86_linux_dr_set_addr): Likewise.
5480 (x86_linux_dr_get_addr): Likewise.
5481 (x86_linux_dr_set_control): Likewise.
5482 (x86_linux_dr_get_control): Likewise.
5483 (x86_linux_dr_get_status): Likewise.
5484 (x86_linux_prepare_to_resume): Likewise.
5485
5486 2015-03-24 Gary Benson <gbenson@redhat.com>
5487
5488 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5489 Use perror_with_name. Pass string through gettext.
5490 (x86_linux_dr_set): Likewise.
5491
5492 2015-03-24 Gary Benson <gbenson@redhat.com>
5493
5494 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5495 (x86_linux_dr_set_addr): ...this.
5496 (x86_dr_low_get_addr): Rename to...
5497 (x86_linux_dr_get_addr): ...this.
5498 (x86_dr_low_set_control): Rename to...
5499 (x86_linux_dr_set_control): ...this.
5500 (x86_dr_low_get_control): Rename to...
5501 (x86_linux_dr_get_control): ...this.
5502 (x86_dr_low_get_status): Rename to...
5503 (x86_linux_dr_get_status): ...this.
5504 (x86_dr_low): Update with new function names.
5505
5506 2015-03-24 Gary Benson <gbenson@redhat.com>
5507
5508 * Makefile.in (x86-linux.o): New rule.
5509 * configure.srv: Add x86-linux.o to relevant targets.
5510 * linux-low.c (lwp_set_arch_private_info): New function.
5511 (lwp_arch_private_info): Likewise.
5512 * linux-x86-low.c: Include nat/x86-linux.h.
5513 (arch_lwp_info): Removed structure.
5514 (update_debug_registers_callback):
5515 Use lwp_set_debug_registers_changed.
5516 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5517 and lwp_set_debug_registers_changed.
5518 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5519
5520 2015-03-24 Gary Benson <gbenson@redhat.com>
5521
5522 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5523 * linux-arm-low.c (arm_new_thread): Likewise.
5524 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5525 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5526 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5527 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5528
5529 2015-03-24 Gary Benson <gbenson@redhat.com>
5530
5531 * linux-low.c (ptid_of_lwp): New function.
5532 (lwp_is_stopped): Likewise.
5533 (lwp_stop_reason): Likewise.
5534 * linux-x86-low.c (update_debug_registers_callback):
5535 Use lwp_is_stopped.
5536 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5537 lwp_stop_reason.
5538
5539 2015-03-24 Gary Benson <gbenson@redhat.com>
5540
5541 * linux-low.h (linux_stop_lwp): Remove declaration.
5542
5543 2015-03-24 Gary Benson <gbenson@redhat.com>
5544
5545 * linux-low.h: Include nat/linux-nat.h.
5546 * linux-low.c (iterate_over_lwps_args): New structure.
5547 (iterate_over_lwps_filter): New function.
5548 (iterate_over_lwps): Likewise.
5549 * linux-x86-low.c (update_debug_registers_callback):
5550 Update signature to what iterate_over_lwps expects.
5551 Remove PID check that iterate_over_lwps now performs.
5552 (x86_dr_low_set_addr): Use iterate_over_lwps.
5553 (x86_dr_low_set_control): Likewise.
5554
5555 2015-03-24 Gary Benson <gbenson@redhat.com>
5556
5557 * linux-x86-low.c (x86_debug_reg_state): New function.
5558 (x86_linux_prepare_to_resume): Use the above.
5559
5560 2015-03-24 Gary Benson <gbenson@redhat.com>
5561
5562 * linux-low.c (current_lwp_ptid): New function.
5563 * linux-x86-low.c: Include nat/linux-nat.h.
5564 (x86_dr_low_get_addr): Use current_lwp_ptid.
5565 (x86_dr_low_get_control): Likewise.
5566 (x86_dr_low_get_status): Likewise.
5567
5568 2015-03-20 Pedro Alves <palves@redhat.com>
5569
5570 * tracepoint.c (cmd_qtstatus): Make "str" const.
5571
5572 2015-03-20 Pedro Alves <palves@redhat.com>
5573
5574 * server.c (handle_general_set): Make "req_str" const.
5575
5576 2015-03-19 Pedro Alves <palves@redhat.com>
5577
5578 * linux-low.c (linux_resume_one_lwp): Rename to ...
5579 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5580 instead call perror_with_name.
5581 (check_ptrace_stopped_lwp_gone): New function.
5582 (linux_resume_one_lwp): Reimplement as wrapper around
5583 linux_resume_one_lwp_throw that swallows errors if the LWP is
5584 gone.
5585
5586 2015-03-19 Pedro Alves <palves@redhat.com>
5587
5588 * linux-low.c (count_events_callback, select_event_lwp_callback):
5589 No longer check whether the thread has resume_stop as last resume
5590 kind.
5591
5592 2015-03-19 Pedro Alves <palves@redhat.com>
5593
5594 * linux-low.c (count_events_callback, select_event_lwp_callback):
5595 Use the lwp's status_pending_p field, not the thread's.
5596
5597 2015-03-19 Pedro Alves <palves@redhat.com>
5598
5599 * linux-low.c (select_event_lwp_callback): Update comments to
5600 no longer mention SIGTRAP.
5601
5602 2015-03-18 Gary Benson <gbenson@redhat.com>
5603
5604 * server.c (handle_query): Do not report vFile:fstat as supported.
5605
5606 2015-03-11 Gary Benson <gbenson@redhat.com>
5607
5608 * hostio.c (sys/types.h): New include.
5609 (sys/stat.h): Likewise.
5610 (common-remote-fileio.h): Likewise.
5611 (handle_fstat): New function.
5612 (handle_vFile): Handle vFile:fstat packets.
5613
5614 2015-03-11 Gary Benson <gbenson@redhat.com>
5615
5616 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5617 struct stat.st_blocks and struct stat.st_blksize.
5618 * configure: Regenerate.
5619 * config.in: Likewise.
5620 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5621 (OBS): Add common-remote-fileio.o.
5622 (common-remote-fileio.o): New rule.
5623
5624 2015-03-09 Pedro Alves <palves@redhat.com>
5625
5626 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5627 'struct sockaddr' pointer in 'accept' call.
5628
5629 2015-03-09 Pedro Alves <palves@redhat.com>
5630
5631 Revert:
5632 2015-03-07 Pedro Alves <palves@redhat.com>
5633 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5634 or <winsock2.h> here. Instead include "gdb_socket.h".
5635 (remote_open): Use union gdb_sockaddr_u.
5636 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5637 or <winsock2.h> here. Instead include "gdb_socket.h".
5638 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5639 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5640 or <sys/un.h>.
5641 (init_named_socket, gdb_agent_helper_thread): Use union
5642 gdb_sockaddr_u.
5643
5644 2015-03-07 Pedro Alves <palves@redhat.com>
5645
5646 * configure.ac (build_warnings): Move
5647 -Wdeclaration-after-statement to the C-specific set.
5648 * configure: Regenerate.
5649
5650 2015-03-07 Pedro Alves <palves@redhat.com>
5651
5652 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5653 or <winsock2.h> here. Instead include "gdb_socket.h".
5654 (remote_open): Use union gdb_sockaddr_u.
5655 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5656 or <winsock2.h> here. Instead include "gdb_socket.h".
5657 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5658 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5659 or <sys/un.h>.
5660 (init_named_socket, gdb_agent_helper_thread): Use union
5661 gdb_sockaddr_u.
5662
5663 2015-03-07 Pedro Alves <palves@redhat.com>
5664
5665 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5666 instead.
5667
5668 2015-03-06 Yao Qi <yao.qi@linaro.org>
5669
5670 * linux-aarch64-low.c (aarch64_insert_point): Use
5671 show_debug_regs as a boolean.
5672 (aarch64_remove_point): Likewise.
5673
5674 2015-03-05 Pedro Alves <palves@redhat.com>
5675
5676 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5677 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5678 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5679 * nto-low.c (nto_target_ops): Likewise.
5680 * spu-low.c (spu_target_ops): Likewise.
5681 * win32-low.c (win32_target_ops): Likewise.
5682
5683 2015-03-04 Pedro Alves <palves@redhat.com>
5684
5685 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5686 Decide whether a breakpoint triggered based on the SIGTRAP's
5687 siginfo.si_code.
5688 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5689 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5690 (linux_low_filter_event): Check for breakpoints before checking
5691 watchpoints.
5692 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5693 siginfo.si_code.
5694 (linux_stopped_by_sw_breakpoint)
5695 (linux_supports_stopped_by_sw_breakpoint)
5696 (linux_stopped_by_hw_breakpoint)
5697 (linux_supports_stopped_by_hw_breakpoint): New functions.
5698 (linux_target_ops): Install new target methods.
5699
5700 2015-03-04 Pedro Alves <palves@redhat.com>
5701
5702 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5703 * server.c (swbreak_feature, hwbreak_feature): New globals.
5704 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5705 (captured_main): Clear swbreak_feature and hwbreak_feature.
5706 * server.h (swbreak_feature, hwbreak_feature): Declare.
5707 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5708 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5709 supports_stopped_by_hw_breakpoint>: New fields.
5710 (target_supports_stopped_by_sw_breakpoint)
5711 (target_stopped_by_sw_breakpoint)
5712 (target_supports_stopped_by_hw_breakpoint)
5713 (target_stopped_by_hw_breakpoint): Declare.
5714
5715 2015-03-04 Pedro Alves <palves@redhat.com>
5716
5717 enum lwp_stop_reason -> enum target_stop_reason
5718 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5719 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5720 (linux_wait_1, stuck_in_jump_pad_callback)
5721 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5722 (linux_stopped_by_watchpoint):
5723 * linux-low.h (enum lwp_stop_reason): Delete.
5724 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5725 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5726
5727 2015-03-04 Yao Qi <yao.qi@linaro.org>
5728
5729 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5730
5731 2015-03-03 Gary Benson <gbenson@redhat.com>
5732
5733 * hostio.c (handle_vFile): Fix prefix lengths.
5734
5735 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5736
5737 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5738 ptr_bits.
5739
5740 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5741
5742 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5743 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5744 (clean): Add "rm -f" for above C files.
5745 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5746 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5747 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5748 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5749 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5750 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5751 (init_registers_s390x_vx_linux64)
5752 (init_registers_s390x_tevx_linux64)
5753 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5754 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5755 declarations.
5756 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5757 (s390_store_vxrs_high): New functions.
5758 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5759 NT_S390_VXRS_HIGH.
5760 (s390_arch_setup): Add logic for selecting one of the new target
5761 descriptions. Activate the new vector regsets if applicable.
5762 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5763 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5764 and init_registers_s390x_tevx_linux64.
5765
5766 2015-03-01 Pedro Alves <palves@redhat.com>
5767
5768 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5769 parameter.
5770
5771 2015-02-27 Pedro Alves <palves@redhat.com>
5772
5773 * linux-x86-low.c (u_debugreg_offset): New function.
5774 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5775
5776 2015-02-27 Pedro Alves <palves@redhat.com>
5777
5778 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5779 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5780 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5781 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5782 (ps_lsetfpregs, ps_getpid)
5783 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5784 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5785 (ps_lsetxregs, ps_plog): Declare.
5786
5787 2015-02-27 Pedro Alves <palves@redhat.com>
5788
5789 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5790 IP_AGENT_EXPORT_FUNC.
5791 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5792 IP_AGENT_EXPORT_FUNC.
5793 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5794 (IP_AGENT_EXPORT): Delete.
5795 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5796 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5797 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5798 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5799 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5800 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5801 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5802 (traceframe_read_count, traceframe_write_count)
5803 (traceframes_created, trace_state_variables, get_raw_reg)
5804 (get_trace_state_variable_value, set_trace_state_variable_value)
5805 (ust_loaded, helper_thread_id, cmd_buf): Use
5806 IPA_SYM_EXPORTED_NAME.
5807 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5808 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5809 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5810 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5811 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5812 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5813 EXTERN_C_PUSH/EXTERN_C_POP.
5814 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5815 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5816 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5817 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5818 (traceframe_write_count, traceframe_read_count)
5819 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5820 (about_to_request_buffer_space, get_trace_state_variable_value)
5821 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5822 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5823 EXTERN_C_PUSH/EXTERN_C_POP.
5824 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5825 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5826 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5827 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5828 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5829 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5830 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5831 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5832 Define.
5833 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5834 (IP_AGENT_EXPORT_VAR_DECL): Define.
5835 (tracing): Declare.
5836 (gdb_agent_get_raw_reg): Declare.
5837
5838 2015-02-27 Tom Tromey <tromey@redhat.com>
5839 Pedro Alves <palves@redhat.com>
5840
5841 Rename symbols whose names are reserved C++ keywords throughout.
5842
5843 2015-02-27 Pedro Alves <palves@redhat.com>
5844
5845 * Makefile.in (COMPILER): New, get it from autoconf.
5846 (CXX): Get from autoconf instead.
5847 (COMPILE.pre): Use COMPILER.
5848 (CC-LD): Rename to ...
5849 (CC_LD): ... this. Use COMPILER.
5850 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5851 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5852 * acinclude.m4: Include build-with-cxx.m4.
5853 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5854 Disable -Werror by default if building in C++ mode.
5855 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5856 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5857 the C++ compiler. Save/restore CXXFLAGS too.
5858 * configure: Regenerate.
5859
5860 2015-02-27 Pedro Alves <palves@redhat.com>
5861
5862 * acinclude.m4: Include libiberty.m4.
5863 * configure.ac: Call libiberty_INIT.
5864 * config.in, configure: Regenerate.
5865
5866 2015-02-26 Pedro Alves <palves@redhat.com>
5867
5868 * linux-low.c (linux_wait_1): When incrementing the PC past a
5869 program breakpoint always use the_low_target.breakpoint_len as
5870 increment, rather than the maximum between that and
5871 the_low_target.decr_pc_after_break.
5872
5873 2015-02-23 Pedro Alves <palves@redhat.com>
5874
5875 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5876 thread was doing a step-over; always adjust the PC if
5877 we stepped over a permanent breakpoint.
5878 (linux_wait_1): If we stepped over breakpoint that was on top of a
5879 permanent breakpoint, manually advance the PC past it.
5880
5881 2015-02-23 Pedro Alves <palves@redhat.com>
5882
5883 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5884 modes.
5885 (x86_fill_gregset, x86_store_gregset): Use it when handling
5886 $orig_eax.
5887
5888 2015-02-20 Pedro Alves <palves@redhat.com>
5889
5890 * thread-db.c: Include "nat/linux-procfs.h".
5891 (thread_db_init): Skip listing new threads if the kernel supports
5892 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5893
5894 2015-02-20 Pedro Alves <palves@redhat.com>
5895
5896 * linux-low.c (status_pending_p_callback): Use ptid_match.
5897
5898 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5899
5900 PR breakpoints/16812
5901 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5902 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5903 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5904
5905 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5906
5907 PR breakpoints/15956
5908 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5909
5910 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5911
5912 * linux-low.c (linux_low_btrace_conf): Print size.
5913 * server.c (handle_btrace_conf_general_set): New.
5914 (hanle_general_set): Call handle_btrace_conf_general_set.
5915 (handle_query): Report Qbtrace-conf:bts:size as supported.
5916
5917 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5918
5919 * linux-low.c (linux_low_enable_btrace): Update parameters.
5920 (linux_low_btrace_conf): New.
5921 (linux_target_ops)<to_btrace_conf>: Initialize.
5922 * server.c (current_btrace_conf): New.
5923 (handle_btrace_enable): Rename to ...
5924 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5925 to target_enable_btrace. Update comment. Update users.
5926 (handle_qxfer_btrace_conf): New.
5927 (qxfer_packets): Add btrace-conf entry.
5928 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5929 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5930 (target_ops)<read_btrace_conf>: New.
5931 (target_enable_btrace): Update parameters.
5932 (target_read_btrace_conf): New.
5933
5934 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5935
5936 * server.c (handle_btrace_general_set): Remove call to
5937 target_supports_btrace.
5938 (supported_btrace_packets): New.
5939 (handle_query): Call supported_btrace_packets.
5940 * target.h: include btrace-common.h.
5941 (btrace_target_info): Removed.
5942 (supports_btrace, target_supports_btrace): Update parameters.
5943
5944 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5945
5946 * Makefile.in (SFILES): Add common/btrace-common.c.
5947 (OBS): Add common/btrace-common.o.
5948 (btrace-common.o): Add build rules.
5949 * linux-low: Include btrace-common.h.
5950 (linux_low_read_btrace): Use struct btrace_data. Call
5951 btrace_data_init and btrace_data_fini.
5952
5953 2015-02-06 Pedro Alves <palves@redhat.com>
5954
5955 * thread-db.c (find_new_threads_callback): Add debug output.
5956
5957 2015-02-04 Pedro Alves <palves@redhat.com>
5958
5959 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5960 (resume_stopped_resumed_lwps): New function.
5961 (linux_wait_for_event_filtered): Use it.
5962
5963 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5964
5965 * Makefile.in (SFILES): Add linux-personality.c.
5966 (linux-personality.o): New rule.
5967 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5968 list of objects to be built.
5969 * linux-low.c: Include nat/linux-personality.h.
5970 (linux_create_inferior): Remove code to disable address space
5971 randomization (moved to ../nat/linux-personality.c). Create
5972 cleanup to disable address space randomization.
5973
5974 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5975
5976 * Makefile.in (posix-strerror.o): New rule.
5977 (mingw-strerror.o): Likewise.
5978 * configure: Regenerated.
5979 * configure.ac: Source file ../common/common.host. Initialize new
5980 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5981
5982 2015-01-14 Yao Qi <yao@codesourcery.com>
5983
5984 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5985 (ppc-linux.o): New rule.
5986 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5987 * configure.ac: AC_CHECK_FUNCS(getauxval).
5988 * config.in: Re-generated.
5989 * configure: Re-generated.
5990 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5991 ppc64_64bit_inferior_p
5992
5993 2015-01-14 Yao Qi <yao@codesourcery.com>
5994
5995 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5996 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5997 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5998 (PT_ORIG_R3, PT_TRAP): Likewise.
5999 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6000 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6001 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6002
6003 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6004
6005 * i387-fp.c (i387_cache_to_xsave): In look over
6006 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6007 zmmh_low_space field by use of zmmh_high_space.
6008
6009 2015-01-09 Pedro Alves <palves@redhat.com>
6010
6011 * linux-low.c (step_over_bkpt): Move higher up in the file.
6012 (handle_extended_wait): Don't store the stop_pc here.
6013 (get_stop_pc): Adjust comments and rename to ...
6014 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6015 stopped for a software breakpoint or hardware breakpoint.
6016 (thread_still_has_status_pending_p): New function.
6017 (status_pending_p_callback): Use
6018 thread_still_has_status_pending_p. If the event is no longer
6019 interesting, resume the LWP.
6020 (handle_tracepoints): Add assert.
6021 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6022 (wstatus_maybe_breakpoint): New function.
6023 (cancel_breakpoint): Delete function.
6024 (check_stopped_by_watchpoint): New function, factored out from
6025 linux_low_filter_event.
6026 (lp_status_maybe_breakpoint): Delete function.
6027 (linux_low_filter_event): Remove filter_ptid argument.
6028 Leave thread group exits pending here. Store the LWP's stop PC.
6029 Always leave events pending.
6030 (linux_wait_for_event_filtered): Pull all events out of the
6031 kernel, and leave them all pending.
6032 (count_events_callback, select_event_lwp_callback): Consider all
6033 events.
6034 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6035 (select_event_lwp): Only give preference to the stepping LWP in
6036 all-stop mode. Adjust comments.
6037 (ignore_event): New function.
6038 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6039 references to cancel_breakpoints. Adjust to renames. Also give
6040 equal priority to all LWPs that have had events in non-stop mode.
6041 If reporting a software breakpoint event, unadjust the LWP's PC.
6042 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6043 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6044 Adjust.
6045 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6046 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6047 (linux_stopped_by_watchpoint): Adjust.
6048 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6049 * linux-low.h (enum lwp_stop_reason): New.
6050 (struct lwp_info) <stop_pc>: Adjust comment.
6051 <stopped_by_watchpoint>: Delete field.
6052 <stop_reason>: New field.
6053 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6054 * mem-break.c (software_breakpoint_inserted_here)
6055 (hardware_breakpoint_inserted_here): New function.
6056 * mem-break.h (software_breakpoint_inserted_here)
6057 (hardware_breakpoint_inserted_here): Declare.
6058 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6059 (cancel_breakpoints): Delete.
6060 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6061 (upload_fast_traceframes): Remove references to
6062 cancel_breakpoints.
6063
6064 2015-01-09 Pedro Alves <palves@redhat.com>
6065
6066 * thread-db.c (find_new_threads_callback): Ignore thread if the
6067 kernel thread ID is -1.
6068
6069 2015-01-09 Pedro Alves <palves@redhat.com>
6070
6071 * linux-low.c (linux_attach_fail_reason_string): Move to
6072 nat/linux-ptrace.c, and rename.
6073 (linux_attach_lwp): Update comment.
6074 (attach_proc_task_lwp_callback): New function.
6075 (linux_attach): Adjust to rename and use
6076 linux_proc_attach_tgid_threads.
6077 (linux_attach_fail_reason_string): Delete declaration.
6078
6079 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6080
6081 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6082 * server.c (gdbserver_version): Likewise.
6083
6084 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6085
6086 * remote-utils.c: Include ctype.h.
6087 (input_interrupt): Explicitly handle the case when the char
6088 received is the NUL byte. Improve the printing of non-ASCII
6089 characters.
6090
6091 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6092
6093 * linux-low.c (linux_low_filter_event): Update call to
6094 linux_enable_event_reporting following the addition of
6095 a new parameter to that function.
6096
6097 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6098
6099 PR server/17457
6100 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6101 (AARCH64_FPCR_REGNO): Likewise.
6102 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6103 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6104 (aarch64_store_fpregset): Likewise.
6105
6106 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6107
6108 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6109 Remove FIXME comment about assumption about N.
6110
6111 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6112
6113 * configure.ac: If large-file support is disabled in GDBserver,
6114 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6115 * configure: Regenerate.
6116
6117 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6118
6119 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6120 warning upon ENODATA from ptrace.
6121 * linux-s390-low.c (s390_store_tdb): New.
6122 (s390_regsets): Add regset for NT_S390_TDB.
6123
6124 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6125
6126 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6127 without a fill_function.
6128 * linux-s390-low.c (s390_fill_last_break): Remove.
6129 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6130 (s390_arch_setup): Use regset's size instead of fill_function for
6131 loop end condition.
6132
6133 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6134
6135 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6136 the regset's store function when ptrace returned an error.
6137 * regcache.c (get_thread_regcache): Invalidate register cache
6138 before fetching inferior's registers.
6139
6140 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6141
6142 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6143 while-loop as for-loop.
6144 (regsets_store_inferior_registers): Likewise.
6145
6146 2014-11-28 Yao Qi <yao@codesourcery.com>
6147
6148 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6149 * config.in, configure: Re-generate.
6150 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6151 is defined.
6152
6153 2014-11-21 Yao Qi <yao@codesourcery.com>
6154
6155 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6156 (AC_CHECK_HEADERS): Remove malloc.h.
6157 * configure: Re-generated.
6158 * config.in: Re-generated.
6159 * server.h: Don't include alloca.h and malloc.h.
6160 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6161 Don't include malloc.h.
6162
6163 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6164
6165 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6166 corresponding ERRNO check in same block.
6167
6168 2014-11-12 Pedro Alves <palves@redhat.com>
6169
6170 * server.c (cont_thread): Update comment.
6171 (start_inferior, attach_inferior): No longer clear cont_thread.
6172 (handle_v_cont): No longer set cont_thread.
6173 (captured_main): Clear cont_thread each time a GDB connects.
6174
6175 2014-11-12 Pedro Alves <palves@redhat.com>
6176
6177 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6178 thread, and don't resume all threads if the Hc thread has exited.
6179
6180 2014-11-12 Pedro Alves <palves@redhat.com>
6181
6182 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6183 the process group instead of to a specific LWP.
6184
6185 2014-10-15 Pedro Alves <palves@redhat.com>
6186
6187 PR server/17487
6188 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6189 parameter.
6190 (arm_set_thread_context): Delete.
6191 (the_low_target): Adjust.
6192 * win32-i386-low.c (debug_registers_changed)
6193 (debug_registers_used): Delete.
6194 (update_debug_registers_callback): New function.
6195 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6196 needing to update their debug registers.
6197 (win32_get_current_dr): New function.
6198 (x86_dr_low_get_addr, x86_dr_low_get_control)
6199 (x86_dr_low_get_status): Fetch the debug register from the thread
6200 record's context.
6201 (i386_initial_stuff): Adjust.
6202 (i386_get_thread_context): Remove current_event parameter. Don't
6203 clear debug_registers_changed nor copy DR values to
6204 debug_reg_state.
6205 (i386_set_thread_context): Delete.
6206 (i386_prepare_to_resume): New function.
6207 (i386_thread_added): Mark the thread as needing to update irs
6208 debug registers.
6209 (the_low_target): Remove i386_set_thread_context and install
6210 i386_prepare_to_resume.
6211 * win32-low.c (win32_get_thread_context): Adjust.
6212 (win32_set_thread_context): Use SetThreadContext
6213 directly.
6214 (win32_prepare_to_resume): New function.
6215 (win32_require_context): New function, factored out from ...
6216 (thread_rec): ... this.
6217 (continue_one_thread): Call win32_prepare_to_resume on each thread
6218 we're about to continue.
6219 (win32_resume): Call win32_prepare_to_resume on the event thread.
6220 * win32-low.h (struct win32_thread_info)
6221 <debug_registers_changed>: New field.
6222 (struct win32_target_ops): Change prototype of set_thread_context,
6223 delete set_thread_context and add prepare_to_resume.
6224 (win32_require_context): New declaration.
6225
6226 2014-10-08 Gary Benson <gbenson@redhat.com>
6227
6228 * server.h: Do not include common-exceptions.h.
6229
6230 2014-10-08 Gary Benson <gbenson@redhat.com>
6231
6232 * server.h: Do not include cleanups.h.
6233
6234 2014-09-30 James Hogan <james.hogan@imgtec.com>
6235
6236 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6237 mips64-dsp-linux.c.
6238
6239 2014-09-23 Yao Qi <yao@codesourcery.com>
6240
6241 * linux-low.c (lp_status_maybe_breakpoint): New function.
6242 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6243 (count_events_callback): Likewise.
6244 (select_event_lwp_callback): Likewise.
6245 (cancel_breakpoints_callback): Likewise.
6246
6247 2014-09-19 Don Breazeal <donb@codesourcery.com>
6248
6249 * linux-low.c (handle_extended_wait): Call
6250 linux_ptrace_get_extended_event.
6251 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6252 linux_is_extended_waitstatus.
6253
6254 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6255
6256 * Makefile.in (CPPFLAGS): Define.
6257 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6258 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6259
6260 2014-09-16 Gary Benson <gbenson@redhat.com>
6261
6262 * inferiors.h (current_inferior): Renamed as...
6263 (current_thread): New variable. All uses updated.
6264 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6265 (maybe_move_out_of_jump_pad): Likewise.
6266 (cancel_breakpoint): Likewise.
6267 (linux_low_filter_event): Likewise.
6268 (wait_for_sigstop): Likewise.
6269 (linux_resume_one_lwp): Likewise.
6270 (need_step_over_p): Likewise.
6271 (start_step_over): Likewise.
6272 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6273 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6274 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6275 and save_inferior as saved_thread.
6276 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6277 saved_thread.
6278 (regcache_invalidate_thread): Likewise.
6279 * remote-utils.c (prepare_resume_reply): Likewise.
6280 * thread-db.c (thread_db_get_tls_address): Likewise.
6281 (disable_thread_event_reporting): Likewise.
6282 (remove_thread_event_breakpoints): Likewise.
6283 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6284 as saved_thread.
6285 * target.h (set_desired_inferior): Renamed as...
6286 (set_desired_thread): New declaration. All uses updated.
6287 * server.c (myresume): Updated comment to reference thread instead
6288 of inferior.
6289 (handle_serial_event): Likewise.
6290 (handle_target_event): Likewise.
6291
6292 2014-09-12 Tom Tromey <tromey@redhat.com>
6293 Gary Benson <gbenson@redhat.com>
6294
6295 * regcache.h: Include common-regcache.h.
6296 (regcache_read_pc): Don't declare.
6297 * regcache.c (get_thread_regcache_for_ptid): New function.
6298
6299 2014-09-11 Tom Tromey <tromey@redhat.com>
6300 Gary Benson <gbenson@redhat.com>
6301
6302 * symbol.c: New file.
6303 * Makefile.in (SFILES): Add symbol.c.
6304 (OBS): Add symbol.o.
6305
6306 2014-09-11 Gary Benson <gbenson@redhat.com>
6307
6308 * target.c (target_stop_ptid, target_continue_ptid): New
6309 functions.
6310
6311 2014-09-11 Tom Tromey <tromey@redhat.com>
6312 Gary Benson <gbenson@redhat.com>
6313
6314 * target.h: Include target/target.h.
6315 * target.c (target_read_memory, target_read_uint32)
6316 (target_write_memory): New functions.
6317
6318 2014-09-11 Gary Benson <gbenson@redhat.com>
6319
6320 * server.h (debug_hw_points): Don't declare.
6321 * server.c (debug_hw_points): Don't define. Replace all uses
6322 with show_debug_regs.
6323 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6324 all uses with show_debug_regs.
6325
6326 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6327
6328 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6329 endianness into account.
6330 (ppc_supply_ptrace_register): Likewise.
6331
6332 2014-09-03 James Hogan <james.hogan@imgtec.com>
6333
6334 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6335 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6336
6337 2014-09-03 Gary Benson <gbenson@redhat.com>
6338
6339 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6340 ALL_DEBUG_ADDRESS_REGISTERS.
6341
6342 2014-09-02 Gary Benson <gbenson@redhat.com>
6343
6344 * i386-low.h: Renamed as...
6345 * x86-low.h: New file. All type, function and variable name
6346 prefixes changed from "i386_" to "x86_". All references updated.
6347 * i386-low.c: Renamed as...
6348 * x86-low.c: New file. All type, function and variable name
6349 prefixes changed from "i386_" to "x86_". All references updated.
6350
6351 2014-09-02 Gary Benson <gbenson@redhat.com>
6352
6353 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6354 (x86_linux_new_thread): Likewise.
6355
6356 2014-08-29 Gary Benson <gbenson@redhat.com>
6357
6358 * server.h (setjmp.h): Do not include.
6359 (toplevel): Do not declare.
6360 (common-exceptions.h): Include.
6361 (cleanups.h): Likewise.
6362 * server.c (toplevel): Do not define.
6363 (exit_code): New static global.
6364 (detach_or_kill_for_exit_cleanup): New function.
6365 (main): New function. Original main renamed to...
6366 (captured_main): New function.
6367 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6368
6369 2014-08-29 Gary Benson <gbenson@redhat.com>
6370
6371 * Makefile.in (SFILES): Add common/common-exceptions.c.
6372 (OBS): Add common-exceptions.o.
6373 (common-exceptions.o): New rule.
6374 * utils.c (prepare_to_throw_exception): New function.
6375
6376 2014-08-29 Gary Benson <gbenson@redhat.com>
6377
6378 * config.in: Regenerate.
6379 * configure: Likewise.
6380
6381 2014-08-29 Gary Benson <gbenson@redhat.com>
6382
6383 * Makefile.in (SFILES): Add common/cleanups.c.
6384 (OBS): cleanups.o.
6385 (cleanups.o): New rule.
6386
6387 2014-08-29 Gary Benson <gbenson@redhat.com>
6388
6389 * utils.c (internal_vwarning): New function.
6390
6391 2014-08-28 Gary Benson <gbenson@redhat.com>
6392
6393 * utils.h (fatal): Remove declaration.
6394 * utils.c (fatal): Remove function.
6395
6396 2014-08-28 Gary Benson <gbenson@redhat.com>
6397
6398 * tracepoint.c (gdb_agent_init): Replace fatal with
6399 perror_with_name.
6400 (initialize_tracepoint): Likewise.
6401
6402 2014-08-28 Gary Benson <gbenson@redhat.com>
6403
6404 * remote-utils.c (remote_prepare): Replace fatal with error.
6405
6406 2014-08-28 Gary Benson <gbenson@redhat.com>
6407
6408 * linux-low.c (linux_async): Replace fatal with warning.
6409 Tidy up and return.
6410 (linux_start_non_stop): Return -1 if linux_async failed.
6411
6412 2014-08-28 Gary Benson <gbenson@redhat.com>
6413
6414 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6415 gdb_assert.
6416 (i386_dr_low_get_addr): Remove vague comment.
6417 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6418 gdb_assert.
6419
6420 2014-08-28 Gary Benson <gbenson@redhat.com>
6421
6422 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6423 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6424 internal_error.
6425 (linux_resume_one_lwp): Likewise.
6426 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6427 gdb_assert.
6428 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6429 with internal_error.
6430 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6431 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6432 (find_register_by_name): Replace fatal with internal_error.
6433 (find_regno): Likewise.
6434 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6435 * thread-db.c (thread_db_create_event): Likewise.
6436 (thread_db_load_search): Likewise.
6437 (try_thread_db_load_1): Likewise.
6438 * tracepoint.c (get_jump_space_head): Replace fatal with
6439 internal_error.
6440 (claim_trampoline_space): Likewise.
6441 (have_fast_tracepoint_trampoline_buffer): Likewise.
6442 (cmd_qtstart): Likewise.
6443 (stop_tracing): Likewise.
6444 (fast_tracepoint_collecting): Likewise.
6445 (target_malloc): Likewise.
6446 (download_tracepoint): Likewise.
6447 (download_trace_state_variables): Replace check with gdb_assert.
6448 (upload_fast_traceframes): Replace fatal with internal_error.
6449
6450 2014-08-19 Tom Tromey <tromey@redhat.com>
6451 Gary Benson <gbenson@redhat.com>
6452
6453 * Makefile.in (SFILES): Add common/common-debug.c.
6454 (OBS): Add common-debug.o.
6455 (common-debug.o): New rule.
6456 * debug.h (debug_printf): Don't declare.
6457 * debug.c (debug_printf): Renamed and rewritten as...
6458 (debug_vprintf): New function.
6459
6460 2014-08-19 Gary Benson <gbenson@redhat.com>
6461
6462 * utils.h: Do not include print-utils.h.
6463
6464 2014-08-19 Tom Tromey <tromey@redhat.com>
6465 Gary Benson <gbenson@redhat.com>
6466
6467 * server.h: Add static assertion.
6468 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6469
6470 2014-08-19 Tom Tromey <tromey@redhat.com>
6471 Gary Benson <gbenson@redhat.com>
6472
6473 * Makefile.in (SFILES): Add common/errors.c.
6474 (OBS): Add errors.o.
6475 (IPA_OBS): Add errors-ipa.o.
6476 (errors.o): New rule.
6477 (errors-ipa.o): Likewise.
6478 * utils.h (perror_with_name, error, warning): Don't declare.
6479 * utils.c (warning): Renamed and rewritten as...
6480 (vwarning): New function.
6481 (error): Renamed and rewritten as...
6482 (verror): New function.
6483 (internal_error): Renamed and rewritten as...
6484 (internal_verror): New function.
6485
6486 2014-08-07 Gary Benson <gbenson@redhat.com>
6487
6488 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6489 * configure: Regenerate.
6490 * config.in: Likewise.
6491 * server.h: Do not include errno.h.
6492 * event-loop.c: Likewise.
6493 * hostio-errno.c: Likewise.
6494 * linux-low.c: Likewise.
6495 * remote-utils.c: Likewise.
6496 * spu-low.c: Likewise.
6497 * utils.c: Likewise.
6498 * gdbreplay.c: Unconditionally include errno.h.
6499
6500 2014-08-07 Gary Benson <gbenson@redhat.com>
6501
6502 * server.h: Do not include string.h.
6503 * event-loop.c: Likewise.
6504 * linux-low.c: Likewise.
6505 * regcache.c: Likewise.
6506 * remote-utils.c: Likewise.
6507 * spu-low.c: Likewise.
6508 * utils.c: Likewise.
6509
6510 2014-08-07 Gary Benson <gbenson@redhat.com>
6511
6512 * server.h: Do not include gdb_assert.h.
6513
6514 2014-08-07 Gary Benson <gbenson@redhat.com>
6515
6516 * server.h: Do not include common-utils.h.
6517
6518 2014-08-07 Gary Benson <gbenson@redhat.com>
6519
6520 * server.h: Do not include ptid.h.
6521 * notif.h: Likewise.
6522
6523 2014-08-07 Gary Benson <gbenson@redhat.com>
6524
6525 * server.h: Do not include gdb_locale.h.
6526
6527 2014-08-07 Gary Benson <gbenson@redhat.com>
6528
6529 * server.h: Do not include gdb/signals.h.
6530 * win32-low.c: Likewise.
6531
6532 2014-08-07 Gary Benson <gbenson@redhat.com>
6533
6534 * server.h: Do not include pathmax.h.
6535
6536 2014-08-07 Gary Benson <gbenson@redhat.com>
6537
6538 * server.h: Do not include libiberty.h.
6539 * linux-bfin-low.c: Likewise.
6540
6541 2014-08-07 Gary Benson <gbenson@redhat.com>
6542
6543 * server.h: Do not include ansidecl.h.
6544
6545 2014-08-07 Gary Benson <gbenson@redhat.com>
6546
6547 * linux-x86-low.c: Do not include stddef.h.
6548 * lynx-ppc-low.c: Likewise.
6549 * tracepoint.c: Likewise.
6550
6551 2014-08-07 Gary Benson <gbenson@redhat.com>
6552
6553 * server.h: Do not include stdarg.h.
6554 * nto-low.c: Likewise.
6555
6556 2014-08-07 Gary Benson <gbenson@redhat.com>
6557
6558 * server.h: Do not include stdlib.h.
6559 * inferiors.c: Likewise.
6560 * linux-low.c: Likewise.
6561 * regcache.c: Likewise.
6562 * spu-low.c: Likewise.
6563 * tracepoint.c: Likewise.
6564 * utils.c: Likewise.
6565
6566 2014-08-07 Gary Benson <gbenson@redhat.com>
6567
6568 * server.h: Do not include stdio.h.
6569 * linux-low.c: Likewise.
6570 * remote-utils.c: Likewise.
6571 * spu-low.c: Likewise.
6572 * utils.c: Likewise.
6573 * wincecompat.c: Likewise.
6574
6575 2014-08-06 Gary Benson <gbenson@redhat.com>
6576
6577 * regcache.c (init_register_cache): Move conditionals inside if.
6578
6579 2014-08-06 Gary Benson <gbenson@redhat.com>
6580
6581 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6582
6583 2014-07-31 Gary Benson <gbenson@redhat.com>
6584
6585 * ax.h: Do not include server.h.
6586 * gdbthread.h: Likewise.
6587 * lynx-low.h: Likewise.
6588 * notif.h: Likewise.
6589
6590 2014-07-30 Gary Benson <gbenson@redhat.com>
6591
6592 * server.h: Include common-defs.h.
6593 Do not include config.h or build-gnulib-gdbserver/config.h.
6594
6595 2014-07-30 Gary Benson <gbenson@redhat.com>
6596
6597 * hostio-errno.c: Move server.h to top of includes list.
6598 * inferiors.c: Likewise.
6599 * linux-x86-low.c: Likewise.
6600 * notif.c: Include server.h.
6601
6602 2014-07-24 Tom Tromey <tromey@redhat.com>
6603 Gary Benson <gbenson@redhat.com>
6604
6605 * server.h (CORE_ADDR): Now unsigned.
6606
6607 2014-07-16 Pedro Alves <palves@redhat.com>
6608
6609 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6610
6611 2014-07-15 Pedro Alves <palves@redhat.com>
6612
6613 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6614 copy.
6615
6616 2014-07-11 Pedro Alves <palves@redhat.com>
6617
6618 * linux-low.c (kill_wait_lwp): New function, based on
6619 kill_one_lwp_callback, but use my_waitpid directly.
6620 (kill_one_lwp_callback, linux_kill): Use it.
6621
6622 2014-06-23 Pedro Alves <palves@redhat.com>
6623
6624 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6625 before setting DR0..DR3.
6626
6627 2014-06-20 Gary Benson <gbenson@redhat.com>
6628
6629 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6630 * configure: Regenerated.
6631 * config.in: Likewise.
6632
6633 2014-06-20 Gary Benson <gbenson@redhat.com>
6634
6635 * Makefile.in (SFILES): Update locations for files moved
6636 from common to nat.
6637 (object file files): Reordered.
6638
6639 2014-06-20 Gary Benson <gbenson@redhat.com>
6640
6641 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6642 (i386_dr_low_set_addr): Likewise.
6643 (i386_dr_low_get_addr): Likewise.
6644 (i386_dr_low_can_set_control): Likewise.
6645 (i386_dr_low_set_control): Likewise.
6646 (i386_dr_low_get_control): Likewise.
6647 (i386_dr_low_get_status): Likewise.
6648 (i386_get_debug_register_length): Likewise.
6649 * linux-x86-low.c (i386_dr_low_set_addr):
6650 Changed signature. Made static.
6651 (i386_dr_low_get_addr): Likewise.
6652 (i386_dr_low_set_control): Likewise.
6653 (i386_dr_low_get_control): Likewise.
6654 (i386_dr_low_get_status): Likewise.
6655 (i386_dr_low): New global variable.
6656 * win32-i386-low.c (i386_dr_low_set_addr):
6657 Changed signature. Made static.
6658 (i386_dr_low_get_addr): Likewise.
6659 (i386_dr_low_set_control): Likewise.
6660 (i386_dr_low_get_control): Likewise.
6661 (i386_dr_low_get_status): Likewise.
6662 (i386_dr_low): New global variable.
6663
6664 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6665
6666 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6667 * Makefile.in (AR, AR_FLAGS): Define.
6668 * configure: Regenerate.
6669
6670 2014-06-19 Gary Benson <gbenson@redhat.com>
6671
6672 * Makefile.in (i386-dregs.o): New rule.
6673 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6674 * i386-low.c (target.h): Remove include.
6675 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6676 (DR_CONTROL_SHIFT): Likewise.
6677 (DR_CONTROL_SIZE): Likewise.
6678 (DR_RW_EXECUTE): Likewise.
6679 (DR_RW_WRITE): Likewise.
6680 (DR_RW_READ): Likewise.
6681 (DR_RW_IORW): Likewise.
6682 (DR_LEN_1): Likewise.
6683 (DR_LEN_2): Likewise.
6684 (DR_LEN_4): Likewise.
6685 (DR_LEN_8): Likewise.
6686 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6687 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6688 (DR_ENABLE_SIZE): Likewise.
6689 (DR_LOCAL_SLOWDOWN): Likewise.
6690 (DR_GLOBAL_SLOWDOWN): Likewise.
6691 (DR_CONTROL_RESERVED): Likewise.
6692 (I386_DR_CONTROL_MASK): Likewise.
6693 (I386_DR_VACANT): Likewise.
6694 (I386_DR_LOCAL_ENABLE): Likewise.
6695 (I386_DR_GLOBAL_ENABLE): Likewise.
6696 (I386_DR_DISABLE): Likewise.
6697 (I386_DR_SET_RW_LEN): Likewise.
6698 (I386_DR_GET_RW_LEN): Likewise.
6699 (I386_DR_WATCH_HIT): Likewise.
6700 (i386_wp_op_t): Likewise.
6701 (i386_show_dr): Likewise.
6702 (i386_length_and_rw_bits): Likewise.
6703 (i386_insert_aligned_watchpoint): Likewise.
6704 (i386_remove_aligned_watchpoint): Likewise.
6705 (i386_handle_nonaligned_watchpoint): Likewise.
6706 i386_update_inferior_debug_regs(): Likewise.
6707 (i386_dr_insert_watchpoint): Likewise.
6708 (i386_dr_remove_watchpoint): Likewise.
6709 (i386_dr_region_ok_for_watchpoint): Likewise.
6710 (i386_dr_stopped_data_address): Likewise.
6711 (i386_dr_stopped_by_watchpoint): Likewise.
6712
6713 2014-06-19 Gary Benson <gbenson@redhat.com>
6714
6715 * i386-low.c (i386_dr_show): Renamed to
6716 i386_show_dr and made static. All uses updated.
6717 (i386_dr_length_and_rw_bits): Renamed to
6718 i386_length_and_rw_bits and made static.
6719 All uses updated.
6720 (i386_dr_insert_aligned_watchpoint): Renamed to
6721 i386_insert_aligned_watchpoint and made static.
6722 All uses updated.
6723 (i386_dr_remove_aligned_watchpoint): Renamed to
6724 i386_remove_aligned_watchpoint and made static.
6725 All uses updated.
6726 (i386_dr_update_inferior_debug_regs): Renamed to
6727 i386_update_inferior_debug_regs and made static.
6728 All uses updated.
6729
6730 2014-06-18 Gary Benson <gbenson@redhat.com>
6731
6732 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6733 (i386_dr_low_can_set_control): Likewise.
6734 (i386_get_debug_register_length): Likewise.
6735 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6736 (i386_dr_low_can_set_control): Likewise.
6737 (i386_get_debug_register_length): Likewise.
6738
6739 2014-06-17 Gary Benson <gbenson@redhat.com>
6740
6741 * i386-low.h (i386-dregs.h): New include.
6742 (DR_FIRSTADDR): Now in i386-dregs.h.
6743 (DR_LASTADDR): Likewise.
6744 (DR_NADDR): Likewise.
6745 (DR_STATUS): Likewise.
6746 (DR_CONTROL): Likewise.
6747 (i386_debug_reg_state): Likewise.
6748 (i386_dr_insert_watchpoint): Likewise.
6749 (i386_dr_remove_watchpoint): Likewise.
6750 (i386_dr_region_ok_for_watchpoint): Likewise.
6751 (i386_dr_stopped_data_address): Likewise.
6752 (i386_dr_stopped_by_watchpoint): Likewise.
6753 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6754
6755 2014-06-18 Gary Benson <gbenson@redhat.com>
6756
6757 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6758 i386_dr_insert_watchpoint.
6759 (i386_low_remove_watchpoint): Renamed to
6760 i386_dr_remove_watchpoint.
6761 (i386_low_region_ok_for_watchpoint): Renamed to
6762 i386_dr_region_ok_for_watchpoint.
6763 (i386_low_stopped_data_address): Renamed to
6764 i386_dr_stopped_data_address.
6765 (i386_low_stopped_by_watchpoint): Renamed to
6766 i386_dr_stopped_by_watchpoint.
6767 * i386-low.c (i386_show_dr): Renamed to
6768 i386_dr_show and made nonstatic. All uses updated.
6769 (i386_length_and_rw_bits): Renamed to
6770 i386_dr_length_and_rw_bits and made nonstatic.
6771 All uses updated.
6772 (i386_insert_aligned_watchpoint): Renamed to
6773 i386_dr_insert_aligned_watchpoint and made nonstatic.
6774 All uses updated.
6775 (i386_remove_aligned_watchpoint): Renamed to
6776 i386_dr_remove_aligned_watchpoint and made nonstatic.
6777 All uses updated.
6778 (i386_update_inferior_debug_regs): Renamed to
6779 i386_dr_update_inferior_debug_regs and made nonstatic.
6780 All uses updated.
6781 (i386_low_insert_watchpoint): Renamed to
6782 i386_dr_insert_watchpoint. All uses updated.
6783 (i386_low_remove_watchpoint): Renamed to
6784 i386_dr_remove_watchpoint. All uses updated.
6785 (i386_low_region_ok_for_watchpoint): Renamed to
6786 i386_dr_region_ok_for_watchpoint. All uses updated.
6787 (i386_low_stopped_data_address): Renamed to
6788 i386_dr_stopped_data_address. All uses updated.
6789 (i386_low_stopped_by_watchpoint): Renamed to
6790 i386_dr_stopped_by_watchpoint. All uses updated.
6791
6792 2014-06-18 Gary Benson <gbenson@redhat.com>
6793
6794 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6795 (i386_dr_low_can_set_control): Likewise.
6796 (i386_insert_aligned_watchpoint): New check.
6797
6798 2014-06-18 Gary Benson <gbenson@redhat.com>
6799
6800 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6801 Renamed to state.
6802
6803 2014-06-18 Gary Benson <gbenson@redhat.com>
6804
6805 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6806 instead of fatal and error.
6807 (i386_handle_nonaligned_watchpoint): Likewise.
6808
6809 2014-06-18 Gary Benson <gbenson@redhat.com>
6810
6811 * i386-low.c (i386_get_debug_register_length): New macro.
6812 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6813 (i386_show_dr): Use debug_printf instead of fprintf. Use
6814 phex to format values.
6815
6816 2014-06-18 Gary Benson <gbenson@redhat.com>
6817
6818 * i386-low.h: Comment changes.
6819 * i386-low.c: Likewise.
6820
6821 2014-06-18 Gary Benson <gbenson@redhat.com>
6822
6823 * i386-low.c: Whitespace changes.
6824
6825 2014-06-12 Tom Tromey <tromey@redhat.com>
6826
6827 * utils.c (freeargv): Remove.
6828
6829 2014-06-12 Tom Tromey <tromey@redhat.com>
6830
6831 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6832 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6833 (parse_debug_format_options): Likewise.
6834 (gdbserver_usage): Likewise.
6835 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6836 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6837 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6838 against libiberty.
6839 ($(LIBGNU)): Depend on libiberty.
6840 (all-lib): Recurse into all subdirs.
6841 (install-only): Invoke "install" target in subdirs.
6842 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6843 targets.
6844 * configure: Rebuild.
6845 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6846 for vasprintf, vsnprintf, or gettimeofday.
6847 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6848 srv_tgtobj.
6849
6850 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6851
6852 * development.sh: Delete.
6853 * Makefile.in (config.status): Adjust dependency on development.sh.
6854 * configure.ac: Adjust development.sh source call.
6855 * configure: Regenerate.
6856
6857 2014-06-02 Pedro Alves <palves@redhat.com>
6858
6859 * ax.c (gdb_free_agent_expr): New function.
6860 * ax.h (gdb_free_agent_expr): New declaration.
6861 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6862 list.
6863 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6864 static.
6865 (clear_breakpoint_conditions_and_commands): New function.
6866 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6867 (clear_breakpoint_conditions_and_commands): New declaration.
6868
6869 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6870
6871 * linux-aarch64-low.c (asm/ptrace.h): Include.
6872
6873 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6874
6875 Fix TLS access for -static -pthread.
6876 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6877 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6878 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6879
6880 2014-05-20 Pedro Alves <palves@redhat.com>
6881
6882 * linux-aarch64-low.c (aarch64_insert_point)
6883 (aarch64_remove_point): No longer check whether the type is
6884 supported here. Adjust to new interface.
6885 (the_low_target): Install aarch64_supports_z_point_type as
6886 supports_z_point_type method.
6887 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6888 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6889 instead of a Z packet char. Adjust.
6890 (arm_supports_z_point_type): New function.
6891 (arm_insert_point, arm_remove_point): Adjust to new interface.
6892 (the_low_target): Install arm_supports_z_point_type.
6893 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6894 (cris_insert_point, cris_remove_point): Adjust to new interface.
6895 Don't check whether the type is supported here.
6896 (the_low_target): Install cris_supports_z_point_type.
6897 * linux-low.c (linux_supports_z_point_type): New function.
6898 (linux_insert_point, linux_remove_point): Adjust to new interface.
6899 * linux-low.h (struct linux_target_ops) <insert_point,
6900 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6901 raw_breakpoint pointer parameter.
6902 <supports_z_point_type>: New method.
6903 * linux-mips-low.c (mips_supports_z_point_type): New function.
6904 (mips_insert_point, mips_remove_point): Adjust to new interface.
6905 Use mips_supports_z_point_type.
6906 (the_low_target): Install mips_supports_z_point_type.
6907 * linux-ppc-low.c (the_low_target): Install NULL as
6908 supports_z_point_type method.
6909 * linux-s390-low.c (the_low_target): Install NULL as
6910 supports_z_point_type method.
6911 * linux-sparc-low.c (the_low_target): Install NULL as
6912 supports_z_point_type method.
6913 * linux-x86-low.c (x86_supports_z_point_type): New function.
6914 (x86_insert_point): Adjust to new insert_point interface. Use
6915 insert_memory_breakpoint. Adjust to new
6916 i386_low_insert_watchpoint interface.
6917 (x86_remove_point): Adjust to remove_point interface. Use
6918 remove_memory_breakpoint. Adjust to new
6919 i386_low_remove_watchpoint interface.
6920 (the_low_target): Install x86_supports_z_point_type.
6921 * lynx-low.c (lynx_target_ops): Install NULL as
6922 supports_z_point_type callback.
6923 * nto-low.c (nto_supports_z_point_type): New.
6924 (nto_insert_point, nto_remove_point): Adjust to new interface.
6925 (nto_target_ops): Install nto_supports_z_point_type.
6926 * mem-break.c: Adjust intro comment.
6927 (struct raw_breakpoint) <raw_type, size>: New fields.
6928 <inserted>: Update comment.
6929 <shlib_disabled>: Delete field.
6930 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6931 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6932 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6933 (raw_bkpt_type_to_target_hw_bp_type): New function.
6934 (find_enabled_raw_code_breakpoint_at): New function.
6935 (find_raw_breakpoint_at): New type and size parameters. Use them.
6936 (insert_memory_breakpoint): New function, based off
6937 set_raw_breakpoint_at.
6938 (remove_memory_breakpoint): New function.
6939 (set_raw_breakpoint_at): Reimplement.
6940 (set_breakpoint): New, based on set_breakpoint_at.
6941 (set_breakpoint_at): Reimplement.
6942 (delete_raw_breakpoint): Go through the_target->remove_point
6943 instead of assuming memory breakpoints.
6944 (find_gdb_breakpoint_at): Delete.
6945 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6946 (find_gdb_breakpoint): New function.
6947 (set_gdb_breakpoint_at): Delete.
6948 (z_type_supported): New function.
6949 (set_gdb_breakpoint_1): New function, loosely based off
6950 set_gdb_breakpoint_at.
6951 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6952 (delete_gdb_breakpoint_at): Delete.
6953 (delete_gdb_breakpoint_1): New function, loosely based off
6954 delete_gdb_breakpoint_at.
6955 (delete_gdb_breakpoint): New function.
6956 (clear_gdb_breakpoint_conditions): Rename to ...
6957 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6958 breakpoint.
6959 (add_condition_to_breakpoint): Make static.
6960 (add_breakpoint_condition): Take a struct breakpoint pointer
6961 instead of an address. Adjust.
6962 (gdb_condition_true_at_breakpoint): Rename to ...
6963 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6964 z_type parameter.
6965 (gdb_condition_true_at_breakpoint): Reimplement.
6966 (add_breakpoint_commands): Take a struct breakpoint pointer
6967 instead of an address. Adjust.
6968 (gdb_no_commands_at_breakpoint): Rename to ...
6969 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6970 parameter. Return true if no breakpoint was found. Change debug
6971 output.
6972 (gdb_no_commands_at_breakpoint): Reimplement.
6973 (run_breakpoint_commands): Rename to ...
6974 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6975 and change return type to boolean.
6976 (run_breakpoint_commands): New function.
6977 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6978 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6979 breakpoint. Go through the_target->remove_point instead of
6980 assuming memory breakpoint.
6981 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6982 software and hardware breakpoints.
6983 (reinsert_raw_breakpoint): Go through the_target->insert_point
6984 instead of assuming memory breakpoint.
6985 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6986 software and hardware breakpoints.
6987 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6988 Check both software and hardware breakpoints.
6989 (validate_inserted_breakpoint): Assert the breakpoint is a
6990 software breakpoint. Set the inserted flag to -1 instead of
6991 setting shlib_disabled.
6992 (delete_disabled_breakpoints): Adjust.
6993 (validate_breakpoints): Only validate software breakpoints.
6994 Adjust to inserted flag change.
6995 (check_mem_read, check_mem_write): Skip breakpoint types other
6996 than software breakpoints. Adjust to inserted flag change.
6997 * mem-break.h (enum raw_bkpt_type): New enum.
6998 (raw_breakpoint, struct process_info): Forward declare.
6999 (Z_packet_to_target_hw_bp_type): Delete declaration.
7000 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7001 (set_gdb_breakpoint, delete_gdb_breakpoint)
7002 (clear_breakpoint_conditions): New declarations.
7003 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7004 (breakpoint_inserted_here): Update comment.
7005 (add_breakpoint_condition, add_breakpoint_commands): Replace
7006 address parameter with a breakpoint pointer parameter.
7007 (gdb_breakpoint_here): Update comment.
7008 (delete_gdb_breakpoint_at): Delete.
7009 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7010 * server.c (process_point_options): Take a struct breakpoint
7011 pointer instead of an address. Adjust.
7012 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7013 delete_gdb_breakpoint.
7014 * spu-low.c (spu_target_ops): Install NULL as
7015 supports_z_point_type method.
7016 * target.h: Include mem-break.h.
7017 (struct target_ops) <prepare_to_access_memory>: Update comment.
7018 <supports_z_point_type>: New field.
7019 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7020 instead of a char. Also take a raw breakpoint pointer.
7021 * win32-arm-low.c (the_low_target): Install NULL as
7022 supports_z_point_type.
7023 * win32-i386-low.c (i386_supports_z_point_type): New function.
7024 (i386_insert_point, i386_remove_point): Adjust to new interface.
7025 (the_low_target): Install i386_supports_z_point_type.
7026 * win32-low.c (win32_supports_z_point_type): New function.
7027 (win32_insert_point, win32_remove_point): Adjust to new interface.
7028 (win32_target_ops): Install win32_supports_z_point_type.
7029 * win32-low.h (struct win32_target_ops):
7030 <supports_z_point_type>: New method.
7031 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7032 instead of a char. Also take a raw breakpoint pointer.
7033
7034 2014-05-20 Pedro Alves <palves@redhat.com>
7035
7036 * mem-break.h: Include break-common.h.
7037 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7038 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7039 (Z_packet_to_target_hw_bp_type): New declaration.
7040 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7041 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7042 (Z_PACKET_ACCESS_WP): Delete macros.
7043 (Z_packet_to_hw_type): Delete function.
7044 * i386-low.h: Don't include break-common.h here.
7045 (Z_packet_to_hw_type): Delete declaration.
7046 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7047 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7048 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7049 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7050 * linux-aarch64-low.c: Don't include break-common.h here.
7051 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7052 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7053 (Z_packet_to_target_hw_bp_type): Delete function.
7054 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7055 function.
7056 (mips_insert_point, mips_remove_point): Use
7057 Z_packet_to_target_hw_bp_type.
7058
7059 2014-05-20 Pedro Alves <palves@redhat.com>
7060
7061 * linux-aarch64-low.c: Include break-common.h.
7062 (enum target_point_type): Delete.
7063 (Z_packet_to_point_type): Rename to ...
7064 (Z_packet_to_target_hw_bp_type): ... this, and return a
7065 target_hw_bp_type instead.
7066 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7067 instead of an enum target_point_type.
7068 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7069 breakpoint type.
7070 (aarch64_dr_state_insert_one_point)
7071 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7072 (aarch64_handle_aligned_watchpoint)
7073 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7074 Take an enum target_hw_bp_type instead of an enum
7075 target_point_type.
7076 (aarch64_supports_z_point_type): New function.
7077 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7078 use Z_packet_to_target_hw_bp_type.
7079
7080 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7081
7082 * configure.ac: Only use -Werror by default when DEVELOPMENT
7083 is true.
7084 * configure: Regenerate.
7085
7086 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7087
7088 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7089 * linux-x86-low.c (X86_64_USER_REGS): New.
7090 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7091
7092 2014-04-28 Yao Qi <yao@codesourcery.com>
7093
7094 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7095 name.
7096
7097 2014-04-25 Pedro Alves <palves@redhat.com>
7098
7099 PR server/16255
7100 * linux-low.c (linux_attach_fail_reason_string): New function.
7101 (linux_attach_lwp): Delete.
7102 (linux_attach_lwp_1): Rename to ...
7103 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7104 argument. Remove "initial" parameter. Return int instead of
7105 void. Don't error or warn here.
7106 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7107 failure to attach to the tgid. Call warning when failing to
7108 attach to an lwp.
7109 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7110 argument. Remove "initial" parameter. Return int instead of
7111 void. Don't error or warn here.
7112 (linux_attach_fail_reason_string): New declaration.
7113 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7114 interface change. Use linux_attach_fail_reason_string.
7115
7116 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7117 Walfred Tedeschi <walfred.tedeschi@intel.com>
7118
7119 * Makefile.in: Added rules to handle new files
7120 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7121 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7122 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7123 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7124 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7125 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7126 x32-avx512-linux.o.
7127 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7128 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7129 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7130 i386/x32-avx512.xml.
7131 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7132 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7133 i386/x32-avx512-linux.xml.
7134 * i387-fp.c (num_avx512_k_registers): New constant for number
7135 of K registers.
7136 (num_avx512_zmmh_low_registers): New constant for number of
7137 lower ZMM registers (0-15).
7138 (num_avx512_zmmh_high_registers): New constant for number of
7139 higher ZMM registers (16-31).
7140 (num_avx512_ymmh_registers): New contant for number of higher
7141 YMM registers (ymm16-31 added by avx521 on x86_64).
7142 (num_avx512_xmm_registers): New constant for number of higher
7143 XMM registers (xmm16-31 added by AVX512 on x86_64).
7144 (struct i387_xsave): Add space for AVX512 registers.
7145 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7146 Add code to handle AVX512 registers.
7147 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7148 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7149 prototypei from generated file.
7150 (tdesc_amd64_avx512_linux): Likewise.
7151 (init_registers_x32_avx512_linux): Likewise.
7152 (tdesc_x32_avx512_linux): Likewise.
7153 (init_registers_i386_avx512_linux): Likewise.
7154 (tdesc_i386_avx512_linux): Likewise.
7155 (x86_64_regmap): Add AVX512 registers.
7156 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7157 mask.
7158 (initialize_low_arch): Add code to initialize AVX512 registers.
7159
7160 2014-04-23 Pedro Alves <palves@redhat.com>
7161
7162 * mem-break.c (find_gdb_breakpoint_at): Make static.
7163 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7164
7165 2014-04-23 Pedro Alves <palves@redhat.com>
7166
7167 * i386-low.c: Don't include break-common.h here.
7168 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7169 prototype to take target_hw_bp_type as argument instead of a Z
7170 packet char.
7171 * i386-low.h: Include break-common.h here.
7172 (Z_packet_to_hw_type): Declare.
7173 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7174 prototypes.
7175 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7176 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7177 (x86_remove_point): Convert the packet number to a
7178 target_hw_bp_type before calling i386_low_remove_watchpoint.
7179 * win32-i386-low.c (i386_insert_point): Convert the packet number
7180 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7181 (i386_remove_point): Convert the packet number to a
7182 target_hw_bp_type before calling i386_low_remove_watchpoint.
7183
7184 2014-04-23 Pedro Alves <palves@redhat.com>
7185
7186 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7187
7188 2014-04-10 Pedro Alves <palves@redhat.com>
7189
7190 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7191 Check if the condition or command is NULL before checking if the
7192 breakpoint is known. On success, return true.
7193 * mem-break.h (add_breakpoint_condition): Document return.
7194 (add_breakpoint_commands): Add describing comment.
7195 * server.c (skip_to_semicolon): New function.
7196 (process_point_options): Use it.
7197
7198 2014-04-09 Pedro Alves <palves@redhat.com>
7199
7200 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7201 to lwpid_of.
7202
7203 2014-02-27 Pedro Alves <palves@redhat.com>
7204
7205 PR 12702
7206 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7207 macros.
7208 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7209 output.
7210 (last_thread_of_process_p): Take a PID argument instead of a
7211 thread pointer.
7212 (linux_wait_for_lwp): Delete.
7213 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7214 functions.
7215 (linux_low_filter_event): New function, party factored out from
7216 linux_wait_for_event.
7217 (linux_wait_for_event): Rename to ...
7218 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7219 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7220 sigsuspend. Check for zombie leaders.
7221 (linux_wait_for_event): Reimplement as wrapper around
7222 linux_wait_for_event_filtered.
7223 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7224 a normal or signal exit is seen, it's the whole process exiting.
7225 (wait_for_sigstop): No longer a for_each_inferior callback.
7226 Rewrite on top of linux_wait_for_event_filtered.
7227 (stop_all_lwps): Call wait_for_sigstop directly.
7228 * server.c (resume, handle_target_event): Handle
7229 TARGET_WAITKIND_NO_RESUMED.
7230
7231 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7232
7233 * win32-low.c (psapi_get_dll_name,
7234 * win32_CreateToolhelp32Snapshot): Delete.
7235 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7236 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7237 Delete.
7238 (handle_load_dll): Add function description.
7239 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7240
7241 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7242
7243 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7244 Add comment.
7245 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7246 base address when calling win32_add_one_solib.
7247 (handle_load_dll): Delete local variable load_addr.
7248 Remove 0x1000 offset applied to DLL base address when calling
7249 win32_add_one_solib.
7250 (handle_unload_dll): Add comment.
7251
7252 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7253
7254 * win32-low.c (win32_add_all_dlls): Renames
7255 win32_ensure_ntdll_loaded. Rewrite function documentation.
7256 Adjust implementation to always load all DLLs.
7257 Add 0x1000 offset to DLL base address when calling
7258 win32_add_one_solib.
7259 (child_initialization_done): New static global.
7260 (do_initial_child_stuff): Set child_initialization_done to
7261 zero during child initialization, and 1 after. Replace call
7262 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7263 Add comment.
7264 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7265 (handle_unload_dll): Add function documentation.
7266 (get_child_debug_event): Ignore load and unload DLL events
7267 during child initialization.
7268
7269 2014-02-20 Doug Evans <dje@google.com>
7270
7271 Remove global all_lwps.
7272 * inferiors.h (ptid_of): Move here from linux-low.h.
7273 (pid_of, lwpid_of): Ditto.
7274 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7275 parameter is a struct thread_info * now.
7276 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7277 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7278 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7279 directly.
7280 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7281 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7282 * linux-arm-low.c (update_registers_callback): Update, "entry"
7283 parameter is a struct thread_info * now.
7284 Fetch lwpid from current_inferior directly.
7285 (arm_insert_point): Pass &all_threads to find_inferior instead of
7286 &all_lwps.
7287 (arm_remove_point): Ditto.
7288 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7289 (arm_prepare_to_resume): Fetch pid from thread.
7290 (arm_read_description): Fetch lwpid from current_inferior directly.
7291 * linux-low.c (all_lwps): Delete.
7292 (delete_lwp): Delete call to remove_inferior.
7293 (handle_extended_wait): Fetch lwpid from thread.
7294 (add_lwp): Don't set lwp->entry.id. Remove call to
7295 add_inferior_to_list.
7296 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7297 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7298 (kill_one_lwp_callback): Ditto.
7299 (linux_kill): Don't dereference NULL pointer.
7300 Fetch ptid,lwpid from thread.
7301 (get_detach_signal): Fetch ptid from thread.
7302 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7303 Simplify call to regcache_invalidate_thread.
7304 (delete_lwp_callback): Update, "entry" parameter is a
7305 struct thread_info * now. Fetch pid from thread.
7306 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7307 (status_pending_p_callback): Update, "entry" parameter is a
7308 struct thread_info * now. Fetch ptid from thread.
7309 (find_lwp_pid): Update, "entry" parameter is a
7310 struct thread_info * now.
7311 (linux_wait_for_lwp): Fetch pid from thread.
7312 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7313 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7314 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7315 (dequeue_one_deferred_signal): Ditto.
7316 (cancel_breakpoint): Fetch ptid from current_inferior.
7317 (linux_wait_for_event): Pass &all_threads to find_inferior,
7318 not &all_lwps. Fetch ptid, lwpid from thread.
7319 (count_events_callback): Update, "entry" parameter is a
7320 struct thread_info * now.
7321 (select_singlestep_lwp_callback): Ditto.
7322 (select_event_lwp_callback): Ditto.
7323 (cancel_breakpoints_callback): Ditto.
7324 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7325 not &all_lwps.
7326 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7327 (unsuspend_one_lwp): Update, "entry" parameter is a
7328 struct thread_info * now.
7329 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7330 not &all_lwps.
7331 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7332 Fetch lwpid from thread, not lwp.
7333 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7334 Pass &all_threads to find_inferior, not &all_lwps.
7335 (send_sigstop): Fetch lwpid from thread, not lwp.
7336 (send_sigstop_callback): Update, "entry" parameter is a
7337 struct thread_info * now.
7338 (suspend_and_send_sigstop_callback): Ditto.
7339 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7340 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7341 struct thread_info * now.
7342 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7343 from thread, lwp.
7344 (lwp_running): Update, "entry" parameter is a
7345 struct thread_info * now.
7346 (stop_all_lwps): Fetch ptid from thread.
7347 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7348 (linux_resume_one_lwp): Fetch lwpid from thread.
7349 (linux_set_resume_request): Update, "entry" parameter is a
7350 struct thread_info * now. Fetch pid, lwpid from thread.
7351 (resume_status_pending_p): Update, "entry" parameter is a
7352 struct thread_info * now.
7353 (need_step_over_p): Ditto. Fetch lwpid from thread.
7354 (start_step_over): Fetch lwpid from thread.
7355 (linux_resume_one_thread): Update, "entry" parameter is a
7356 struct thread_info * now. Fetch lwpid from thread.
7357 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7358 (proceed_one_lwp): Update, "entry" parameter is a
7359 struct thread_info * now. Fetch lwpid from thread.
7360 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7361 struct thread_info * now.
7362 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7363 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7364 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7365 directly.
7366 (regsets_store_inferior_registers): Ditto.
7367 (fetch_register, store_register): Ditto.
7368 (linux_read_memory, linux_write_memory): Ditto.
7369 (linux_request_interrupt): Ditto.
7370 (linux_read_auxv): Ditto.
7371 (linux_xfer_siginfo): Ditto.
7372 (linux_qxfer_spu): Ditto.
7373 (linux_qxfer_libraries_svr4): Ditto.
7374 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7375 moved to inferiors.h.
7376 (get_lwp): Delete.
7377 (get_thread_lwp): Update.
7378 (struct lwp_info): Delete member "entry". Simplify comment for
7379 member "thread".
7380 (all_lwps): Delete.
7381 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7382 current_inferior directly.
7383 (update_watch_registers_callback): Update, "entry" parameter is a
7384 struct thread_info * now. Fetch pid from thread.
7385 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7386 (mips_insert_point): Fetch lwpid from current_inferior.
7387 Pass &all_threads to find_inferior, not &all_lwps.
7388 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7389 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7390 directly.
7391 (mips_stopped_data_address): Ditto.
7392 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7393 directly.
7394 * linux-tile-low.c (tile_arch_setup): Ditto.
7395 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7396 (update_debug_registers_callback): Update, "entry" parameter is a
7397 struct thread_info * now. Fetch pid from thread.
7398 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7399 Pass &all_threads to find_inferior, not &all_lwps.
7400 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7401 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7402 Pass &all_threads to find_inferior, not &all_lwps.
7403 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7404 (i386_dr_low_get_status): Ditto.
7405 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7406 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7407 (x86_linux_read_description): Ditto.
7408 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7409
7410 2014-02-20 Doug Evans <dje@google.com>
7411
7412 * inferiors.c (get_first_inferior): Fix buglet.
7413
7414 2014-02-19 Doug Evans <dje@google.com>
7415
7416 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7417 * inferiors.c (add_thread): Change result type to struct thread_info *.
7418 All callers updated.
7419 (add_lwp): Call add_thread here instead of in callers.
7420 All callers updated.
7421 * linux-low.h (get_lwp_thread): Rewrite.
7422 (struct lwp_info): New member "thread".
7423
7424 2014-02-19 Doug Evans <dje@google.com>
7425
7426 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7427 All callers updated.
7428
7429 2014-02-19 Doug Evans <dje@google.com>
7430
7431 * inferiors.c (add_thread): Fix whitespace.
7432
7433 2014-02-19 Doug Evans <dje@google.com>
7434
7435 * dll.c (clear_dlls): Replace accessing list implemention details
7436 with API function.
7437 * gdbthread.h (get_first_thread): Declare.
7438 * inferiors.c (for_each_inferior_with_data): New function.
7439 (get_first_thread): New function.
7440 (find_thread_ptid): Simplify.
7441 (get_first_inferior): New function.
7442 (clear_list): Delete.
7443 (one_inferior_p): New function.
7444 (clear_inferior_list): New function.
7445 (clear_inferiors): Update.
7446 * inferiors.h (for_each_inferior_with_data): Declare.
7447 (clear_inferior_list): Declare.
7448 (one_inferior_p): Declare.
7449 (get_first_inferior): Declare.
7450 * linux-low.c (linux_wait_for_event): Replace accessing list
7451 implemention details with API function.
7452 * server.c (target_running): Ditto.
7453 (accumulate_file_name_length): New function.
7454 (emit_dll_description): New function.
7455 (handle_qxfer_libraries): Replace accessing list implemention
7456 details with API function.
7457 (handle_qxfer_threads_worker): New function.
7458 (handle_qxfer_threads_proper): Replace accessing list implemention
7459 details with API function.
7460 (handle_query): Ditto.
7461 (visit_actioned_threads_callback_ftype): New typedef.
7462 (visit_actioned_threads_data): New struct.
7463 (visit_actioned_threads): Rewrite to be find_inferior callback.
7464 (resume): Call find_inferior.
7465 (handle_status): Replace accessing list implemention
7466 details with API function.
7467 (process_serial_event): Replace accessing list implemention details
7468 with API function.
7469 * target.c (set_desired_inferior): Replace accessing list implemention
7470 details with API function.
7471 * tracepoint.c (same_process_p): New function.
7472 (gdb_agent_about_to_close): Replace accessing list implemention
7473 details with API function.
7474 * win32-low.c (child_delete_thread): Replace accessing list
7475 implemention details with API function.
7476 (match_dll_by_basename): New function.
7477 (dll_is_loaded_by_basename): New function.
7478 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7479 details call to dll_is_loaded_by_basename.
7480
7481 2014-02-19 Doug Evans <dje@google.com>
7482
7483 * dll.h (struct dll_info): Add comment.
7484 * gdbthread.h (struct thread_info): Add comment.
7485 (current_ptid): Simplify.
7486 * inferiors.c (add_process): Update.
7487 (remove_process): Update.
7488 * inferiors.h (struct process_info): Rename member "head" to "entry".
7489 * linux-low.c (delete_lwp): Update.
7490 (add_lwp): Update.
7491 (last_thread_of_process_p): Update.
7492 (kill_one_lwp_callback, linux_kill): Update.
7493 (status_pending_p_callback): Update.
7494 (wait_for_sigstop): Update. Simplify read of ptid.
7495 (start_step_over): Update.
7496 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7497 (get_lwp_thread): Update.
7498 (struct lwp_info): Rename member "head" to "entry".
7499 * regcache.h (inferior_list_entry): Delete.
7500 * server.c (kill_inferior_callback): Update.
7501 (detach_or_kill_inferior_callback): Update.
7502 (print_started_pid): Update.
7503 (print_attached_pid): Update.
7504 (process_serial_event): Simplify read of ptid.
7505 * thread-db.c (thread_db_create_event): Update.
7506 (thread_db_get_tls_address): Update.
7507 * win32-low.c (current_inferior_ptid): Simplify.
7508
7509 2014-02-19 Tom Tromey <tromey@redhat.com>
7510
7511 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7512 argument.
7513 (target_supports_btrace): Update.
7514
7515 2014-02-14 Yao Qi <yao@codesourcery.com>
7516
7517 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7518 (rsp-low-ipa.o): New target.
7519
7520 2014-02-12 Tom Tromey <tromey@redhat.com>
7521
7522 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7523 convert_ascii_to_int.
7524 * regcache.c (registers_to_string): Likewise.
7525 * remote-utils.c (decode_M_packet): Likewise.
7526 * server.c (process_serial_event): Likewise.
7527
7528 2014-02-12 Tom Tromey <tromey@redhat.com>
7529
7530 * server.c (handle_query, handle_v_run): Use hex2bin, not
7531 unhexify.
7532 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7533
7534 2014-02-12 Tom Tromey <tromey@redhat.com>
7535
7536 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7537 convert_int_to_ascii.
7538 * regcache.c (registers_to_string, collect_register_as_string):
7539 Likewise.
7540 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7541 Likewise.
7542 * server.c (process_serial_event): Likewise.
7543 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7544 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7545
7546 2014-02-12 Tom Tromey <tromey@redhat.com>
7547
7548 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7549 bin2hex, not hexify.
7550 * tracepoint.c (cmd_qtstatus): Likewise.
7551
7552 2014-02-12 Tom Tromey <tromey@redhat.com>
7553
7554 * remote-utils.c (monitor_output): Pass explicit length to
7555 hexify.
7556
7557 2014-02-12 Tom Tromey <tromey@redhat.com>
7558
7559 * tracepoint.c: Include rsp-low.h.
7560 * server.c: Include rsp-low.h.
7561 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7562 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7563 declare.
7564 * remote-utils.c: Include rsp-low.h.
7565 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7566 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7567 (convert_int_to_ascii, convert_ascii_to_int): Move to
7568 common/rsp-low.c.
7569 * regcache.c: Include rsp-low.h.
7570 * ax.c: Include rsp-low.h.
7571 * Makefile.in (SFILES): Add common/rsp-low.c.
7572 (OBS): Add rsp-low.o.
7573 (rsp-low.o): New target.
7574
7575 2014-02-12 Tom Tromey <tromey@redhat.com>
7576
7577 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7578 Include print-utils.h.
7579 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7580 (plongest, thirty_two, phex_nz): Remove.
7581 * Makefile.in (SFILES): Add common/print-utils.c.
7582 (OBS): Add print-utils.o.
7583 (print-utils-ipa.o): New target.
7584 (print-utils.o): New target.
7585 (IPA_OBJS): Add print-utils-ipa.o.
7586
7587 2014-02-06 Tom Tromey <tromey@redhat.com>
7588
7589 * Makefile.in (SFILES): Fix indentation.
7590
7591 2014-02-05 Doug Evans <dje@google.com>
7592
7593 * linux-low.c (linux_wait_for_event): Improve comment.
7594 (linux_wait_1): Keep current_inferior in sync with event_child.
7595
7596 2014-01-22 Doug Evans <dje@google.com>
7597
7598 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7599
7600 2014-01-22 Doug Evans <dje@google.com>
7601
7602 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7603 * configure: Regenerate.
7604 * config.in: Regenerate.
7605 * Makefile.in (SFILES): Add debug.c.
7606 (OBS): Add debug.o.
7607 * debug.c: New file.
7608 * debug.h: New file.
7609 * linux-aarch64-low.c (*): Update all debugging printfs to use
7610 debug_printf instead of fprintf.
7611 * linux-arm-low.c (*): Ditto.
7612 * linux-cris-low.c (*): Ditto.
7613 * linux-crisv32-low.c (*): Ditto.
7614 * linux-m32r-low.c (*): Ditto.
7615 * linux-sparc-low.c (*): Ditto.
7616 * linux-x86.c (*): Ditto.
7617 * linux-low.c (*): Ditto.
7618 (linux_wait_1): Add calls to debug_enter, debug_exit.
7619 (linux_wait): Remove redundant debugging printf.
7620 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7621 (linux_resume, unstop_all_lwps): Ditto.
7622 * mem-break.c (*): Update all debugging printfs to use
7623 debug_printf instead of fprintf.
7624 * remote-utils.c (*): Ditto.
7625 * thread-db.c (*): Ditto.
7626 * server.c #include <ctype.h>, "gdb_vecs.h".
7627 (debug_threads): Moved to debug.c.
7628 (*): Update all debugging printfs to use debug_printf instead of
7629 fprintf.
7630 (start_inferior): Replace call to fflush with call to debug_flush.
7631 (monitor_show_help): Mention set debug-format.
7632 (parse_debug_format_options): New function.
7633 (handle_monitor_command): Handle "monitor set debug-format".
7634 (gdbserver_usage): Mention --debug-format.
7635 (main): Parse --debug-format.
7636 * server.h (debug_threads): Declaration moved to debug.h.
7637 #include "debug.h".
7638 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7639 trace_debug_1 that uses debug_printf.
7640 (tracepoint_look_up_symbols): Update all debugging printfs to use
7641 debug_printf instead of fprintf.
7642
7643 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7644
7645 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7646 sys/ptrace.h.
7647
7648 2014-01-17 Pedro Alves <palves@redhat.com>
7649
7650 PR build/16445
7651 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7652 defined after including gdb_proc_service.h.
7653
7654 2014-01-16 Doug Evans <dje@google.com>
7655
7656 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7657 (match_dll): Use it.
7658
7659 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7660
7661 * target.h (target_ops) <read_btrace>: Change parameters and
7662 return type to allow error reporting.
7663 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7664 trace reading errors on.
7665 * linux-low.c (linux_low_read_btrace): Pass trace reading
7666 errors on.
7667 (linux_low_disable_btrace): New.
7668
7669 2014-01-15 Doug Evans <dje@google.com>
7670
7671 * inferiors.c (thread_id_to_gdb_id): Delete.
7672 * inferiors.h (thread_id_to_gdb_id): Delete.
7673
7674 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7675
7676 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7677 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7678 versions.
7679
7680 2014-01-08 Pedro Alves <palves@redhat.com>
7681
7682 * server.c (handle_status): Don't discard previous queued stop
7683 replies or thread's pending status here.
7684 (main) <disconnection>: Do it here instead.
7685
7686 2014-01-08 Pedro Alves <palves@redhat.com>
7687
7688 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7689 * server.c (visit_actioned_threads, handle_pending_status): New
7690 function.
7691 (handle_v_cont): Factor out parts to ...
7692 (resume): ... this new function. If in all-stop, and a thread
7693 being resumed has a pending status, report it without actually
7694 resuming.
7695 (myresume): Adjust to use the new 'resume' function.
7696 (clear_pending_status_callback, set_pending_status_callback)
7697 (find_status_pending_thread_callback): New functions.
7698 (handle_status): Handle the case of multiple threads having
7699 interesting statuses to report. Report threads' real last signal
7700 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7701 with an interesting thread to report the status for, instead of
7702 always reporting the status of the first thread.
7703
7704 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7705
7706 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7707 * gdbreplay.c (gdbreplay_version): Likewise.
7708
7709 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7710
7711 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7712 iov.iov_len with the real length in use.
7713
7714 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7715
7716 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7717 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7718 for all targets that use win32-low.c.
7719 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7720 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7721
7722 2013-12-13 Pedro Alves <palves@redhat.com>
7723
7724 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7725 if equal to TARGET_WAITKIND_LOADED.
7726 * win32-low.c (cached_status): New static global.
7727 (win32_wait): Add declaration.
7728 (do_initial_child_stuff): Flush all initial pending debug events
7729 up to the initial breakpoint.
7730 (win32_wait): If CACHED_STATUS was set, return that instead
7731 of doing a real wait. Remove the code resuming the execution
7732 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7733 during the initial phase. Also remove the code changing
7734 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7735 TARGET_WAITKIND_STOPPED.
7736
7737 2013-12-11 Yao Qi <yao@codesourcery.com>
7738
7739 * notif.c (handle_notif_ack): Return 0 if no notification
7740 matches.
7741
7742 2013-11-20 Doug Evans <dje@google.com>
7743
7744 * linux-low.c (linux_set_resume_request): Fix comment.
7745
7746 2013-11-20 Doug Evans <dje@google.com>
7747
7748 * linux-low.c (resume_status_pending_p): Tweak comment.
7749
7750 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7751
7752 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7753 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7754 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7755 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7756 (srv_amd64_regobj): Add amd64-mpx.o.
7757 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7758 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7759 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7760 * i387-fp.c (num_pl_bnd_register) Added constant.
7761 (num_pl_bnd_cfg_registers) Added constant.
7762 (struct i387_xsave) Added reserved area and MPX fields.
7763 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7764 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7765 function.
7766 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7767 (init_registers_amd64_mpx_linux): Declare new function.
7768 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7769 (x86_64_regmap): Add MPX registers.
7770 (x86_linux_read_description): Add MPX case.
7771 (initialize_low_arch): Initialize MPX targets.
7772
7773 2013-11-18 Tom Tromey <tromey@redhat.com>
7774
7775 * configure: Rebuild.
7776 * configure.ac: Don't check for stdlib.h.
7777 * gdbreplay.c: Unconditionally include stdlib.h.
7778
7779 2013-11-18 Tom Tromey <tromey@redhat.com>
7780
7781 * config.in: Rebuild.
7782 * configure: Rebuild.
7783 * configure.ac: Don't use AC_HEADER_DIRENT.
7784
7785 2013-11-18 Tom Tromey <tromey@redhat.com>
7786
7787 * server.h: Don't check HAVE_STRING_H.
7788 * gdbreplay.c: Don't check HAVE_STRING_H.
7789 * configure: Rebuild.
7790
7791 2013-11-18 Tom Tromey <tromey@redhat.com>
7792
7793 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7794 LIBGNU.
7795
7796 2013-11-08 Tom Tromey <tromey@redhat.com>
7797
7798 * configure, config.in: Rebuild.
7799 * configure.ac: Remove unused configury.
7800
7801 2013-11-08 Tom Tromey <tromey@redhat.com>
7802
7803 * acinclude.m4: Include common.m4, codeset.m4.
7804 * configure, config.in: Rebuild.
7805 * configure.ac: Use GDB_AC_COMMON.
7806
7807 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7808
7809 * linux-s390-low.c (HWCAP_S390_TE): New define.
7810 (s390_arch_setup): Consider the TE field in the HWCAP for
7811 determining 'have_regset_tdb'.
7812
7813 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7814
7815 PR gdb/16014
7816 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7817 call to sizeof.
7818
7819 2013-10-02 Pedro Alves <palves@redhat.com>
7820
7821 * server.c (process_serial_event): Don't output "GDBserver
7822 exiting" if GDB is connected through stdio.
7823 * target.c (mywait): Likewise, be silent if GDB is connected
7824 through stdio.
7825
7826 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7827
7828 * lynx-low.c (lynx_add_threads_after_attach): New function.
7829 (lynx_attach): Remove call to add_thread. Add call to
7830 lynx_add_threads_after_attach instead.
7831
7832 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7833
7834 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7835 * config.in, configure: Regenerated.
7836
7837 2013-09-18 Yao Qi <yao@codesourcery.com>
7838
7839 PR server/15959
7840 * server.c (start_inferior): Clear 'resume_info'.
7841
7842 2013-09-16 Jiong Wang <jiwang@tilera.com>
7843
7844 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7845 for each register.
7846
7847 2013-09-16 Jiong Wang <jiwang@tilera.com>
7848
7849 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7850 linux-tile-low.o to srv_tgtobj.
7851
7852 2013-09-16 Will Newton <will.newton@linaro.org>
7853
7854 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7855 out regs.
7856
7857 2013-09-06 Pedro Alves <palves@redhat.com>
7858
7859 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7860 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7861 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7862 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7863 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7864 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7865
7866 2013-09-06 Pedro Alves <palves@redhat.com>
7867
7868 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7869 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7870
7871 2013-09-06 Pedro Alves <palves@redhat.com>
7872
7873 * linux-amd64-ipa.c: Include tracepoint.h.
7874 * linux-i386-ipa.c: Include tracepoint.h.
7875
7876 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7877
7878 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7879 (ps_get_thread_area): New function.
7880
7881 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7882
7883 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7884 (initialize_low_arch): Call init_registers_crisv32 rather than
7885 init_register_crisv32.
7886
7887 2013-09-05 Pedro Alves <palves@redhat.com>
7888
7889 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7890 to ...
7891 * hostio.h: ... this new file.
7892 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7893 win32-low.c: Include hostio.h.
7894
7895 2013-09-05 Pedro Alves <palves@redhat.com>
7896
7897 * server.h (gdb_client_data, handler_func, callback_handler_func)
7898 (delete_file_handler, add_file_handler, append_callback_event)
7899 (delete_callback_event, start_event_loop, initialize_event_loop):
7900 Move to event-loop.h and include it.
7901 * event-loop.h: New file.
7902
7903 2013-09-05 Pedro Alves <palves@redhat.com>
7904
7905 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7906 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7907 (loaded_dll, unloaded_dll): Move to ...
7908 * dll.h: ... this new file.
7909 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7910
7911 2013-09-05 Pedro Alves <palves@redhat.com>
7912
7913 * server.h (current_process, get_thread_process, all_processes)
7914 (add_inferior_to_list, for_each_inferior, current_inferior)
7915 (remove_inferior, add_process, remove_process, find_process_pid)
7916 (have_started_inferiors_p, have_attached_inferiors_p)
7917 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7918 (clear_inferiors, find_inferior, find_inferior_id)
7919 (inferior_target_data, set_inferior_target_data)
7920 (inferior_regcache_data, set_inferior_regcache_data): Move to
7921 inferiors.h, and include it.
7922 * inferiors.h: New file.
7923
7924 2013-09-05 Pedro Alves <palves@redhat.com>
7925
7926 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7927 Move ...
7928 * ax.h: ... here.
7929
7930 2013-09-05 Pedro Alves <palves@redhat.com>
7931
7932 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7933 tracepoint.h.
7934 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7935 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7936 (handle_tracepoint_general_set, handle_tracepoint_query)
7937 (tracepoint_finished_step, tracepoint_was_hit)
7938 (release_while_stepping_state_list, current_traceframe)
7939 (in_readonly_region, traceframe_read_mem)
7940 (fetch_traceframe_registers, traceframe_read_sdata)
7941 (traceframe_read_info, struct fast_tpoint_collect_status)
7942 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7943 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7944 (supply_fast_tracepoint_registers)
7945 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7946 (ipa_tdesc, claim_trampoline_space)
7947 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7948 (agent_mem_read, agent_get_trace_state_variable_value)
7949 (agent_set_trace_state_variable_value, agent_tsv_read)
7950 (agent_mem_read_string, get_raw_reg_func_addr)
7951 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7952 * tracepoint.h: ... this new file.
7953
7954 2013-09-05 Pedro Alves <palves@redhat.com>
7955
7956 * server.h (perror_with_name, error, fatal, warning, paddress)
7957 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7958 include it.
7959 * utils.h: New file.
7960
7961 2013-09-05 Pedro Alves <palves@redhat.com>
7962
7963 * server.h (remote_debug, noack_mode, transport_is_reliable)
7964 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7965 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7966 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7967 (write_enn, initialize_async_io, enable_async_io)
7968 (disable_async_io, check_remote_input_interrupt_request)
7969 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7970 (dead_thread_notify, prepare_resume_reply)
7971 (decode_address_to_semicolon, decode_address, decode_m_packet)
7972 (decode_M_packet, decode_X_packet, decode_xfer_write)
7973 (decode_search_memory_packet, unhexify, hexify)
7974 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7975 (look_up_one_symbol, relocate_instruction)
7976 (monitor_output): Move to remote-utils.h, and include it.
7977 * remote-utils.h: New file.
7978
7979 2013-09-05 Pedro Alves <palves@redhat.com>
7980
7981 * server.h (_): Delete.
7982
7983 2013-09-02 Pedro Alves <palves@redhat.com>
7984
7985 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7986 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7987 allocated.
7988 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7989
7990 2013-09-02 Pierre Muller <muller@sourceware.org>
7991
7992 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7993 or WriteProcessMemory complete successfully and handle
7994 ERROR_PARTIAL_COPY error.
7995
7996 2013-09-02 Pedro Alves <palves@redhat.com>
7997
7998 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7999 error instead of EIO.
8000
8001 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8002
8003 PR server/15604
8004 * linux-low.c: Include filestuff.h.
8005 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8006 * lynx-low.c: Include filestuff.h.
8007 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8008 * server.c: Include filestuff.h.
8009 (main): Call notice_open_fds.
8010 * spu-low.c: Include filestuff.h.
8011 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8012
8013 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8014
8015 * Makefile.in: Explain why ../target and ../nat are not
8016 listed as include file search paths.
8017 (linux-waitpid.o): New object file rule.
8018 * configure.srv (srv_native_linux_obj): New variable.
8019 Replace all occurrences of linux native object files with
8020 $srv_native_linux_obj.
8021 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8022 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8023 (linux_enable_event_reporting): Remove declaration.
8024 (my_waitpid): Moved to common/linux-waitpid.c.
8025 (linux_wait_for_event): Pass ptid when calling
8026 linux_enable_event_reporting.
8027 (linux_supports_tracefork_flag): Remove.
8028 (linux_enable_event_reporting): Likewise.
8029 (linux_tracefork_grandchild): Remove.
8030 (STACK_SIZE): Moved to common/linux-ptrace.c.
8031 (linux_tracefork_child): Remove.
8032 (linux_test_for_tracefork): Remove.
8033 (linux_look_up_symbols): Call linux_supports_traceclone.
8034 (initialize_low): Remove call to linux_test_for_tracefork.
8035 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8036 common/linux-ptrace.h.
8037 (PTRACE_TYPE_ARG4): Likewise.
8038 Include linux-ptrace.h.
8039
8040 2013-08-21 Pedro Alves <palves@redhat.com>
8041
8042 * config.in: Renegerate.
8043
8044 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8045
8046 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8047 (SFILES): Remove $(srcdir)/common/target-common.c and
8048 add $(srcdir)/target/waitstatus.c.
8049 (OBS): Remove target-common.o and add waitstatus.o.
8050 (server_h): Remove $(srcdir)/../common/target-common.h and
8051 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8052 and $(srcdir)/../target/waitstatus.h.
8053 (target-common.o): Remove.
8054 (waitstatus.o): New target object file.
8055 * target.h: Do not include target-common.h and
8056 include target/resume.h, target/wait.h and
8057 target/waitstatus.h.
8058
8059 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8060
8061 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8062 to PTRACE_TYPE_ARG3.
8063 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8064 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8065 PTRACE_TYPE_ARG4.
8066 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8067 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8068
8069 2013-07-27 Jie Zhang <jie@codesourcery.com>
8070 Daniel Jacobowitz <dan@codesourcery.com>
8071 Yao Qi <yao@codesourcery.com>
8072
8073 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8074 (mips-linux-watch.o): New rule.
8075 (mips_linux_watch_h): New variable.
8076 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8077 srv_tgtobj.
8078 * linux-mips-low.c: Include mips-linux-watch.h.
8079 (struct arch_process_info, struct arch_lwp_info): New.
8080 (update_watch_registers_callback): New function.
8081 (mips_linux_new_process, mips_linux_new_thread) New functions.
8082 (mips_linux_prepare_to_resume, mips_insert_point): New
8083 functions.
8084 (mips_remove_point, mips_stopped_by_watchpoint): New
8085 functions.
8086 (rsp_bp_type_to_target_hw_bp_type): New function.
8087 (mips_stopped_data_address): New function.
8088 (the_low_target): Add watchpoint support functions.
8089
8090 2013-07-27 Yao Qi <yao@codesourcery.com>
8091
8092 * i386-low.c: Include break-common.h.
8093 (enum target_hw_bp_type): Remove.
8094
8095 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8096
8097 * Makefile.in (SFILES): /common/target-common.c.
8098 (OBS): Add target-common.o.
8099 (server_h): Add $(srcdir)/../common/target-common.h.
8100 (target-common.o): New target.
8101 * server.c (queue_stop_reply_callback): Free
8102 status string after use.
8103 * target.c (target_waitstatus_to_string): Remove.
8104 * target.h: Include target-common.h.
8105 (resume_kind): Likewise.
8106 (target_waitkind): Likewise.
8107 (target_waitstatus): Likewise.
8108 (TARGET_WNOHANG): Likewise.
8109
8110 2013-07-04 Yao Qi <yao@codesourcery.com>
8111
8112 * Makefile.in (host_alias): Use @host_noncanonical@.
8113 (target_alias): Use @target_noncanonical@.
8114 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8115 ACX_NONCANONICAL_HOST.
8116 * configure: Regenerated.
8117
8118 Revert:
8119 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8120
8121 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8122 * configure: Rebuild.
8123 * Makefile.in (version_host, version_target): Get from configure.
8124 (version.c): Use $(version_host) and $(version_target).
8125
8126 2013-07-03 Pedro Alves <palves@redhat.com>
8127
8128 * Makefile.in (config.status): Depend on development.sh.
8129 * acinclude.m4: Include libmcheck.m4.
8130 * configure: Regenerate.
8131
8132 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8133
8134 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8135 attribute inside the parentheses.
8136 (winapi_DebugSetProcessKillOnExit): Ditto.
8137 (winapi_DebugBreakProcess): Ditto.
8138 (winapi_GenerateConsoleCtrlEvent): Ditto.
8139
8140 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8141
8142 * notif.h (notif_event): Add a dummy member to avoid compiler
8143 errors.
8144
8145 2013-07-01 Pedro Alves <palves@redhat.com>
8146
8147 * hostio.c (HOSTIO_PATH_MAX): Define.
8148 (require_filename, handle_open, handle_unlink, handle_readlink):
8149 Use it.
8150
8151 2013-07-01 Pedro Alves <palves@redhat.com>
8152
8153 * server.h: Include "pathmax.h".
8154 * linux-low.c: Don't include sys/param.h.
8155 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8156 MAXPATHLEN.
8157 * win32-low.c: Don't include sys/param.h.
8158 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8159
8160 2013-07-01 Pedro Alves <palves@redhat.com>
8161
8162 * event-loop.c: Don't check HAVE_UNISTD_H before including
8163 <unistd.h>.
8164 * gdbreplay.c: Likewise.
8165 * remote-utils.c: Likewise.
8166 * server.c: Likewise.
8167 * configure.ac: Don't check for unistd.h.
8168 * configure: Regenerate.
8169
8170 2013-06-28 Tom Tromey <tromey@redhat.com>
8171
8172 * Makefile.in (version.c): Use version.in, not
8173 common/version.in.
8174
8175 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8176
8177 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8178 * configure: Rebuild.
8179 * Makefile.in (version_host, version_target): Get from configure.
8180 (version.c): Use $(version_host) and $(version_target).
8181
8182 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8183
8184 Fix trace-status to output user name without trailing colon.
8185 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8186
8187 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8188
8189 Fix trace-status to output proper start-time and stop-time.
8190 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8191 output start time and stop time in hex as gdb expects.
8192
8193 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8194
8195 * tracepoint.c (build_traceframe_info_xml): Output trace state
8196 variables present in the trace buffer.
8197
8198 2013-06-24 Tom Tromey <tromey@redhat.com>
8199
8200 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8201 create-version.sh.
8202 (version.o): Remove.
8203 * gdbreplay.c: Include version.h.
8204 (version, host_name): Don't declare.
8205 * server.h: Include version.h.
8206 (version, host_name): Don't declare.
8207
8208 2013-06-12 Pedro Alves <palves@redhat.com>
8209
8210 * linux-x86-low.c (linux_is_elf64): Delete global.
8211 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8212 with local linux_pid_exe_is_elf_64_file use.
8213
8214 2013-06-11 Pedro Alves <palves@redhat.com>
8215
8216 * linux-low.c (regset_disabled, disable_regset): New functions.
8217 (regsets_fetch_inferior_registers)
8218 (regsets_store_inferior_registers): Use them.
8219 (initialize_regsets_info); Don't allocate the disabled_regsets
8220 array here.
8221 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8222 comment.
8223
8224 2013-06-11 Pedro Alves <palves@redhat.com>
8225
8226 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8227 xmalloc.
8228
8229 2013-06-11 Pedro Alves <palves@redhat.com>
8230
8231 * linux-x86-low.c (initialize_low_arch): Call
8232 init_registers_x32_avx_linux.
8233
8234 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8235
8236 Fix compatibility with Android Bionic.
8237 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8238 it is not empty.
8239
8240 2013-06-07 Pedro Alves <palves@redhat.com>
8241
8242 PR server/14823
8243 * Makefile.in (OBS): Add tdesc.o.
8244 (IPA_OBJS): Add tdesc-ipa.o.
8245 (tdesc-ipa.o): New rule.
8246 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8247 interface.
8248 * linux-low.c (new_inferior): Delete.
8249 (disabled_regsets, num_regsets): Delete.
8250 (linux_add_process): Adjust to set the new per-process
8251 new_inferior flag.
8252 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8253 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8254 was a stop. When calling arch_setup, switch the current inferior
8255 to the thread that got an event.
8256 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8257 (regsets_fetch_inferior_registers)
8258 (regsets_store_inferior_registers): New regsets_info parameter.
8259 Adjust to use it.
8260 (linux_register_in_regsets): New regs_info parameter. Adjust to
8261 use it.
8262 (register_addr, fetch_register, store_register): New usrregs_info
8263 parameter. Adjust to use it.
8264 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8265 parameter regs_info. Adjust to use it.
8266 (linux_fetch_registers): Get the current inferior's regs_info, and
8267 adjust to use it.
8268 (linux_store_registers): Ditto.
8269 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8270 (initialize_low): Don't initialize the target_regsets here. Call
8271 initialize_low_arch.
8272 * linux-low.h (target_regsets): Delete declaration.
8273 (struct regsets_info): New.
8274 (struct usrregs_info): New.
8275 (struct regs_info): New.
8276 (struct process_info_private) <new_inferior>: New field.
8277 (struct linux_target_ops): Delete the num_regs, regmap, and
8278 regset_bitmap fields. New field regs_info.
8279 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8280 * i387-fp.c (num_xmm_registers): Delete.
8281 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8282 calls to new interface.
8283 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8284 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8285 Infer the number of xmm registers from the regcache's target
8286 description.
8287 * i387-fp.h (num_xmm_registers): Delete.
8288 * inferiors.c (add_thread): Don't install the thread's regcache
8289 here.
8290 * proc-service.c (gregset_info): Fetch the current inferior's
8291 regs_info. Adjust to use it.
8292 * regcache.c: Include tdesc.h.
8293 (register_bytes, reg_defs, num_registers)
8294 (gdbserver_expedite_regs): Delete.
8295 (get_thread_regcache): If the thread doesn't have a regcache yet,
8296 create one, instead of aborting gdbserver.
8297 (regcache_invalidate_one): Rename to ...
8298 (regcache_invalidate_thread): ... this.
8299 (regcache_invalidate_one): New.
8300 (regcache_invalidate): Only invalidate registers of the current
8301 process.
8302 (init_register_cache): Add target_desc parameter, and use it.
8303 (new_register_cache): Ditto. Assert the target description has a
8304 non zero registers_size.
8305 (regcache_cpy): Add assertions. Adjust.
8306 (realloc_register_cache, set_register_cache): Delete.
8307 (registers_to_string, registers_from_string): Adjust.
8308 (find_register_by_name, find_regno, find_register_by_number)
8309 (register_cache_size): Add target_desc parameter, and use it.
8310 (free_register_cache_thread, free_register_cache_thread_one)
8311 (regcache_release, register_cache_size): New.
8312 (register_size): Add target_desc parameter, and use it.
8313 (register_data, supply_register, supply_register_zeroed)
8314 (supply_regblock, supply_register_by_name, collect_register)
8315 (collect_register_as_string, collect_register_by_name): Adjust.
8316 * regcache.h (struct target_desc): Forward declare.
8317 (struct regcache) <tdesc>: New field.
8318 (init_register_cache, new_register_cache): Add target_desc
8319 parameter.
8320 (regcache_invalidate_thread): Declare.
8321 (regcache_invalidate_one): Delete declaration.
8322 (regcache_release): Declare.
8323 (find_register_by_number, register_cache_size, register_size)
8324 (find_regno): Add target_desc parameter.
8325 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8326 declarations.
8327 * remote-utils.c: Include tdesc.h.
8328 (outreg, prepare_resume_reply): Adjust.
8329 * server.c: Include tdesc.h.
8330 (gdbserver_xmltarget): Delete declaration.
8331 (get_features_xml, process_serial_event): Adjust.
8332 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8333 declare.
8334 (struct process_info) <tdesc>: New field.
8335 (ipa_tdesc): Declare.
8336 * tdesc.c: New file.
8337 * tdesc.h: New file.
8338 * tracepoint.c: Include tdesc.h.
8339 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8340 (get_context_regcache): Adjust to pass ipa_tdesc down.
8341 (do_action_at_tracepoint): Adjust to get the register cache size
8342 from the context regcache's description.
8343 (traceframe_walk_blocks): Adjust to get the register cache size
8344 from the current trace frame's description.
8345 (traceframe_get_pc): Adjust to get current trace frame's
8346 description and pass it down.
8347 (gdb_collect): Adjust to get the register cache size from the
8348 IPA's description.
8349 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8350 (gdbserver_xmltarget): Delete.
8351 (initialize_low_tracepoint): Set the ipa's target description.
8352 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8353 (initialize_low_tracepoint): Set the ipa's target description.
8354 * linux-x86-low.c: Include tdesc.h.
8355 [__x86_64__] (is_64bit_tdesc): New.
8356 (ps_get_thread_area, x86_get_thread_area): Use it.
8357 (i386_cannot_store_register): Rename to ...
8358 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8359 (i386_cannot_fetch_register): Rename to ...
8360 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8361 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8362 to new interface.
8363 (target_regsets): Rename to ...
8364 (x86_regsets): ... this.
8365 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8366 interface.
8367 (x86_siginfo_fixup): Use is_64bit_tdesc.
8368 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8369 (tdesc_x32_avx_linux, tdesc_x32_linux)
8370 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8371 Declare.
8372 (x86_linux_update_xmltarget): Delete.
8373 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8374 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8375 (AMD64_LINUX_USER64_CS): New.
8376 (x86_linux_read_description): New, based on
8377 x86_linux_update_xmltarget.
8378 (same_process_callback): New.
8379 (x86_arch_setup_process_callback): New.
8380 (x86_linux_update_xmltarget): New.
8381 (x86_regsets_info): New.
8382 (amd64_linux_regs_info): New.
8383 (i386_linux_usrregs_info): New.
8384 (i386_linux_regs_info): New.
8385 (x86_linux_regs_info): New.
8386 (x86_arch_setup): Reimplement.
8387 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8388 (x86_emit_ops): Ditto.
8389 (the_low_target): Adjust. Install x86_linux_regs_info,
8390 x86_cannot_fetch_register, and x86_cannot_store_register.
8391 (initialize_low_arch): New.
8392 * linux-ia64-low.c (tdesc_ia64): Declare.
8393 (ia64_fetch_register): Adjust.
8394 (ia64_usrregs_info, regs_info): New globals.
8395 (ia64_regs_info): New function.
8396 (the_low_target): Adjust.
8397 (initialize_low_arch): New function.
8398 * linux-sparc-low.c (tdesc_sparc64): Declare.
8399 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8400 Adjust.
8401 (sparc_arch_setup): New function.
8402 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8403 (the_low_target): Adjust.
8404 (initialize_low_arch): New function.
8405 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8406 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8407 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8408 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8409 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8410 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8411 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8412 (tdesc_powerpc_isa205_vsx64l): Declare.
8413 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8414 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8415 (ppc_set_pc, ppc_get_hwcap): Adjust.
8416 (ppc_usrregs_info): Forward declare.
8417 (!__powerpc64__) ppc_regmap_adjusted: New global.
8418 (ppc_arch_setup): Adjust to the current process'es target
8419 description.
8420 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8421 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8422 (ppc_store_evrregset): Adjust.
8423 (target_regsets): Rename to ...
8424 (ppc_regsets): ... this, and make static.
8425 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8426 (ppc_regs_info): New function.
8427 (the_low_target): Adjust.
8428 (initialize_low_arch): New function.
8429 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8430 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8431 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8432 (tdesc_s390x_linux64v2): Declare.
8433 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8434 (s390_fill_gregset, s390_store_last_break): Adjust.
8435 (target_regsets): Rename to ...
8436 (s390_regsets): ... this, and make static.
8437 (s390_get_pc, s390_set_pc): Adjust.
8438 (s390_get_hwcap): New target_desc parameter, and use it.
8439 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8440 (s390_arch_setup): Adjust to set the current process'es target
8441 description. Don't adjust the regmap.
8442 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8443 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8444 (regs_info_3264): New globals.
8445 (s390_regs_info): New function.
8446 (the_low_target): Adjust.
8447 (initialize_low_arch): New function.
8448 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8449 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8450 [__mips64] (init_registers_mips_linux)
8451 (init_registers_mips_dsp_linux): Delete defines.
8452 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8453 (have_dsp): New global.
8454 (mips_read_description): New, based on mips_arch_setup.
8455 (mips_arch_setup): Reimplement.
8456 (get_usrregs_info): New function.
8457 (mips_cannot_fetch_register, mips_cannot_store_register)
8458 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8459 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8460 (target_regsets): Rename to ...
8461 (mips_regsets): ... this, and make static.
8462 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8463 (dsp_regs_info, regs_info): New globals.
8464 (mips_regs_info): New function.
8465 (the_low_target): Adjust.
8466 (initialize_low_arch): New function.
8467 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8468 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8469 Declare.
8470 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8471 (arm_read_description): New, with bits factored from
8472 arm_arch_setup.
8473 (arm_arch_setup): Reimplement.
8474 (target_regsets): Rename to ...
8475 (arm_regsets): ... this, and make static.
8476 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8477 (arm_regs_info): New function.
8478 (the_low_target): Adjust.
8479 (initialize_low_arch): New function.
8480 * linux-m68k-low.c (tdesc_m68k): Declare.
8481 (target_regsets): Rename to ...
8482 (m68k_regsets): ... this, and make static.
8483 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8484 (m68k_regs_info): New function.
8485 (m68k_arch_setup): New function.
8486 (the_low_target): Adjust.
8487 (initialize_low_arch): New function.
8488 * linux-sh-low.c (tdesc_sharch): Declare.
8489 (target_regsets): Rename to ...
8490 (sh_regsets): ... this, and make static.
8491 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8492 (sh_regs_info, sh_arch_setup): New functions.
8493 (the_low_target): Adjust.
8494 (initialize_low_arch): New function.
8495 * linux-bfin-low.c (tdesc_bfin): Declare.
8496 (bfin_arch_setup): New function.
8497 (bfin_usrregs_info, regs_info): New globals.
8498 (bfin_regs_info): New function.
8499 (the_low_target): Adjust.
8500 (initialize_low_arch): New function.
8501 * linux-cris-low.c (tdesc_cris): Declare.
8502 (cris_arch_setup): New function.
8503 (cris_usrregs_info, regs_info): New globals.
8504 (cris_regs_info): New function.
8505 (the_low_target): Adjust.
8506 (initialize_low_arch): New function.
8507 * linux-cris-low.c (tdesc_crisv32): Declare.
8508 (cris_arch_setup): New function.
8509 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8510 (cris_regs_info): New function.
8511 (the_low_target): Adjust.
8512 (initialize_low_arch): New function.
8513 * linux-m32r-low.c (tdesc_m32r): Declare.
8514 (m32r_arch_setup): New function.
8515 (m32r_usrregs_info, regs_info): New globals.
8516 (m32r_regs_info): Adjust.
8517 (initialize_low_arch): New function.
8518 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8519 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8520 (tic6x_usrregs_info): Forward declare.
8521 (tic6x_read_description): New function, based on ...
8522 (tic6x_arch_setup): ... this. Reimplement.
8523 (target_regsets): Rename to ...
8524 (tic6x_regsets): ... this, and make static.
8525 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8526 (tic6x_regs_info): New function.
8527 (the_low_target): Adjust.
8528 (initialize_low_arch): New function.
8529 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8530 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8531 (target_regsets): Rename to ...
8532 (xtensa_regsets): ... this, and make static.
8533 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8534 globals.
8535 (xtensa_arch_setup, xtensa_regs_info): New functions.
8536 (the_low_target): Adjust.
8537 (initialize_low_arch): New function.
8538 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8539 (nios2_arch_setup): Set the current process'es tdesc.
8540 (target_regsets): Rename to ...
8541 (nios2_regsets): ... this.
8542 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8543 (nios2_regs_info): New function.
8544 (the_low_target): Adjust.
8545 (initialize_low_arch): New function.
8546 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8547 (aarch64_arch_setup): Set the current process'es tdesc.
8548 (target_regsets): Rename to ...
8549 (aarch64_regsets): ... this.
8550 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8551 (aarch64_regs_info): New function.
8552 (the_low_target): Adjust.
8553 (initialize_low_arch): New function.
8554 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8555 globals.
8556 (target_regsets): Rename to ...
8557 (tile_regsets): ... this.
8558 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8559 (tile_regs_info): New function.
8560 (tile_arch_setup): Set the current process'es tdesc.
8561 (the_low_target): Adjust.
8562 (initialize_low_arch): New function.
8563 * spu-low.c (tdesc_spu): Declare.
8564 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8565 * win32-arm-low.c (tdesc_arm): Declare.
8566 (arm_arch_setup): New function.
8567 (the_low_target): Install arm_arch_setup instead of
8568 init_registers_arm.
8569 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8570 (init_windows_x86): Rename to ...
8571 (i386_arch_setup): ... this. Set `win32_tdesc'.
8572 (the_low_target): Adjust.
8573 * win32-low.c (win32_tdesc): New global.
8574 (child_add_thread): Don't create the thread cache here.
8575 (do_initial_child_stuff): Set the new process'es tdesc.
8576 * win32-low.h (struct target_desc): Forward declare.
8577 (win32_tdesc): Declare.
8578 * lynx-i386-low.c (tdesc_i386): Declare global.
8579 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8580 * lynx-low.c (lynx_tdesc): New global.
8581 (lynx_add_process): Set the new process'es tdesc.
8582 * lynx-low.h (struct target_desc): Forward declare.
8583 (lynx_tdesc): Declare global.
8584 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8585 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8586 * nto-low.c (nto_tdesc): New global.
8587 (do_attach): Set the new process'es tdesc.
8588 * nto-low.h (struct target_desc): Forward declare.
8589 (nto_tdesc): Declare.
8590 * nto-x86-low.c (tdesc_i386): Declare.
8591 (nto_x86_arch_setup): Set `nto_tdesc'.
8592
8593 2013-06-04 Gary Benson <gbenson@redhat.com>
8594
8595 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8596 to qSupported response when appropriate.
8597 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8598 with nonzero-length annex.
8599 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8600 arguments supplied in annex.
8601
8602 2013-05-31 Doug Evans <dje@google.com>
8603
8604 PR server/15594
8605 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8606 64 bits in 64-cross-32 environment.
8607
8608 2013-05-28 Pedro Alves <palves@redhat.com>
8609
8610 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8611 (aarch64-without-fpu.c): Delete rule.
8612 * configure.srv (aarch64*-*-linux*): Remove references to
8613 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8614 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8615 declaration.
8616
8617 2013-05-24 Pedro Alves <palves@redhat.com>
8618
8619 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8620 instead of strchr/decode_address. Error if the range isn't split
8621 with a ','. Don't assume there's be a ':' in the action.
8622
8623 2013-05-23 Yao Qi <yao@codesourcery.com>
8624 Pedro Alves <palves@redhat.com>
8625
8626 * linux-low.c (lwp_in_step_range): New function.
8627 (linux_wait_1): If the thread was range stepping and stopped
8628 outside the stepping range, report the stop to GDB. Otherwise,
8629 continue stepping. Add range stepping debug output.
8630 (linux_set_resume_request): Copy the step range from the resume
8631 request to the lwp.
8632 (linux_supports_range_stepping): New.
8633 (linux_target_ops) <supports_range_stepping>: Set to
8634 linux_supports_range_stepping.
8635 * linux-low.h (struct linux_target_ops)
8636 <supports_range_stepping>: New field.
8637 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8638 * linux-x86-low.c (x86_supports_range_stepping): New.
8639 (the_low_target) <supports_range_stepping>: Set to
8640 x86_supports_range_stepping.
8641 * server.c (handle_v_cont): Handle 'r' action.
8642 (handle_v_requests): Append ";r" if the target supports range
8643 stepping.
8644 * target.h (struct thread_resume) <step_range_start,
8645 step_range_end>: New fields.
8646 (struct target_ops) <supports_range_stepping>:
8647 New field.
8648 (target_supports_range_stepping): New macro.
8649
8650 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8651
8652 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8653 confusion in comment.
8654
8655 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8656
8657 * lynx-low.c (struct process_info_private): New type.
8658 (lynx_add_process): New function.
8659 (lynx_create_inferior, lynx_attach): Replace calls to
8660 add_process by calls to lynx_add_process.
8661 (lynx_resume): If PTID is null, then try using
8662 current_process()->private->last_wait_event_ptid.
8663 Add comments.
8664 (lynx_clear_inferiors): Delete. The contents of that function
8665 has been inlined in lynx_mourn;
8666 (lynx_wait_1): Save the ptid in the process's private data.
8667 (lynx_mourn): Free the process' private data. Replace call
8668 to lynx_clear_inferiors by call to clear_inferiors.
8669
8670 2013-05-17 Yao Qi <yao@codesourcery.com>
8671
8672 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8673 the right place.
8674
8675 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8676
8677 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8678 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8679 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8680 PT_TEXT_END_ADDR guards. Update comments.
8681 (linux_target_op) <read_offsets>: Conditionally define to
8682 linux_read_offsets if the target is UCLIBC and if it defines
8683 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8684
8685 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8686 Andrew Jenner <andrew@codesourcery.com>
8687
8688 * Makefile.in (SFILES): Add linux-nios2-low.c.
8689 (clean): Add action to delete nios2-linux.c.
8690 (nios2-linux.c): New rule.
8691 * configure.srv: Add nios2*-*-linux*.
8692 * linux-nios2-low.c: New.
8693
8694 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8695
8696 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8697
8698 2013-04-25 Hui Zhu <hui@codesourcery.com>
8699
8700 PR gdb/15186
8701 * ax.c (ax_printf): Add fflush.
8702
8703 2013-04-22 Tom Tromey <tromey@redhat.com>
8704
8705 * Makefile.in (SFILES): Add filestuff.c.
8706 (OBS): Add filestuff.o.
8707 (filestuff.o): New target.
8708 * config.in, configure: Rebuild.
8709 * configure.ac: Check for fdwalk, pipe2.
8710
8711 2013-04-17 Pedro Alves <palves@redhat.com>
8712
8713 * configure.ac (USE_THREAD_DB): Delete variable.
8714 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8715 Don't AC_SUBST USE_THREAD_DB.
8716 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8717 * config.in, configure: Regenerate.
8718
8719 2013-04-16 Pedro Alves <palves@redhat.com>
8720
8721 * linux-low.h (struct lwp_info) <thread_known>: Move under
8722 the USE_THREAD_DB #ifdef.
8723
8724 2013-04-16 Pedro Alves <palves@redhat.com>
8725
8726 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8727 (linux-low.o): Delete rule.
8728 * linux-low.h: Always include "gdb_thread_db.h" instead of
8729 conditionally including thread_db.h.
8730 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8731 HAVE_THREAD_DB_H.
8732
8733 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8734
8735 * Makefile.in (install-only): Fix make install regression.
8736
8737 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8738
8739 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8740 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8741 installation.
8742 * gdbserver.1: Remove.
8743
8744 2013-03-22 Pedro Alves <palves@redhat.com>
8745
8746 * linux-low.c (handle_extended_wait): Don't call
8747 linux_enable_event_reporting.
8748
8749 2013-03-15 Tony Theodore <tonyt@logyst.com>
8750
8751 PR build/9098:
8752 * Makefile.in (SHELL): Use @SHELL@.
8753
8754 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8755
8756 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8757 compiler warning.
8758
8759 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8760
8761 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8762 Remove extraneous NULL element.
8763
8764 2013-03-13 Yao Qi <yao@codesourcery.com>
8765
8766 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8767 'V' block in trace frame.
8768
8769 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8770
8771 * target.h (struct target_ops): Add btrace ops.
8772 (target_supports_btrace): New macro.
8773 (target_enable_btrace): New macro.
8774 (target_disable_btrace): New macro.
8775 (target_read_btrace): New macro.
8776 * gdbthread.h (struct thread_info): Add btrace field.
8777 * server.c: Include btrace-common.h.
8778 (handle_btrace_general_set): New function.
8779 (handle_btrace_enable): New function.
8780 (handle_btrace_disable): New function.
8781 (handle_general_set): Call handle_btrace_general_set.
8782 (handle_qxfer_btrace): New function.
8783 (struct qxfer qxfer_packets[]): Add btrace entry.
8784 * inferiors.c (remove_thread): Disable btrace.
8785 * linux-low: Include linux-btrace.h.
8786 (linux_low_enable_btrace): New function.
8787 (linux_low_read_btrace): New function.
8788 (linux_target_ops): Add btrace ops.
8789 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8790 Add srv_linux_btrace=yes.
8791 (x86_64-*-linux*): Add linux-btrace.o.
8792 Add srv_linux_btrace=yes.
8793 * configure.ac: Define HAVE_LINUX_BTRACE.
8794 * config.in: Regenerated.
8795 * configure: Regenerated.
8796
8797 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8798
8799 * server.c (handle_qxfer): Preserve error message if -3 is
8800 returned.
8801 (qxfer): Document the -3 return value.
8802
8803 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8804
8805 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8806 (linux_btrace_h): New variable.
8807 (linux-btrace.o): New rule.
8808
8809 2013-03-08 Stan Shebs <stan@codesourcery.com>
8810 Hafiz Abid Qadeer <abidh@codesourcery.com>
8811
8812 * tracepoint.c (trace_buffer_size): New global.
8813 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8814 (init_trace_buffer): Change to one-argument function. Allocate
8815 trace buffer memory.
8816 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8817 handle QTBuffer:size packet.
8818 (cmd_bigqtbuffer_size): New function.
8819 (initialize_tracepoint): Call init_trace_buffer with
8820 DEFAULT_TRACE_BUFFER_SIZE.
8821 * server.c (handle_query): Add QTBuffer:size in the
8822 supported packets.
8823
8824 2013-03-07 Yao Qi <yao@codesourcery.com>
8825
8826 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8827 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8828 of -1.
8829 (cmd_qtsp): Adjust condition. Do post increment.
8830 Set cur_action and cur_step_action back to 0.
8831
8832 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8833
8834 PR server/15236
8835 * linux-low.c (linux_write_memory): Return early success if LEN is
8836 zero.
8837
8838 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8839
8840 * configure.srv: Add x86_64-*-cygwin* as target.
8841
8842 2013-02-28 Tom Tromey <tromey@redhat.com>
8843
8844 * configure.ac: Invoke AC_SYS_LARGEFILE.
8845 * configure, config.in: Rebuild.
8846
8847 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8848
8849 * win32-low.c: Throughout, fix format strings and casts of
8850 printf-like functions to avoid type related warnings on all
8851 platforms.
8852 (get_child_debug_event): Print dwDebugEventCode as hex since
8853 that's how it's usually documented.
8854
8855 2013-02-28 Yao Qi <yao@codesourcery.com>
8856
8857 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8858 pulongest.
8859
8860 2013-02-27 Jiong Wang <jiwang@tilera.com>
8861
8862 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8863 (reg-tilegx32.c): New rule.
8864 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8865 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8866 different register info initializer according to elf class.
8867 (init_registers_tilgx32): New function. The tilegx32 register info
8868 initializer.
8869 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8870 (tile_store_gregset): Likewise.
8871
8872 2013-02-27 Yao Qi <yao@codesourcery.com>
8873
8874 * server.c (process_point_options): Print debug message when
8875 debug_threads is true.
8876
8877 2013-02-26 Yao Qi <yao@codesourcery.com>
8878
8879 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8880
8881 2013-02-19 Pedro Alves <palves@redhat.com>
8882 Kai Tietz <ktietz@redhat.com>
8883
8884 PR gdb/15161
8885
8886 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8887 instead of strtoul to extract address from packet.
8888 (process_serial_event) <'z'>: Likewise.
8889
8890 2013-02-18 Yao Qi <yao@codesourcery.com>
8891
8892 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8893
8894 2013-02-14 Pedro Alves <palves@redhat.com>
8895
8896 Plug memory leak.
8897
8898 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8899 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8900
8901 2013-02-14 Pedro Alves <palves@redhat.com>
8902
8903 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8904
8905 2013-02-14 Pedro Alves <palves@redhat.com>
8906
8907 * tracepoint.c (save_string): Delete.
8908 (add_tracepoint_action): Use savestring instead of save_string.
8909
8910 2013-02-12 Pedro Alves <palves@redhat.com>
8911
8912 * linux-xtensa-low.c: Ditto.
8913 * xtensa-xtregs.c: Ditto.
8914
8915 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8916
8917 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8918 thread_db.
8919
8920 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8921
8922 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8923 aarch64_num_wp_regs and aarch64_num_bp_regs to
8924 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8925
8926 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8927
8928 * linux-aarch64-low.c (ps_get_thread_area): Replace
8929 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8930
8931 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8932 Marcus Shawcroft <marcus.shawcroft@arm.com>
8933 Nigel Stephens <nigel.stephens@arm.com>
8934 Yufeng Zhang <yufeng.zhang@arm.com>
8935
8936 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8937 (aarch64.c, aarch64-without-fpu.c): New targets.
8938 * configure.srv (aarch64*-*-linux*): New.
8939 * linux-aarch64-low.c: New file.
8940
8941 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8942
8943 * linux-low.c (handle_extended_wait, linux_create_inferior)
8944 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8945 (dequeue_one_deferred_signal, linux_resume_one_thread)
8946 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8947 (linux_tracefork_grandchild, linux_test_for_tracefork)
8948 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8949 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8950 where the argument is 0.
8951
8952 2013-01-25 Yao Qi <yao@codesourcery.com>
8953
8954 * event-loop.c: Include "queue.h".
8955 (gdb_event_p): New typedef.
8956 (struct gdb_event) <next_event>: Remove.
8957 (event_queue): Change to QUEUE(gdb_event_p).
8958 (async_queue_event): Remove.
8959 (gdb_event_xfree): New.
8960 (initialize_event_loop): New.
8961 (process_event): Use API from QUEUE.
8962 (wait_for_event): Likewise.
8963 * server.c (main): Call initialize_event_loop.
8964 * server.h (initialize_event_loop): Declare.
8965
8966 2013-01-18 Yao Qi <yao@codesourcery.com>
8967
8968 * ax.h (struct eval_agent_expr_context): New.
8969 (gdb_eval_agent_expr): Update declaration.
8970 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8971 TFRAME. Add new argument CTX.
8972 * server.h (struct eval_agent_expr_context): Declare.
8973 (agent_mem_read, agent_tsv_read): Update declaration.
8974 (agent_mem_read_string): Likewise.
8975 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8976 (add_traceframe_block): Add new argument TPOINT.
8977 Increase TPOINT->traceframe_usage.
8978 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8979 eval_tracepoint_agent_expr.
8980 (condition_true_at_tracepoint): Likewise.
8981 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8982 (agent_mem_read_string, agent_tsv_read): Likewise.
8983
8984 2013-01-16 Yao Qi <yao@codesourcery.com>
8985
8986 * linux-low.c (linux_resume_one_lwp): Don't check
8987 'lwp->bp_reinsert != 0'.
8988
8989 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8990 Pedro Alves <palves@redhat.com>
8991
8992 * lynx-low.c (ptrace_request_to_str): Define a temporary
8993 macro and use it to simplify this function's implementation.
8994
8995 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8996
8997 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8998 sets errno.
8999
9000 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9001
9002 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9003
9004 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9005
9006 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9007
9008 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9009
9010 * lynx-low.c (lynx_resume): Use the resume_info parameter
9011 to determine the ptid for the lynx_ptrace call, unless
9012 it is equal to minus_one_ptid, in which case we use the
9013 ptid of the current_inferior.
9014 (lynx_wait_1): After having received a thread create/exit
9015 event, resume the inferior's execution using the signaling
9016 thread's ptid, rather than the old ptid.
9017
9018 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9019
9020 * lynx-low.c (lynx_resume): Delete variable ret.
9021
9022 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9023
9024 * gdbreplay.c (gdbreplay_version): Update copyright year.
9025 * server.c (gdbserver_version): Likewise.
9026
9027 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9028
9029 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9030 new thread.
9031
9032 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9033
9034 * lynx-low.c (ptrace_request_to_str): Add handling for
9035 PTRACE_GETTRACESIG.
9036
9037 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9038
9039 * lynx-low.c (lynx_attach): Delete variable new_process.
9040
9041 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9042
9043 * lynx-low.c (lynx_create_inferior): Delete variable
9044 new_process.
9045
9046 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9047
9048 * lynx-low.c (ptrace_request_to_str): Do not handle
9049 PTRACE_GETTHREADLIST if this macro does not exist.
9050
9051 2012-12-15 Yao Qi <yao@codesourcery.com>
9052
9053 * Makefile.in (OBS): Add notif.o.
9054 * notif.c, notif.h: New.
9055 * server.c: Include "notif.h".
9056 (struct vstop_notif) <next>: Remove.
9057 <base>: New field.
9058 (queue_stop_reply): Update.
9059 (push_event, send_next_stop_reply): Remove.
9060 (discard_queued_stop_replies): Update.
9061 (notif_stop): New variable.
9062 (handle_v_stopped): Remove.
9063 (handle_v_requests): Don't call handle_v_stopped. Call
9064 handle_ack_notif instead.
9065 (queue_stop_reply_callback): Call notif_event_enque instead
9066 of queue_stop_reply.
9067 (handle_status): Don't call send_next_stop_reply, call
9068 notif_write_event instead.
9069 (kill_inferior_callback): Likewise.
9070 (detach_or_kill_inferior_callback): Likewise.
9071 (main): Call initialize_notif.
9072 (process_serial_event): Call QUEUE_is_empty.
9073 (handle_target_event): Call notif_push instead of push event.
9074 * server.h (push_event): Remove declaration.
9075
9076 2012-12-10 Tom Tromey <tromey@redhat.com>
9077
9078 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9079 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9080 macros.
9081 (.c.o): Rewrite.
9082 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9083 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9084 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9085 (amd64-linux-ipa.o, ax.o): Rewrite.
9086 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9087 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9088 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9089 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9090 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9091 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9092 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9093 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9094 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9095 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9096 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9097 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9098 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9099 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9100 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9101 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9102 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9103 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9104 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9105 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9106 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9107 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9108 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9109 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9110 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9111 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9112 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9113 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9114 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9115 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9116 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9117 (reg-tilegx.o): Remove.
9118 (all_object_files): New macro.
9119 Include .deps files.
9120 * aclocal.m4, configure: Rebuild.
9121 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9122 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9123 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9124
9125 2012-12-05 Tom Tromey <tromey@redhat.com>
9126
9127 PR gdb/14917:
9128 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9129
9130 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9131
9132 * configure.ac: Check for linux/perf_event.h.
9133 * config.in: Regenerated.
9134 * configure: Regenerated.
9135
9136 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9137
9138 * hostio.c (handle_readlink): Decrease buffer size
9139 parameter passed to readlink by one byte.
9140
9141 2012-11-26 Yao Qi <yao@codesourcery.com>
9142
9143 * configure.ac (build_warnings): Append '-Wempty-body'.
9144 * configure: Regenerated.
9145 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9146 body.
9147
9148 2012-11-15 Pierre Muller <muller@sourceware.org>
9149
9150 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9151 * config.in: Regenerate.
9152 * configure: Regenerate.
9153 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9154 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9155 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9156 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9157 header.
9158 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9159 instead of <sys/wait.h> header.
9160 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9161
9162 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9163
9164 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9165 (various make rules): Remove -DGDBSERVER
9166
9167 2012-11-09 Yao Qi <yao@codesourcery.com>
9168
9169 * spu-low.c (current_ptid): Move it to ..
9170 * gdbthread.h: ... here. New.
9171 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9172 * server.c (myresume, process_serial_event): Likewise.
9173 * thread-db.c (thread_db_find_new_threads): Likewise.
9174 * tracepoint.c (run_inferior_command): Likewise.
9175
9176 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9177
9178 * server.c (handle_search_memory_1): Include access length in
9179 warning message.
9180
9181 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9182
9183 * linux-crisv32-low.c: Fix compile errors.
9184
9185 2012-09-04 Yao Qi <yao@codesourcery.com>
9186
9187 * tracepoint.c (cmd_qtsv): Adjust debug message.
9188 Don't check CUR_TPOINT.
9189
9190 2012-08-28 Yao Qi <yao@codesourcery.com>
9191
9192 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9193 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9194 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9195 Remove declarations of xmalloc, xreallloc, xstrdup and
9196 freeargv.
9197 * Makefile.in (libiberty_h): New.
9198 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9199 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9200
9201 2012-08-23 Yao Qi <yao@codesourcery.com>
9202
9203 * server.h: Remove declaration of 'xsnprintf'.
9204
9205 2012-08-22 Keith Seitz <keiths@redhat.com>
9206
9207 * server.h: Include build-gnulib-gbserver/config.h.
9208 * gdbreplay.c: Likewise.
9209
9210 2012-08-08 Doug Evans <dje@google.com>
9211
9212 * Makefile.in (SFILES): Add gdb_vecs.c.
9213 (OBS): Add gdb_vecs.o.
9214 (gdb_vecs_h, host_defs_h): New variables.
9215 (thread-db.o): Add $(gdb_vecs_h) dependency.
9216 (gdb_vecs.o): New rule.
9217 * thread-db.c: #include "gdb_vecs.h".
9218 (thread_db_load_search): Use a vector to iterate over path elements.
9219 Handle text appearing after "$pdir".
9220
9221 * configure.ac: Add check for strstr.
9222 * config.in: Regenerate.
9223 * configure: Regenerate.
9224
9225 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9226
9227 * hostio.c (handle_pread): If pread fails, fall back to attempting
9228 lseek/read.
9229 (handle_pwrite): Likewise for pwrite.
9230
9231 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9232
9233 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9234 between unsupported TYPE and unimplementable ADDR/LEN combination.
9235 (arm_insert_point): Act on new return value.
9236
9237 2012-07-31 Pedro Alves <palves@redhat.com>
9238
9239 * server.c (process_point_options): Only skip tokens if we find
9240 one that is unrecognized. Don't treat 'X' specially while
9241 skipping unrecognized tokens.
9242
9243 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9244
9245 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9246 to 4-byte-align HW breakpoint addresses for Thumb.
9247
9248 2012-07-27 Yao Qi <yao@codesourcery.com>
9249
9250 PR remote/14161.
9251
9252 * server.h: Declare gdb_agent_about_to_close.
9253 * target.c (kill_inferior): Include "agent.h".
9254 New. Send command 'kill'.
9255 * target.h (kill_inferior): Removed macro.
9256 * tracepoint.c (gdb_agent_about_to_close): New.
9257 (gdb_agent_helper_thread): Handle command 'close'.
9258 Wait endlessly until the inferior stops.
9259 Install gdb_agent_remove_socket to atexit hook.
9260 (agent_socket_name): New static variable.
9261 (gdb_agent_socket_init): Replace local variable 'name' with
9262 'agent_socket_name'.
9263 (gdb_agent_remove_socket): New.
9264
9265 2012-07-27 Yao Qi <yao@codesourcery.com>
9266
9267 * server.c (process_point_options): Stop at 'X' when parsing.
9268
9269 2012-07-19 Michael Eager <eager@eagercon.com>
9270
9271 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9272 to hw_execute.
9273 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9274 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9275 hardware breakpoint.
9276
9277 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9278
9279 * gdbserver/linux-low.c (initialize_low): Call
9280 linux_ptrace_init_warnings.
9281
9282 2012-07-02 Doug Evans <dje@google.com>
9283
9284 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9285 pointer to int.
9286
9287 2012-07-02 Stan Shebs <stan@codesourcery.com>
9288
9289 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9290 (ax.o): Add it to build rule.
9291 (ax-ipa.o): Ditto.
9292 (OBS): Add format.o.
9293 (IPA_OBS): Add format.o.
9294 * server.c (handle_query): Claim support for breakpoint commands.
9295 (process_point_options): Add command case.
9296 (process_serial_event): Leave running if there are printfs in
9297 effect.
9298 * mem-break.h (any_persistent_commands): Declare.
9299 (add_breakpoint_commands): Declare.
9300 (gdb_no_commands_at_breakpoint): Declare.
9301 (run_breakpoint_commands): Declare.
9302 * mem-break.c (struct point_command_list): New struct.
9303 (struct breakpoint): New field command_list.
9304 (any_persistent_commands): New function.
9305 (add_commands_to_breakpoint): New function.
9306 (add_breakpoint_commands): New function.
9307 (gdb_no_commands_at_breakpoint): New function.
9308 (run_breakpoint_commands): New function.
9309 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9310 locally.
9311 * ax.c: Include format.h.
9312 (ax_printf): New function.
9313 (gdb_eval_agent_expr): Add printf opcode.
9314
9315 2012-06-13 Yao Qi <yao@codesourcery.com>
9316
9317 * server.c (start_inferior): Remove duplicated writes to fields
9318 'last_resume_kind' and 'last_status' of 'current_inferior'.
9319
9320 2012-06-12 Yao Qi <yao@codesourcery.com>
9321 Pedro Alves <palves@redhat.com>
9322
9323 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9324 comment.
9325 * server.c (handle_v_cont): Extend comment.
9326
9327 2012-06-11 Yao Qi <yao@codesourcery.com>
9328
9329 * linux-low.c (linux_attach): Add 'static'.
9330
9331 2012-06-06 Yao Qi <yao@codesourcery.com>
9332
9333 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9334
9335 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9336
9337 Fix gcc -flto compilation warning.
9338 * server.c (main): Make variable multi_mode and attach volatile.
9339
9340 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9341
9342 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9343 if the platform doesn't know about it.
9344
9345 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9346
9347 * Makefile.in (SFILES): Add linux-tile-low.c.
9348 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9349 * configure.srv: Handle tilegx-*-linux*.
9350 * linux-tile-low.c: New file.
9351
9352 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9353
9354 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9355
9356 2012-05-24 Pedro Alves <palves@redhat.com>
9357
9358 PR gdb/7205
9359
9360 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9361
9362 2012-05-24 Pedro Alves <palves@redhat.com>
9363
9364 PR gdb/7205
9365
9366 Replace target_signal with gdb_signal throughout.
9367
9368 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9369
9370 * linux-low.c (linux_store_registers): Avoid the copying sequence
9371 when no data has been retrieved by ptrace.
9372
9373 2012-05-22 Will Deacon <will.deacon@arm.com>
9374
9375 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9376 Include asm/ptrace.h.
9377 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9378 already defined.
9379
9380 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9381
9382 * linux-low.c (linux_store_registers): Don't re-retrieve data
9383 with ptrace that has already been obtained from /proc. Always
9384 copy any data retrieved with ptrace to the buffer supplied.
9385
9386 2012-05-11 Yao Qi <yao@codesourcery.com>
9387 Pedro Alves <palves@redhat.com>
9388
9389 * linux-low.c (enum stopping_threads_kind): New.
9390 (stopping_threads): Change type to `enum stopping_threads_kind'.
9391 (handle_extended_wait): If stopping and suspending threads, leave
9392 the new_lwp suspended too.
9393 (linux_wait_for_event): Adjust.
9394 (stop_all_lwps): Set `stopping_threads' to
9395 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9396 whether we're suspending threads or just stopping them. Assert no
9397 recursion happens.
9398
9399 2012-04-29 Yao Qi <yao@codesourcery.com>
9400
9401 * server.h: Move some code to ...
9402 * gdbthread.h: ... here. New.
9403 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9404 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9405 (nto-low.o, win32-low.o): Likewise.
9406 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9407 * regcache.c, remote-utils.c, server.c: Likewise.
9408 * target.c, tracepoint.c, win32-low.c: Likewise.
9409
9410 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9411
9412 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9413 (PTRACE_ARG4_TYPE): Likewise.
9414 (PTRACE_XFER_TYPE): Likewise.
9415 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9416 ptrace to PTRACE_ARG3_TYPE.
9417 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9418 (PTRACE_ARG4_TYPE): Likewise.
9419 (PTRACE_XFER_TYPE): Likewise.
9420 (linux_detach_one_lwp): Cast fourth argument of
9421 ptrace to long then PTRACE_ARG4_TYPE.
9422 (regsets_fetch_inferior_registers): Cast third argument of
9423 ptrace to long then PTRACE_ARG3_TYPE.
9424 (regsets_store_inferior_registers): Likewise.
9425
9426 2012-04-20 Pedro Alves <palves@redhat.com>
9427
9428 * configure: Regenerate.
9429
9430 2012-04-19 Pedro Alves <palves@redhat.com>
9431
9432 * Makefile.in (GNULIB_BUILDDIR): New.
9433 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9434 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9435 (all, install-only, uninstall, clean-info, all-lib, clean): No
9436 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9437 (maintainer-clean realclean distclean): Use subdir_do.
9438 (subdir_do): New.
9439 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9440 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9441 * acinclude.m4: Include acx_configure_dir.m4.
9442 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9443 calls. Call AC_PROG_RANLIB. Configure gnulib using
9444 ACX_CONFIGURE_DIR.
9445 (GNULIB): New.
9446 (GNULIB_STDINT_H): Adjust.
9447 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9448 * gdbreplay.c: Include build-gnulib/config.h.
9449 * server.h: Likewise.
9450 * aclocal.m4: Regenerate.
9451 * config.in: Regenerate.
9452 * configure: Regenerate.
9453
9454 2012-04-19 Pedro Alves <palves@redhat.com>
9455
9456 * Makefile.in (LIBGNU, INCGNU): Adjust.
9457 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9458 (all, install-only, uninstall, clean-info, all-lib, clean)
9459 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9460 * configure.ac: Adjust AC_OUTPUT output.
9461 * aclocal.m4: Regenerate.
9462 * configure: Regenerate.
9463
9464 2012-04-19 Pedro Alves <palves@redhat.com>
9465
9466 * Makefile.in (generated_files): New.
9467 (server_h): Remove the explicit dependency on config.h, and depend
9468 on $generated_files.
9469
9470 2012-04-19 Pedro Alves <palves@redhat.com>
9471
9472 * Makefile.in (INCGNU): Add -Ignulib.
9473
9474 2012-04-19 Pedro Alves <palves@redhat.com>
9475
9476 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9477 (INCGNU): ... this, and spell out -I here.
9478 (GNULIB_LIB): Rename to ...
9479 (LIBGNU): ... this.
9480 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9481
9482 2012-04-19 Pedro Alves <palves@redhat.com>
9483
9484 * config.in: Regenerate.
9485
9486 2012-04-19 Pedro Alves <palves@redhat.com>
9487
9488 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9489 * server.h (memmem): Remove declaration.
9490 * config.in: Regenerate.
9491 * configure: Regenerate.
9492
9493 2012-04-19 Yao Qi <yao@codesourcery.com>
9494
9495 * Makefile.in (SFILES): Add common/vec.c.
9496 (OBS): Add vec.o.
9497 (vec.o): New rule.
9498
9499 2012-04-19 Yao Qi <yao@codesourcery.com>
9500
9501 * remote-utils.c (prepare_resume_reply): Replace with macro
9502 target_core_of_thread.
9503 * server.c (handle_qxfer_threads_proper): Likewise.
9504 * target.h (traget_core_of_thread): New macro.
9505
9506 2012-04-18 Pedro Alves <palves@redhat.com>
9507
9508 * aclocal.m4: Regenerate.
9509 * configure: Regenerate.
9510
9511 2012-04-16 Yao Qi <yao@codesourcery.com>
9512
9513 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9514 duplicated on address.
9515
9516 2012-04-16 Yao Qi <yao@codesourcery.com>
9517
9518 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9519 (struct tracepoint_action_ops) <send>: New field.
9520 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9521 (agent_expr_send, x_tracepoint_action_send): New.
9522 (l_tracepoint_action_send): New.
9523 (cmd_qtdp): Download and install tracepoint
9524 according to `use_agent'.
9525 (run_inferior_command): Add one more parameter `len'.
9526 Update callers.
9527 (tracepoint_send_agent): New.
9528 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9529
9530 2012-04-16 Yao Qi <yao@codesourcery.com>
9531
9532 * tracepoint.c (download_tracepoints): Moved to ...
9533 (cmd_qtstart): ... here.
9534
9535 2012-04-14 Yao Qi <yao@codesourcery.com>
9536
9537 * tracepoint.c: Include inttypes.h.
9538 (struct collect_memory_action): Use sized types.
9539 (struct tracepoint): Likewise.
9540 (cmd_qtdp, stop_tracing): Update print specifiers.
9541 (cmd_qtp, response_tracepoint): Likewise.
9542 (collect_data_at_tracepoint): Likewise.
9543 (collect_data_at_step): Likewise.
9544
9545 2012-04-14 Yao Qi <yao@codesourcery.com>
9546
9547 Import gnulib module inttypes.
9548 * aclocal.m4, config.in, configure: Regenerated.
9549
9550 2012-04-14 Yao Qi <yao@codesourcery.com>
9551
9552 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9553 Makefile and config.status at last.
9554
9555 2012-04-13 Yao Qi <yao@codesourcery.com>
9556
9557 * tracepoint.c: Include stdint.h unconditionally.
9558
9559 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9560
9561 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9562 on BFD_HAVE_SYS_PROCFS_TYPE.
9563 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9564 * configure: Regenerate.
9565 * config.in: Likewise.
9566
9567 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9568
9569 * Makefile.in (clean): Also remove x32.c x32-linux.c
9570 x32-avx.c x32-avx-linux.c.
9571 (x32.o): New target.
9572 (x32.c): Likewise.
9573 (x32-linux.o): Likewise.
9574 (x32-linux.c): Likewise.
9575 (x32-avx.o): Likewise.
9576 (x32-avx.c): Likewise.
9577 (x32-avx-linux.o): Likewise.
9578 (x32-avx-linux.c): Likewise.
9579
9580 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9581 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9582 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9583 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9584 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9585 i386/x32-avx-linux.xml.
9586
9587 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9588 (init_registers_x32_avx_linux): Likwise.
9589 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9590 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9591
9592 2012-04-13 Pedro Alves <palves@redhat.com>
9593
9594 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9595 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9596 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9597 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9598 the sub-make.
9599
9600 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9601
9602 * linux-x86-low.c (compat_x32_clock_t): New.
9603 (compat_x32_siginfo_t): Likewise.
9604 (compat_x32_siginfo_from_siginfo): Likewise.
9605 (siginfo_from_compat_x32_siginfo): Likewise.
9606 (linux_is_elf64): Likewise.
9607 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9608 and siginfo_from_compat_x32_siginfo for x32.
9609 (x86_arch_setup): Set linux_is_elf64.
9610
9611 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9612
9613 PR gdb/13969
9614 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9615 e_machine field.
9616 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9617 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9618 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9619 compatible with process.
9620
9621 2012-04-12 Yao Qi <yao@codesourcery.com>
9622
9623 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9624 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9625 (install-only, install-info, clean): Handle sub dir gnulib.
9626 (all-lib, am--refresh): New targets.
9627 (memmem.o): Remove target.
9628 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9629 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9630 (AC_REPLACE_FUNCS): Remove memmem.
9631 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9632 (AC_OUTPUT): Generate Makefile in gnulib/.
9633 * aclocal.m4, config.in, configure: Regenerated.
9634
9635 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9636
9637 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9638
9639 2012-04-05 Pedro Alves <palves@redhat.com>
9640
9641 -Werror=strict-aliasing
9642
9643 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9644 pointer.
9645
9646 2012-04-04 Pedro Alves <palves@redhat.com>
9647
9648 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9649 (sparc_store_gregset_from_stack, sparc_store_gregset)
9650 (sparc_breakpoint_at): Fix formatting.
9651
9652 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9653
9654 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9655 are available.
9656 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9657 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9658 * config.in: Regenerate.
9659 * configure: Likewise.
9660
9661 2012-03-29 Pedro Alves <palves@redhat.com>
9662
9663 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9664 Correct ptrace arguments.
9665
9666 2012-03-28 Pedro Alves <palves@redhat.com>
9667
9668 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9669 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9670 (IA64_FR1_REGNUM): New defines.
9671 (ia64_fetch_register): New.
9672 (the_low_target): Install it.
9673 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9674 field.
9675 * linux-low.c (linux_fetch_registers): Try the
9676 the_low_target.fetch_register hook first.
9677
9678 * linux-arm-low.c (the_low_target): Adjust.
9679 * linux-bfin-low.c (the_low_target): Adjust.
9680 * linux-cris-low.c (the_low_target): Adjust.
9681 * linux-crisv32-low.c (the_low_target): Adjust.
9682 * linux-m32r-low.c (the_low_target): Adjust.
9683 * linux-m68k-low.c (the_low_target): Adjust.
9684 * linux-mips-low.c (the_low_target): Adjust.
9685 * linux-ppc-low.c (the_low_target): Adjust.
9686 * linux-s390-low.c (the_low_target): Adjust.
9687 * linux-sh-low.c (the_low_target): Adjust.
9688 * linux-sparc-low.c (the_low_target): Adjust.
9689 * linux-tic6x-low.c (the_low_target): Adjust.
9690 * linux-x86-low.c (the_low_target): Adjust.
9691 * linux-xtensa-low.c (the_low_target): Adjust.
9692
9693 2012-03-26 Pedro Alves <palves@redhat.com>
9694
9695 * server.c (handle_qxfer_libraries): Don't bail early if
9696 the_target->qxfer_libraries_svr4 is not NULL.
9697
9698 2012-03-26 Pedro Alves <palves@redhat.com>
9699
9700 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9701
9702 2012-03-23 Pedro Alves <palves@redhat.com>
9703
9704 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9705 "library-list-svr4" element's start tag when the the DSO list is
9706 empty.
9707
9708 2012-03-23 Pedro Alves <palves@redhat.com>
9709
9710 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9711 a variable whose type size is the same as the inferior's pointer
9712 size.
9713
9714 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9715
9716 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9717 struct siginfo.
9718 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9719 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9720 * linux-low.h: Include <signal.h>.
9721 (struct siginfo): Remove forward declaration.
9722 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9723 struct siginfo.
9724
9725 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9726
9727 * .gitignore: Ignore more files.
9728
9729 2012-03-19 Pedro Alves <palves@redhat.com>
9730 Jan Kratochvil <jan.kratochvil@redhat.com>
9731
9732 * server.c (cont_thread, general_thread): Add describing comments.
9733 (start_inferior): Clear `cont_thread'.
9734 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9735 of a process.
9736
9737 2012-03-15 Yao Qi <yao@codesourcery.com>
9738
9739 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9740 handling to ...
9741 (cmd_qtdp): ... here.
9742
9743 2012-03-15 Yao Qi <yao@codesourcery.com>
9744
9745 * tracepoint.c (struct tracepoint_action_ops): New.
9746 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9747 (m_tracepoint_action_download): New.
9748 (r_tracepoint_action_download): New.
9749 (x_tracepoint_action_download): New.
9750 (l_tracepoint_action_download): New.
9751 (add_tracepoint_action): Install `action->ops' according type.
9752 (download_tracepoint_1): Move code `download' function pointer
9753 of various tracepoint_action_ops.
9754
9755 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9756
9757 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9758 linux_ptrace_attach_warnings.
9759
9760 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9761
9762 * Makefile.in (linux-ptrace.o): New.
9763 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9764 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9765 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9766 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9767 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9768 of these targets.
9769 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9770
9771 2012-03-08 Yao Qi <yao@codesourcery.com>
9772 Pedro Alves <palves@redhat.com>
9773
9774 Fix PR server/13392.
9775 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9776 offset of JMP insn.
9777 * tracepoint.c (remove_tracepoint): New.
9778 (cmd_qtdp): Call remove_tracepoint when failed to install.
9779
9780 2012-03-07 Pedro Alves <palves@redhat.com>
9781
9782 * linux-low.c (get_detach_signal): New.
9783 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9784 Pass on pending signals to PTRACE_DETACH. Check the result of the
9785 ptrace call.
9786 * server.c (program_signals, program_signals_p): New.
9787 (handle_general_set): Handle QProgramSignals.
9788 * server.h (program_signals, program_signals_p): Declare.
9789
9790 2012-03-05 Pedro Alves <palves@redhat.com>
9791 Jan Kratochvil <jan.kratochvil@redhat.com>
9792
9793 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9794 New comment why.
9795
9796 2012-03-03 Yao Qi <yao@codesourcery.com>
9797
9798 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9799 agent_look_up_symbols.
9800
9801 2012-03-03 Yao Qi <yao@codesourcery.com>
9802
9803 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9804 (linux-x86-low.o): Likewise.
9805 * server.h: Remove in_process_agent_loaded.
9806 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9807 common/agent.c.
9808 Update callers.
9809
9810 2012-03-03 Yao Qi <yao@codesourcery.com>
9811
9812 * tracepoint.c (gdb_agent_capability): New global.
9813 (in_process_agent_loaded_ust): Renamed to
9814 `in_process_agent_supports_ust'.
9815 Update callers.
9816 (in_process_agent_supports_ust): Call agent_capability_check.
9817 (clear_installed_tracepoints): Assert that agent supports
9818 agent.
9819
9820 2012-03-03 Yao Qi <yao@codesourcery.com>
9821
9822 * linux-low.c (linux_supports_agent): New.
9823 (linux_target_ops): Initialize field `supports_agent' with
9824 linux_supports_agent.
9825 * target.h (struct target_ops) <supports_agent>: New.
9826 (target_supports_agent): New macro.
9827 * server.c (handle_general_set): Handle packet 'QAgent'.
9828 (handle_query): Send `QAgent+'.
9829 * Makefile.in (server.o): Depends on agent.h.
9830
9831 2012-03-03 Yao Qi <yao@codesourcery.com>
9832
9833 * Makefile.in (OBS): Add agent.o.
9834 Add new rule for agent.o.
9835 Track dependence of tracepoint.c on agent.h.
9836 * tracepoint.c (run_inferior_command_1):
9837 (run_inferior_command): Call agent_run_command.
9838 (gdb_ust_connect_sync_socket): Deleted. Move it to
9839 common/agent.c.
9840 (resume_thread, stop_thread): Likewise.
9841 (gdb_ust_socket_init): Renamed to ...
9842 (gdb_agent_socket_init): ... New.
9843 (gdb_ust_thread): Renamed to ...
9844 (gdb_agent_helper_thread): ... New.
9845 (gdb_ust_init): Move some code to ...
9846 (gdb_agent_init): ... here. New.
9847 [HAVE_UST]: Call gdb_ust_init.
9848 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9849 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9850 * config.in, configure: Regenerated.
9851
9852 2012-03-02 Pedro Alves <palves@redhat.com>
9853
9854 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9855 * linux-low.c (struct simple_pid_list): New.
9856 (stopped_pids): New a struct simple_pid_list pointer.
9857 (add_to_pid_list, pull_pid_from_list): New.
9858 (handle_extended_wait): Don't assume the first signal new children
9859 report is SIGSTOP. Adjust call to pull_pid_from_list.
9860 (linux_wait_for_lwp): Adjust.
9861
9862 2012-03-02 Yao Qi <yao@codesourcery.com>
9863
9864 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9865 debug log.
9866
9867 2012-03-02 Yao Qi <yao@codesourcery.com>
9868
9869 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9870 `stop_pc' and `tpoint'. Update caller.
9871
9872 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9873
9874 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9875 * linux-low.c (use_linux_regsets): New macro.
9876 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9877 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9878 (linux_register_in_regsets): New function.
9879 (usr_fetch_inferior_registers): Skip registers covered by
9880 regsets.
9881 (usr_store_inferior_registers): Likewise.
9882 (usr_fetch_inferior_registers): New macro.
9883 (usr_store_inferior_registers): Likewise.
9884 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9885 (linux_store_registers): Likewise.
9886 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9887 prototype.
9888 (init_registers_mips64_dsp_linux): Likewise.
9889 (init_registers_mips_linux): New macro.
9890 (init_registers_mips_dsp_linux): Likewise.
9891 (mips_dsp_num_regs): Likewise.
9892 (DSP_BASE, DSP_CONTROL): New fallback macros.
9893 (mips_base_regs): New macro.
9894 (mips_regmap): Use it. Fix the size.
9895 (mips_dsp_regmap): New variable.
9896 (mips_dsp_regset_bitmap): Likewise.
9897 (mips_arch_setup): New function.
9898 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9899 than mips_regmap.
9900 (mips_cannot_store_register): Likewise.
9901 (the_low_target): Update .arch_setup, .num_regs and .regmap
9902 initializers. Add .regset_bitmap initializer.
9903 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9904 initializer.
9905 * linux-bfin-low.c (the_low_target): Likewise.
9906 * linux-cris-low.c (the_low_target): Likewise.
9907 * linux-crisv32-low.c (the_low_target): Likewise.
9908 * linux-ia64-low.c (the_low_target): Likewise.
9909 * linux-m32r-low.c (the_low_target): Likewise.
9910 * linux-m68k-low.c (the_low_target): Likewise.
9911 * linux-ppc-low.c (the_low_target): Likewise.
9912 * linux-s390-low.c (the_low_target): Likewise.
9913 * linux-sh-low.c (the_low_target): Likewise.
9914 * linux-sparc-low.c (the_low_target): Likewise.
9915 * linux-tic6x-low.c (the_low_target): Likewise.
9916 * linux-x86-low.c (the_low_target): Likewise.
9917 * linux-xtensa-low.c (the_low_target): Likewise.
9918 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9919 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9920 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9921 srv_xmlfiles.
9922 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9923 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9924
9925 2012-02-29 Yao Qi <yao@codesourcery.com>
9926 Pedro Alves <palves@redhat.com>
9927
9928 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9929 `step_over_finished' is true.
9930
9931 2012-02-27 Pedro Alves <palves@redhat.com>
9932
9933 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9934 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9935
9936 2012-02-27 Pedro Alves <palves@redhat.com>
9937
9938 PR server/9684
9939 * linux-low.c (pid_is_stopped): New.
9940 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9941
9942 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9943
9944 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9945 of conditions.
9946
9947 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9948
9949 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9950
9951 2012-02-24 Luis Machado <lgustavo@codesourcery>
9952
9953 * server.c (handle_query): Advertise support for target-side
9954 breakpoint condition evaluation.
9955 (process_point_options): New function.
9956 (process_serial_event): When inserting a breakpoint, check for
9957 a target-side condition that should be evaluated.
9958
9959 * mem-break.c: Include regcache.h and ax.h.
9960 (point_cond_list_t): New data structure.
9961 (breakpoint) <cond_list>: New field.
9962 (find_gdb_breakpoint_at): Make non-static.
9963 (delete_gdb_breakpoint_at): Clear any target-side
9964 conditions.
9965 (clear_gdb_breakpoint_conditions): New function.
9966 (add_condition_to_breakpoint): Likewise.
9967 (add_breakpoint_condition): Likewise.
9968 (gdb_condition_true_at_breakpoint): Likewise.
9969 (gdb_breakpoint_here): Return result directly instead
9970 of going through a local variable.
9971
9972 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9973 (clear_gdb_breakpoint_conditions): Likewise.
9974 (add_breakpoint_condition): Likewise.
9975 (gdb_condition_true_at_breakpoint): Likewise.
9976
9977 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9978 (need_step_over_p): Take target-side breakpoint condition into
9979 consideration.
9980
9981 2012-02-24 Luis Machado <lgustavo@codesourcery>
9982
9983 * server.h: Include tracepoint.h.
9984 (agent_mem_read, agent_get_trace_state_variable_value,
9985 agent_set_trace_state_variable_value,
9986 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9987 get_set_tsv_func_addr): New prototypes.
9988
9989 * ax.h: New include file.
9990 * ax.c: New source file.
9991
9992 * tracepoint.c: Include ax.h.
9993 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9994 agent_expr, eval_result_type): Move to ax.h.
9995 (parse_agent_expr): Rename to ...
9996 (gdb_parse_agent_expr): ... this, make it non-static and move
9997 to ax.h.
9998 (unparse_agent_expr) Rename to ...
9999 (gdb_unparse_agent_expr): ... this, make it non-static and move
10000 to ax.h.
10001 (eval_agent_expr): Rename to ...
10002 (eval_tracepoint_agent_expr): ... this.
10003 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10004 forward declarations.
10005 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10006 (agent_get_trace_state_variable_value): New function.
10007 (agent_set_trace_state_variable_value): New function.
10008 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10009 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10010 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10011 (condition_true_at_tracepoint): Likewise.
10012 (parse_agent_expr): Rename to ...
10013 (gdb_parse_agent_expr): ... this and move to ax.c.
10014 (unparse_agent_expr): Rename to ...
10015 (gdb_unparse_agent_expr): ... this and move to ax.c.
10016 (gdb_agent_op_name): Move to ax.c.
10017 (eval_agent_expr): Rename to ...
10018 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10019 and move to ax.c.
10020 (eval_tracepoint_agent_expr): New function.
10021 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10022 non-static.
10023 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10024 ax.c.
10025 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10026 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10027 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10028 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10029 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10030 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10031 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10032 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10033 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10034 (compile_bytecodes): Remove forward declaration.
10035 (is_goto_target): Move to ax.c.
10036 (compile_bytecodes): Move to ax.c and call
10037 agent_get_trace_state_variable_value (...) and
10038 agent_set_trace_state_variable_value (...).
10039
10040 * Makefile.in: Update ax.c and IPA dependencies.
10041
10042 2012-02-24 Pedro Alves <palves@redhat.com>
10043
10044 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10045 (cmd_bigqtbuffer_circular): ... this. Only handle
10046 'QTBuffer:circular:'.
10047 (handle_tracepoint_general_set): Adjust.
10048
10049 2012-02-16 Yao Qi <yao@codesourcery.com>
10050
10051 * inferiors.c: Move code to ...
10052 * dll.c: .... here. New.
10053 * server.h: Declare clear_dlls.
10054 * Makefile.in (SFILES): Add dll.c.
10055 (OBS): Add dll.o
10056 (dll.o): New rule.
10057
10058 2012-02-11 Yao Qi <yao@codesourcery.com>
10059
10060 * server.c: (handle_monitor_command): Add a new parameter
10061 `own_buf'.
10062 (handle_query): Update caller.
10063
10064 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10065
10066 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10067 * configure, config.in: Regenerate.
10068 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10069 is not defined.
10070
10071 2012-02-02 Pedro Alves <palves@redhat.com>
10072
10073 Try SIGKILL first, then PTRACE_KILL.
10074 * linux-low.c (linux_kill_one_lwp): New.
10075 (linux_kill_one_lwp): Rename to ...
10076 (kill_one_lwp_callback): ... this. Use the new
10077 linux_kill_one_lwp.
10078
10079 2012-02-02 Pedro Alves <palves@redhat.com>
10080
10081 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10082 inferior.
10083
10084 2012-01-27 Pedro Alves <palves@redhat.com>
10085
10086 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10087 (elf_64_file_p): Make static.
10088 (linux_pid_exe_is_elf_64_file): New.
10089 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10090 Delete declarations.
10091 (linux_pid_exe_is_elf_64_file): Declare.
10092 * linux-x86-low.c (x86_arch_setup): Use
10093 linux_pid_exe_is_elf_64_file.
10094
10095 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10096
10097 * linux-low.c (linux_wait_for_event_1): Rename to ...
10098 (linux_wait_for_event): ... here and merge it with former
10099 linux_wait_for_event - new variable wait_ptid, use it.
10100 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10101
10102 2012-01-23 Pedro Alves <palves@redhat.com>
10103
10104 * server.c (main): Avoid yet another case of infinite loop while
10105 detaching/killing after a longjmp.
10106
10107 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10108
10109 Code cleanup.
10110 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10111
10112 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10113
10114 * hostio.c (handle_readlink): New function.
10115 (handle_vFile): Call it to handle "vFile:readlink" packets.
10116
10117 2012-01-20 Pedro Alves <palves@redhat.com>
10118 Ulrich Weigand <ulrich.weigand@linaro.org>
10119
10120 * server.c (handle_v_requests): Only support vAttach and vRun to
10121 start multiple processes when in extended protocol mode.
10122
10123 2012-01-17 Pedro Alves <palves@redhat.com>
10124
10125 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10126 memalign plus mprotect to allocate the scratch buffer.
10127
10128 2012-01-13 Pedro Alves <palves@redhat.com>
10129
10130 * server.c (attach_inferior): Clear `cont_thread'.
10131
10132 2012-01-13 Pedro Alves <palves@redhat.com>
10133
10134 * server.c (main): Avoid infinite loop while detaching/killing
10135 after a longjmp.
10136
10137 2012-01-09 Doug Evans <dje@google.com>
10138
10139 * server.c (start_inferior): Set last_ptid in --wrapper case.
10140
10141 2012-01-06 Yao Qi <yao@codesourcery.com>
10142
10143 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10144 defined.
10145 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10146
10147 2012-01-04 Yao Qi <yao@codesourcery.com>
10148
10149 * tracepoint.c (cmd_qtdp): Print debug message
10150 for static tracepoint.
10151
10152 2012-01-04 Yao Qi <yao@codesourcery.com>
10153
10154 * tracepoint.c (trace_vdebug): Differentiate debug message
10155 between gdbserver and IPA.
10156
10157 2012-01-03 Yao Qi <yao@codesourcery.com>
10158
10159 * tracepoint.c (tracepoint_was_hit): Don't collect for
10160 static tracepoint.
10161
10162 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10163
10164 * terminal.h: Reformat copyright header.
10165
10166 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10167
10168 * server.c (gdbserver_version): Update copyright year.
10169 * gdbreplay.c (gdbreplay_version): Likewise.
10170
10171 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10172
10173 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10174
10175 Revert:
10176 2011-12-18 Hui Zhu <teawater@gmail.com>
10177 * linux-low.c (linux_create_inferior): Save return value to ret.
10178
10179 2011-12-18 Hui Zhu <teawater@gmail.com>
10180
10181 * linux-low.c (linux_create_inferior): Save return value to ret.
10182
10183 2011-12-16 Doug Evans <dje@google.com>
10184
10185 * linux-low.c (linux_create_inferior): If stdio connection,
10186 redirect stdin from /dev/null, stdout to stderr.
10187 * remote-utils.c (remote_is_stdio): New static global.
10188 (remote_connection_is_stdio): New function.
10189 (remote_prepare): Handle stdio connection.
10190 (remote_open): Ditto.
10191 (remote_close): Don't close stdin for stdio connections.
10192 (read_prim,write_prim): New functions. Replace all calls to
10193 read/write to these.
10194 * server.c (main): Watch for "-" argument. Move call to
10195 remote_prepare before start_inferior.
10196 * server.h (STDIO_CONNECTION_NAME): New macro.
10197 (remote_connection_is_stdio): Declare.
10198
10199 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10200 in debugging output.
10201
10202 2011-12-15 Yao Qi <yao@codesourcery.com>
10203
10204 * tracepoint.c: Include sys/syscall.h.
10205 (gdb_ust_thread): Remove preprocessor conditional.
10206
10207 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10208
10209 * linux-low.c (linux_detach_one_lwp): Call
10210 the_low_target.prepare_to_resume before detaching.
10211
10212 2011-12-14 Yao Qi <yao@codesourcery.com>
10213
10214 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10215 of write.
10216
10217 2011-12-14 Yao Qi <yao@codesourcery.com>
10218
10219 * i386-low.c (i386_low_stopped_data_address): Initialize local
10220 variable `control'.
10221
10222 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10223
10224 PR remote/13492
10225
10226 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10227 DR_CONTROL unless necessary. Extend comments.
10228 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10229 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10230
10231 2011-12-13 Yao Qi <yao@codesourcery.com>
10232
10233 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10234 macros.
10235 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10236
10237 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10238
10239 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10240 Print new debug message for such case.
10241
10242 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10243
10244 Fix overlapping memcpy.
10245 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10246 the read_inferior_memory transfer.
10247 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10248 write_inferior_memory transfer.
10249 (set_fast_tracepoint_jump): New variable buf. Use it for the
10250 read_inferior_memory and write_inferior_memory transfers.
10251 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10252 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10253 Use it for the write_inferior_memory transfer.
10254 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10255 buffers.
10256
10257 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10258
10259 * linux-low.c (fetch_register, store_register): Make code
10260 consistent, fix formatting.
10261
10262 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10263
10264 * linux-low.c (usr_store_inferior_registers): Factor out code
10265 to handle individual registers into...
10266 (store_register): ... this new function.
10267
10268 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10269
10270 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10271 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10272 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10273 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10274 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10275 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10276 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10277 (srv_xmlfiles): Add new XML files.
10278
10279 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10280 and <sys/uio.h>.
10281 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10282 (init_registers_s390_linux32v1): Add prototype.
10283 (init_registers_s390_linux32v2): Likewise.
10284 (init_registers_s390_linux64v1): Likewise.
10285 (init_registers_s390_linux64v2): Likewise.
10286 (init_registers_s390x_linux64v1): Likewise.
10287 (init_registers_s390x_linux64v2): Likewise.
10288 (s390_num_regs): Increment to 52.
10289 (s390_regmap): Add orig_r2 register.
10290 (s390_num_regs_3264): Increment to 68.
10291 (s390_regmap_3264): Add orig_r2 register.
10292 (s390_collect_ptrace_register): Handle orig_r2 register.
10293 (s390_supply_ptrace_register): Likewise.
10294 (s390_fill_last_break): New function.
10295 (s390_store_last_break): Likewise.
10296 (s390_fill_system_call): New function.
10297 (s390_store_system_call): Likewise.
10298 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10299 register sets.
10300 (s390_check_regset): New function.
10301 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10302 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10303 Update target_regsets for available register sets.
10304
10305 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10306 Jan Kratochvil <jan.kratochvil@redhat.com>
10307
10308 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10309 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10310 New.
10311 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10312 * linux-low.h (struct process_info_private): New member r_debug.
10313 * server.c (handle_qxfer_libraries): Call
10314 the_target->qxfer_libraries_svr4.
10315 (handle_qxfer_libraries_svr4): New function.
10316 (qxfer_packets): New entry "libraries-svr4".
10317 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10318 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10319 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10320 PACKET_qXfer_libraries_svr4.
10321
10322 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10323
10324 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10325 PSW address/mask between 8-byte and 16-byte formats.
10326 (s390_supply_ptrace_register): Likewise.
10327 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10328 basic addressing mode bit.
10329
10330 2011-11-24 Stan Shebs <stan@codesourcery.com>
10331
10332 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10333
10334 2011-11-17 Stan Shebs <stan@codesourcery.com>
10335
10336 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10337 (tracing_start_time): New global.
10338 (tracing_stop_time): New global.
10339 (tracing_user_name): New global.
10340 (tracing_notes): New global.
10341 (tracing_stop_note): New global.
10342 (cmd_qtstart): Set traceframe_usage, start_time.
10343 (stop_tracing): Set stop_time.
10344 (cmd_qtstatus): Report additional status.
10345 (cmd_qtp): New function.
10346 (handle_tracepoint_query): Call it.
10347 (cmd_qtnotes): New function.
10348 (handle_tracepoint_general_set): Call it.
10349 (get_timestamp): Rename from tsv_get_timestamp.
10350
10351 2011-11-14 Stan Shebs <stan@codesourcery.com>
10352 Kwok Cheung Yeung <kcy@codesourcery.com>
10353
10354 * linux-x86-low.c (small_jump_insn): New.
10355 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10356 trampoline and error message, build a trampoline and issue a small
10357 jump instruction to it.
10358 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10359 trampoline and error message.
10360 (x86_get_min_fast_tracepoint_insn_len): New.
10361 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10362 * linux-low.h (struct linux_target_ops): Add arguments to
10363 install_fast_tracepoint_jump_pad operation, add new operation.
10364 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10365 arguments.
10366 (linux_get_min_fast_tracepoint_insn_len): New function.
10367 (linux_target_op): Add new operation.
10368 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10369 (gdb_trampoline_buffer_end): Ditto.
10370 (gdb_trampoline_buffer_error): Ditto.
10371 (struct ipa_sym_addresses): Add fields for new IPA variables.
10372 (symbol_list): Add entries for new IPA variables.
10373 (struct tracepoint): Add fields to hold the address range of the
10374 trampoline used by the tracepoint.
10375 (trampoline_buffer_head): New static variable.
10376 (trampoline_buffer_tail): Ditto.
10377 (claim_trampoline_space): New function.
10378 (have_fast_tracepoint_trampoline_buffer): New function.
10379 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10380 structure.
10381 (install_fast_tracepoint): Ditto, also add error buffer argument.
10382 (cmd_qtminftpilen): New function.
10383 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10384 (fast_tracepoint_from_trampoline_address): New function.
10385 (fast_tracepoint_collecting): Handle trampoline as part of jump
10386 pad space.
10387 (set_trampoline_buffer_space): New function.
10388 (initialize_tracepoint): Initialize new IPA variables.
10389 * target.h (struct target_ops): Add arguments to
10390 install_fast_tracepoint_jump_pad operation, add new
10391 get_min_fast_tracepoint_insn_len operation.
10392 (target_get_min_fast_tracepoint_insn_len): New.
10393 (install_fast_tracepoint_jump_pad): Add arguments.
10394 * server.h (IPA_BUFSIZ): Define.
10395 * linux-i386-ipa.c: Include extra header files.
10396 (initialize_fast_tracepoint_trampoline_buffer): New function.
10397 (initialize_low_tracepoint): Call it.
10398 * server.h (set_trampoline_buffer_space): Declare.
10399 (claim_trampoline_space): Ditto.
10400 (have_fast_tracepoint_trampoline_buffer): Ditto.
10401
10402 2011-11-14 Yao Qi <yao@codesourcery.com>
10403
10404 * server.c (handle_query): Handle InstallInTrace for qSupported.
10405 * tracepoint.c (add_tracepoint): Sort list.
10406 (install_tracepoint, download_tracepoint): New.
10407 (cmd_qtdp): Call them to install and download tracepoints.
10408 (sort_tracepoints): Removed.
10409 (cmd_qtstart): Update.
10410
10411 2011-11-14 Yao Qi <yao@codesourcery.com>
10412
10413 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10414 * mem-break.h: Declare.
10415 * tracepoint.c (cmd_qtstart): Move some code to ...
10416 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10417 New.
10418 (download_tracepoints): Move some code to ...
10419 (download_tracepoint_1): ... here. New.
10420
10421 2011-11-08 Yao Qi <yao@codesourcery.com>
10422
10423 * remote-utils.c (relocate_instruction): A comment fix.
10424
10425 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10426
10427 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10428 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10429 dr_status_mirror and dr_control_mirror from debug_reg_state.
10430 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10431 (i386_initial_stuff): Remove use of deleted globals.
10432 (i386_get_thread_context, i386_set_thread_context,
10433 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10434 from debug_reg_state.
10435
10436 2011-11-05 Yao Qi <yao@codesourcery.com>
10437
10438 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10439 address as TPOINT's.
10440
10441 2011-11-02 Stan Shebs <stan@codesourcery.com>
10442
10443 * tracepoint.c (agent_mem_read_string): New function.
10444 (eval_agent_expr): Call it for tracenz.
10445 * server.c (handle_query): Report support for tracenz.
10446
10447 2011-11-02 Yao Qi <yao@codesourcery.com>
10448
10449 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10450
10451 2011-11-02 Yao Qi <yao@codesourcery.com>
10452
10453 * target.h: Fix a typo in comment.
10454
10455 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10456
10457 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10458 clobber the breakpoints' shadows with fast tracepoint jumps.
10459 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10460 * target.c (write_inferior_memory): Also pass MYADDR down to
10461 check_mem_write.
10462
10463 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10464
10465 * configure.ac: Check support for personality routine.
10466 * configure: Regenerate.
10467 * config.in: Likewise.
10468 * linux-low.c: Include <sys/personality.h>.
10469 Define ADDR_NO_RANDOMIZE if necessary.
10470 (linux_create_inferior): Disable address space randomization when
10471 forking inferior, if requested.
10472 (linux_supports_disable_randomization): New function.
10473 (linux_target_ops): Install it.
10474 * server.h (disable_randomization): Declare.
10475 * server.c (disable_randomization): New global variable.
10476 (handle_general_set): Handle QDisableRandomization.
10477 (handle_query): Likewise for qSupported.
10478 (main): Support --disable-randomization and --no-disable-randomization
10479 command line arguments.
10480 * target.h (struct target_ops): Add supports_disable_randomization.
10481 (target_supports_disable_randomization): New macro.
10482
10483 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10484
10485 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10486 ifdef check.
10487 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10488 [!PT_GETDSBT] (target_loadmap): New definition.
10489 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10490 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10491 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10492 and PT_GETDSBT to LINUX_LOADMAP.
10493 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10494 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10495
10496 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10497
10498 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10499 (arm_linux_hwbp_cap): New static variable.
10500 (arm_linux_get_hwbp_cap): Replace by ...
10501 (arm_linux_init_hwbp_cap): ... this new function.
10502 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10503 (arm_linux_get_hw_watchpoint_count): Likewise.
10504 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10505 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10506 (arm_prepare_to_resume): Use perror_with_name instead of error.
10507
10508 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10509
10510 * linux-arm-low.c: Include <signal.h>.
10511 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10512 (struct arm_linux_hwbp_cap): New data type.
10513 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10514 (struct arm_linux_hw_breakpoint): New data type.
10515 (MAX_BPTS, MAX_WPTS): Define.
10516 (struct arch_process_info, struct arch_lwp_info): New data types.
10517 (arm_linux_get_hwbp_cap): New function.
10518 (arm_linux_get_hw_breakpoint_count): Likewise.
10519 (arm_linux_get_hw_watchpoint_count): Likewise.
10520 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10521 (arm_hwbp_control_initialize): Likewise.
10522 (arm_hwbp_control_is_enabled): Likewise.
10523 (arm_hwbp_control_is_initialized): Likewise.
10524 (arm_hwbp_control_disable): Likewise.
10525 (arm_linux_hw_breakpoint_equal): Likewise.
10526 (arm_linux_hw_point_initialize): Likewise.
10527 (struct update_registers_data): New data structure.
10528 (update_registers_callback: New function.
10529 (arm_insert_point): Likewise.
10530 (arm_remove_point): Likewise.
10531 (arm_stopped_by_watchpoint): Likewise.
10532 (arm_stopped_data_address): Likewise.
10533 (arm_new_process): Likewise.
10534 (arm_new_thread): Likewise.
10535 (arm_prepare_to_resume): Likewise.
10536 (the_low_target): Register arm_insert_point, arm_remove_point,
10537 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10538 arm_new_thread, and arm_prepare_to_resume.
10539
10540 2011-09-15 Stan Shebs <stan@codesourcery.com>
10541
10542 * server.h (struct emit_ops): Add compare-goto fields.
10543 * tracepoint.c (gdb_agent_op_sizes): New table.
10544 (emit_eq_goto): New function.
10545 (emit_ne_goto): New function.
10546 (emit_lt_goto): New function.
10547 (emit_le_goto): New function.
10548 (emit_gt_goto): New function.
10549 (emit_ge_goto): New function.
10550 (is_goto_target): New function.
10551 (compile_bytecodes): Recognize special cases of compare-goto
10552 combinations and call specialized emitters for them.
10553 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10554 (amd64_emit_ne_goto): New function.
10555 (amd64_emit_lt_goto): New function.
10556 (amd64_emit_le_goto): New function.
10557 (amd64_emit_gt_goto): New function.
10558 (amd64_emit_ge_goto): New function.
10559 (amd64_emit_ops): Add the new functions.
10560 (i386_emit_eq_goto): New function.
10561 (i386_emit_ne_goto): New function.
10562 (i386_emit_lt_goto): New function.
10563 (i386_emit_le_goto): New function.
10564 (i386_emit_gt_goto): New function.
10565 (i386_emit_ge_goto): New function.
10566 (i386_emit_ops): Add the new functions.
10567
10568 2011-09-08 Stan Shebs <stan@codesourcery.com>
10569
10570 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10571 (i386_emit_epilogue): Restore %ebx.
10572
10573 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10574
10575 * server.c (step_thread): Remove definition.
10576 (process_serial_event): Don't handle Hs.
10577 * server.h (step_thread): Remove declaration.
10578 * target.c (set_desired_inferior): Remove use of step_thread.
10579
10580 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10581
10582 * linux-low.c: Include linux-procfs.h.
10583 (linux_attach_lwp_1): Update comments.
10584 (linux_attach): Scan for existing threads when attaching to a
10585 process that is the tgid.
10586 * Makefile.in: Update dependencies.
10587
10588 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10589
10590 * configure.srv: Add linux-procfs.o dependencies.
10591
10592 2011-08-14 Yao Qi <yao@codesourcery.com>
10593
10594 * target.h (struct target_ops): Fix indent.
10595 * win32-low.c (win32_target_ops): Fix comment.
10596
10597 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10598 Yao Qi <yao@codesourcery.com>
10599
10600 * Makefile.in (clean): Remove tic6x-*.c files.
10601 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10602 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10603 (tic6x-c64xp-linux.c): Likewise.
10604 * configure.srv: Add support for tic6x-*-uclinux.
10605 * linux-tic6x-low.c: New.
10606 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10607
10608 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10609 Yao Qi <yao@codesourcery.com>
10610
10611 * target.h (struct target_ops): Add read_loadmap.
10612 * linux-low.c (struct target_loadseg): New type.
10613 (struct target_loadmap): New type.
10614 (linux_read_loadmap): New function.
10615 (linux_target_ops): Add linux_read_loadmap.
10616 * server.c (handle_query): Support qXfer:fdpic:read packet.
10617 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10618 to NULL.
10619
10620 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10621
10622 * win32-low.c: Include <stdint.h>.
10623
10624 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10625
10626 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10627 to the inferior here.
10628 (i386_remove_aligned_watchpoint): Ditto.
10629 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10630 fit part of the watchpoint in the debug registers.
10631 (i386_update_inferior_debug_regs): New.
10632 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10633 registers, and only update the inferior on success.
10634 (i386_low_remove_watchpoint): Ditto.
10635
10636 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10637
10638 * linux-low.c (compare_ints, unique, list_threads, show_process,
10639 linux_core_of_thread): Delete.
10640 (linux_target_ops): Change linux_core_of_thread to
10641 linux_common_core_of_thread.
10642 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10643 * utils.c (malloc_failure): Change type of argument.
10644 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10645 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10646 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10647 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10648 (IPA_OBJS): Add common-utils-ipa.o.
10649 (ptid_h, linux_osdata_h): New macros.
10650 (server_h): Add common/common-utils.h, common/xml-utils.h,
10651 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10652 common/ptid.h.
10653 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10654 ptid.o, buffer.o): New rules.
10655 (linux-low.o): Add common/linux-osdata.h as a dependency.
10656 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10657 * configure.ac: Add AC_HEADER_DIRENT check.
10658 * config.in: Regenerate.
10659 * configure: Regenerate.
10660 * remote-utils.c (xml_escape_text): Delete.
10661 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10662 buffer_xml_printf): Move to common/buffer.c.
10663 * server.c (main): Remove call to initialize_inferiors.
10664 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10665 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10666 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10667 internal_error, gdb_assert, gdb_assert_fail): Delete.
10668 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10669 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10670 common/buffer.h.
10671 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10672 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10673 initialize_inferiors): Delete.
10674
10675 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10676
10677 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10678 symbol error.
10679
10680 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10681
10682 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10683 assertion.
10684 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10685
10686 2011-05-26 Yao Qi <yao@codesourcery.com>
10687
10688 * Makefile.in (thread-db.o): Track dependence to
10689 common/gdb_thread_db.h.
10690 * thread-db.c: include gdb_thread_db.h from right place.
10691
10692 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10693
10694 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10695 __FILE__ and __LINE__ to internal_error.
10696
10697 2011-05-13 Doug Evans <dje@google.com>
10698
10699 * thread-db.c (try_thread_db_load_from_sdir): New function.
10700 (try_thread_db_load_from_dir): New function.
10701 (thread_db_load_search): Handle $sdir, ignore $pdir.
10702 Remove trying of system directories if search of
10703 libthread-db-search-path fails, that is now done via $sdir.
10704
10705 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10706
10707 * server.c (handle_query): Add EnableDisableTracepoints to the list
10708 of supported features.
10709 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10710 tracepoints.
10711 (cmd_qtenable_disable): New.
10712 (cmd_qtstart): Install tracepoints even if disabled.
10713 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10714 receiving a QTEnable or QTDisable packet.
10715 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10716 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10717 tracepoints.
10718 (gdb_probe): Skip data collection if static tracepoint is disabled.
10719
10720 2011-05-10 Doug Evans <dje@google.com>
10721
10722 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10723
10724 2011-05-04 Doug Evans <dje@google.com>
10725
10726 * linux-low.c (linux_join): Skip process lookup.
10727 * spu-low.c (spu_join): Ditto.
10728 * server.c (join_inferiors_callback): Delete.
10729 (process_serial_event): For 'D' packet (detach) call join_inferior
10730 directly.
10731
10732 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10733
10734 * README: Don't mention xscale*-*-linux*.
10735 * configure.srv (xscale*-*-linux*): Don't handle target.
10736
10737 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10738
10739 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10740 casting pointers.
10741 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10742 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10743 (i386_emit_void_call_2): Likewise.
10744
10745 2011-04-26 Yao Qi <yao@codesourcery.com>
10746
10747 * linux-low.c: Move common macros to linux-ptrace.h.
10748 Include linux-ptrace.h.
10749 * Makefile.in (linux_ptrace_h): New.
10750 (linux-low.o): Depends on linux-ptrace.h.
10751
10752 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10753
10754 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10755 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10756 (remote_prepare): New function with most of the TCP code from ...
10757 (remote_open): ... here. Detect PORT here unconditionally. Move also
10758 setting transport_is_reliable.
10759 * server.c (run_once): New variable.
10760 (gdbserver_usage): Document it.
10761 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10762 the first run if RUN_ONCE.
10763 * server.h (run_once, remote_prepare): New declarations.
10764
10765 2011-04-19 Tom Tromey <tromey@redhat.com>
10766
10767 * win32-low.c (handle_load_dll): Remove duplicate "the".
10768
10769 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10770
10771 Remove support for old Cygwin 1.5 versions.
10772 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10773 function to avoid warning.
10774 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10775 warning.
10776
10777 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10778
10779 * gdbserver/server.h (Macro _): Define it if not available.
10780
10781 2011-03-14 Michael Snyder <msnyder@vmware.com>
10782
10783 * hostio.c (handle_close): Remove unnecessary null test.
10784
10785 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10786
10787 * Makefile.in (maintainer-clean realclean distclean): Remove
10788 "make ... subdir_do" command.
10789
10790 2011-03-10 Michael Snyder <msnyder@vmware.com>
10791
10792 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10793
10794 * server.c (handle_v_run): Free alloced buffer on early return.
10795
10796 2011-03-09 Yao Qi <yao@codesourcery.com>
10797
10798 Revert:
10799 2011-03-04 Yao Qi <yao@codesourcery.com>
10800
10801 * Makefile.in: Remove GNU make feature --directory.
10802
10803 2011-03-05 Yao Qi <yao@codesourcery.com>
10804
10805 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10806 (subdir_do): New make target. Copied from gdb/Makefile.
10807 (maintainer-clean, realclean, distclean, clean): Call corresponding
10808 make targets in common/Makefile.
10809
10810 2011-02-11 Yao Qi <yao@codesourcery.com>
10811
10812 * configure.ac: Call AC_PROG_RANLIB.
10813 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10814 * configure: Regenerate.
10815
10816 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10817
10818 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10819
10820 2011-03-06 Yao Qi <yao@codesourcery.com>
10821
10822 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10823
10824 2011-03-05 Yao Qi <yao@codesourcery.com>
10825
10826 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10827 (subdir_do): New make target. Copied from gdb/Makefile.
10828 (maintainer-clean, realclean, distclean, clean): Call corresponding
10829 make targets in common/Makefile.
10830
10831 2011-03-04 Yao Qi <yao@codesourcery.com>
10832
10833 * Makefile.in: Remove GNU make feature --directory.
10834
10835 2011-03-04 Michael Snyder <msnyder@vmware.com>
10836
10837 * server.c (queue_stop_reply): Call xmalloc not malloc.
10838
10839 2011-03-02 Michael Snyder <msnyder@vmware.com>
10840
10841 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10842
10843 2011-02-28 Michael Snyder <msnyder@vmware.com>
10844
10845 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10846 (cmd_qtframe): Ditto.
10847 (cmd_qtbuffer): Ditto.
10848 (cmd_bigqtbuffer): Ditto.
10849
10850 * utils.c (decimal2str): Initialize 'width' to nine, then
10851 don't mess with it.
10852
10853 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10854
10855 * hostio.c (require_data): Free *data, not data.
10856
10857 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10858
10859 * hostio.c (require_data): Use free, not xfree.
10860
10861 2011-02-27 Michael Snyder <msnyder@vmware.com>
10862
10863 * server.c (handle_query): Discard unused value.
10864
10865 * hostio.c (require_data): Free malloc memory before returning
10866 error.
10867
10868 2011-02-26 Michael Snyder <msnyder@vmware.com>
10869
10870 * linux-low.c (list_threads): Call closedir for dirent.
10871
10872 2011-02-27 Michael Snyder <msnyder@vmware.com>
10873
10874 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10875 a case statement falls through.
10876
10877 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10878
10879 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10880 in comparison.
10881
10882 2011-02-26 Michael Snyder <msnyder@vmware.com>
10883
10884 * utils.c (decimal2str): Eliminate dead code and dead param.
10885 (pulongest): Drop dead param from call to decimal2str.
10886 (plongest): Ditto.
10887
10888 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10889
10890 Revert the following patch (not approved yet):
10891 2011-02-21 Hui Zhu <teawater@gmail.com>
10892 * tracepoint.c (tp_printf): New function.
10893 (eval_agent_expr): Handle gdb_agent_op_printf.
10894
10895 2011-02-21 Hui Zhu <teawater@gmail.com>
10896
10897 * tracepoint.c (tp_printf): New function.
10898 (eval_agent_expr): Handle gdb_agent_op_printf.
10899
10900 2011-02-18 Tom Tromey <tromey@redhat.com>
10901
10902 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10903 (tracepoint.o): Likewise.
10904 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10905 (gdb_agent_op_names): Likewise.
10906
10907 2011-02-18 Tom Tromey <tromey@redhat.com>
10908
10909 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10910 gdb_agent_op_rot>: New constants.
10911 (gdb_agent_op_names): Add pick and roll.
10912 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10913 cases.
10914
10915 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10916
10917 * aclocal.m4: Regenerated with aclocal-1.11.1.
10918
10919 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10920
10921 * server.c (handle_qxfer_traceframe_info): New.
10922 (qxfer_packets): Register "traceframe-info".
10923 (handle_query): Report support for qXfer:traceframe-info:read+.
10924 * tracepoint.c (match_blocktype): New.
10925 (traceframe_find_block_type): Rename to ...
10926 (traceframe_walk_blocks): ... this. Add callback filter argument,
10927 and use it.
10928 (traceframe_find_block_type): New, reimplemented on top of
10929 traceframe_walk_blocks.
10930 (build_traceframe_info_xml): New.
10931 (traceframe_read_info): New.
10932 * server.h (traceframe_read_info): Declare.
10933
10934 2011-02-11 Yao Qi <yao@codesourcery.com>
10935
10936 * configure.ac: Call AC_PROG_RANLIB.
10937 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10938 * configure: Regenerate.
10939
10940 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10941
10942 * server.c (gdb_read_memory): Change return semantics to allow
10943 partial transfers.
10944 (handle_search_memory_1): Adjust.
10945 (process_serial_event) <'m' packet>: Handle partial transfers.
10946 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10947
10948 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10949
10950 * regcache.c (init_register_cache): Initialize
10951 regcache->register_status.
10952 (free_register_cache): Release regcache->register_status.
10953 (regcache_cpy): Copy register_status.
10954 (registers_to_string): Print 'x's for unavailable registers.
10955 (supply_register): Mark the register's status valid or
10956 unavailable, depending on whether a buffer was passed in or not.
10957 (supply_register_zeroed): New.
10958 (supply_regblock): Mark the registers' status valid or
10959 unavailable, depending on whether a buffer was passed in or not.
10960 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10961 (struct regcache): New `register_status' field.
10962 (supply_register_zeroed): Declare.
10963 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10964 supply_register_zeroed, rather than passing a NULL buffer to
10965 supply_register.
10966 * tracepoint.c (fetch_traceframe_registers): Update comment.
10967
10968 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10969
10970 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10971 buffer explicit.
10972
10973 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10974
10975 * server.h (decode_xfer_write): Change prototype.
10976 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10977 and don't extract the annex here.
10978 * server.c (decode_xfer_read): Remove `annex' parameter,
10979 and don't extract the annex here.
10980 (decode_xfer): New.
10981 (struct qxfer): New.
10982 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10983 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10984 (handle_qxfer_statictrace): New functions, abstracted out from
10985 handle_query, and made to use the struct qxfer interface.
10986 (handle_threads_qxfer_proper): Rename to ...
10987 (handle_qxfer_threads_proper): ... this.
10988 (handle_threads_qxfer): Rename to ...
10989 (handle_qxfer_threads): ... this. Adjust.
10990 (qxfer_packets): New array.
10991 (handle_qxfer): New function.
10992 (handle_query): Use handle_qxfer.
10993
10994 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10995
10996 * gdbreplay.c: Shorten lines of >= 80 columns.
10997 * linux-low.c: Ditto.
10998 * linux-ppc-low.c: Ditto.
10999 * linux-s390-low.c: Ditto.
11000 * linux-sparc-low.c: Ditto.
11001 * linux-x86-low.c: Ditto.
11002 * linux-xtensa-low.c: Ditto.
11003 * mem-break.c: Ditto.
11004 * nto-low.c: Ditto.
11005 * regcache.h: Ditto.
11006 * remote-utils.c: Ditto.
11007 * server.c: Ditto.
11008 * server.h: Ditto.
11009 * thread-db.c: Ditto.
11010 * tracepoint.c: Ditto.
11011 * utils.c: Ditto.
11012 * win32-low.h: Ditto.
11013
11014 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11015
11016 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11017 update.
11018
11019 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11020
11021 * server.c (gdbserver_version): Update copyright year in version
11022 output.
11023 * gdbreplay.c (gdbreplay_version): Ditto.
11024
11025 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11026
11027 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11028 * linux-bfin-low.c: New file.
11029 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11030 PT_DATA_ADDR for BFIN targets.
11031 * Makefile.in (SFILES): Add linux-bfin-low.c.
11032 (clean): Remove reg-bfin.c.
11033 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11034 * README: Mention supported Blackfin targets.
11035
11036 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11037
11038 * .gitignore: New file.
11039
11040 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11041
11042 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11043
11044 2010-10-22 Jie Zhang <jie@codesourcery.com>
11045
11046 * Makefile.in: Add FLAGS_TO_PASS variable.
11047 (install): Remove dependency of install-only and recursively
11048 invoke make for install-only.
11049
11050 2010-10-04 Doug Evans <dje@google.com>
11051
11052 * Makefile.in (uninstall): Use $(DESTDIR).
11053
11054 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11055
11056 PR gdb/11842
11057
11058 * linux-x86-low.c (compat_siginfo_from_siginfo)
11059 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11060 si_code is < 0. Check for si_code == SI_TIMER before checking for
11061 si_code < 0.
11062
11063 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11064
11065 * lynx-i386-low.c: New file.
11066 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11067
11068 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11069
11070 * lynx-low.c (ptrace_request_to_str): Remove handling for
11071 request values that have been removed in LynxOS 5.x.
11072
11073 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11074
11075 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11076 <ptrace.h>
11077
11078 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11079
11080 * configure.ac: Add --enable-inprocess-agent option.
11081 * configure: Rebuilt.
11082
11083 2010-09-06 Yao Qi <yao@codesourcery.com>
11084
11085 * linux-low.c (linux_kill): Remove unused variable.
11086 (linux_stabilize_threads): Likewise.
11087 * server.c (start_inferior): Likewise.
11088 (queue_stop_reply_callback): Likewise.
11089 * tracepoint.c (do_action_at_tracepoint): Likewise.
11090
11091 2010-09-06 Yao Qi <yao@codesourcery.com>
11092
11093 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11094 on return.
11095
11096 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11097
11098 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11099
11100 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11101
11102 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11103 "$(IPA_DEPFILES)".
11104
11105 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11106
11107 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11108 gdbserver/lynx-ppc-low.c: New files.
11109 * Makefile.in (lynx_low_h): New variable.
11110 (lynx-low.o, lynx-ppc-low.o): New rules.
11111 * configure.ac: On LynxOS, link with -lnetinet.
11112 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11113 * configure: regenerate.
11114
11115 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11116
11117 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11118 * configure.ac: Add check for vasprintf and vsnprintf.
11119 * configure, config.in: Regenerate.
11120 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11121
11122 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11123
11124 * gdbreplay.c: Move include of alloca.h up, next to include of
11125 malloc.h.
11126 * server.h: Add include of malloc.h.
11127 * mem-break.c: Remove include of malloc.h.
11128 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11129
11130 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11131
11132 * Makefile.in (memmem.o): Build with -Wno-error.
11133
11134 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11135
11136 * utils.c (xsnprintf): Make non-static.
11137 * server.h: Add xsnprintf declaration.
11138 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11139 replace calls to snprintf by calls to xsnprintf throughout.
11140
11141 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11142
11143 * configure.ac: Add configure check for alloca.
11144 * configure, config.in: Regenerate.
11145 * server.h: Include alloca.h if it exists.
11146 * gdbreplay.c: Include alloca.h if it exists.
11147
11148 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11149
11150 * linux-low.c (__SIGRTMIN): Define if not already defined.
11151 (linux_create_inferior): Check for __ANDROID__ rather than
11152 __SIGRTMIN.
11153 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11154 are already deferred.
11155 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11156 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11157 stopped and already has a pending signal to report.
11158 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11159 a pending signal to report or is moving out of a jump pad.
11160 (linux_init_signals): Check for __ANDROID__ rather than
11161 __SIGRTMIN.
11162
11163 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11164
11165 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11166 debug_threads check. Avoid a linear search when not doing debug
11167 output.
11168
11169 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11170
11171 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11172 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11173 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11174 (process_event): Change local fd's type to gdb_fildes_t.
11175 (create_file_handler): Adjust prototype.
11176 (delete_file_handler): Adjust prototype.
11177 (handle_file_event): Adjust prototype. Use pfildes.
11178 (create_file_event): Adjsut prototype.
11179 * remote-utils.c (remote_desc, listen_desc): Change type to
11180 gdb_fildes_t.
11181 * server.h: New gdb_fildes_t typedef.
11182 [USE_WIN32API]: Include winsock2.h.
11183 (delete_file_handler, add_file_handler): Adjust prototypes.
11184 (pfildes): Declare.
11185 * utils.c (pfildes): New.
11186
11187 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11188
11189 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11190 * configure: Regenerate.
11191
11192 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11193
11194 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11195 (linux_done_accessing_memory): ... this.
11196 (linux_target_ops): Adjust.
11197 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11198 * nto-low.c (nto_target_ops): Adjust comment.
11199 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11200 * spu-low.c (spu_target_ops): Adjust comment.
11201 * target.h (target_ops): Rename unprepare_to_access_memory field
11202 to done_accessing_memory.
11203 (unprepare_to_access_memory): Rename to ...
11204 (done_accessing_memory): ... this.
11205
11206 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11207
11208 * linux-low.c (linux_prepare_to_access_memory): New.
11209 (linux_unprepare_to_access_memory): New.
11210 (linux_target_ops): Install them.
11211 * server.c (read_memory): Rename to ...
11212 (gdb_read_memory): ... this. Use
11213 prepare_to_access_memory/prepare_to_access_memory.
11214 (write_memory): Rename to ...
11215 (gdb_write_memory): ... this. Use
11216 prepare_to_access_memory/prepare_to_access_memory.
11217 (handle_search_memory_1): Adjust.
11218 (process_serial_event): Adjust.
11219 * target.h (struct target_ops): New fields
11220 prepare_to_access_memory and unprepare_to_access_memory.
11221 (prepare_to_access_memory, unprepare_to_access_memory): New.
11222 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11223 prepare_to_access_memory/prepare_to_access_memory.
11224 * nto-low.c (nto_target_ops): Adjust.
11225 * spu-low.c (spu_target_ops): Adjust.
11226 * win32-low.c (win32_target_ops): Adjust.
11227
11228 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11229
11230 * Makefile.in (WARN_CFLAGS): Get it from configure.
11231 (WERROR_CFLAGS): New.
11232 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11233 * configure.ac: Introduce --enable-werror, which adds -Werror to
11234 the compiler command line. Enabled by default. Disable with
11235 --disable-werror. Add -Wdeclaration-after-statement
11236 Wpointer-arith and -Wformat-nonliteral to warning flags.
11237 * configure: Regenerate.
11238
11239 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11240
11241 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11242
11243 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11244
11245 * gdbreplay.c (remote_error): New.
11246 (gdbchar): New.
11247 (expect): Use gdbchar. Check for error reading from GDB.
11248 Clarify sync error output.
11249 (play): Check for errors writing to GDB.
11250 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11251 * remote-utils.c (getpkt): Check for errors writing to the remote
11252 descriptor.
11253
11254 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11255
11256 * linux-low.c (linux_wait_1): Move non-debugging code out of
11257 `debug_threads' control.
11258
11259 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11260
11261 * linux-low.c (linux_wait_1): Don't set last_status here.
11262 * server.c (push_event, queue_stop_reply_callback): Assert we're
11263 not pushing a TARGET_WAITKIND_IGNORE event.
11264 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11265 (myresume, handle_target_event): Set the thread's last_resume_kind
11266 and last_status from the target returned status.
11267
11268 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11269
11270 PR threads/10729
11271
11272 * linux-x86-low.c (update_debug_registers_callback): New.
11273 (i386_dr_low_set_addr): Use it.
11274 (i386_dr_low_get_addr): New.
11275 (i386_dr_low_set_control): Use update_debug_registers_callback.
11276 (i386_dr_low_get_control): New.
11277 (i386_dr_low_get_status): Adjust.
11278 * linux-low.c (linux_stop_lwp): New.
11279 * linux-low.h (linux_stop_lwp): Declare.
11280
11281 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11282 argument instead of a i386_debug_reg_state.
11283 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11284 a i386_debug_reg_state.
11285 (i386_insert_aligned_watchpoint): Adjust.
11286 (i386_remove_aligned_watchpoint): Adjust.
11287 (i386_low_stopped_data_address): Read the debug registers from the
11288 inferior instead of from the mirrors.
11289 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11290 (i386_dr_low_get_addr): Declare.
11291 (i386_dr_low_get_control): Declare.
11292 (i386_dr_low_get_status): Change prototype.
11293
11294 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11295 (i386_dr_low_get_addr): New.
11296 (i386_dr_low_get_control): New.
11297 (i386_dr_low_get_status): Adjust prototype. Return
11298 dr_status_mirror.
11299 (i386_initial_stuff): Clear dr_status_mirror and
11300 dr_control_mirror.
11301 (i386_get_thread_context): Adjust.
11302 (i386_set_thread_context): Adjust.
11303 (i386_thread_added): Adjust.
11304
11305 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11306
11307 * linux-low.h (linux_thread_area): Delete declaration.
11308
11309 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11310
11311 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11312 after its termination.
11313
11314 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11315
11316 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11317 (gdb_wants_all_stopped): Delete.
11318 (linux_wait_1): Don't call them.
11319 * server.c (handle_v_cont): Tag all threads as want-stopped.
11320 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11321 stopped as "client-wants-stopped".
11322
11323 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11324
11325 * Makefile.in (signals_h): New.
11326 (server_h): Depend on it.
11327 (server.o): Don't depend on $(signals_def).
11328 (signals.o): Depend on $(signals_def).
11329
11330 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11331
11332 * Makefile.in (signals_def): New.
11333 (server_h): Append include/gdb/signals.h and signals_def.
11334 (server.o): Append signals_def.
11335
11336 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11337
11338 * server.c (handle_target_event): Use target_signal_to_host for
11339 resume_info.sig initialization.
11340 * target.h (struct thread_resume) <sig>: New comment.
11341
11342 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11343
11344 * server.c (handle_query): strcpy() the returned string from paddress()
11345 instead of sprintf().
11346 * utils.c (paddress): Return phex_nz().
11347
11348 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11349
11350 * server.c (handle_v_cont): Call mourn_inferior if process
11351 just exited.
11352 (myresume): Likewise.
11353
11354 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11355
11356 Static tracepoints, and integration with UST.
11357
11358 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11359 * mem-break.c (uninsert_all_breakpoints)
11360 (reinsert_all_breakpoints): New.
11361 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11362 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11363 (gdb_agent_ust_loaded, helper_thread_id)
11364 (gdb_agent_helper_thread_id): New macros.
11365 (struct ipa_sym_addresses): Add addr_ust_loaded,
11366 addr_helper_thread_id, addr_cmd_buf.
11367 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11368 (in_process_agent_loaded_ust): New.
11369 (write_e_ust_not_loaded): New.
11370 (maybe_write_ipa_ust_not_loaded): New.
11371 (struct collect_static_trace_data_action): New.
11372 (enum tracepoint_type) <static_tracepoint>: New.
11373 (struct tracepoint) <handle>: Mention static tracepoints.
11374 (struct static_tracepoint_ctx): New.
11375 (CMD_BUF_SIZE): New.
11376 (add_tracepoint_action): Handle static tracepoint actions.
11377 (unprobe_marker_at): New.
11378 (clear_installed_tracepoints): Handle static tracepoints.
11379 (cmd_qtdp): Handle static tracepoints.
11380 (probe_marker_at): New.
11381 (cmd_qtstart): Handle static tracepoints.
11382 (response_tracepoint): Handle static tracepoints.
11383 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11384 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11385 (get_context_regcache): Handle static tracepoints.
11386 (do_action_at_tracepoint): Handle static tracepoint actions.
11387 (traceframe_find_block_type): Handle static trace data blocks.
11388 (traceframe_read_sdata): New.
11389 (download_tracepoints): Download static tracepoint actions.
11390 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11391 (GDB_PROBE_NAME): New.
11392 (ust_ops): New.
11393 (GET_UST_SYM): New.
11394 (USTF): New.
11395 (dlsym_ust): New.
11396 (ust_marker_to_static_tracepoint): New.
11397 (gdb_probe): New.
11398 (collect_ust_data_at_tracepoint): New.
11399 (gdb_ust_probe): New.
11400 (UNIX_PATH_MAX, SOCK_DIR): New.
11401 (gdb_ust_connect_sync_socket): New.
11402 (resume_thread, stop_thread): New.
11403 (run_inferior_command): New.
11404 (init_named_socket): New.
11405 (gdb_ust_socket_init): New.
11406 (cstr_to_hexstr): New.
11407 (next_st): New.
11408 (first_marker, next_marker): New.
11409 (response_ust_marker): New.
11410 (cmd_qtfstm, cmd_qtsstm): New.
11411 (unprobe_marker_at, probe_marker_at): New.
11412 (cmd_qtstmat, gdb_ust_thread): New.
11413 (gdb_ust_init): New.
11414 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11415 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11416 (ST_REGENTRY): New.
11417 (x86_64_st_collect_regmap): New.
11418 (X86_64_NUM_ST_COLLECT_GREGS): New.
11419 (AMD64_RIP_REGNUM): New.
11420 (supply_static_tracepoint_registers): New.
11421 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11422 (ST_REGENTRY): New.
11423 (i386_st_collect_regmap): New.
11424 (i386_NUM_ST_COLLECT_GREGS): New.
11425 (supply_static_tracepoint_registers): New.
11426 * server.c (handle_query): Handle qXfer:statictrace:read.
11427 <qSupported>: Report support for StaticTracepoints, and
11428 qXfer:statictrace:read features.
11429 * server.h (traceframe_read_sdata)
11430 (supply_static_tracepoint_registers): Declare.
11431 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11432 (unpack_varlen_hex): Include in IPA build.
11433 * Makefile.in (ustlibs, ustinc): New.
11434 (IPA_OBJS): Add remote-utils-ipa.o.
11435 ($(IPA_LIB)): Link -ldl and -lpthread.
11436 (UST_CFLAGS): New.
11437 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11438 * config.in, configure: Regenerate.
11439
11440 2010-06-20 Ian Lance Taylor <iant@google.com>
11441 Pedro Alves <pedro@codesourcery.com>
11442
11443 * linux-x86-low.c (always_true): Delete.
11444 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11445 trying to fool the compiler with always_true.
11446
11447 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11448
11449 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11450 conditions in gdbserver.
11451
11452 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11453
11454 * spu-low.c (spu_read_memory): Wrap around local store limit.
11455 (spu_write_memory): Likewise.
11456
11457 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11458
11459 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11460 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11461 LONGEST uses.
11462 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11463 uses.
11464 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11465 uses with LONGEST uses.
11466
11467 2010-06-14 Stan Shebs <stan@codesourcery.com>
11468 Pedro Alves <pedro@codesourcery.com>
11469
11470 Bytecode compiler.
11471
11472 * linux-x86-low.c: Include limits.h.
11473 (add_insns): New.
11474 (always_true): New.
11475 (EMIT_ASM): New.
11476 (EMIT_ASM32): New.
11477 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11478 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11479 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11480 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11481 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11482 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11483 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11484 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11485 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11486 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11487 (amd64_emit_void_call_2): New.
11488 (amd64_emit_ops): New.
11489 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11490 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11491 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11492 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11493 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11494 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11495 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11496 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11497 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11498 (i386_emit_stack_adjust, i386_emit_int_call_1)
11499 (i386_emit_void_call_2): New.
11500 (i386_emit_ops): New.
11501 (x86_emit_ops): New.
11502 (the_low_target): Install x86_emit_ops.
11503 * server.h (struct emit_ops): New.
11504 (get_raw_reg_func_addr): Declare.
11505 (current_insn_ptr, emit_error): Declare.
11506 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11507 (set_trace_state_variable_value): New defines.
11508 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11509 addr_get_trace_state_variable_value and
11510 addr_set_trace_state_variable_value.
11511 (symbol_list): New fields for get_raw_reg,
11512 get_trace_state_variable_value and set_trace_state_variable_value.
11513 (condfn): New typedef.
11514 (struct tracepoint): New field `compiled_cond'.
11515 (do_action_at_tracepoint): Clear compiled_cond.
11516 (get_trace_state_variable_value, set_trace_state_variable_value):
11517 Export in the IPA.
11518 (condition_true_at_tracepoint): If there's a compiled condition,
11519 run that.
11520 (current_insn_ptr, emit_error): New globals.
11521 (struct bytecode_address): New.
11522 (get_raw_reg_func_addr): New.
11523 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11524 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11525 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11526 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11527 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11528 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11529 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11530 (compile_tracepoint_condition, compile_bytecodes): New.
11531 * target.h (emit_ops): Forward declare.
11532 (struct target_ops): New field emit_ops.
11533 (target_emit_ops): New.
11534 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11535 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11536 * linux-low.c (linux_emit_ops): New.
11537 (linux_target_ops): Install it.
11538 * linux-low.h (struct linux_target_ops): New field emit_ops.
11539
11540 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11541
11542 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11543 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11544
11545 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11546 Stan Shebs <stan@codesourcery.com>
11547
11548 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11549 (all): Depend on $(extra_libraries).
11550 (install-only): Install the IPA.
11551 (IPA_OBJS, IPA_LIB): New.
11552 (clean): Remove the IPA lib.
11553 (IPAGENT_CFLAGS): New.
11554 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11555 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11556 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11557 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11558 * configure.ac: Check for atomic builtins support in the compiler.
11559 (IPA_DEPFILES, extra_libraries): Define.
11560 * configure.srv (ipa_obj): Add description.
11561 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11562 (i[34567]86-*-linux*): Set ipa_obj.
11563 (x86_64-*-linux*): Set ipa_obj.
11564 * linux-low.c (stabilizing_threads): New.
11565 (supports_fast_tracepoints): New.
11566 (linux_detach): Stabilize threads before detaching.
11567 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11568 the lwp is either not stabilizing, or is moving out of a jump pad.
11569 (linux_fast_tracepoint_collecting): New.
11570 (maybe_move_out_of_jump_pad): New.
11571 (enqueue_one_deferred_signal): New.
11572 (dequeue_one_deferred_signal): New.
11573 (linux_wait_for_event_1): If moving out of a jump pad, defer
11574 pending signals to later.
11575 (linux_stabilize_threads): New.
11576 (linux_wait_1): Check if threads need moving out of jump pads, and
11577 do it if so.
11578 (stuck_in_jump_pad_callback): New.
11579 (move_out_of_jump_pad_callback): New.
11580 (lwp_running): New.
11581 (linux_resume_one_lwp): Handle moving out of jump pads.
11582 (linux_set_resume_request): Dequeue deferred signals.
11583 (need_step_over_p): Also step over fast tracepoint jumps.
11584 (start_step_over): Also uninsert fast tracepoint jumps.
11585 (finish_step_over): Also reinsert fast tracepoint jumps.
11586 (linux_install_fast_tracepoint_jump): New.
11587 (linux_target_ops): Install linux_stabilize_threads and
11588 linux_install_fast_tracepoint_jump_pad.
11589 * linux-low.h (linux_target_ops) <get_thread_area,
11590 install_fast_tracepoint_jump_pad>: New fields.
11591 (struct lwp_info) <collecting_fast_tracepoint,
11592 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11593 (linux_get_thread_area): Declare.
11594 * linux-x86-low.c (jump_insn): New.
11595 (x86_get_thread_area): New.
11596 (append_insns): New.
11597 (push_opcode): New.
11598 (amd64_install_fast_tracepoint_jump_pad): New.
11599 (i386_install_fast_tracepoint_jump_pad): New.
11600 (x86_install_fast_tracepoint_jump_pad): New.
11601 (the_low_target): Install x86_get_thread_area and
11602 x86_install_fast_tracepoint_jump_pad.
11603 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11604 (struct fast_tracepoint_jump): New.
11605 (fast_tracepoint_jump_insn): New.
11606 (fast_tracepoint_jump_shadow): New.
11607 (find_fast_tracepoint_jump_at): New.
11608 (fast_tracepoint_jump_here): New.
11609 (delete_fast_tracepoint_jump): New.
11610 (set_fast_tracepoint_jump): New.
11611 (uninsert_fast_tracepoint_jumps_at): New.
11612 (reinsert_fast_tracepoint_jumps_at): New.
11613 (set_breakpoint_at): Use write_inferior_memory.
11614 (uninsert_raw_breakpoint): Use write_inferior_memory.
11615 (check_mem_read): Mask out fast tracepoint jumps.
11616 (check_mem_write): Mask out fast tracepoint jumps.
11617 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11618 (set_fast_tracepoint_jump): Declare.
11619 (delete_fast_tracepoint_jump)
11620 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11621 (reinsert_fast_tracepoint_jumps_at): Declare.
11622 * regcache.c: Don't compile many functions when building the
11623 in-process agent library.
11624 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11625 the register buffer in the heap.
11626 (free_register_cache): If the register buffer isn't owned by the
11627 regcache, don't free it.
11628 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11629 pre-existing register caches.
11630 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11631 type.
11632 (convert_ascii_to_int): : Constify `from' parameter type.
11633 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11634 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11635 the needed buffer in-place.
11636 (relocate_instruction): New.
11637 * server.c (handle_query) <qSymbols>: If the target supports
11638 tracepoints, give it a chance of looking up symbols. Report
11639 support for fast tracepoints.
11640 (handle_status): Stabilize threads.
11641 (process_serial_event): Adjust.
11642 * server.h (struct fast_tracepoint_jump): Forward declare.
11643 (struct process_info) <fast_tracepoint_jumps>: New field.
11644 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11645 (decode_X_packet, decode_M_packet): Adjust.
11646 (relocate_instruction): Declare.
11647 (in_process_agent_loaded): Declare.
11648 (tracepoint_look_up_symbols): Declare.
11649 (struct fast_tpoint_collect_status): Declare.
11650 (fast_tracepoint_collecting): Declare.
11651 (force_unlock_trace_buffer): Declare.
11652 (handle_tracepoint_bkpts): Declare.
11653 (initialize_low_tracepoint)
11654 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11655 * target.h (struct target_ops) <stabilize_threads,
11656 install_fast_tracepoint_jump_pad>: New fields.
11657 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11658 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11659 [HAVE_STDINT_H]: Include stdint.h.
11660 (trace_debug_1): Rename to ...
11661 (trace_vdebug): ... this.
11662 (trace_debug): Rename to ...
11663 (trace_debug_1): ... this. Add `level' parameter.
11664 (trace_debug): New.
11665 (ATTR_USED, ATTR_NOINLINE): New.
11666 (IP_AGENT_EXPORT): New.
11667 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11668 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11669 (about_to_request_buffer_space, trace_buffer_is_full)
11670 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11671 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11672 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11673 (traceframe_write_count, traceframes_created)
11674 (trace_state_variables)
11675 New renaming defines.
11676 (struct ipa_sym_addresses): New.
11677 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11678 (symbol_list): New.
11679 (ipa_sym_addrs): New.
11680 (all_tracepoint_symbols_looked_up): New.
11681 (in_process_agent_loaded): New.
11682 (write_e_ipa_not_loaded): New.
11683 (maybe_write_ipa_not_loaded): New.
11684 (tracepoint_look_up_symbols): New.
11685 (debug_threads) [IN_PROCESS_AGENT]: New.
11686 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11687 (UNKNOWN_SIDE_EFFECTS): New.
11688 (stop_tracing): New.
11689 (flush_trace_buffer): New.
11690 (stop_tracing_bkpt): New.
11691 (flush_trace_buffer_bkpt): New.
11692 (read_inferior_integer): New.
11693 (read_inferior_uinteger): New.
11694 (read_inferior_data_pointer): New.
11695 (write_inferior_data_pointer): New.
11696 (write_inferior_integer): New.
11697 (write_inferior_uinteger): New.
11698 (struct collect_static_trace_data_action): Delete.
11699 (enum tracepoint_type): New.
11700 (struct tracepoint) <type>: New field `type'.
11701 <actions_str, step_actions, step_actions_str>: Only include in
11702 GDBserver.
11703 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11704 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11705 (tracepoints): Use IP_AGENT_EXPORT.
11706 (last_tracepoint): Don't include in the IPA.
11707 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11708 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11709 (alloced_trace_state_variables): New.
11710 (trace_state_variables): Use IP_AGENT_EXPORT.
11711 (traceframe_t): Delete unused variable.
11712 (circular_trace_buffer): Don't include in the IPA.
11713 (trace_buffer_start): Delete.
11714 (struct trace_buffer_control): New.
11715 (trace_buffer_free): Delete.
11716 (struct ipa_trace_buffer_control): New.
11717 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11718 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11719 New.
11720 (trace_buffer_ctrl): New.
11721 (TRACE_BUFFER_CTRL_CURR): New.
11722 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11723 Reimplement as macros.
11724 (trace_buffer_wrap): Delete.
11725 (traceframe_write_count, traceframe_read_count)
11726 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11727 (struct tracepoint_hit_ctx) <type>: New field.
11728 (struct fast_tracepoint_ctx): New.
11729 (memory_barrier): New.
11730 (cmpxchg): New.
11731 (record_tracepoint_error): Update atomically in the IPA.
11732 (clear_inferior_trace_buffer): New.
11733 (about_to_request_buffer_space): New.
11734 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11735 updating the same buffer.
11736 (add_tracepoint): Default the tracepoint's type to trap
11737 tracepoint, and orig_size to -1.
11738 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11739 internal variables.
11740 (create_trace_state_variable): New parameter `gdb'. Handle it.
11741 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11742 (cmd_qtdp): Handle fast tracepoints.
11743 (cmd_qtdv): Adjust.
11744 (max_jump_pad_size): New.
11745 (gdb_jump_pad_head): New.
11746 (get_jump_space_head): New.
11747 (claim_jump_space): New.
11748 (sort_tracepoints): New.
11749 (MAX_JUMP_SIZE): New.
11750 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11751 IPA.
11752 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11753 support. Upload fast traceframes, and delete internal IPA
11754 breakpoints.
11755 (stop_tracing_handler): New.
11756 (flush_trace_buffer_handler): New.
11757 (cmd_qtstop): Upload fast tracepoints.
11758 (response_tracepoint): Handle fast tracepoints.
11759 (tracepoint_finished_step): Upload fast traceframes. Set the
11760 tracepoint hit context's tracepoint type.
11761 (handle_tracepoint_bkpts): New.
11762 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11763 type. Add comment about fast tracepoints.
11764 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11765 non-existing action_str field.
11766 (get_context_regcache): Handle fast tracepoints.
11767 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11768 to the regcache.
11769 (fast_tracepoint_from_jump_pad_address): New.
11770 (fast_tracepoint_from_ipa_tpoint_address): New.
11771 (collecting_t): New.
11772 (force_unlock_trace_buffer): New.
11773 (fast_tracepoint_collecting): New.
11774 (collecting): New.
11775 (gdb_collect): New.
11776 (write_inferior_data_ptr): New.
11777 (target_tp_heap): New.
11778 (target_malloc): New.
11779 (download_agent_expr): New.
11780 (UALIGN): New.
11781 (download_tracepoints): New.
11782 (download_trace_state_variables): New.
11783 (upload_fast_traceframes): New.
11784 (IPA_FIRST_TRACEFRAME): New.
11785 (IPA_NEXT_TRACEFRAME_1): New.
11786 (IPA_NEXT_TRACEFRAME): New.
11787 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11788 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11789 (gdb_jump_pad_buffer_end): New.
11790 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11791 (initialize_tracepoint): Adjust.
11792 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11793 buffer. Initialize the low module.
11794 * utils.c (PREFIX, TOOLNAME): New.
11795 (malloc_failure): Use PREFIX.
11796 (error): In the IPA, an error causes an exit.
11797 (fatal, warning): Use PREFIX.
11798 (internal_error): Use TOOLNAME.
11799 (NUMCELLS): Increase to 10.
11800 * configure, config.in: Regenerate.
11801
11802 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11803
11804 * server.c (handle_query) <qSupported>: Do two passes over the
11805 qSupported string to avoid nesting strtok.
11806
11807 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11808
11809 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11810 (CDEPS): New.
11811 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11812 -Wl,--dynamic-list.
11813 * configure: Regenerate.
11814 * proc-service.list: New.
11815
11816 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11817
11818 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11819 New comment.
11820
11821 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11822
11823 * gdbreplay.c (remote_open): Check error return from socket() call by
11824 its equality to -1 not by it being negative.
11825 * remote-utils.c (remote_open): Likewise.
11826
11827 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11828
11829 * config.h: Regenerate.
11830
11831 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11832
11833 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11834 doesn't provide PTRACE_GET_THREAD_AREA.
11835
11836 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11837
11838 * linux-m68k-low.c: Include <asm/ptrace.h>
11839 (ps_get_thread_area): Implement.
11840
11841 2010-05-03 Doug Evans <dje@google.com>
11842
11843 * event-loop.c (struct callback_event): New struct.
11844 (callback_list): New global.
11845 (append_callback_event, delete_callback_event): New functions.
11846 (process_callback): New function.
11847 (start_event_loop): Call it.
11848 * remote-utils.c (NOT_SCHEDULED): Define.
11849 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11850 moved out of readchar.
11851 (readchar): Rewrite. Call reschedule before returning.
11852 (reset_readchar): New function.
11853 (remote_close): Call it.
11854 (process_remaining, reschedule): New functions.
11855 * server.h (callback_handler_func): New typedef.
11856 (append_callback_event, delete_callback_event): Declare.
11857
11858 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11859
11860 * proc-service.c (ps_pglobal_lookup): Use
11861 thread_db_look_up_one_symbol.
11862 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11863 parameter. Use it instead of all_symbols_looked_up.
11864 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11865 field.
11866 (all_symbols_looked_up): Don't declare.
11867 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11868 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11869 field.
11870 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11871 Set all_symbols_looked_up here.
11872 (thread_db_look_up_one_symbol): New.
11873 (thread_db_get_tls_address): Adjust.
11874 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11875 thread_db object on the heap, and tentatively set it in the
11876 process structure.
11877 (thread_db_init): Don't set all_symbols_looked_up here.
11878 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11879
11880 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11881
11882 * linux-low.c (linux_kill, linux_detach): Adjust.
11883 (status_pending_p_callback): Remove redundant statement. Check
11884 for !TARGET_WAITIKIND_IGNORE, instead of
11885 TARGET_WAITKIND_STOPPED.
11886 (handle_tracepoints): Make sure LWP is locked. Adjust.
11887 (linux_wait_for_event_1): Adjust.
11888 (linux_cancel_breakpoints): New.
11889 (unsuspend_one_lwp): New.
11890 (unsuspend_all_lwps): New.
11891 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11892 (send_sigstop_callback): Change return type to int, add new
11893 `except' parameter and handle it.
11894 (suspend_and_send_sigstop_callback): New.
11895 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11896 pass them down. If SUSPEND, also increment the lwp's suspend
11897 count.
11898 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11899 (need_step_over_p): Don't consider suspended LWPs.
11900 (start_step_over): Adjust.
11901 (proceed_one_lwp): Change return type to int, add new `except'
11902 parameter and handle it.
11903 (unsuspend_and_proceed_one_lwp): New.
11904 (proceed_all_lwps): Use find_inferior instead of
11905 for_each_inferior.
11906 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11907 also decrement the suspend count of LWPs. Pass `except' down,
11908 instead of hacking its suspend count.
11909 (linux_pause_all): Add `freeze' parameter. Adjust.
11910 (linux_unpause_all): New.
11911 (linux_target_ops): Install linux_unpause_all.
11912 * server.c (handle_status): Adjust.
11913 * target.h (struct target_ops): New fields `unpause_all' and
11914 `cancel_breakpoints'. Add new parameter to `pause_all'.
11915 (pause_all): Add new `freeze' parameter.
11916 (unpause_all): New.
11917 (cancel_breakpoints): New.
11918 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11919 cancel breakpoints.
11920 (cmd_qtstart): Pause threads.
11921 (stop_tracing): Pause threads, and cancel breakpoints.
11922 * win32-low.c (win32_target_ops): Adjust.
11923
11924 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11925
11926 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11927 the inferior right away from here...
11928 (linux_wait_1): ... to here, and adjust to check the thread's
11929 last_resume_kind instead of the lwp's step or stop_expected flags.
11930
11931 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11932
11933 * README: Use consistent `GDB' and `GDBserver' spellings.
11934
11935 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11936
11937 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11938 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11939 (linux_detach_one_lwp): Assume the lwp is stopped.
11940 (any_thread_of): Delete.
11941 (linux_detach): Stop all lwps here. Don't blindly delete all
11942 breakpoints.
11943 (delete_lwp_callback): New.
11944 (linux_mourn): Delete all lwps of the process that is gone.
11945 (linux_wait_1): Don't delete the last lwp of the process here.
11946 * mem-break.h (mark_breakpoints_out): Declare.
11947 * mem-break.c (mark_breakpoints_out): New.
11948 (free_all_breakpoints): Use it.
11949 * server.c (handle_target_event): If the process is gone, mark
11950 breakpoints out.
11951 * thread-db.c (struct thread_db) <create_bp>: New field.
11952 (thread_db_enable_reporting): Fix prototype. Store a thread event
11953 breakpoint reference in the thread_db struct.
11954 (thread_db_load_search): Clear the thread_db object.
11955 (try_thread_db_load_1): Ditto.
11956 (switch_to_process): New.
11957 (disable_thread_event_reporting): Use it.
11958 (remove_thread_event_breakpoints): New.
11959 (thread_db_detach, thread_db_mourn): Use it.
11960
11961 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11962
11963 * linux-low.c (linux_enable_event_reporting): New.
11964 (linux_wait_for_event_1, handle_extended_wait): Use it.
11965
11966 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11967
11968 * linux-low.c (linux_kill_one_lwp, linux_kill)
11969 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11970 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11971 SIGSTOP even if the LWP is stopped.
11972 (send_sigstop_callback): New.
11973 (stop_all_lwps): Use send_sigstop_callback instead.
11974 (linux_resume_one_thread): Adjust.
11975 (proceed_one_lwp): Still proceed an LWP that the client has
11976 requested to stop, if we haven't reported it as stopped yet. Make
11977 sure that LWPs the client want stopped, have a pending SIGSTOP.
11978
11979 2010-04-26 Doug Evans <dje@google.com>
11980
11981 * server.c (handle_general_set): Make static.
11982
11983 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11984 Print received char after testing for error/eof instead of before.
11985 (input_interrupt): Tweak comment.
11986
11987 2010-04-23 Doug Evans <dje@google.com>
11988
11989 * server.c (start_inferior): Print inferior argv if --debug.
11990
11991 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11992
11993 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11994 * nto-x86-low.c: Include server.h
11995
11996 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11997
11998 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11999 be consistent with other sources of this directory.
12000 (init_registers_amd64): Correct name of source file of this function
12001 in the comment.
12002
12003 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12004
12005 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12006 64-bit executables.
12007
12008 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12009
12010 * win32-i386-low.c: Add 64-bit support.
12011 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12012 (init_registers_amd64): Declare.
12013 (mappings): Add 64-bit version of array.
12014 (init_windows_x86): New function.
12015 (the_low_target): Change init_arch field to init_windows_x86.
12016
12017 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12018
12019 * win32-low.c: Adapt to support also 64-bit architecture.
12020 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12021 (get_image_name): Use SIZE_T type for local variable `done'.
12022 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12023 (toolhelp_get_dll_name): Idem.
12024 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12025 Use uintptr_t typecast to avoid warning.
12026 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12027 (handle_exception): Use phex_nz to avoid warning.
12028 (win32_wait): Remove unused local variable `process'.
12029
12030 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12031
12032 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12033 `amd64-avx.o'.
12034
12035 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12036
12037 * configure.ac: Use `ws2_32' library for srv_mingw.
12038 * configure: Regenerate.
12039 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12040 * remote-utils.c: Likewise.
12041
12042 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12043
12044 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12045 if __x86_64__ is defined.
12046
12047 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12048
12049 * configure: Regenerate.
12050
12051 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12052
12053 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12054 * target.h (target_ops): New get_tib_address field.
12055 * win32-low.h (win32_thread_info): Add thread_local_base field.
12056 * win32-low.c (child_add_thread): Add tlb argument.
12057 Set thread_local_base field to TLB.
12058 (get_child_debug_event): Adapt to child_add_thread change.
12059 (win32_get_tib_address): New function.
12060 (win32_target_ops): Set get_tib_address field to
12061 win32_get_tib_address.
12062 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12063
12064 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12065
12066 * linux-low.c (linux_mourn): Also remove the process.
12067 * server.c (handle_target_event): Don't remove the process here.
12068 * nto-low.c (nto_mourn): New.
12069 (nto_target_ops): Install it.
12070 * spu-low.c (spu_mourn): New.
12071 (spu_target_ops): Install it.
12072 * win32-low.c (win32_mourn): New.
12073 (win32_target_ops): Install it.
12074
12075 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12076
12077 * server.h (buffer_xml_printf): Remove redundant `;'.
12078
12079 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12080
12081 * regcache.c (set_register_cache): Invalidate regcaches before
12082 changing the register cache layout.
12083 (regcache_invalidate_one): Allow a NULL regcache.
12084 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12085 regcaches before changing the register cache layout or the target
12086 regsets.
12087
12088 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12089
12090 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12091 variable warning on Linux/x86-64.
12092
12093 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12094
12095 GDBserver disconnected tracing support.
12096
12097 * linux-low.c (linux_remove_process): Delete.
12098 (add_lwp): Don't set last_resume_kind here.
12099 (linux_kill): Use `mourn'.
12100 (linux_detach): Use `thread_db_detach', and `mourn'.
12101 (linux_mourn): New.
12102 (linux_attach_lwp_1): Adjust comment.
12103 (linux_attach): last_resume_kind moved the thread_info; adjust.
12104 (status_pending_p_callback): Adjust.
12105 (linux_wait_for_event_1): Adjust.
12106 (count_events_callback, select_singlestep_lwp_callback)
12107 (select_event_lwp_callback, cancel_breakpoints_callback)
12108 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12109 (proceed_one_lwp): Adjust.
12110 (linux_async): Add debug output.
12111 (linux_thread_stopped): New.
12112 (linux_pause_all): New.
12113 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12114 linux_pause_all.
12115 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12116 (thread_db_free): Delete declaration.
12117 (thread_db_detach, thread_db_mourn): Declare.
12118 * thread-db.c (thread_db_init): Use thread_db_mourn.
12119 (thread_db_free): Delete, split in two.
12120 (disable_thread_event_reporting): New.
12121 (thread_db_detach): New.
12122 (thread_db_mourn): New.
12123
12124 * server.h (struct thread_info) <last_resume_kind>: New field.
12125 <attached>: Add comment.
12126 <gdb_detached>: New field.
12127 (handler_func): Change return type to int.
12128 (handle_serial_event, handle_target_event): Ditto.
12129 (gdb_connected): Declare.
12130 (tracing): Delete.
12131 (disconnected_tracing): Declare.
12132 (stop_tracing): Declare.
12133
12134 * server.c (handle_query) <qSupported>: Report support for
12135 disconnected tracing.
12136 (queue_stop_reply_callback): Account for running threads.
12137 (gdb_wants_thread_stopped): New.
12138 (gdb_wants_all_threads_stopped): New.
12139 (gdb_reattached_process): New.
12140 (handle_status): Clear the `gdb_detached' flag of all processes.
12141 In all-stop, stop all threads.
12142 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12143 (process_serial_event): If the remote connection breaks, or if an
12144 exit was forced with "monitor exit", force an event loop exit.
12145 Handle disconnected tracing on detach.
12146 (handle_serial_event): Adjust.
12147 (handle_target_event): If GDB isn't connected, forward events back
12148 to the inferior, unless the last process exited, in which case,
12149 exit gdbserver. Adjust interface.
12150
12151 * remote-utils.c (remote_open): Don't block in accept. Instead
12152 register an event loop source on the listen socket file
12153 descriptor. Refactor bits into ...
12154 (listen_desc): ... this new global.
12155 (gdb_connected): ... this new function.
12156 (enable_async_notification): ... this new function.
12157 (handle_accept_event): ... this new function.
12158 (remote_close): Clear remote_desc.
12159
12160 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12161
12162 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12163 New fields.
12164 (mourn_inferior): Define.
12165 (target_process_qsupported): Avoid the dangling else problem.
12166 (thread_stopped): Define.
12167 (pause_all): Define.
12168 (target_waitstatus_to_string): Declare.
12169 * target.c (target_waitstatus_to_string): New.
12170
12171 * tracepoint.c (tracing): Make extern.
12172 (disconnected_tracing): New.
12173 (stop_tracing): Make extern. Handle tracing stops due to GDB
12174 disconnecting.
12175 (cmd_qtdisconnected): New.
12176 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12177 (handle_tracepoint_general_set): Handle QTDisconnected.
12178
12179 * event-loop.c (event_handler_func): Change return type to int.
12180 (process_event): Bail out if the event handler wants the event
12181 loop to stop.
12182 (handle_file_event): Ditto.
12183 (start_event_loop): Bail out if the event handler wants the event
12184 loop to stop.
12185
12186 * nto-low.c (nto_target_ops): Adjust.
12187 * spu-low.c (spu_wait): Don't remove the process here.
12188 (spu_target_ops): Adjust.
12189 * win32-low.c (win32_wait): Don't remove the process here.
12190 (win32_target_ops): Adjust.
12191
12192 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12193
12194 * regcache.c (realloc_register_cache): Invalidate inferior's
12195 regcache before recreating it.
12196
12197 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12198
12199 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12200
12201 2010-04-09 Stan Shebs <stan@codesourcery.com>
12202 Pedro Alves <pedro@codesourcery.com>
12203
12204 * server.h (LONGEST): New.
12205 (struct thread_info) <while_stepping>: New field.
12206 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12207 Declare.
12208 (initialize_tracepoint, handle_tracepoint_general_set)
12209 (handle_tracepoint_query, tracepoint_finished_step)
12210 (tracepoint_was_hit, release_while_stepping_state_list):
12211 (current_traceframe): Declare.
12212 * server.c (handle_general_set): Handle tracepoint packets.
12213 (read_memory): New.
12214 (write_memory): New.
12215 (handle_search_memory_1): Use read_memory.
12216 (handle_query): Report support for conditional tracepoints, trace
12217 state variables, and tracepoint sources. Handle tracepoint
12218 queries.
12219 (main): Initialize the tracepoints module.
12220 (process_serial_event): Handle traceframe reads/writes.
12221
12222 * linux-low.c (handle_tracepoints): New.
12223 (linux_wait_1): Call it.
12224 (linux_resume_one_lwp): Handle while-stepping.
12225 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12226 (linux_target_ops): Install them.
12227 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12228 New field.
12229 * linux-x86-low.c (x86_supports_tracepoints): New.
12230 (the_low_target). Install it.
12231
12232 * mem-break.h (delete_breakpoint): Declare.
12233 * mem-break.c (delete_breakpoint): Make external.
12234
12235 * target.h (struct target_ops): Add `supports_tracepoints',
12236 `read_pc', and `write_pc' fields.
12237 (target_supports_tracepoints): Define.
12238 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12239 (phex_nz): New.
12240
12241 * regcache.h (struct regcache) <registers_owned>: New field.
12242 (init_register_cache, regcache_cpy): Declare.
12243 (regcache_read_pc, regcache_write_pc): Declare.
12244 (register_cache_size): Declare.
12245 (supply_regblock): Declare.
12246 * regcache.c (init_register_cache): New.
12247 (new_register_cache): Use it.
12248 (regcache_cpy): New.
12249 (register_cache_size): New.
12250 (supply_regblock): New.
12251 (regcache_read_pc, regcache_write_pc): New.
12252
12253 * tracepoint.c: New.
12254
12255 * Makefile.in (OBS): Add tracepoint.o.
12256 (tracepoint.o): New rule.
12257
12258 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12259
12260 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12261 (i386-mmx.o): New.
12262 (i386-mmx.c): Likewise.
12263 (i386-mmx-linux.o): Likewise.
12264 (i386-mmx-linux.c): Likewise.
12265
12266 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12267 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12268 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12269 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12270
12271 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12272 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12273 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12274
12275 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12276
12277 * Makefile.in (clean): Updated.
12278 (i386-avx.o): New.
12279 (i386-avx.c): Likewise.
12280 (i386-avx-linux.o): Likewise.
12281 (i386-avx-linux.c): Likewise.
12282 (amd64-avx.o): Likewise.
12283 (amd64-avx.c): Likewise.
12284 (amd64-avx-linux.o): Likewise.
12285 (amd64-avx-linux.c): Likewise.
12286
12287 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12288 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12289 (srv_amd64_regobj): Add amd64-avx.o.
12290 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12291 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12292 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12293 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12294 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12295 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12296 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12297
12298 * i387-fp.c: Include "i386-xstate.h".
12299 (i387_xsave): New.
12300 (i387_cache_to_xsave): Likewise.
12301 (i387_xsave_to_cache): Likewise.
12302 (x86_xcr0): Likewise.
12303
12304 * i387-fp.h (i387_cache_to_xsave): Likewise.
12305 (i387_xsave_to_cache): Likewise.
12306 (x86_xcr0): Likewise.
12307
12308 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12309 * linux-crisv32-low.c (target_regsets): Likewise.
12310 * linux-m68k-low.c (target_regsets): Likewise.
12311 * linux-mips-low.c (target_regsets): Likewise.
12312 * linux-ppc-low.c (target_regsets): Likewise.
12313 * linux-s390-low.c (target_regsets): Likewise.
12314 * linux-sh-low.c (target_regsets): Likewise.
12315 * linux-sparc-low.c (target_regsets): Likewise.
12316 * linux-xtensa-low.c (target_regsets): Likewise.
12317
12318 * linux-low.c: Include <sys/uio.h>.
12319 (regsets_fetch_inferior_registers): Support nt_type.
12320 (regsets_store_inferior_registers): Likewise.
12321 (linux_process_qsupported): New.
12322 (linux_target_ops): Add linux_process_qsupported.
12323
12324 * linux-low.h (regset_info): Add nt_type.
12325 (linux_target_ops): Add process_qsupported.
12326
12327 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12328 and <sys/uio.h>.
12329 (init_registers_i386_avx_linux): New.
12330 (init_registers_amd64_avx_linux): Likewise.
12331 (xmltarget_i386_linux_no_xml): Likewise.
12332 (xmltarget_amd64_linux_no_xml): Likewise.
12333 (PTRACE_GETREGSET): Likewise.
12334 (PTRACE_SETREGSET): Likewise.
12335 (x86_fill_xstateregset): Likewise.
12336 (x86_store_xstateregset): Likewise.
12337 (use_xml): Likewise.
12338 (x86_linux_update_xmltarget): Likewise.
12339 (x86_linux_process_qsupported): Likewise.
12340 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12341 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12342 init_registers_i386_linux here. Call
12343 x86_linux_update_xmltarget.
12344 (the_low_target): Add x86_linux_process_qsupported.
12345
12346 * server.c (handle_query): Call target_process_qsupported.
12347
12348 * target.h (target_ops): Add process_qsupported.
12349 (target_process_qsupported): New.
12350
12351 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12352
12353 * inferiors.c (add_thread): Set last_status kind to
12354 TARGET_WAITKIND_IGNORE.
12355 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12356 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12357 (linux_wait_1): Move `thread' local definition to block that uses
12358 it. Don't NULL initialize `event_child'.
12359 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12360 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12361 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12362
12363 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12364
12365 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12366 an extended waitstatus, or by a watchpoint.
12367 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12368 thread was stepping or has been stopped by a watchpoint.
12369
12370 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12371
12372 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12373 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12374 of another, then delete the previous, and validate all
12375 breakpoints.
12376 (validate_inserted_breakpoint): New.
12377 (delete_disabled_breakpoints): New.
12378 (validate_breakpoints): New.
12379 (check_mem_read): Validate breakpoints before trusting their
12380 shadow. Delete disabled breakpoints.
12381 (check_mem_write): Validate breakpoints before trusting they
12382 should be inserted. Delete disabled breakpoints.
12383 * mem-break.h (validate_breakpoints):
12384 * server.c (handle_query): Validate breakpoints when we see a
12385 qSymbol query.
12386
12387 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12388
12389 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12390 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12391 if we could tell there's a GDB breakpoint at stop_pc.
12392 (need_step_over_p): Don't do a step over if we find a GDB
12393 breakpoint at the resume PC.
12394
12395 * mem-break.c (struct raw_breakpoint): New.
12396 (enum bkpt_type): New type `gdb_breakpoint'.
12397 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12398 fields. New field `raw'.
12399 (find_raw_breakpoint_at): New.
12400 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12401 breakpoint instead.
12402 (set_breakpoint_at): Adjust.
12403 (delete_raw_breakpoint): New.
12404 (release_breakpoint): New.
12405 (delete_breakpoint): Rename to...
12406 (delete_breakpoint_1): ... this. Add proc parameter. Use
12407 release_breakpoint. Return ENOENT.
12408 (delete_breakpoint): Reimplement.
12409 (find_breakpoint_at): Delete.
12410 (find_gdb_breakpoint_at): New.
12411 (delete_breakpoint_at): Delete.
12412 (set_gdb_breakpoint_at): New.
12413 (delete_gdb_breakpoint_at): New.
12414 (gdb_breakpoint_here): New.
12415 (set_reinsert_breakpoint): Use release_breakpoint.
12416 (uninsert_breakpoint): Rename to ...
12417 (uninsert_raw_breakpoint): ... this.
12418 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12419 (reinsert_raw_breakpoint): Change parameter type to
12420 raw_breakpoint.
12421 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12422 instead.
12423 (check_breakpoints): Adjust. Use release_breakpoint.
12424 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12425 (breakpoint_inserted_here): Ditto.
12426 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12427 Don't trust the breakpoint's shadow if it is not inserted.
12428 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12429 (delete_all_breakpoints): Adjust.
12430 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12431 use delete_breakpoint_1.
12432
12433 * mem-break.h (breakpoints_supported): Delete declaration.
12434 (set_gdb_breakpoint_at): Declare.
12435 (gdb_breakpoint_here): Declare.
12436 (delete_breakpoint_at): Delete.
12437 (delete_gdb_breakpoint_at): Declare.
12438
12439 * server.h (struct raw_breakpoint): Forward declare.
12440 (struct process_info): New field `raw_breakpoints'.
12441
12442 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12443 breakpoints.
12444
12445 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12446
12447 * linux-low.c (status_pending_p_callback): Fix comment.
12448 (linux_wait_for_event_1): Move most of the internal breakpoint
12449 handling from here...
12450 (linux_wait_1): ... to here.
12451 (count_events_callback): New.
12452 (select_singlestep_lwp_callback): New.
12453 (select_event_lwp_callback): New.
12454 (cancel_breakpoints_callback): New.
12455 (select_event_lwp): New.
12456 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12457 priority to all LWPs that have had events that should be reported
12458 to the client. Cancel breakpoints when about to reporting the
12459 event to the client, not while stopping lwps. No longer cancel
12460 finished single-steps here.
12461 (cancel_finished_single_step): Delete.
12462 (cancel_finished_single_steps): Delete.
12463
12464 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12465
12466 * mem-break.c (enum bkpt_type): New.
12467 (struct breakpoint): New field `type'.
12468 (set_breakpoint_at): Change return type to struct breakpoint
12469 pointer. Set type to `other_breakpoint' by default.
12470 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12471 in the breakpoint list.
12472 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12473 (reinsert_breakpoint): Rename to ...
12474 (reinsert_raw_breakpoint): ... this.
12475 (reinsert_breakpoints_at): Adjust.
12476 * mem-break.h (struct breakpoint): Declare.
12477 (set_breakpoint_at): Change return type to struct breakpoint
12478 pointer.
12479
12480 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12481
12482 * server.c (handle_query): Assign, not compare.
12483
12484 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12485
12486 Teach linux gdbserver to step-over-breakpoints.
12487
12488 * linux-low.c (can_hardware_single_step): New.
12489 (supports_breakpoints): New.
12490 (handle_extended_wait): If stopping threads, read the stop pc of
12491 the new cloned LWP.
12492 (get_pc): New.
12493 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12494 low target doesn't support retrieving the PC.
12495 (add_lwp): Set last_resume_kind to resume_continue.
12496 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12497 (linux_attach): Don't clear stop_expected. Set the lwp's
12498 last_resume_kind to resume_stop.
12499 (linux_detach_one_lwp): Don't check for removed breakpoints.
12500 (check_removed_breakpoint): Delete.
12501 (status_pending_p): Rename to ...
12502 (status_pending_p_callback): ... this. Don't check for removed
12503 breakpoints. Don't consider threads that are stopped from GDB's
12504 perspective.
12505 (linux_wait_for_lwp): Always read the stop_pc here.
12506 (cancel_breakpoint): New.
12507 (step_over_bkpt): New global.
12508 (linux_wait_for_event_1): Implement stepping over breakpoints.
12509 (gdb_wants_lwp_stopped): New.
12510 (gdb_wants_all_stopped): New.
12511 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12512 single-step traps here. Store the thread's last reported target
12513 wait status.
12514 (send_sigstop): Don't clear stop_expected. Always set it,
12515 instead.
12516 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12517 (cancel_finished_single_step): New.
12518 (cancel_finished_single_steps): New.
12519 (wait_for_sigstop): Don't cancel finished single-step traps here.
12520 (linux_resume_one_lwp): Don't check for removed breakpoints.
12521 Don't set `step' on non-hardware step archs.
12522 (linux_set_resume_request): Ignore resume_stop requests if already
12523 stopping or stopped. Set the lwp's last_resume_kind.
12524 (resume_status_pending_p): Don't check for removed breakpoints.
12525 (need_step_over_p): New.
12526 (start_step_over): New.
12527 (finish_step_over): New.
12528 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12529 requests. Clear the thread's last reported target waitstatus.
12530 Don't use the `suspended' flag. Don't consider pending breakpoints.
12531 (linux_resume): Start a step-over if necessary.
12532 (proceed_one_lwp): New.
12533 (proceed_all_lwps): New.
12534 (unstop_all_lwps): New.
12535 * linux-low.h (struct lwp_info): Rewrite comment for the
12536 `suspended' flag. Add the `stop_pc' field. Delete the
12537 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12538 Add `'last_resume_kind' and `need_step_over' fields.
12539 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12540 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12541 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12542 (set_raw_breakpoint_at): New.
12543 (set_breakpoint_at): Rewrite to use it.
12544 (reinsert_breakpoint_handler): Delete.
12545 (set_reinsert_breakpoint): New.
12546 (reinsert_breakpoint_by_bp): Delete.
12547 (delete_reinsert_breakpoints): New.
12548 (uninsert_breakpoint): Rewrite.
12549 (uninsert_breakpoints_at): New.
12550 (reinsert_breakpoint): Rewrite.
12551 (reinsert_breakpoints_at): New.
12552 (check_breakpoints): Rewrite.
12553 (breakpoint_here): New.
12554 (breakpoint_inserted_here): New.
12555 (check_mem_read): Adjust.
12556 * mem-break.h (breakpoints_supported, breakpoint_here)
12557 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12558 (reinsert_breakpoint_by_bp): Delete declaration.
12559 (delete_reinsert_breakpoints): Declare.
12560 (reinsert_breakpoint): Delete declaration.
12561 (reinsert_breakpoints_at): Declare.
12562 (uninsert_breakpoint): Delete declaration.
12563 (uninsert_breakpoints_at): Declare.
12564 (check_breakpoints): Adjust prototype.
12565 * server.h: Adjust include order.
12566 (struct thread_info): Declare here. Add a `last_status' field.
12567
12568 2010-03-23 Michael Snyder <msnyder@vmware.com>
12569
12570 * server.c (crc32): New function.
12571 (handle_query): Add handling for 'qCRC:' request.
12572
12573 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12574
12575 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12576 lwp had been stopped by a watchpoint.
12577
12578 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12579
12580 * server.h (internal_error): Declare.
12581 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12582 * utils.c (internal_error): New function.
12583
12584 2010-03-15 Andreas Schwab <schwab@redhat.com>
12585
12586 * configure.srv: Fix typo setting srv_regobj.
12587
12588 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12589
12590 * linux-low.c (fetch_register): Avoid passing a non string literal
12591 format to `error'.
12592 (usr_store_inferior_registers): Ditto.
12593
12594 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12595
12596 * linux-low.c (linux_write_memory): Bail out early if peeking
12597 memory failed.
12598
12599 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12600
12601 * linux-low.h (struct lwp_info): New fields
12602 `stopped_by_watchpoint' and `stopped_data_address'.
12603 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12604 here, and cache them in the lwp object.
12605 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12606 directly.
12607 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12608 field.
12609 (linux_stopped_by_watchpoint): Rewrite.
12610 (linux_stopped_data_address): Rewrite.
12611
12612 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12613
12614 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12615 switching the current inferior, not before.
12616
12617 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12618
12619 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12620 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12621 i386-linux.c and amd64-linux.c.
12622 (reg-i386.o): Removed.
12623 (reg-i386.c): Likewise.
12624 (reg-i386-linux.o): Likewise.
12625 (reg-i386-linux.c): Likewise.
12626 (reg-x86-64.o): Likewise.
12627 (reg-x86-64.c): Likewise.
12628 (reg-x86-64-linux.o): Likewise.
12629 (reg-x86-64-linux.c): Likewise.
12630 (i386.o): New.
12631 (i386.c): Likewise.
12632 (i386-linux.o): Likewise.
12633 (i386-linux.c): Likewise.
12634 (amd64.o): Likewise.
12635 (amd64.c): Likewise.
12636 (amd64-linux.o): Likewise.
12637 (amd64-linux.c): Likewise.
12638
12639 * configure.srv (srv_i386_regobj): New.
12640 (srv_i386_linux_regobj): Likewise.
12641 (srv_amd64_regobj): Likewise.
12642 (srv_amd64_linux_regobj): Likewise.
12643 (srv_i386_32bit_xmlfiles): Likewise.
12644 (srv_i386_64bit_xmlfiles): Likewise.
12645 (srv_i386_xmlfiles): Likewise.
12646 (srv_amd64_xmlfiles): Likewise.
12647 (srv_i386_linux_xmlfiles): Likewise.
12648 (srv_amd64_linux_xmlfiles): Likewise.
12649 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12650 srv_xmlfiles to $srv_i386_xmlfiles.
12651 (i[34567]86-*-mingw32ce*): Likewise.
12652 (i[34567]86-*-mingw*): Likewise.
12653 (i[34567]86-*-nto*): Likewise.
12654 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12655 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12656 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12657 (x86_64-*-linux*): Likewise.
12658
12659 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12660 (init_registers_amd64_linux): New.
12661 (x86_arch_setup): Replace init_registers_x86_64_linux with
12662 init_registers_amd64_linux.
12663
12664 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12665
12666 * configure.ac: Check for libdl. If it is not available link against
12667 static libthread_db.
12668 * configure: Regenerate.
12669
12670 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12671
12672 PR9605
12673
12674 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12675 handing a read watchpoint.
12676 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12677
12678 2010-02-12 Doug Evans <dje@google.com>
12679
12680 * linux-low.c (linux_supports_tracefork_flag): Document.
12681 (linux_look_up_symbols): Add comment.
12682
12683 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12684
12685 * regcache.c (supply_register): Clear regcache if buf is NULL.
12686
12687 2010-02-02 Nicolas Roche <roche@sourceware.org>
12688 Joel Brobecker <brobecker@adacore.com>
12689
12690 * inferiors.c (find_inferior): Add function documentation.
12691 (unloaded_dll): Handle the case where the unloaded dll has not
12692 been previously registered in the dll list.
12693
12694 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12695
12696 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12697 (thumb2_breakpoint): New.
12698 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12699
12700 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12701
12702 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12703 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12704 breakpoints.
12705
12706 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12707
12708 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12709
12710 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12711
12712 * linux-s390-low.c (s390_collect_ptrace_register)
12713 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12714
12715 2010-01-21 Doug Evans <dje@google.com>
12716
12717 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12718 (PTRACE_ARG4_TYPE): New macro.
12719 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12720 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12721 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12722 (usr_store_inferior_registers): Ditto.
12723 (linux_read_memory, linux_write_memory): Ditto.
12724 (linux_test_for_tracefork): Ditto.
12725
12726 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12727 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12728
12729 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12730
12731 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12732 target.
12733
12734 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12735
12736 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12737 prototype to take a regcache. Adjust.
12738
12739 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12740
12741 * regcache.h (struct thread_info): Forward declare.
12742 (struct regcache): New.
12743 (new_register_cache): Adjust prototype.
12744 (get_thread_regcache): Declare.
12745 (free_register_cache): Adjust prototype.
12746 (registers_to_string, registers_from_string): Ditto.
12747 (supply_register, supply_register_by_name, collect_register)
12748 (collect_register_as_string, collect_register_by_name): Ditto.
12749 * regcache.c (struct inferior_regcache_data): Delete.
12750 (get_regcache): Rename to ...
12751 (get_thread_regcache): ... this. Adjust. Switch inferior before
12752 fetching registers.
12753 (regcache_invalidate_one): Adjust.
12754 (regcache_invalidate): Fix prototype.
12755 (new_register_cache): Return the new register cache.
12756 (free_register_cache): Change prototype.
12757 (realloc_register_cache): Adjust.
12758 (registers_to_string): Change prototype to take a regcache. Adjust.
12759 (registers_from_string): Ditto.
12760 (register_data): Ditto.
12761 (supply_register): Ditto.
12762 (supply_register_by_name): Ditto.
12763 (collect_register): Ditto.
12764 (collect_register_as_string): Ditto.
12765 (collect_register_by_name): Ditto.
12766 * server.c (process_serial_event): Adjust.
12767 * linux-low.h (regset_fill_func, regset_store_func): Change
12768 prototype.
12769 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12770 Change prototype.
12771 * linux-low.c (get_stop_pc): Adjust.
12772 (check_removed_breakpoint): Adjust.
12773 (linux_wait_for_event): Adjust.
12774 (linux_resume_one_lwp): Adjust.
12775 (fetch_register): Add regcache parameter. Adjust.
12776 (usr_store_inferior_registers): Ditto.
12777 (regsets_fetch_inferior_registers): Ditto.
12778 (regsets_store_inferior_registers): Ditto.
12779 (linux_fetch_registers, linux_store_registers): Ditto.
12780 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12781 regcache. Adjust.
12782 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12783 Ditto.
12784 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12785 prototype to take a regcache.
12786 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12787 * remote-utils.c (convert_ascii_to_int, outreg)
12788 (prepare_resume_reply): Change prototype to take a regcache.
12789 Adjust.
12790 * target.h (struct target_ops) <fetch_registers, store_registers>:
12791 Change prototype to take a regcache.
12792 (fetch_inferior_registers, store_inferior_registers): Change
12793 prototype to take a regcache. Adjust.
12794 * proc-service.c (ps_lgetregs): Adjust.
12795 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12796 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12797 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12798 take a regcache. Adjust.
12799 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12800 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12801 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12802 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12803 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12804 (cris_cannot_fetch_register):
12805 (cris_breakpoint_at): Change prototype to take a regcache.
12806 Adjust.
12807 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12808 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12809 to take a regcache. Adjust.
12810 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12811 Adjust.
12812 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12813 take a regcache. Adjust.
12814 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12815 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12816 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12817 * linux-mips-low.c (mips_get_pc):
12818 (mips_set_pc): Change prototype to take a regcache. Adjust.
12819 (mips_reinsert_addr): Adjust.
12820 (mips_collect_register): Change prototype to take a regcache.
12821 Adjust.
12822 (mips_supply_register):
12823 (mips_collect_register_32bit, mips_supply_register_32bit)
12824 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12825 (mips_store_fpregset): Ditto.
12826 * linux-ppc-low.c (ppc_supply_ptrace_register)
12827 (ppc_supply_ptrace_register): Ditto.
12828 (parse_spufs_run): Adjust.
12829 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12830 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12831 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12832 take a regcache. Adjust.
12833 * linux-s390-low.c (s390_collect_ptrace_register)
12834 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12835 (s390_set_pc): Change prototype to take a regcache. Adjust.
12836 (s390_arch_setup): Adjust.
12837 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12838 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12839 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12840 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12841 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12842 regcache. Adjust.
12843 (sparc_breakpoint_at): Adjust.
12844 * linux-xtensa-low.c (xtensa_fill_gregset):
12845 (xtensa_store_gregset):
12846 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12847 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12848 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12849 prototype to take a regcache. Adjust.
12850 * win32-arm-low.c (arm_fetch_inferior_register)
12851 (arm_store_inferior_register): Change prototype to take a
12852 regcache. Adjust.
12853 * win32-i386-low.c (i386_fetch_inferior_register)
12854 (i386_store_inferior_register): Change prototype to take a
12855 regcache. Adjust.
12856 * win32-low.c (child_fetch_inferior_registers)
12857 (child_store_inferior_registers): Change prototype to take a
12858 regcache. Adjust.
12859 (win32_wait): Adjust.
12860 (win32_fetch_inferior_registers): Change prototype to take a
12861 regcache. Adjust.
12862 (win32_store_inferior_registers): Adjust.
12863 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12864 store_inferior_register>: Change prototype to take a regcache.
12865
12866 2010-01-20 Doug Evans <dje@google.com>
12867
12868 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12869 #ifdef.
12870 (linux_wait_for_event1, linux_init_signals): Ditto.
12871 (W_STOPCODE): Provide definition if missing.
12872
12873 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12874
12875 * linux-low.c (linux_core_of_thread): New.
12876 (compare_ints, show_process, list_threads): New.
12877 (linux_qxfer_osdata): Report threads and cores.
12878 (linux_target_op): Register linux_core_of_thread.
12879 * remote-utils.c (prepare_resume_reply): Report the core.
12880 (buffer_xml_printf): Support %d specifier.
12881 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12882 New.
12883 (handle_query): Handle qXfer:threads. Announce availability
12884 thereof.
12885 * target.h (struct target_ops): New field core_of_thread.
12886
12887 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12888
12889 * Makefile.in (clean): Remove new generated files.
12890 (reg-s390.o, reg-s390.c): Remove rules.
12891 (reg-s390x.o, reg-s390x.c): Likewise.
12892 (s390-linux32.o, s390-linux32.c): Add rules.
12893 (s390-linux64.o, s390-linux64.c): Likewise.
12894 (s390x-linux64.o, s390x-linux64.c): Likewise.
12895 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12896 * linux-s390-low.c: Include <elf.h>.
12897 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12898 (init_registers_s390): Remove prototype.
12899 (init_registers_s390x): Likewise.
12900 (init_registers_s390_linux32): Add prototype.
12901 (init_registers_s390_linux64): Likewise.
12902 (init_registers_s390x_linux64): Likewise.
12903 (s390_num_regs_3264): New define.
12904 (s390_regmap_3264): New global variable.
12905 (s390_cannot_fetch_register): Remove obsolete check.
12906 (s390_cannot_store_register): Likewise.
12907 (s390_collect_ptrace_register): Handle upper/lower register halves.
12908 (s390_supply_ptrace_register): Likewise.
12909 (s390_fill_gregset): Update to register number changes.
12910 (s390_get_hwcap): New routine.
12911 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12912 Install appropriate regmap and register set.
12913
12914 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12915
12916 * server.c (gdbserver_version): Update copyright year to 2010.
12917 * gdbreplay.c (gdbreplay_version): Likewise.
12918
12919 2009-12-28 Doug Evans <dje@google.com>
12920
12921 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12922 elf/external.h. Include <elf.h> instead but only if necessary.
12923
12924 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12925
12926 * linux-low.c (linux_remove_process): Remove `detaching'
12927 parameter. Don't release/detach from thread_db here.
12928 (linux_kill): Release/detach from thread_db here, ...
12929 (linux_detach): ... and here, before actually detaching.
12930 (linux_wait_1): ... and here, when a process exits.
12931 * thread-db.c (any_thread_of): New.
12932 (thread_db_free): Switch the current inferior to a thread of the
12933 passed in process.
12934
12935 2009-12-21 Doug Evans <dje@google.com>
12936
12937 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12938
12939 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12940 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12941 warning ifndef __NR_tkill. Move setting of errno there too.
12942 Delete unnecessary resetting of errno after syscall.
12943 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12944
12945 * configure.ac: Check for dladdr.
12946 * config.in: Regenerate.
12947 * configure: Regenerate.
12948 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12949 (try_thread_db_load): Update.
12950
12951 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12952
12953 2009-12-18 Doug Evans <dje@google.com>
12954
12955 * event-loop.c: Include unistd.h if it exists.
12956
12957 * linux-low.c (my_waitpid): Move definition away from being in
12958 between linux_tracefork_child/linux_test_for_tracefork.
12959
12960 * gdb_proc_service.h (psaddr_t): Fix type.
12961 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12962 signature to match glibc.
12963
12964 2009-12-16 Doug Evans <dje@google.com>
12965
12966 * linux-low.c (linux_read_memory): Fix argument to read.
12967
12968 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12969
12970 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12971 events, don't leave current_inferior pointing at null.
12972
12973 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12974
12975 * win32-low.c (LOG): Delete.
12976 (OUTMSG): Output to stderr.
12977 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12978 on compile time LOG macro.
12979 (win32_wait): Fix debug output.
12980
12981 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12982
12983 * win32-low.c (win32_add_one_solib): If the dll name is
12984 "ntdll.dll", prepend the system directory to the dll path.
12985
12986 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12987
12988 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12989
12990 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12991 Vladimir Prus <vladimir@codesourcery.com>
12992
12993 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12994 * configure.ac: Check for __mcoldfire__ and set
12995 gdb_cv_m68k_is_coldfire.
12996 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12997 reg-cf.o and reg-m68k.o.
12998 * configure: Regenerated.
12999
13000 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13001
13002 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13003 Pass it to thread_db_free.
13004 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13005 proper `detaching' argument to linux_remove_process.
13006 * linux-low.h (thread_db_free): Add `detaching' parameter.
13007 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13008 to thread_db_free.
13009 (thread_db_free): Add `detaching' parameter. Only
13010 call td_ta_clear_event if detaching from process.
13011
13012 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13013
13014 * thread-db.c (thread_db_free): Fix typo.
13015
13016 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13017
13018 PR gdb/10838
13019 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13020
13021 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13022
13023 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13024 with an i686 compiler.
13025 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13026 needed.
13027 * configure: Rebuilt.
13028
13029 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13030
13031 PR gdb/10783
13032
13033 * server.c (handle_search_memory_1): Correct read_addr initialization
13034 in loop for searching subsequent chunks.
13035
13036 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13037
13038 * configure.ac: New --with-libthread-db option.
13039 * thread-db.c: Allow direct dependence on libthread_db.
13040 (thread_db_free): Adjust.
13041 * config.in: Regenerate.
13042 * configure: Likewise.
13043
13044 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13045
13046 PR gdb/10757
13047 * thread-db.c (attach_thread): New function.
13048 (maybe_attach_thread): Return success/failure.
13049 (find_new_threads_callback): Adjust.
13050 (thread_db_find_new_threads): Loop until no new threads.
13051
13052 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13053
13054 * proc-service.c (ps_lgetregs): Formatting.
13055
13056 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13057
13058 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13059 * configure.ac: Adjust.
13060 * linux-low.h (struct process_info_private): Move members to struct
13061 thread_db.
13062 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13063 * linux-low.c (linux_remove_process): Adjust.
13064 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13065 * server.c (handle_query): Move code ...
13066 (handle_monitor_command): ... here. New function.
13067 * target.h (struct target_ops): New member.
13068 * thread-db.c (struct thread_db): New.
13069 (libthread_db_search_path): New variable.
13070 (thread_db_create_event, thread_db_enable_reporting)
13071 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13072 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13073 (try_thread_db_load_1, dladdr_to_soname): New functions.
13074 (try_thread_db_load, thread_db_load_search): New functions.
13075 (thread_db_init): Search for libthread_db.
13076 (thread_db_free): New function.
13077 (thread_db_handle_monitor_command): Likewise.
13078 * config.in: Regenerate.
13079 * configure: Regenerate.
13080
13081 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13082
13083 * spu-low.c (spu_kill): Wait for inferior to terminate.
13084 Call clear_inferiors.
13085 (spu_detach): Call clear_inferiors.
13086
13087 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13088
13089 * aclocal.m4: Regenerate.
13090 * config.in: Likewise.
13091 * configure: Likewise.
13092
13093 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13094
13095 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13096 (parse_spufs_run): New function.
13097 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13098 (ppc_breakpoint_at): Handle SPU breakpoints.
13099
13100 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13101
13102 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13103 (SPUFS_MAGIC): Define.
13104 (spu_enumerate_spu_ids): New function.
13105 (linux_qxfer_spu): New function.
13106 (linux_target_ops): Install linux_qxfer_spu.
13107
13108 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13109
13110 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13111 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13112 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13113 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13114 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13115 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13116 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13117 (init_registers_powerpc_cell32l): Add prototype.
13118 (init_registers_powerpc_cell64l): Likewise.
13119 (ppc_arch_setup): Detect Cell/B.E. architecture.
13120
13121 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13122
13123 * Makefile.in (datarootdir): New variable.
13124
13125 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13126
13127 * linux-low.c (linux_write_memory): Update debugging output.
13128 * Makefile.in (clean): Add new descriptions.
13129 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13130 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13131 * configure.srv: Add new files for arm*-*-linux*.
13132 * linux-arm-low.c: Add new declarations.
13133 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13134 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13135 (HWCAP_VFPv3D16): New.
13136 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13137 instead of __IWMMXT__.
13138 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13139 (arm_arch_setup): New.
13140 (target_regsets): Remove #ifdef. Add VFP regset.
13141 (the_low_target): Use arm_arch_setup.
13142
13143 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13144
13145 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13146 the main thread again.
13147
13148 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13149
13150 Adding Neutrino gdbserver.
13151 * configure: Regenerated.
13152 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13153 * configure.srv (i[34567]86-*-nto*): New target.
13154 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13155 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13156 (nto_comctrl) [__QNX__]: New function.
13157 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13158
13159 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13160
13161 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13162 srv_tgtobj.
13163
13164 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13165 Pedro Alves <pedro@codesourcery.com>
13166
13167 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13168 don't support CONTEXT_EXTENDED_REGISTERS.
13169 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13170 (the_low_target): Install them.
13171 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13172 failing with ERROR_PIPE_NOT_CONNECTED.
13173
13174 2009-06-30 Doug Evans <dje@google.com>
13175 Pierre Muller <muller@ics.u-strasbg.fr>
13176
13177 Add h/w watchpoint support to x86-linux, win32-i386.
13178 * Makefile.in (SFILES): Add i386-low.c
13179 (i386_low_h): Define.
13180 (i386-low.o): Add dependencies.
13181 (linux-x86-low.o): Add i386-low.h dependency.
13182 (win32-i386-low.o): Ditto.
13183 * i386-low.c: New file.
13184 * i386-low.h: New file.
13185 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13186 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13187 * linux-low.c (linux_add_process): Initialize arch_private.
13188 (linux_remove_process): Free arch_private.
13189 (add_lwp): Initialize arch_private.
13190 (delete_lwp): Free arch_private.
13191 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13192 provided.
13193 * linux-low.h (process_info_private): New member arch_private.
13194 (lwp_info): New member arch_private.
13195 (linux_target_ops): New members new_process, new_thread,
13196 prepare_to_resume.
13197 (ptid_of): New macro.
13198 * linux-x86-low.c: Include stddef.h, i386-low.h.
13199 (arch_process_info): New struct.
13200 (arch_lwp_info): New struct.
13201 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13202 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13203 (i386_dr_low_get_status): New function.
13204 (x86_insert_point, x86_remove_point): New functions.
13205 (x86_stopped_by_watchpoint): New function.
13206 (x86_stopped_data_address): New function.
13207 (x86_linux_new_process, x86_linux_new_thread): New functions.
13208 (x86_linux_prepare_to_resume): New function.
13209 (the_low_target): Add entries for insert_point, remove_point,
13210 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13211 prepare_to_resume.
13212 * server.c (debug_hw_points): New global.
13213 (monitor_show_help): Document set debug-hw-points.
13214 (handle_query): Process "set debug-hw-points".
13215 * server.h (debug_hw_points): Declare.
13216 (paddress): Declare.
13217 * utils.c (NUMCELLS, CELLSIZE): New macros.
13218 (get_sell, xsnprintf, paddress): New functions.
13219 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13220 remove_point, stopped_by_watchpoint, stopped_data_address.
13221 * win32-i386-low.c: Include i386-low.h.
13222 (debug_reg_state): Replaces dr.
13223 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13224 (i386_dr_low_get_status): New function.
13225 (i386_insert_point, i386_remove_point): New functions.
13226 (i386_stopped_by_watchpoint): New function.
13227 (i386_stopped_data_address): New function.
13228 (i386_initial_stuff): Update.
13229 (get_thread_context,set_thread_context,i386_thread_added): Update.
13230 (the_low_target): Add entries for insert_point,
13231 remove_point, stopped_by_watchpoint, stopped_data_address.
13232 * win32-low.c (win32_insert_watchpoint): New function.
13233 (win32_remove_watchpoint): New function.
13234 (win32_stopped_by_watchpoint): New function.
13235 (win32_stopped_data_address): New function.
13236 (win32_target_ops): Add entries for insert_watchpoint,
13237 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13238 * win32-low.h (win32_target_ops): New members insert_point,
13239 remove_point, stopped_by_watchpoint, stopped_data_address.
13240
13241 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13242
13243 * server.c (process_serial_event): Re-return unsupported, not
13244 error, if the type isn't recognized. Re-allow supporting only
13245 insert or remove packets. Also call require_running for
13246 breakpoints. Add missing break statement to default case. Tidy.
13247 * target.h (struct target_ops): Rename insert_watchpoint to
13248 insert_point, and remove_watchpoint to remove_point.
13249
13250 * linux-low.h (struct linux_target_ops): Likewise.
13251 * linux-low.c (linux_insert_watchpoint): Rename to ...
13252 (linux_insert_point): ... this. Adjust.
13253 (linux_remove_watchpoint): Rename to ...
13254 (linux_remove_point): ... this. Adjust.
13255 (linux_target_ops): Adjust.
13256 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13257 (cris_insert_point): ... this.
13258 (cris_remove_watchpoint): Rename to ...
13259 (cris_remove_point): ... this.
13260 (the_low_target): Adjust.
13261
13262 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13263
13264 * server.c (handle_v_kill): Pass signal_pid to
13265 kill_inferior if multi_process is zero.
13266
13267 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13268
13269 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13270 * target.h (target_ops): Comment for *_watchpoint to make it clear
13271 the functions can get types '0' and '1'.
13272
13273 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13274
13275 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13276 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13277 * regcache.c (get_regcache): Likewise.
13278 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13279 * win32-low.c (child_fetch_inferior_registers): Remove check for
13280 regno 0.
13281
13282 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13283 Pedro Alves <pedro@codesourcery.com>
13284
13285 * target.h (struct target_ops) <supports_multi_process>: New
13286 callback.
13287 (target_supports_multi_process): New.
13288 * server.c (handle_query): Even if GDB reports support, only
13289 enable multi-process if the target also supports it. Report
13290 multi-process support only if the target backend supports it.
13291 * linux-low.c (linux_supports_multi_process): New function.
13292 (linux_target_ops): Install it as target_supports_multi_process
13293 callback.
13294
13295 2009-05-24 Doug Evans <dje@google.com>
13296
13297 Global renaming of find_thread_pid to find_thread_ptid.
13298 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13299 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13300 All callers updated.
13301
13302 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13303 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13304 directly.
13305
13306 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13307 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13308 (linux_resume_one_lwp): Ditto.
13309
13310 2009-05-23 Doug Evans <dje@google.com>
13311
13312 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13313 from struct inferior_list_entry * to struct lwp_info *.
13314 All callers updated.
13315
13316 2009-05-13 Doug Evans <dje@google.com>
13317
13318 * linux-x86-low.c: Don't include assert.h.
13319 (x86_siginfo_fixup): Use fatal, not assert.
13320 (x86_arch_setup): Fix comment.
13321
13322 2009-05-12 Doug Evans <dje@google.com>
13323
13324 Biarch support for i386/amd64 gdbserver.
13325 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13326 Add linux-x86-low.c.
13327 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13328 (linux-x86-low.o): Add.
13329 * linux-x86-64-low.c: Delete.
13330 * linux-i386-low.c: Delete.
13331 * linux-x86-low.c: New file.
13332 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13333 linux-x86-low.o.
13334 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13335 linux-x86-low.o.
13336 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13337 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13338 (linux_child_pid_to_exec_file): New function.
13339 (elf_64_header_p, elf_64_file_p): New functions.
13340 (siginfo_fixup): New function.
13341 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13342 give target a chance to convert layout.
13343 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13344 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13345
13346 2009-05-07 Doug Evans <dje@google.com>
13347
13348 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13349 (regsets_store_inferior_registers): Ditto.
13350
13351 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13352
13353 PR server/10048
13354
13355 * linux-low.c (must_set_ptrace_flags): Delete.
13356 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13357 of the global.
13358 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13359 `lwp->must_set_ptrace_flags' instead.
13360 (linux_wait_for_event_1): Set ptrace options here.
13361 (linux_wait_1): ... not here.
13362
13363 2009-04-30 Doug Evans <dje@google.com>
13364
13365 * inferiors.c (started_inferior_callback): New function.
13366 (attached_inferior_callback): New function.
13367 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13368 * server.c (print_started_pid, print_attached_pid): New functions.
13369 (detach_or_kill_for_exit): New function.
13370 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13371 * server.h (have_started_inferiors_p): Declare.
13372 (have_attached_inferiors_p): Declare.
13373
13374 * inferiors.c (remove_process): Fix memory leak, free process.
13375 * linux-low.c (linux_remove_process): New function.
13376 (linux_kill): Call it instead of remove_process.
13377 (linux_detach, linux_wait_1): Ditto.
13378
13379 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13380
13381 * configure.srv: Add x86 Windows CE target.
13382
13383 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13384
13385 * inferiors.c (get_thread_process): Make global.
13386 * server.h (get_thread_process): Add prototype.
13387 * thread-db.c (find_one_thread): Use get_thread_process
13388 instead of current_process.
13389 (thread_db_get_tls_address): Do not crash if called when
13390 thread layer is not yet initialized.
13391
13392 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13393
13394 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13395 * spu-low.c (current_tid): Rename to ...
13396 (current_ptid): ... this.
13397 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13398 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13399 ptid_get_lwp (current_ptid) instead of current_tid.
13400 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13401 instead of current_tid. Use find_process_pid to verify pid
13402 argument is valid. Pass proper argument to remove_process.
13403 (spu_thread_alive): Compare current_ptid instead of current_tid.
13404 (spu_resume): Likewise.
13405
13406 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13407
13408 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13409 variable.
13410
13411 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13412
13413 Implement the multiprocess extensions, and add linux multiprocess
13414 support.
13415
13416 * server.h (ULONGEST): Declare.
13417 (struct ptid, ptid_t): New.
13418 (minus_one_ptid, null_ptid): Declare.
13419 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13420 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13421 (struct inferior_list_entry): Change `id' type from unsigned from
13422 to ptid_t.
13423 (struct sym_cache, struct breakpoint, struct
13424 process_info_private): Forward declare.
13425 (struct process_info): Declare.
13426 (current_process): Declare.
13427 (all_processes): Declare.
13428 (initialize_inferiors): Declare.
13429 (add_thread): Adjust to use ptid_t.
13430 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13431 (add_process, remove_process, find_thread_pid): Declare.
13432 (find_inferior_id): Adjust to use ptid_t.
13433 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13434 (multi_process): Declare.
13435 (push_event): Adjust to use ptid_t.
13436 (read_ptid, write_ptid): Declare.
13437 (prepare_resume_reply): Adjust to use ptid_t.
13438 (clear_symbol_cache): Declare.
13439 * inferiors.c (all_processes): New.
13440 (null_ptid, minus_one_ptid): New.
13441 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13442 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13443 (add_thread): Change unsigned long to ptid. Remove gdb_id
13444 parameter. Adjust.
13445 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13446 (gdb_id_to_thread): Rename to ...
13447 (find_thread_pid): ... this. Change unsigned long to ptid.
13448 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13449 (loaded_dll, pull_pid_from_list): Adjust.
13450 (add_process, remove_process, find_process_pid)
13451 (get_thread_process, current_process, initialize_inferiors): New.
13452 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13453 (struct target_waitstatus) <related_pid>: Ditto.
13454 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13455 return type to int.
13456 (struct target_ops) <join>: Add `pid' argument.
13457 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13458 (struct target_ops) <wait>: Add `ptid' field. Change return type
13459 to ptid.
13460 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13461 (mywait): Add `ptid' argument. Change return type to ptid_t.
13462 (target_pid_to_str): Declare.
13463 * target.c (set_desired_inferior): Adjust to use ptids.
13464 (mywait): Add new `ptid' argument. Adjust.
13465 (target_pid_to_str): New.
13466 * mem-break.h (free_all_breakpoints): Declare.
13467 * mem-break.c (breakpoints): Delelete.
13468 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13469 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13470 to use per-process breakpoint list.
13471 (free_all_breakpoints): New.
13472 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13473 (symbol_cache, all_symbols_looked_up): Delete.
13474 (hexchars): New.
13475 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13476 read_ptid): New.
13477 (prepare_resume_reply): Change ptid argument's type from unsigned
13478 long to ptid_t. Adjust. Implement W;process and X;process.
13479 (free_sym_cache, clear_symbol_cache): New.
13480 (look_up_one_symbol): Adjust to per-process symbol cache. *
13481 * server.c (cont_thread, general_thread, step_thread): Change type
13482 to ptid_t.
13483 (attached): Delete.
13484 (multi_process): New.
13485 (last_ptid): Change type to ptid_t.
13486 (struct vstop_notif) <ptid>: Change type to ptid_t.
13487 (queue_stop_reply, push_event): Change `ptid' argument's type to
13488 ptid_t.
13489 (discard_queued_stop_replies): Add `pid' argument.
13490 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13491 changes. Don't reference the `attached' global.
13492 (attach_inferior): Adjust to mywait interface changes.
13493 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13494 features. Handle and report "multiprocess+". Handle
13495 "qAttached:PID".
13496 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13497 changes.
13498 (handle_v_kill): New.
13499 (handle_v_stopped): Adjust to use target_pid_to_str.
13500 (handle_v_requests): Allow multiple attaches and runs when
13501 multiprocess extensions are in effect. Handle "vKill".
13502 (myresume): Adjust to use ptids.
13503 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13504 (handle_status): Adjust to discard_queued_stop_replies interface
13505 change.
13506 (first_thread_of, kill_inferior_callback)
13507 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13508 (main): Call initialize_inferiors. Adjust to use ptids, killing
13509 and detaching from all inferiors. Handle multiprocess packet
13510 variants.
13511 * linux-low.h: Include gdb_proc_service.h.
13512 (struct process_info_private): New.
13513 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13514 <lwpid_of>: Use ptid_get_lwp.
13515 (get_lwp_thread): Adjust.
13516 (struct lwp_info): Add `dead' member.
13517 (find_lwp_pid): Declare.
13518 * linux-low.c (thread_db_active): Delete.
13519 (new_inferior): Adjust comment.
13520 (inferior_pid): Delete.
13521 (linux_add_process): New.
13522 (handle_extended_wait): Adjust.
13523 (add_lwp): Change unsigned long to ptid.
13524 (linux_create_inferior): Add process to processes table. Adjust
13525 to use ptids. Don't set new_inferior here.
13526 (linux_attach_lwp): Rename to ...
13527 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13528 it. Adjust to use ptids.
13529 (linux_attach_lwp): New.
13530 (linux_attach): Add process to processes table. Don't set
13531 new_inferior here.
13532 (struct counter): New.
13533 (second_thread_of_pid_p, last_thread_of_process_p): New.
13534 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13535 multiple processes.
13536 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13537 processes. Remove process from process table.
13538 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13539 to multiple processes.
13540 (any_thread_of): New.
13541 (linux_detach): Add `pid' argument, and handle it. Remove process
13542 from processes table.
13543 (linux_join): Add `pid' argument. Handle it.
13544 (linux_thread_alive): Change unsighed long argument to ptid_t.
13545 Consider dead lwps as not being alive.
13546 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13547 threads we're not interested in.
13548 (same_lwp, find_lwp_pid): New.
13549 (linux_wait_for_lwp): Change `pid' argument's type from int to
13550 ptid_t. Adjust.
13551 (linux_wait_for_event): Rename to ...
13552 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13553 from int to ptid_t. Adjust.
13554 (linux_wait_for_event): New.
13555 (linux_wait_1): Add `ptid' argument. Change return type to
13556 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13557 that exit from the process table.
13558 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13559 Adjust.
13560 (mark_lwp_dead): New.
13561 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13562 stopping all threads, mark its main lwp as dead.
13563 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13564 ptids.
13565 (fetch_register, usr_store_inferior_registers)
13566 (regsets_fetch_inferior_registers)
13567 (regsets_store_inferior_registers, linux_read_memory)
13568 (linux_write_memory): Inline `inferior_pid'.
13569 (linux_look_up_symbols): Adjust to use per-process
13570 `thread_db_active'.
13571 (linux_request_interrupt): Adjust to use ptids.
13572 (linux_read_auxv): Inline `inferior_pid'.
13573 (initialize_low): Don't reference thread_db_active.
13574 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13575 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13576 (ps_getpid): Return the pid of the current inferior.
13577 * thread-db.c (proc_handle, thread_agent): Delete.
13578 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13579 per-process data.
13580 (find_one_thread): Change argument type to ptid_t. Adjust to
13581 per-process data.
13582 (maybe_attach_thread): Adjust to per-process data and ptids.
13583 (thread_db_find_new_threads): Ditto.
13584 (thread_db_init): Ditto.
13585 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13586 processes table. Adjust to use ptids.
13587 (spu_kill, spu_detach): Adjust interface. Remove process from
13588 processes table.
13589 (spu_join, spu_thread_alive): Adjust interface.
13590 (spu_wait): Adjust interface. Remove process from processes
13591 table. Adjust to use ptids.
13592 * win32-low.c (current_inferior_tid): Delete.
13593 (current_inferior_ptid): New.
13594 (debug_event_ptid): New.
13595 (thread_rec): Take a ptid. Adjust.
13596 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13597 (child_delete_thread): Ditto.
13598 (do_initial_child_stuff): Add `attached' argument. Add process to
13599 processes table.
13600 (child_fetch_inferior_registers, child_store_inferior_registers):
13601 Adjust.
13602 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13603 (win32_attach): Pass 1 to do_initial_child_stuff.
13604 (win32_kill): Adjust interface. Remove process from processes
13605 table.
13606 (win32_detach): Ditto.
13607 (win32_join): Adjust interface.
13608 (win32_thread_alive): Take a ptid.
13609 (win32_resume): Adjust to use ptids.
13610 (get_child_debug_event): Ditto.
13611 (win32_wait): Adjust interface. Remove exiting process from
13612 processes table.
13613
13614 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13615
13616 Non-stop mode support.
13617
13618 * server.h (non_stop): Declare.
13619 (gdb_client_data, handler_func): Declare.
13620 (delete_file_handler, add_file_handler, start_event_loop):
13621 Declare.
13622 (handle_serial_event, handle_target_event, push_event)
13623 (putpkt_notif): Declare.
13624 * target.h (enum resume_kind): New.
13625 (struct thread_resume): Replace `step' field by `kind' field.
13626 (TARGET_WNOHANG): Define.
13627 (struct target_ops) <wait>: Add `options' argument.
13628 <supports_non_stop, async, start_non_stop>: New fields.
13629 (target_supports_non_stop, target_async): New.
13630 (start_non_stop): Declare.
13631 (mywait): Add `options' argument.
13632 * target.c (mywait): Add `options' argument. Print child exit
13633 notifications here.
13634 (start_non_stop): New.
13635 * server.c (non_stop, own_buf, mem_buf): New globals.
13636 (struct vstop_notif): New.
13637 (notif_queue): New global.
13638 (queue_stop_reply, push_event, discard_queued_stop_replies)
13639 (send_next_stop_reply): New.
13640 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13641 interface changes.
13642 (attach_inferior): In non-stop mode, don't wait for the target
13643 here.
13644 (handle_general_set): Handle QNonStop.
13645 (handle_query): When handling qC, return the current general
13646 thread, instead of the first thread of the list.
13647 (handle_query): If the backend supports non-stop mode, include
13648 QNonStop+ in the qSupported query response.
13649 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13650 and non-stop mode.
13651 (handle_v_attach, handle_v_run): Handle non-stop mode.
13652 (handle_v_stopped): New.
13653 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13654 (myresume): Adjust to use resume_kind. Handle non-stop.
13655 (queue_stop_reply_callback): New.
13656 (handle_status): Handle non-stop mode.
13657 (main): Clear non_stop flag on reconnection. Use the event-loop.
13658 Refactor serial protocol handling from here ...
13659 (process_serial_event): ... to this new function. When GDB
13660 selects any thread, select one here. In non-stop mode, wait until
13661 GDB acks all pending events before exiting.
13662 (handle_serial_event, handle_target_event): New.
13663 * remote-utils.c (remote_open): Install remote_desc in the event
13664 loop.
13665 (remote_close): Remove remote_desc from the event loop.
13666 (putpkt_binary): Rename to...
13667 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13668 (putpkt_binary): New as wrapper around putpkt_binary_1.
13669 (putpkt_notif): New.
13670 (prepare_resume_reply): In non-stop mode, don't change the
13671 general_thread.
13672 * event-loop.c: New.
13673 * Makefile.in (OBJ): Add event-loop.o.
13674 (event-loop.o): New rule.
13675
13676 * linux-low.h (pid_of): Moved here.
13677 (lwpid_of): New.
13678 (get_lwp_thread): Use lwpid_of.
13679 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13680 * linux-low.c (pid_of): Delete.
13681 (inferior_pid): Use lwpid_of.
13682 (linux_event_pipe): New.
13683 (target_is_async_p): New.
13684 (delete_lwp): New.
13685 (handle_extended_wait): Use lwpid_of.
13686 (add_lwp): Don't set lwpid field.
13687 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13688 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13689 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13690 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13691 first. Adjust to linux_wait_for_event interface changes. Use
13692 lwpid_of.
13693 (linux_detach): Don't delete the main lwp here.
13694 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13695 (status_pending_p): Don't consider explicitly suspended lwps.
13696 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13697 pointer. Add OPTIONS argument. Change return type to int. Use
13698 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13699 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13700 pointer. Add status pointer argument. Return a pid instead of a
13701 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13702 changes. In non-stop mode, don't switch to a random thread.
13703 (linux_wait): Rename to...
13704 (linux_wait_1): ... this. Add target_options argument, and handle
13705 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13706 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13707 clean exit and signal exit code. Don't stop all threads in
13708 non-stop mode. In all-stop mode, only stop all threads when
13709 reporting a stop to GDB. Handle explicit thread stop requests.
13710 (async_file_flush, async_file_mark): New.
13711 (linux_wait): New.
13712 (send_sigstop): Use lwpid_of.
13713 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13714 interface changes. In non-stop mode, don't switch to a random
13715 thread.
13716 (linux_resume_one_lwp): Use lwpid_of.
13717 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13718 (linux_resume_one_thread): ... this. Handle resume_stop. In
13719 non-stop mode, don't look for pending flag in all threads.
13720 (resume_status_pending_p): Don't consider explicitly suspended
13721 threads.
13722 (my_waitpid): Reimplement. Emulate __WALL.
13723 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13724 Use lwpid_of.
13725 (sigchld_handler, linux_supports_non_stop, linux_async)
13726 (linux_start_non_stop): New.
13727 (linux_target_ops): Register linux_supports_non_stop, linux_async
13728 and linux_start_non_stop.
13729 (initialize_low): Install SIGCHLD handler.
13730 * thread-db.c (thread_db_create_event, find_one_thread)
13731 (thread_db_get_tls_address): Use lwpid_of.
13732 * win32-low.c (win32_detach): Adjust to use resume_kind.
13733 (win32_wait): Add `options' argument.
13734 * spu-low.c (spu_resume): Adjust to use resume_kind.
13735 (spu_wait): Add `options' argument.
13736
13737 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13738
13739 Decouple target code from remote protocol.
13740
13741 * target.h (enum target_waitkind): New.
13742 (struct target_waitstatus): New.
13743 (struct target_ops) <wait>: Return an unsigned long. Take a
13744 target_waitstatus pointer instead of a char pointer.
13745 (mywait): Likewise.
13746 * target.c (mywait): Change prototype to return an unsigned long.
13747 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13748 * server.h (thread_from_wait, old_thread_from_wait): Delete
13749 declarations.
13750 (prepare_resume_reply): Change prototype to take a
13751 target_waitstatus.
13752 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13753 (last_status, last_ptid): New.
13754 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13755 pid instead of a signal.
13756 (attach_inferior): Remove "status" and "signal" parameters.
13757 Adjust.
13758 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13759 not as an address.
13760 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13761 (handle_v_requests, myresume): Remove "status" and "signal"
13762 parameters. Adjust.
13763 (handle_status): New.
13764 (main): Delete local `status'. Adjust.
13765 * remote-utils.c: Include target.h.
13766 (prepare_resume_reply): Change prototype to take a
13767 target_waitstatus. Adjust.
13768
13769 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13770 interface.
13771 * spu-low.c (spu_wait): Adjust.
13772 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13773 Delete.
13774 (win32_wait): Adjust.
13775
13776 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13777
13778 * target.h (struct thread_resume): Delete leave_stopped member.
13779 (struct target_ops): Add a `n' argument to the `resume' callback.
13780 * server.c (start_inferior): Adjust.
13781 (handle_v_cont, myresume): Adjust.
13782 * linux-low.c (check_removed_breakpoint): Adjust to resume
13783 interface change, and to removed leave_stopped field.
13784 (resume_ptr): Delete.
13785 (struct thread_resume_array): New.
13786 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13787 resume interface change.
13788 (linux_continue_one_thread, linux_queue_one_thread)
13789 (resume_status_pending_p): Check if the resume field is NULL
13790 instead of checking the leave_stopped member.
13791 (linux_resume): Adjust to the target resume interface change.
13792 * spu-low.c (spu_resume): Adjust to the target resume interface
13793 change.
13794 * win32-low.c (win32_detach, win32_resume): Ditto.
13795
13796 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13797
13798 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13799 flag.
13800 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13801 pending.
13802 (linux_continue_one_thread): Only preserve the stepping flag if
13803 there's a pending breakpoint.
13804
13805 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13806
13807 * server.c (main): After the inferior having exited, call
13808 remote_close before exiting gdbserver.
13809
13810 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13811
13812 Fix size of FPSCR in Power 7 processors.
13813 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13814 (PPC_FEATURE_HAS_DFP): New #define.
13815 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13816 size of the FPSCR.
13817
13818 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13819
13820 * server.c (handle_query) Whitespace and formatting.
13821
13822 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13823
13824 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13825 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13826 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13827 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13828 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13829 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13830 Makefile.in, configure.ac: Fix whitespace throughout.
13831 * configure: Regenerate.
13832
13833 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13834
13835 * inferiors.c (find_inferior): Make it safe for the callback
13836 function to delete the currently iterated inferior.
13837
13838 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13839
13840 * Makefile.in (linuw_low_h): Move higher.
13841 (thread-db.o): Depend on $(linux_low_h).
13842
13843 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13844
13845 Rename "process" to "lwp" throughout.
13846
13847 * linux-low.c (all_processes): Rename to...
13848 (all_lwps): ... this.
13849 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13850 (add_process): Rename to ...
13851 (add_lwp): ... this. Adjust.
13852 (linux_create_inferior): Adjust.
13853 (linux_attach_lwp): Adjust.
13854 (linux_attach): Adjust.
13855 (linux_kill_one_process): Rename to ...
13856 (linux_kill_one_lwp): ... this. Adjust.
13857 (linux_kill): Adjust.
13858 (linux_detach_one_process): Rename to ...
13859 (linux_detach_one_lwp): ... this. Adjust.
13860 (linux_detach): Adjust.
13861 (check_removed_breakpoint): Adjust.
13862 (status_pending_p): Adjust.
13863 (linux_wait_for_process): Rename to ...
13864 (linux_wait_for_lwp): ... this. Adjust.
13865 (linux_wait_for_event): Adjust.
13866 (send_sigstop): Adjust.
13867 (wait_for_sigstop): Adjust.
13868 (stop_all_processes): Rename to ...
13869 (stop_all_lwps): ... this.
13870 (linux_resume_one_process): Rename to ...
13871 (linux_resume_one_lwp): ... this. Adjust.
13872 (linux_set_resume_request, linux_continue_one_thread)
13873 (linux_queue_one_thread, resume_status_pending_p)
13874 (usr_store_inferior_registers, regsets_store_inferior_registers)
13875 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13876 Adjust.
13877 * linux-low.h (get_process): Rename to ...
13878 (get_lwp): ... this. Adjust.
13879 (get_thread_process): Rename to ...
13880 (get_thread_lwp): ... this. Adjust.
13881 (get_process_thread): Rename to ...
13882 (get_lwp_thread): ... this. Adjust.
13883 (struct process_info): Rename to ...
13884 (struct lwp_info): ... this.
13885 (all_processes): Rename to ...
13886 (all_lwps): ... this.
13887 * proc-service.c (ps_lgetregs): Adjust.
13888 * thread-db.c (thread_db_create_event, find_one_thread)
13889 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13890
13891 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13892
13893 * server.c (handle_query): Handle "qAttached".
13894
13895 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13896
13897 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13898 GPLv3, update license URL.
13899
13900 2009-03-01 Doug Evans <dje@google.com>
13901
13902 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13903 (server_h): Add gdb_signals.h.
13904 (signals.o): Update.
13905 * server.h (target_signal_from_host,target_signal_to_host_p)
13906 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13907
13908 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13909
13910 * remote-utils.c (getpkt): Also generate remote-debug
13911 information if noack_mode is set.
13912
13913 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13914
13915 * server.c (handle_query): Report qXfer:siginfo:read and
13916 qXfer:siginfo:write as supported and handle them.
13917 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13918 * linux-low.c (linux_xfer_siginfo): New.
13919 (linux_target_ops): Set it.
13920
13921 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13922
13923 * server.c (gdbserver_usage): Mention --remote-debug.
13924 (main): Accept '--remote-debug' switch.
13925
13926 2009-01-18 Doug Evans <dje@google.com>
13927
13928 * regcache.c (new_register_cache): No need to check result of xcalloc.
13929 * server.c (handle_search_memory): Back out calls to xmalloc,
13930 result is checked and error is returned to user upon failure.
13931 (handle_query): Ditto. Add more checks for result of malloc.
13932 (handle_v_cont): Check result of malloc, report error back to
13933 user upon failure.
13934 (handle_v_run): Ditto. Call freeargv.
13935 * server.h (freeargv): Declare.
13936 * utils.c (freeargv): New fn.
13937
13938 2009-01-15 Doug Evans <dje@google.com>
13939
13940 * gdbreplay.c (perror_with_name): Make arg const char *.
13941 * server.h (target_signal_to_name): Make return type const char *.
13942 * thread-db.c (thread_db_err_str): Make return type const char *.
13943 * utils.c (perror_with_name): Make arg const char *.
13944
13945 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13946
13947 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13948 when handling a EXIT_PROCESS_DEBUG_EVENT.
13949
13950 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13951
13952 * gdbreplay.c (gdbreplay_version): Update copyright year.
13953 * server.c (gdbserver_version): Likewise.
13954
13955 2009-01-05 Doug Evans <dje@google.com>
13956
13957 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13958 (handle_extended_wait): Improve comment.
13959
13960 2008-12-13 Doug Evans <dje@google.com>
13961
13962 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13963 * server.h (ATTR_MALLOC): New macro.
13964 (xmalloc,xcalloc,xstrdup): Declare.
13965 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13966 * inferiors.c: Ditto.
13967 * linux-low.c: Ditto.
13968 * mem-break.c: Ditto.
13969 * regcache.c: Ditto.
13970 * remote-utils.c: Ditto.
13971 * server.c: Ditto.
13972 * target.c: Ditto.
13973 * win32-low.c: Ditto.
13974
13975 2008-12-12 Doug Evans <dje@google.com>
13976
13977 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13978 in debugging printf.
13979
13980 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13981
13982 2008-12-09 Doug Evans <dje@google.com>
13983
13984 * linux-low.h (struct process_info): Delete member tid, unused.
13985 * thread-db.c (find_one_thread): Update.
13986 (maybe_attach_thread): Update.
13987
13988 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13989
13990 * target.h (struct target_ops): Add qxfer_osdata member.
13991 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13992 and dirent.h.
13993 (linux_qxfer_osdata): New functions.
13994 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13995 callback.
13996 * server.c (handle_query): Handle "qXfer:osdata:read:".
13997 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13998 (buffer_xml_printf): New functions.
13999 * server.h (struct buffer): New.
14000 (buffer_grow_str, buffer_grow_str0): New macros.
14001 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14002 (buffer_xml_printf): Declare.
14003
14004 2008-11-24 Doug Evans <dje@google.com>
14005
14006 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14007
14008 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14009
14010 * server.c (handle_v_run): Always use the supplied argument list.
14011
14012 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14013
14014 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14015 (xtensa_regmap_table): Add entry for scompare1.
14016
14017 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14018
14019 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14020 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14021 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14022 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14023 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14024 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14025 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14026 XML target descriptions.
14027 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14028 when inferior is running on an ISA 2.05 or later processor. Add
14029 special case to return offset for full 64-bit slot of FPSCR when
14030 in 32-bits.
14031
14032 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14033
14034 * Makefile.in (SFILES, clean): Added sparc64 files.
14035 (reg-sparc64.o, reg-sparc64.c): New.
14036 * configure.srv (sparc*-*-linux*): New configuration.
14037 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14038 syscall arguments for SPARC.
14039 (regsets_store_inferior_registers): Likewise.
14040 * linux-sparc-low.c: New file.
14041
14042 2008-10-21 Doug Evans <dje@google.com>
14043
14044 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14045 (READLINE_DIR,READLINE_DEP): Delete.
14046 (INTERNAL_CFLAGS): Update.
14047 (LINTFLAGS): Update.
14048
14049 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14050
14051 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14052 whole argv from the last run, not just argv[0].
14053
14054 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14055
14056 * regcache.c (new_register_cache): Return NULL if the register
14057 cache size isn't known yet.
14058 (free_register_cache): Avoid dereferencing a NULL regcache.
14059
14060 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14061
14062 * configure.srv: Merge MIPS and MIPS64.
14063
14064 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14065
14066 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14067
14068 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14069
14070 * Makefile.in: Add required vsx dependencies.
14071
14072 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14073 Declare init_registers_powerpc_vsx32l.
14074 Declare init_registers_powerpc_vsx64l.
14075 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14076 (ppc_arch_setup): Check for VSX in hwcap.
14077 (ppc_fill_vsxregset): New function.
14078 (ppc_store_vsxregset): New function.
14079 Add new VSX entry in regset_info target_regsets.
14080
14081 * configure.srv: Add new VSX dependencies.
14082
14083 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14084
14085 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14086 (remote_open): Set or clear transport_is_reliable.
14087 (putpkt_binary): Don't expect acks in noack mode.
14088 (getpkt): Don't send ack/nac in noack mode.
14089 * server.c (handle_general_set): Handle QStartNoAckMode.
14090 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14091 qSupported.
14092 (main): Reset noack_mode on every connection.
14093 * server.h (noack_mode): Declare.
14094
14095 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14096
14097 * Makefile.in (GDBREPLAY_OBS): New variable.
14098 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14099
14100 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14101 Daniel Jacobowitz <dan@codesourcery.com>
14102
14103 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14104 (usr_store_inferior_registers): Likewise.
14105 (regsets_store_inferior_registers): Likewise.
14106
14107 2008-07-31 Rolf Jansen <rj@surtec.com>
14108 Pedro Alves <pedro@codesourcery.com>
14109
14110 * configure.ac: Check for memmem declaration.
14111 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14112 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14113 (disable_packet_qfThreadInfo): Unconditionally compile.
14114 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14115 * configure, config.in: Regenerate.
14116
14117 2008-07-28 Doug Kwan <dougkwan@google.com>
14118
14119 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14120 (linux_write_memory): Remove declaration of errno.
14121
14122 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14123
14124 * linux-low.c (handle_extended_wait): Do not use "status"
14125 variable uninitialized.
14126
14127 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14128
14129 * server.c (handle_v_attach): Inhibit reporting dll changes.
14130
14131 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14132
14133 * remote-utils.c (prepare_resume_reply): If requested, don't
14134 output "thread:TID" in the T stop reply.
14135
14136 * server.c (disable_packet_vCont, disable_packet_Tthread)
14137 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14138 (handle_query): If requested, disable support for qC, qfThreadInfo
14139 and qsThreadInfo.
14140 (handle_v_requests): If requested, disable support for vCont.
14141 (gdbserver_show_disableable): New.
14142 (main): Handle --disable-packet and --disable-packet=LIST.
14143
14144 * server.h (disable_packet_vCont, disable_packet_Tthread)
14145 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14146
14147 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14148
14149 * server.c (gdbserver_usage): Mention --version.
14150
14151 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14152
14153 * Makefile.in (gdbreplay.o): New rule.
14154
14155 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14156
14157 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14158 message, not gdbserver.
14159
14160 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14161 Nathan Sidwell <nathan@codesourcery.com>
14162 Joseph Myers <joseph@codesourcery.com>
14163
14164 * acinclude.m4: Include ../../config/acx.m4.
14165 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14166 * configure, config.in: Regenerate.
14167 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14168 * server.c (gdbserver_version): Print PKGVERSION.
14169 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14170 (main): Adjust gdbserver_usage calls.
14171 * gdbreplay.c (version, host_name): Add declarations.
14172 (gdbreplay_version, gdbreplay_usage): New.
14173 (main): Accept --version and --help options.
14174
14175 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14176
14177 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14178 (arm_breakpoint_at): Handle Thumb.
14179 (the_low_target): Add comment.
14180
14181 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14182
14183 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14184
14185 2008-05-09 Doug Evans <dje@google.com>
14186
14187 * server.h (decode_search_memory_packet): Declare.
14188 * remote-utils.c (decode_search_memory_packet): New fn.
14189 * server.c (handle_search_memory_1): New fn.
14190 (handle_search_memory): New fn.
14191 (handle_query): Process qSearch:memory packets.
14192
14193 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14194
14195 * regcache.c (registers_length): Remove.
14196 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14197 full register packet.
14198 * regcache.h (registers_length): Remove prototype.
14199 * server.h (PBUFSIZ): Define to 16384.
14200
14201 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14202
14203 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14204 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14205 powerpc-64l.o, and powerpc-altivec64l.o.
14206 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14207 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14208 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14209 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14210 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14211 to srv_xmlfiles.
14212
14213 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14214 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14215 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14216 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14217 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14218 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14219 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14220 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14221 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14222 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14223 (clean): Update.
14224
14225 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14226 (init_registers_powerpc_32l): ... this new prototype.
14227 (init_registers_powerpc_32): Remove, replace by ...
14228 (init_registers_powerpc_altivec32l): ... this new prototype.
14229 (init_registers_powerpc_e500): Remove, replace by ...
14230 (init_registers_powerpc_e500l): ... this new prototype.
14231 (init_registers_ppc64): Remove, replace by ...
14232 (init_registers_powerpc_64l): ... this new prototype.
14233 (init_registers_powerpc_64): Remove, replace by ...
14234 (init_registers_powerpc_altivec64l): ... this new prototype.
14235 (ppc_num_regs): Set to 73.
14236 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14237 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14238 (ppc_cannot_store_register): Handle orig_r3 and trap.
14239 (ppc_arch_setup): Update init_registers_... calls.
14240 (ppc_fill_gregset): Handle orig_r3 and trap.
14241
14242 * inferiors.c (clear_inferiors): Reset current_inferior.
14243
14244 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14245
14246 * acinclude.m4: Add override.m4.
14247 * configure: Regenerate.
14248
14249 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14250
14251 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14252 initial call to init_register_ppc64.
14253
14254 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14255
14256 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14257 single powerpc*-*-linux* case.
14258 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14259
14260 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14261
14262 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14263 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14264 from reg_xmlfiles.
14265 * linux-ppc-low.c: Include <elf.h>.
14266 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14267 (ppc_hwcap): New global variable.
14268 (ppc_regmap): Remove __SPE__ #ifdef sections.
14269 (ppc_regmap_e500): New global variable.
14270 (ppc_cannot_store_register): Update __SPE__ special case.
14271 (ppc_get_hwcap): New function.
14272 (ppc_arch_setup): Use it to determine whether inferior supports
14273 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14274 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14275 Do not access registers if target does not support AltiVec.
14276 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14277 Do not access registers if target does not support SPE.
14278 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14279
14280 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14281
14282 * linux-low.c (disabled_regsets, num_regsets): New.
14283 (use_regsets_p): Delete.
14284 (linux_wait_for_process): Clear disabled_regsets.
14285 (regsets_fetch_inferior_registers): Check and set it.
14286 (regsets_store_inferior_registers): Likewise.
14287 (linux_fetch_registers, linux_store_registers): Do not use
14288 use_regsets_p.
14289 (initialize_low): Allocate disabled_regsets.
14290
14291 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14292
14293 * Makefile.in (LIBOBJS): New.
14294 (OBS): Use LIBOBJS.
14295 (memmem.o): New rule.
14296 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14297 * configure: Regenerated.
14298
14299 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14300
14301 * server.c (handle_query): Never return "unsupported" for
14302 qXfer:features:read queries.
14303
14304 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14305
14306 * server.c (get_features_xml): Fix inverted condition.
14307 (handle_query): Always support qXfer:feature:read.
14308
14309 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14310
14311 * server.c (wrapper_argv): New.
14312 (start_inferior): Handle wrapper_argv. If set, expect an extra
14313 trap.
14314 (gdbserver_usage): Document --wrapper.
14315 (main): Parse --wrapper.
14316
14317 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14318
14319 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14320 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14321 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14322 (ppc_set_pc): Likewise.
14323 (ppc_arch_setup): New function.
14324 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14325 of collect_register.
14326 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14327
14328 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14329
14330 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14331 instead of linux-ppc64-low.o.
14332 * linux-ppc64-low.c: Remove file.
14333 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14334 (linux-ppc64-low.o): Remove rule.
14335
14336 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14337 (init_registers_powerpc_64): Likewise.
14338 (ppc_regmap): Conditionally define depending on __powerpc64__.
14339 (ppc_cannot_store_register): Do not special-case "fpscr" when
14340 compiled on __powerpc64__.
14341 (ppc_collect_ptrace_register): New function.
14342 (ppc_supply_ptrace_register): New function.
14343 (ppc_breakpoint): Change type to "unsigned int".
14344 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14345 (the_low_target): Conditionally provide initializers for the
14346 arch_setup member depending on __powerpc64__. Install
14347 collect_ptrace_register and supply_ptrace_register members.
14348
14349 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14350
14351 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14352 * server.c (gdbserver_xmltarget): Define.
14353 (get_features_xml): Use it to replace "target.xml" and arch_string.
14354
14355 * configure.srv: Remove srv_xmltarget. Add XML files that were
14356 mentioned there to srv_xmlfiles instead. Remove conditional tests
14357 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14358 srv_xmlfiles and srv_regobj to include all possible choices.
14359 * configure.ac (srv_xmltarget): Remove.
14360 (srv_xmlfiles): Do not add "target.xml".
14361 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14362 checks for supplementary target information.
14363 * configure: Regenerate.
14364 * Makefile.in (XML_TARGET): Remove.
14365 (target.xml): Remove rule.
14366 (clean): Do not clean up target.xml.
14367 (.PRECIOUS): Do not mention target.xml.
14368
14369 * target.h (struct target_ops): Remove arch_string member.
14370 * linux-low.c (linux_arch_string): Remove.
14371 (linux_target_ops): Remove arch_string initializer.
14372 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14373 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14374 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14375 * spu-low.c (spu_arch_string): Remove.
14376 (spu_target_ops): Remove arch_string initializer.
14377 * win32-low.c (win32_arch_string): Remove.
14378 (win32_target_ops): Remove arch_string initializer.
14379 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14380 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14381 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14382
14383 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14384
14385 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14386 by collect_ptrace_register and supply_ptrace_register hooks.
14387 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14388 instead of checking for the_low_target.left_pad_xfer.
14389 (usr_store_inferior_registers): Use collect_ptrace_register callback
14390 instead of checking for the_low_target.left_pad_xfer.
14391
14392 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14393 (s390_supply_ptrace_register): Likewise.
14394 (s390_fill_gregset): Call s390_collect_ptrace_register.
14395 (the_low_target): Update.
14396
14397 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14398 (ppc_supply_ptrace_register): Likewise.
14399 (the_low_target): Update.
14400
14401 * linux-i386-low.c (the_low_target): Update.
14402 * linux-x86-64-low.c (the_low_target): Update.
14403
14404 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14405
14406 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14407 reg-s390.o and reg-s390x.o.
14408
14409 * linux-low.c (new_inferior): New global variable.
14410 (linux_create_inferior, linux_attach): Set it.
14411 (linux_wait_for_process): Call the_low_target.arch_setup after the
14412 target has stopped for the first time.
14413 (initialize_low): Do not call the_low_target.arch_setup.
14414
14415 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14416 (s390_set_pc): Likewise.
14417 (s390_arch_setup): New function.
14418 (the_low_target): Use s390_arch_setup as arch_setup routine.
14419
14420 * regcache.c (realloc_register_cache): New function.
14421 (set_register_cache): Call it for each existing regcache.
14422
14423 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14424
14425 * server.h (init_registers): Remove prototype.
14426
14427 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14428 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14429 instead of init_registers ().
14430 * linux-arm-low.c (init_registers_arm): Add prototype.
14431 (init_registers_arm_with_iwmmxt): Likewise.
14432 (the_low_target): Add initializer for arch_setup field.
14433 * linux-cris-low.c (init_registers_cris): Add prototype.
14434 (the_low_target): Add initializer for arch_setup field.
14435 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14436 (the_low_target): Add initializer for arch_setup field.
14437 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14438 (the_low_target): Add initializer for arch_setup field.
14439 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14440 (the_low_target): Add initializer for arch_setup field.
14441 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14442 (the_low_target): Add initializer for arch_setup field.
14443 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14444 (the_low_target): Add initializer for arch_setup field.
14445 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14446 (init_registers_mips64_linux): Likewise.
14447 (the_low_target): Add initializer for arch_setup field.
14448 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14449 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14450 (the_low_target): Add initializer for arch_setup field.
14451 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14452 (init_registers_powerpc_64): Likewise.
14453 (the_low_target): Add initializer for arch_setup field.
14454 * linux-s390-low.c (init_registers_s390): Add prototype.
14455 (init_registers_s390x): Likewise.
14456 (the_low_target): Add initializer for arch_setup field.
14457 * linux-sh-low.c (init_registers_sh): Add prototype.
14458 (the_low_target): Add initializer for arch_setup field.
14459 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14460 (the_low_target): Add initializer for arch_setup field.
14461 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14462 (the_low_target): Add initializer for arch_setup field.
14463
14464 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14465 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14466 instead of init_registers ().
14467 * win32-arm-low.c (init_registers_arm): Add prototype.
14468 (the_low_target): Add initializer for arch_setup field.
14469 * win32-i386-low.c (init_registers_i386): Add prototype.
14470 (the_low_target): Add initializer for arch_setup field.
14471
14472 * spu-low.c (init_registers_spu): Add prototype.
14473 (initialize_low): Call initialie_registers_spu () instead of
14474 initialize_registers ().
14475
14476 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14477
14478 * server.c (handle_v_requests): When handling the vRun and vAttach
14479 packets, if already debugging a process, don't kill it. Return an
14480 error instead.
14481
14482 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14483
14484 * server.c (handle_query): Correct length check.
14485
14486 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14487
14488 * win32-low.c (do_initial_child_stuff): Add process handle
14489 parameter. Set current_process_handle and current_process_id from the
14490 parameters. Clear globals.
14491 (win32_create_inferior): Don't set current_process_handle and
14492 current_process_id here. Instead pass them on the call to
14493 do_initial_child_stuff.
14494 (win32_attach): Likewise.
14495 (win32_clear_inferiors): New.
14496 (win32_kill): Don't close the current process handle or the
14497 current thread handle here. Instead call win32_clear_inferiors.
14498 (win32_detach): Don't open a new handle to the process. Call
14499 win32_clear_inferiors.
14500 (win32_join): Don't rely on current_process_handle; open a new
14501 handle using the process id.
14502 (win32_wait): Call win32_clear_inferiors when the inferior process
14503 has exited.
14504
14505 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14506
14507 * server.c (monitor_show_help): Add "exit".
14508
14509 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14510
14511 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14512 (clean): Add reg-xtensa.c.
14513 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14514 * configure.srv (xtensa*-*-linux*) New target.
14515 * linux-xtensa-low.c: New.
14516 * xtensa-xtregs.c: New.
14517
14518 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14519
14520 * hostio.c: Don't include errno.h.
14521 (errno_to_fileio_errno): Move to hostio-errno.
14522 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14523 error number outputting to the target->hostio_last_error callback.
14524 (hostio_packet_error): Use FILEIO_EINVAL directly.
14525 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14526 calls to hostio_error.
14527 * hostio-errno.c: New.
14528 * server.h (hostio_last_error_from_errno): Declare.
14529 * target.h (target_ops): Add hostio_last_error member.
14530 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14531 as hostio_last_error handler.
14532 * spu-low.c (spu_target_ops): Likewise.
14533 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14534 (wince_hostio_last_error): New functions.
14535 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14536 as hostio_last_error handler.
14537 (win32_target_ops) [!_WIN32_WCE]: Register
14538 hostio_last_error_from_errno as hostio_last_error handler.
14539 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14540 (hostio-errno.o): New rule.
14541 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14542 * configure.srv (srv_hostio_err_objs): New variable. Default to
14543 hostio-errno.o.
14544 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14545 * configure: Regenerate.
14546
14547 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14548
14549 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14550 (linux_kill, linux_detach): Clean up the process list.
14551 * remote-utils.c (remote_open): Improve port number parsing.
14552 (putpkt_binary, input_interrupt): Only send interrupts if the target
14553 is running.
14554 * server.c (extended_protocol): Make static.
14555 (attached): Define earlier.
14556 (exit_requested, response_needed, program_argv): New variables.
14557 (target_running): New.
14558 (start_inferior): Clear attached here.
14559 (attach_inferior): Set attached here.
14560 (require_running): Define.
14561 (handle_query): Use require_running and target_running. Implement
14562 "monitor exit".
14563 (handle_v_attach, handle_v_run): New.
14564 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14565 (gdbserver_usage): Update.
14566 (main): Redo argument parsing. Handle --debug and --multi. Handle
14567 --attach along with other options or after the port. Save
14568 program_argv. Support no initial program. Resynchronize
14569 communication with GDB after an error. Handle "monitor exit".
14570 Use require_running and target_running. Always allow the extended
14571 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14572 restart in extended mode.
14573 * README: Refer to the GDB manual. Update --attach usage.
14574
14575 2007-12-20 Andreas Schwab <schwab@suse.de>
14576
14577 * linux-low.c (STACK_SIZE): Define.
14578 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14579 (linux_test_for_tracefork): Likewise.
14580
14581 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14582
14583 * linux-low.c (linux_wait_for_event): Update messages. Do not
14584 reinsert auto-delete breakpoints.
14585 * mem-break.c (struct breakpoint): Change return type of handler to
14586 int.
14587 (set_breakpoint_at): Update handler type.
14588 (reinsert_breakpoint_handler): Return 1 instead of calling
14589 delete_breakpoint.
14590 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14591 setting a new one.
14592 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14593 * mem-break.h (set_breakpoint_at): Update handler type.
14594 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14595 * win32-low.c (auto_delete_breakpoint): New.
14596 (get_child_debug_event): Use it.
14597
14598 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14599
14600 * configure.ac: Check for pread and pwrite.
14601 * hostio.c (handle_pread): Fall back to lseek and read.
14602 (handle_pwrite): Fall back to lseek and write.
14603 * config.in, configure: Regenerated.
14604
14605 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14606
14607 * server.c (myresume): Add own_buf argument.
14608 (main): Update calls.
14609
14610 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14611
14612 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14613 * remote-utils.c (remote_open): Do not call disable_async_io.
14614 (block_async_io): Delete.
14615 (unblock_async_io): Make static.
14616 (initialize_async_io): New.
14617 * server.c (handle_v_cont): Handle async I/O here.
14618 (myresume): Likewise. Move other common resume tasks here...
14619 (main): ... from here. Call initialize_async_io. Disable async
14620 I/O before the main loop.
14621 * server.h (initialize_async_io): Declare.
14622 (block_async_io, unblock_async_io): Delete prototypes.
14623 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14624
14625 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14626
14627 * remote-utils.c (readchar): Allow binary data in received messages.
14628
14629 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14630
14631 * win32-low.c (attaching): New global.
14632 (win32_create_inferior): Clear the `attaching' global.
14633 (win32_attach): Set the `attaching' global.
14634 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14635 attaching. Only set a breakpoint at the entry point if not
14636 attaching.
14637
14638 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14639
14640 * server.c (main): Don't report dll events on the initial
14641 connection on attaches.
14642
14643 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14644
14645 * server.c (main): Relax numerical bases supported for the pid of
14646 the --attach command line argument.
14647
14648 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14649
14650 * win32-low.c (win32_attach): Call OpenProcess before
14651 DebugActiveProcess, not after. Add last error output to error
14652 call.
14653
14654 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14655
14656 * win32-low.c (win32_get_thread_context)
14657 (win32_set_thread_context): New functions.
14658 (thread_rec): Use win32_get_thread_context.
14659 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14660 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14661 field.
14662
14663 2007-12-03 Leo Zayas
14664 Pedro Alves <pedro_alves@portugalmail.pt>
14665
14666 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14667 global variables.
14668 (child_add_thread): Minor cleanup.
14669 (child_continue): Resume artificially suspended threads before
14670 calling ContinueDebugEvent.
14671 (suspend_one_thread): New.
14672 (fake_breakpoint_event): New.
14673 (get_child_debug_event): Change return type to int. Check here if
14674 gdb sent an interrupt request. If a soft interrupt was requested,
14675 fake a breakpoint event. Return 0 if there is no event to handle,
14676 and 1 otherwise.
14677 (win32_wait): Don't check here if gdb sent an interrupt request.
14678 Ensure there is a valid event to handle.
14679 (win32_request_interrupt): Add soft interruption method as last
14680 resort.
14681
14682 2007-12-03 Leo Zayas
14683 Pedro Alves <pedro_alves@portugalmail.pt>
14684
14685 * win32-low.h (win32_thread_info): Add descriptions to the
14686 structure members. Replace `suspend_count' counter by a
14687 `suspended' flag.
14688 * win32-low.c (thread_rec): Update condition of when to get the
14689 context from the inferior. Rely on ContextFlags being set if it
14690 has already been retrieved. Only suspend the inferior thread if
14691 we haven't already. Warn if that fails.
14692 (continue_one_thread): s/suspend_count/suspended/. Only call
14693 ResumeThread once. Warn if that fails.
14694
14695 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14696
14697 * win32-low.c (win32_wait): Don't read from the inferior when it
14698 has already exited.
14699
14700 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14701
14702 * Makefile.in (win32_low_h): New variable.
14703 (win32-low.o): Add dependency on $(win32_low_h).
14704 (win32-arm-low.o, win32-i386-low.o): New rules.
14705
14706 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14707
14708 * hostio.c: Correct copyright year.
14709
14710 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14711
14712 * Makefile.in (OBS): Add hostio.o.
14713 (hostio.o): New rule.
14714 * server.h (handle_vFile): Declare.
14715 * hostio.c: New file.
14716 * server.c (handle_v_requests): Take packet_len and new_packet_len
14717 for binary packets. Call handle_vFile.
14718 (main): Update call to handle_v_requests.
14719
14720 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14721
14722 * linux-low.c: Include <sched.h>.
14723
14724 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14725
14726 * linux-low.c (linux_tracefork_grandchild): New.
14727 (linux_tracefork_child): Use clone.
14728 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14729
14730 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14731
14732 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14733
14734 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14735
14736 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14737
14738 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14739
14740 * inferiors.c (change_inferior_id): Delete.
14741 (add_pid_to_list, pull_pid_from_list): New.
14742 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14743 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14744 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14745 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14746 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14747 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14748 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14749 (using_threads): Always set to 1.
14750 (handle_extended_wait): New.
14751 (add_process): Do not set TID.
14752 (linux_create_inferior): Set must_set_ptrace_flags.
14753 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14754 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14755 (linux_thread_alive): Rename TID argument to LWPID.
14756 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14757 (linux_wait_for_event): Do not use TID or check using_threads. Update
14758 call to dead_thread_notify. Call handle_extended_wait.
14759 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14760 (send_sigstop): Delete sigstop_sent.
14761 (wait_for_sigstop): Avoid TID.
14762 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14763 (linux_test_for_tracefork): New.
14764 (linux_lookup_signals): Use thread_db_active and
14765 linux_supports_tracefork_flag.
14766 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14767 * linux-low.h (get_process_thread): Avoid TID.
14768 (struct process_ifo): Move thread_known and tid to the end. Remove
14769 sigstop_sent.
14770 (linux_attach_lwp, thread_db_init): Update prototypes.
14771 * server.h (change_inferior_id): Delete prototype.
14772 (add_pid_to_list, pull_pid_from_list): New prototypes.
14773 * thread-db.c (thread_db_use_events): New.
14774 (find_first_thread): Rename to...
14775 (find_one_thread): ...this. Update callers and messages. Do not
14776 call fatal. Check thread_db_use_events. Do not call
14777 change_inferior_id or new_thread_notify.
14778 (maybe_attach_thread): Update. Do not call new_thread_notify.
14779 (thread_db_init): Set thread_db_use_events. Check use_events.
14780 * utils.c (fatal, warning): Correct message prefix.
14781
14782 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14783
14784 * Makefile.in (clean): Remove new files.
14785 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14786 (powerpc-64.o, powerpc-64.c): New rules.
14787 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14788 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14789 with SPE.
14790 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14791 SPE targets.
14792 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14793 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14794 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14795 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14796 (target_regsets): Add AltiVec and SPE register sets.
14797 * configure.ac: Check for AltiVec and SPE.
14798 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14799 (ppc_fill_vrregset, ppc_store_vrregset): New.
14800 (target_regsets): Add AltiVec register set.
14801 * configure: Regenerated.
14802
14803 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14804
14805 * linux-low.c (O_LARGEFILE): Define.
14806 (linux_read_memory): Use /proc/PID/mem.
14807 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14808 * configure, config.in: Regenerated.
14809
14810 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14811
14812 * linux-low.c (linux_wait_for_event): Do not pass signals while
14813 single-stepping.
14814
14815 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14816
14817 * win32-low.c (create_process): New.
14818 (win32_create_inferior): Use create_process instead of
14819 CreateProcess. If create_process failed retry appending an ".exe"
14820 suffix. Store the GetLastError result immediatelly after
14821 create_process calls and use it on the call to error.
14822
14823 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14824
14825 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14826
14827 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14828
14829 * configure.ac: Switch license to GPLv3.
14830
14831 2007-08-01 Michael Snyder <msnyder@access-company.com>
14832
14833 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14834
14835 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14836
14837 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14838 typedef.
14839 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14840 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14841 CloseToolhelp32Snapshot.
14842 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14843 CloseToolhelp32Snapshot.
14844
14845 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14846
14847 * server.c (main): Check for inferior exit before main loop.
14848
14849 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14850
14851 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14852 instead of on tmp_desc.
14853
14854 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14855 Daniel Jacobowitz <dan@codesourcery.com>
14856
14857 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14858 (add_thread): Minor cleanups.
14859 (clear_inferiors): Move lower in the file. Clear the DLL
14860 list.
14861 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14862 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14863 (xml_escape_text): New.
14864 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14865 for qSupported.
14866 (handle_v_cont): Report errors.
14867 (gdbserver_version): Update.
14868 (main): Correct size of own_buf. Do not report initial DLL events.
14869 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14870 (unloaded_dll, xml_escape_text): New.
14871 * win32-low.c (enum target_waitkind): Update comments.
14872 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14873 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14874 (win32_EnumProcessModules, win32_GetModuleInformation)
14875 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14876 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14877 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14878 (win32_Module32First, win32_Module32Next, load_toolhelp)
14879 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14880 (get_child_debug_event): Handle DLL events.
14881 (win32_wait): Likewise.
14882
14883 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14884
14885 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14886 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14887
14888 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14889
14890 * win32-low.c (handle_output_debug_string): Ignore event if not
14891 waiting.
14892
14893 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14894
14895 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14896
14897 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14898
14899 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14900
14901 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14902
14903 * inferiors.c (change_inferior_id): Add comment.
14904 * linux-low.c (check_removed_breakpoint): Add an early
14905 prototype. Improve debug output.
14906 (linux_attach): Doc update.
14907 (linux_detach_one_process, linux_detach): Clean up before releasing
14908 each process.
14909 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14910 * linux-low.h (struct process_info): Doc improvement.
14911 * mem-break.c (delete_all_breakpoints): New.
14912 * mem-break.h (delete_all_breakpoints): New prototype.
14913 * thread-db.c (find_first_thread): New.
14914 (thread_db_create_event): Call it instead of
14915 thread_db_find_new_threads. Clean up unused variables.
14916 (maybe_attach_thread): Remove first thread handling.
14917 (thread_db_find_new_threads): Use find_first_thread.
14918 (thread_db_get_tls_address): Likewise.
14919
14920 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14921
14922 * thread-db.c (thread_db_find_new_threads): Add prototype.
14923 (thread_db_create_event): Check for the main thread before adding
14924 a new thread.
14925 (maybe_attach_thread): Only enable event reporting if TID == 0.
14926 (thread_db_get_tls_address): Check for new threads.
14927
14928 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14929
14930 * linux-low.c (linux_create_inferior): Try execv before execvp.
14931 * spu-low.c (spu_create_inferior): Likewise.
14932
14933 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14934
14935 * linux-low.c (linux_create_inferior): Change execv to execvp.
14936 * spu-low.c (spu_create_inferior): Likewies.
14937
14938 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14939
14940 * Makefile.in (clean): Clean new files instead of deleted ones.
14941 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14942 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14943 rules.
14944 * configure.srv: Specify XML files and new regformats for MIPS and
14945 MIPS64 GNU/Linux.
14946 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14947 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14948 an entry for the restart register.
14949 (mips_cannot_fetch_register, mips_cannot_store_register)
14950 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14951 register names to match the XML descriptions.
14952 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14953 restart register instead of $0.
14954
14955 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14956 Markus Deuling <deuling@de.ibm.com>
14957
14958 * remote-utils.c (decode_xfer_write): New function.
14959 * server.h (decode_xfer_write): Add prototype.
14960 * server.c (handle_query): Add PACKET_LEN argument. Support
14961 qXfer:spu:read and qXfer:spu:write packets.
14962 (main): Pass packet_len to handle_query.
14963 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14964 * target.h (target_ops): Add qxfer_spu.
14965
14966 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14967
14968 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14969 accessing non-seekable spufs files.
14970
14971 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14972
14973 * server.c (handle_query): Add reply for qC packet.
14974
14975 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14976 Leo Zayas <lerele@champenstudios@com>
14977
14978 * server.h (check_remote_input_interrupt_request): New function.
14979 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14980 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14981 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14982 (check_remote_input_interrupt_request): New function.
14983 * server.h (check_remote_input_interrupt_request): Declare.
14984 * win32-low.c (winapi_DebugBreakProcess,
14985 winapi_GenerateConsoleCtrlEvent): New typedefs.
14986 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14987 to 250 ms.
14988 (win32_wait): Check for remote interrupt request
14989 with check_remote_input_interrupt_request.
14990 (win32_request_interrupt): New function.
14991 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14992
14993 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14994
14995 * win32-low.c (debug_registers_changed,
14996 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14997 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14998 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14999 (thread_rec): Get context using the low target.
15000 (child_add_thread): Call thread_added on the low target,
15001 which does the same thing.
15002 (regptr): Delete.
15003 (do_initial_child_stuff): Remove debug registers references.
15004 Set context using the low target. Resume threads after
15005 setting the contexts.
15006 (child_continue): Remove dead variable. Remove debug
15007 registers references.
15008 (child_fetch_inferior_registers): Go through the low target.
15009 (do_child_store_inferior_registers): Remove.
15010 (child_store_inferior_registers): Go through the low target.
15011 (win32_resume): Remove debug registers references.
15012 Set context using the low target.
15013 (handle_exception): Change return type to void. Don't record
15014 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15015 first chance exception.
15016 (get_child_debug_event): Change return type to void. Remove
15017 goto loop. Always return after waiting for debug event.
15018 (win32_wait): Convert to switch statement. Handle spurious
15019 events.
15020
15021 * win32-i386-low.c (debug_registers_changed,
15022 debug_registers_used): New.
15023 (initial_stuff): Rename to ...
15024 (i386_initial_stuff): ... this. Clear debug registers
15025 state variables.
15026 (store_debug_registers): Delete.
15027 (i386_get_thread_context): New.
15028 (load_debug_registers): Delete.
15029 (i386_set_thread_context): New.
15030 (i386_thread_added): New.
15031 (single_step): Rename to ...
15032 (i386_single_step): ... this.
15033 (do_fetch_inferior_registers): Rename to ...
15034 (i386_fetch_inferior_register): ... this.
15035 (i386_store_inferior_register): New.
15036 (the_low_target): Adapt to new interface.
15037
15038 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15039 (arm_get_thread_context): New.
15040 (arm_set_thread_context): New.
15041 (regptr): New.
15042 (do_fetch_inferior_registers): Rename to ...
15043 (arm_fetch_inferior_register): ... this.
15044 (arm_store_inferior_register): New.
15045 (arm_wince_breakpoint): Reimplement as unsigned long.
15046 (arm_wince_breakpoint_len): Define.
15047 (the_low_target): Adapt to new interface.
15048
15049 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15050 load_debug_registers. Add get_thread_context, set_thread_context,
15051 thread_added and store_inferior_register. Rename
15052 fetch_inferior_registers to fetch_inferior_register.
15053 (regptr): Remove declaration.
15054
15055 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15056
15057 * linux-low.c (linux_detach): Change return type to int. Return 0.
15058 * spu-low.c (spu_detach): Likewise.
15059
15060 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15061
15062 * target.h (target_ops): Change return type of detach to int.
15063 Add join.
15064 (join_inferior): New.
15065 * server.c (main): Don't skip detach support on mingw32.
15066 If the inferior doesn't support detaching return error.
15067 Call join_inferior instead of using waitpid.
15068 * linux-low.c (linux_join): New.
15069 (linux_target_op): Add linux_join.
15070 * spu-low.c (spu_join): New.
15071 (spu_target_ops): Add spu_join.
15072 * win32-low.c (win32_detach): Adapt to new interface.
15073 Reopen current_process_handle before detaching. Issue a child
15074 resume before detaching.
15075 (win32_join): New.
15076 (win32_target_op): Add win32_join.
15077
15078 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15079
15080 * win32-low.c (win32-attach): Fix return value.
15081 * target.h (target_ops): Describe ATTACH return values.
15082
15083 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15084
15085 * win32-low.c (GETPROCADDRESS): Define.
15086 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15087 (winapi_DebugSetProcessKillOnExit): Likewise.
15088 (win32_create_inferior): Force usage of ansi CreateProcessA.
15089 (win32_attach): Use GETPROCADDRESS.
15090 (win32_detach): Likewise.
15091
15092 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15093
15094 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15095
15096 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15097
15098 * win32-low.c: Commit leftover changes from 2007-03-29.
15099
15100 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15101
15102 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15103 fields short instead of int. Add explicit padding.
15104 (i387_cache_to_fsave): Remove unnecessary casts.
15105 (i387_fsave_to_cache): Doc fix.
15106 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15107
15108 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15109
15110 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15111 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15112
15113 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15114
15115 * configure.srv (arm*-*-mingw32ce*): Move near the other
15116 arm targets.
15117
15118 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15119
15120 * configure.ac: Add errno checking.
15121 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15122 sys/file.h and malloc.h.
15123 (AC_CHECK_DECLS): Add perror.
15124 (srv_mingwce): Handle.
15125 * configure.srv (i[34567]86-*-cygwin*): Add
15126 win32-i386-low.o to srv_tgtobj.
15127 (i[34567]86-*-mingw*): Likewise.
15128 (arm*-*-mingw32ce*): Add case.
15129 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15130 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15131 [__MINGW32CE__] (strerror): New function.
15132 [__MINGW32CE__] (errno): Define to GetLastError.
15133 [__MINGW32CE__] (COUNTOF): New macro.
15134 (remote_open): Remove extra close call.
15135 * mem-break.c (delete_breakpoint_at): New function.
15136 * mem-break.h (delete_breakpoint_at): Declare.
15137 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15138 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15139 [USE_WIN32API] (read, write): Add char* casts.
15140 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15141 * server.h: Include wincecompat.h on Windows CE.
15142 [HAVE_ERRNO_H]: Check.
15143 (perror): Declare if not declared.
15144 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15145 (perror_with_name): Remove errno declaration.
15146 * wincecompat.h: New.
15147 * wincecompat.c: New.
15148 * win32-low.h: New.
15149 * win32-arm-low.c: New.
15150 * win32-i386-low.c: New.
15151 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15152 (OUTMSG2): Make it safe.
15153 (_T): New macro.
15154 (COUNTOF): New macro.
15155 (NUM_REGS): Get it from the low target.
15156 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15157 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15158 (thread_rec): Let low target handle debug registers.
15159 (child_add_thread): Likewise.
15160 (child_init_thread_list): Likewise.
15161 (continue_one_thread): Likewise.
15162 (regptr): New.
15163 (do_child_fetch_inferior_registers): Move to ...
15164 * win32-i386-low.c: ... here, and rename to ...
15165 (do_fetch_inferior_registers): ... this.
15166 * win32-low.c (child_fetch_inferior_registers):
15167 Go through the low target.
15168 (do_child_store_inferior_registers): Use regptr.
15169 (strwinerror): New function.
15170 (win32_create_inferior): Handle Windows CE.
15171 Use strwinerror instead of strerror on Windows error
15172 codes. Add program to the error output.
15173 Don't close the main thread handle on Windows CE.
15174 (win32_attach): Use coredll.dll on Windows CE.
15175 (win32_kill): Close current process and current
15176 thread handles.
15177 (win32_detach): Use coredll.dll on Windows CE.
15178 (win32_resume): Let low target handle debug registers, and
15179 step request.
15180 (handle_exception): Add/Remove initial breakpoint. Avoid
15181 non-existant WSTOPSIG on Windows CE.
15182 (win32_read_inferior_memory): Cast to remove warning.
15183 (win32_arch_string): Go through the low target.
15184 (initialize_low): Call set_breakpoint_data with the low
15185 target's breakpoint.
15186 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15187 FOP_REGNUM, mappings): Move to ...
15188 * win32-i386-low.c: ... here.
15189 * win32-low.c (win32_thread_info): Move to ...
15190 * win32-low.h: ... here.
15191 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15192 win32-arm-low.c and wincecompat.c.
15193 (all:): Add $EXEEXT.
15194 (install-only:): Likewise.
15195 (gdbserver:): Likewise.
15196 (gdbreplay:): Likewise.
15197 * config.in: Regenerate.
15198 * configure: Regenerate.
15199
15200 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15201
15202 * win32-low.c: Rename typedef thread_info to
15203 win32_thread_info throughout.
15204
15205 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15206
15207 * win32-i386-low.c: Rename to ...
15208 * win32-low.c: ... this.
15209 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15210 * Makefile.in: Likewise.
15211
15212 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15213
15214 * remote-utils.c (monitor_output): Constify msg parameter.
15215 * server.h (monitor_output): Likewise.
15216 * win32-i386-low.c (handle_output_debug_string): New.
15217 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15218 handle_output_debug_string.
15219 (get_child_debug_event): Likewise.
15220
15221 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15222
15223 * server.c (main): Correct strtoul check.
15224
15225 2007-03-27 Jon Ringle <jon@ringle.org>
15226
15227 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15228
15229 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15230
15231 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15232
15233 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15234
15235 * terminal.h: Check HAVE_SGTTY_H.
15236
15237 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15238
15239 * remote-utils.c (remote_open): Print out the assigned port number.
15240
15241 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15242
15243 * remote-utils.c (monitor_output): New function.
15244 * server.c (debug_threads): Define here.
15245 (monitor_show_help): New function.
15246 (handle_query): Handle qRcmd.
15247 (main): Do not handle 'd' packet.
15248 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15249 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15250 of debug_threads.
15251
15252 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15253
15254 * Makefile.in (EXEEXT): New.
15255 (clean): Use $(EXEEXT).
15256
15257 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15258
15259 * target.h (target_ops): Rename send_signal to request_interrupt,
15260 and remove enum target_signal parameter.
15261 * linux-low.c (linux_request_interrupt): Rename from
15262 linux_send_signal, and always send SIGINT.
15263 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15264 and always send SIGINT.
15265 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15266 of send_signal.
15267 (input_interrupt): Likewise.
15268
15269 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15270
15271 * server.c (get_features_xml): Check if target implemented
15272 arch_string.
15273 * win32-i386-low.c (win32_arch_string): New.
15274 (win32_target_ops): Add win32_arch_string as arch_string member.
15275
15276 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15277
15278 * spu-low.c (spu_arch_string): New.
15279 (spu_target_ops): Add spu_arch_string.
15280
15281 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15282
15283 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15284 * configure.ac: Do not check for terminal.h.
15285 * configure, config.in: Regenerated.
15286
15287 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15288
15289 * Makefile.in (OBS): Add $(XML_BUILTIN).
15290 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15291 (clean): Update.
15292 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15293 (arm-with-iwmmxt.c): New.
15294 * config.in, configure: Regenerate.
15295 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15296 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15297 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15298 (arm*-*-linux*): Add iWMMXt and regset support.
15299 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15300 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15301 (arm_store_wmmxregset, target_regsets): New.
15302 * server.c (get_features_xml): Take annex argument. Check builtin
15303 XML documents.
15304 (handle_query): Handle multiple annexes.
15305
15306 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15307
15308 * remote-utils.c [USE_WIN32API] (read, write): Define.
15309 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15310 write.
15311
15312 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15313
15314 * linux-i386-low.c (the_low_target): Set arch_string.
15315 * linux-x86-64-low.c (the_low_target): Likewise.
15316 * linux-low.c (linux_arch_string): New.
15317 (linux_target_ops): Add it.
15318 * linux-low.h (struct linux_target_ops): Add arch_string.
15319 * server.c (write_qxfer_response): Use const void * for DATA.
15320 (get_features_xml): New.
15321 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15322 * target.h (struct target_ops): Add arch_string method.
15323
15324 2007-01-03 Denis Pilat <denis.pilat@st.com>
15325 Daniel Jacobowitz <dan@codesourcery.com>
15326
15327 * linux-low.c (linux_kill): Handle being called with no threads.
15328 * win32-i386-low.c (win32_kill): Likewise.
15329 (get_child_debug_event): Clear current_process_handle.
15330
15331 2006-12-30 Denis PILAT <denis.pilat@st.com>
15332 Daniel Jacobowitz <dan@codesourcery.com>
15333
15334 * remote-utils.c (remote_open): Check the type of specified
15335 serial port devices before opening them.
15336 * server.c (main): Kill the inferior if an error occurs during
15337 the first remote_open.
15338
15339 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15340
15341 * README: Update supported targets.
15342
15343 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15344
15345 * Makefile.in (clean): Remove reg-mips64.c.
15346 (reg-mips64.c, reg-mips64.o): New rules.
15347 * configure.srv: Handle mips64. Include regset support for mips.
15348 * linux-mips-low.c (union mips_register): New.
15349 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15350 (mips_breakpoint, mips_breakpoint_at): Use int.
15351 (mips_collect_register, mips_supply_register)
15352 (mips_collect_register_32bit, mips_supply_register_32bit)
15353 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15354 (mips_store_fpregset, target_regsets): New.
15355 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15356
15357 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15358
15359 * configure.srv: Add target "spu*-*-*".
15360 * Makefile.in (clean): Remove reg-spu.c.
15361 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15362 * spu-low.c: New file.
15363
15364 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15365
15366 * configure.ac: Correct td_thr_tls_get_addr test.
15367 * configure: Regenerated.
15368
15369 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15370
15371 * linux-low.c (linux_wait_for_event): Reformat. Use the
15372 pass_signals array.
15373 * remote-utils.c (decode_address_to_semicolon): New.
15374 * server.c (pass_signals, handle_general_set): New.
15375 (handle_query): Mention QPassSignals for qSupported.
15376 (main): Call handle_general_set.
15377 * server.h (pass_signals, decode_address_to_semicolon): New.
15378
15379 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15380
15381 * server.c (handle_query): Correct error handling for read_auxv.
15382
15383 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15384
15385 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15386 and srv_linux_thread_db to yes.
15387 * linux-s390-low.c (s390_fill_gregset): New function.
15388 (target_regsets): Define data structure.
15389
15390 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15391
15392 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15393 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15394 * config.in, configure: Regenerated.
15395 * inferiors.c (gdb_id_to_thread): New function.
15396 (gdb_id_to_thread_id): Use it.
15397 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15398 * linux-low.h (struct process_info): Add th member.
15399 (thread_db_get_tls_address): New prototype.
15400 * remote-utils.c (decode_address): Make non-static.
15401 * server.c (handle_query): Handle qGetTLSAddr.
15402 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15403 * target.h (struct target_ops): Add get_tls_address.
15404 * thread-db.c (maybe_attach_thread): Save the thread handle.
15405 (thread_db_get_tls_address): New.
15406
15407 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15408
15409 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15410 (linux_resume_one_process): Take a siginfo_t *. Update all
15411 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15412 (struct pending_signals): Add a siginfo_t.
15413 (linux_wait_for_process): Always set last_status.
15414 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15415 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15416 * linux-low.h (struct process_info): Add last_status.
15417
15418 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15419
15420 * remote-utils.c (try_rle): New function.
15421 (putpkt_binary): Use it.
15422
15423 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15424
15425 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15426 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15427 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15428 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15429 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15430 point registers.
15431
15432 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15433
15434 * server.c (terminal_fd): New variable.
15435 (old_foreground_pgrp): Likewise.
15436 (restore_old_foreground_pgrp): New function.
15437 (start_inferior): Record the terminal file descriptor in terminal_fd
15438 and its original foreground group in old_foreground_pgrp. Register
15439 restore_old_foreground_pgrp with atexit().
15440
15441 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15442
15443 * server.c (handle_query): Correct qPart to qXfer.
15444
15445 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15446
15447 * configure.ac: Check for more headers which are missing on
15448 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15449 * configure.srv: Add Cygwin and mingw32.
15450 * remote-utils.c: Don't include headers unconditionally which
15451 are missing on mingw32. Include <winsock.h> for mingw32.
15452 (remote_open): Adjust for mingw32 support. Flush
15453 standard error after writing to it.
15454 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15455 (unblock_async_io, enable_async_io, disable_async_io)
15456 (readchar, getpkt): Update for Winsock support.
15457 (prepare_resume_reply): Expect a protocol signal number.
15458 * server.c: Disable <sys/wait.h> on mingw32.
15459 (start_inferior): Adjust for mingw32 support. Flush
15460 standard error after writing to it.
15461 (attach_inferior): Likewise. Use protocol signal
15462 numbers.
15463 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15464 and names.
15465 * win32-i386-low.c: New file.
15466 * Makefile.in (XM_CLIBS): Set.
15467 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15468 (win32-i386-low.o): New dependency rule.
15469 * linux-low.c (linux_wait): Use target signal numbers.
15470 * target.h (struct target_ops): Doc fix.
15471 * server.h (target_signal_to_name): New prototype.
15472 * gdbreplay.c: Don't include headers unconditionally which
15473 are missing on mingw32. Include <winsock.h> for mingw32.
15474 (remote_close, remote_open): Adjust for Winsock support.
15475 * configure, config.in: Regenerated.
15476
15477 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15478
15479 * server.c (decode_xfer_read, write_qxfer_response): New.
15480 (handle_query): Take a packet length argument. Handle
15481 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15482 the qSupported response.
15483 (main): Update call to handle_query.
15484
15485 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15486
15487 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15488 (putpkt_binary): Renamed from putpkt and adjusted for binary
15489 data.
15490 (putpkt): New wrapper for putpkt_binary.
15491 (readchar): Don't mask off the high bit.
15492 (decode_X_packet): New function.
15493 * server.c (main): Call putpkt_binary if a handler sets the packet
15494 length. Save the length of the incoming packet. Handle 'X'.
15495 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15496
15497 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15498
15499 * server.c (handle_query): Handle qSupported.
15500
15501 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15502
15503 * remote-utils.c (all_symbols_looked_up): New variable.
15504 (look_up_one_symbol): Check it.
15505 * server.h (look_up_one_symbol): New declaration.
15506 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15507
15508 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15509
15510 * Makefile.in (linux-arm-low.o): Update dependencies.
15511 * linux-arm-low.c: Include "gdb_proc_service.h".
15512 (PTRACE_GET_THREAD_AREA): Define.
15513 (ps_get_thread_area): New function.
15514
15515 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15516
15517 * configure.srv (m68k*-*-uclinux*): New target.
15518 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15519 (linux_resume_one_process): Remove extraneous cast.
15520 (linux_read_offsets): New.
15521 (linux_target_op): Add linux_read_offsets on mmuless systems.
15522 * server.c (handle_query): Add qOffsets logic.
15523 * target.h (struct target_ops): Add read_offsets.
15524
15525 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15526
15527 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15528 (PTRACE_GET_THREAD_AREA): Define.
15529 (ps_get_thread_area): New function.
15530 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15531 (linux-x86-64-low.o): Update.
15532
15533 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15534
15535 * configure.ac: Remove checks for prfpregset_t.
15536 * gdb_proc_service.h: New file.
15537 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15538 new "gdb_proc_service.h".
15539 * proc-service.c: Likewise.
15540 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15541 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15542 * Makefile.in (gdb_proc_service_h): Updated.
15543 * configure, config.in: Regenerated.
15544
15545 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15546
15547 * remote-utils.c (prepare_resume_reply): Move declaration
15548 of gdb_id_from_wait to the top of the block.
15549
15550 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15551
15552 * linux-low.c (regsets_store_inferior_registers): Read the regset
15553 from the target before filling it.
15554
15555 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15556
15557 * server.c (attach_inferior): Return SIGTRAP for a successful
15558 attach.
15559
15560 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15561
15562 * Makefile.in (OBS): Add version.o.
15563 (STAGESTUFF): Delete.
15564 (version.o): Add dependencies.
15565 (version.c): Replace rule.
15566 (clean): Remove version.c.
15567 * server.c (gdbserver_version): New.
15568 (gdbserver_usage): Use printf.
15569 (main): Handle --version and --help.
15570 * server.h (version, host_name): Add declarations.
15571
15572 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15573
15574 * linux-arm-low.c:
15575 * linux-arm-low.c:
15576 * inferiors.c:
15577 * i387-fp.h:
15578 * i387-fp.c:
15579 * gdbreplay.c:
15580 * regcache.c:
15581 * proc-service.c:
15582 * mem-break.h:
15583 * mem-break.c:
15584 * linux-x86-64-low.c:
15585 * linux-sh-low.c:
15586 * linux-s390-low.c:
15587 * linux-ppc64-low.c:
15588 * linux-ppc-low.c:
15589 * linux-mips-low.c:
15590 * linux-m68k-low.c:
15591 * linux-m32r-low.c:
15592 * linux-low.h:
15593 * linux-low.c:
15594 * linux-ia64-low.c:
15595 * linux-i386-low.c:
15596 * linux-crisv32-low.c:
15597 * thread-db.c:
15598 * terminal.h:
15599 * target.h:
15600 * target.c:
15601 * server.h:
15602 * server.c:
15603 * remote-utils.c:
15604 * regcache.h:
15605 * utils.c:
15606 * Makefile.in:
15607 * configure.ac:
15608 * gdbserver.1: Add (C) after Copyright. Update the FSF
15609 address.
15610
15611 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15612
15613 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15614 (arm_breakpoint_at): Recognize both breakpoints.
15615 (the_low_target): Use the correct breakpoint instruction.
15616
15617 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15618
15619 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15620 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15621 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15622 (the_low_target): Update.
15623
15624 2005-10-25 Andreas Schwab <schwab@suse.de>
15625
15626 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15627
15628 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15629 (ia64_num_regs): Reduce to 462.
15630
15631 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15632
15633 * acinclude.m4: Correct quoting.
15634 * aclocal.m4: Regenerated.
15635
15636 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15637 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15638 (thread_db_init): Call thread_db_err_str.
15639 * configure.ac: Check for TD_VERSION.
15640 * config.in, configure: Regenerated.
15641
15642 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15643
15644 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15645
15646 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15647
15648 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15649 is not available. Define HAVE_PTRACE_GETREGS if it is.
15650 * config.in, configure: Regenerated.
15651 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15652 * linux-i386-low.c, linux-m68k-low.c: Update to use
15653 HAVE_PTRACE_GETREGS.
15654 * linux-low.c (regsets_fetch_inferior_registers)
15655 (regsets_store_inferior_registers): Only return 0 if we processed
15656 GENERAL_REGS.
15657 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15658 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15659
15660 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15661
15662 * inferiors.c (struct thread_info): Add gdb_id.
15663 (add_thread): Add gdb_id argument.
15664 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15665 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15666 calls to add_thread.
15667 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15668 * server.c (handle_query): Use thread_to_gdb_id.
15669 (handle_v_cont, main): Use gdb_id_to_thread_id.
15670 * server.h (add_thread): Update prototype.
15671 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15672 prototypes.
15673
15674 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15675
15676 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15677 left-padded registers.
15678 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15679 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15680
15681 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15682
15683 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15684 * configure: Regenerate.
15685 * config.in: Regenerate.
15686 * server.h (NEED_DECLARATION_STRERROR):
15687 Replace with !HAVE_DECL_STRERROR.
15688
15689 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15690
15691 * linux-low.c (linux_wait, linux_send_signal): Don't test
15692 an unsigned long variable for > 0 if it could be MAX_ULONG.
15693 * server.c (myresume): Likewise.
15694 * target.c (set_desired_inferior): Likewise.
15695
15696 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15697
15698 * configure.ac: Simplify and improve check for socklen_t.
15699 * configure, config.in: Regenerate.
15700
15701 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15702
15703 * acconfig.h: Remove.
15704 * configure.ac: Add a test for socklen_t. Use three-argument
15705 AC_DEFINE throughout.
15706 * config.in: Regenerated using autoheader 2.59.
15707 * configure: Regenerated.
15708
15709 * gdbreplay.c (socklen_t): Provide a default.
15710 (remote_open): Use socklen_t.
15711 * remote-utils.c (socklen_t): Provide a default.
15712 (remote_open): Use socklen_t.
15713 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15714 unsigned char.
15715
15716 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15717 char for buffers.
15718 * linux-low.c (linux_read_memory, linux_write_memory)
15719 (linux_read_auxv): Likewise.
15720 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15721 (check_mem_write): Likewise.
15722 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15723 Likewise.
15724 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15725 (registers_from_string, register_data): Likewise.
15726 * server.c (handle_query, main): Likewise.
15727 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15728 (decode_M_packet): Likewise.
15729 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15730 * target.h (struct target_ops): Update read_memory, write_memory,
15731 and read_auxv.
15732 (read_inferior_memory, write_inferior_memory): Update.
15733 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15734 to unsigned char *.
15735 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15736 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15737 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15738 linux-s390-low.c, linux-sh-low.c: Update for changes in
15739 read_inferior_memory and the_low_target->breakpoint.
15740
15741 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15742
15743 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15744 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15745 * configure.srv: Add powerpc64-*-linux*.
15746 * linux-ppc64-low.c: New file.
15747
15748 2005-05-23 Orjan Friberg <orjanf@axis.com>
15749
15750 * linux-cris-low.c: New file with support for CRIS.
15751 * linux-crisv32-low.c: Ditto for CRISv32.
15752 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15753 (clean): Add reg-cris.c and reg-crisv32.c.
15754 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15755 reg-crisv32.o, and reg-crisv32.c to make rules.
15756 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15757 recognized targets.
15758
15759 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15760
15761 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15762 of sizeof (PTRACE_XFER_TYPE).
15763 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15764
15765 2005-05-12 Orjan Friberg <orjanf@axis.com>
15766
15767 * target.h (struct target_ops): Add insert_watchpoint,
15768 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15769 pointers for hardware watchpoint support.
15770 * linux-low.h (struct linux_target_ops): Ditto.
15771 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15772 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15773 to linux_target_ops.
15774 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15775 reply packet.
15776 * server.c (main): Recognize 'Z' and 'z' packets.
15777
15778 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15779
15780 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15781 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15782 (the_low_target): Add new members.
15783
15784 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15785
15786 * proc-service.c (ps_lgetregs): Search all_processes instead of
15787 all_threads.
15788
15789 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15790
15791 * server.c (start_inferior): Change return type to int.
15792 (attach_inferior): Change sigptr to int *.
15793 (handle_v_cont, handle_v_requests): Change signal to int *.
15794 (main): Change signal to int.
15795
15796 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15797
15798 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15799 * configure.srv: Add m32r*-*-linux*.
15800 * linux-m32r-low.c: New file.
15801
15802 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15803
15804 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15805
15806 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15807
15808 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15809 Take unsigned long arguments for PIDs.
15810 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15811 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15812 (wait_for_sigstop, linux_resume_one_process)
15813 (regsets_fetch_inferior_registers, linux_send_signal)
15814 (linux_read_auxv): Likewise. Update the types of variables holding
15815 PIDs. Update format string specifiers.
15816 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15817 * remote-utils.c (prepare_resume_reply): Likewise.
15818 * server.c (cont_thread, general_thread, step_thread)
15819 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15820 unsigned long.
15821 (handle_query): Update format specifiers.
15822 (handle_v_cont, main): Use strtoul for thread IDs.
15823 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15824 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15825 (general_thread, step_thread, thread_from_wait)
15826 (old_thread_from_wait): Update.
15827 * target.h (struct thread_resume): Use unsigned long for THREAD.
15828 (struct target_ops): Use unsigned long for arguments to attach and
15829 thread_alive.
15830
15831 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15832
15833 * acinclude.m4: Include bfd/bfd.m4 directly.
15834 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15835 <agriffis@toolchain.org>.
15836 * aclocal.m4, configure: Regenerated.
15837
15838 2005-01-07 Andrew Cagney <cagney@gnu.org>
15839
15840 * configure.ac: Rename configure.in, require autoconf 2.59.
15841 * configure: Re-generate.
15842
15843 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15844
15845 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15846 LIBS when finished.
15847 * aclocal.m4: Regenerated.
15848 * configure: Regenerated.
15849
15850 2004-11-21 Andreas Schwab <schwab@suse.de>
15851
15852 * linux-m68k-low.c (m68k_num_gregs): Define.
15853 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15854 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15855 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15856 (m68k_breakpoint_at): New. Add to the_low_target.
15857
15858 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15859 srv_linux_thread_db to yes.
15860
15861 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15862
15863 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15864 (ARCH_SET_FS): Likewise.
15865 (ARCH_GET_FS): Likewise.
15866 (ARCH_GET_GS): Likewise.
15867
15868 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15869
15870 * linux-i386-low.c (ps_get_thread_area): New.
15871 * linux-x86-64-low.c (ps_get_thread_area): New.
15872 * linux-low.c: Include <sys/syscall.h>.
15873 (linux_kill_one_process): Don't kill the first thread here.
15874 (linux_kill): Kill the first thread here.
15875 (kill_lwp): New function.
15876 (send_sigstop, linux_send_signal): Use it.
15877 * proc-service.c: Clean up #ifdefs.
15878 (fpregset_info): Delete.
15879 (ps_lgetregs): Update and enable implementation.
15880 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15881 implementations.
15882 * remote-utils.c (struct sym_cache, symbol_cache): New.
15883 (input_interrupt): Print a clearer message.
15884 (async_io_enabled): New variable.
15885 (enable_async_io, disable_async_io): Use it. Update comments.
15886 (look_up_one_symbol): Use the symbol cache.
15887 * thread-db.c (thread_db_look_up_symbols): New function.
15888 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15889
15890 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15891
15892 * configure.in: Test for -rdynamic.
15893 * configure: Regenerated.
15894 * Makefile (INTERNAL_LDFLAGS): New.
15895 (gdbserver, gdbreplay): Use it.
15896
15897 2004-09-02 Andrew Cagney <cagney@gnu.org>
15898
15899 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15900
15901 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15902
15903 * linux-low.c (linux_wait): Clear all_processes list also.
15904
15905 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15906
15907 * linux-low.c: Include <errno.h>. Remove extern declaration of
15908 errno.
15909
15910 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15911
15912 * gdbreplay.c, server.h, utils.c: Update copyright years.
15913
15914 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15915
15916 * server.c (main): Print child status or termination signal from
15917 variable 'signal', not 'sig'.
15918
15919 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15920
15921 * linux-low.c (linux_read_memory): Change return type to
15922 int. Check for and return error from ptrace().
15923 * target.c (read_inferior_memory): Change return type to int. Pass
15924 back return status from the_target->read_memory().
15925 * target.h (struct target_ops): Adapt *read_memory() prototype.
15926 Update comment.
15927 (read_inferior_memory): Adapt prototype.
15928 * server.c (main): Return an error packet if
15929 read_inferior_memory() returns an error.
15930
15931 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15932
15933 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15934 Unify with other clean targets.
15935
15936 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15937
15938 * server.c (handle_v_cont): Call set_desired_inferior.
15939
15940 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15941
15942 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15943
15944 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15945
15946 * linux-low.c (linux_wait): Unblock async I/O.
15947 (linux_resume): Block and enable async I/O.
15948 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15949 * server.h (block_async_io, unblock_async_io): Add prototypes.
15950
15951 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15952
15953 * remote-utils.c (remote_open): Print a status notice after
15954 opening a TCP port.
15955 * server.c (attach_inferior): Print a status notice after
15956 attaching.
15957
15958 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15959
15960 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15961
15962 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15963
15964 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15965 error packet.
15966 * server.c, target.h: Update copyright years.
15967
15968 2004-02-25 Roland McGrath <roland@redhat.com>
15969
15970 * target.h (struct target_ops): New member `read_auxv'.
15971 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15972 * linux-low.c (linux_read_auxv): New function.
15973 (linux_target_ops): Initialize `read_auxv' member to that.
15974
15975 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15976
15977 Committed by Jim Blandy <jimb@redhat.com>.
15978
15979 * linux-s390-low.c (s390_num_regs): Update.
15980 (s390_regmap): Remove control registers. Use __s390x__ predefine
15981 instead of GPR_SIZE to distiguish s390 and s390x targets.
15982
15983 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15984
15985 * linux-low.c: Update copyright year.
15986 (check_removed_breakpoint): Clear pending_is_breakpoint.
15987 (linux_set_resume_request, linux_queue_one_thread)
15988 (resume_status_pending_p): New functions.
15989 (linux_continue_one_thread): Use process->resume.
15990 (linux_resume): Only resume threads if there are no pending events.
15991 * linux-low.h (struct process_info): Add resume request
15992 pointer.
15993
15994 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15995
15996 * regcache.c (new_register_cache): Clear the allocated register
15997 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15998
15999 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16000
16001 * linux-low.c (linux_resume): Take a struct thread_resume *
16002 argument.
16003 (linux_wait): Update call.
16004 (resume_ptr): New static variable.
16005 (linux_continue_one_thread): Renamed from
16006 linux_continue_one_process. Use resume_ptr.
16007 (linux_resume): Use linux_continue_one_thread.
16008 * server.c (handle_v_cont, handle_v_requests): New functions.
16009 (myresume): New function.
16010 (main): Handle 'v' case.
16011 * target.h (struct thread_resume): New type.
16012 (struct target_ops): Change argument of "resume" to struct
16013 thread_resume *.
16014 (myresume): Delete macro.
16015
16016 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16017
16018 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16019 (uninstall): Support DESTDIR.
16020
16021 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16022
16023 * configure.srv: Add xscale*linux copy of arm*linux entry.
16024
16025 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16026
16027 * linux-arm-low.c (arm_reinsert_addr): New function.
16028 (the_low_target): Add arm_reinsert_addr.
16029
16030 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16031
16032 * mem-break.c: Remove whitespace at end of file.
16033
16034 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16035
16036 * configure.in: Check whether we need to prototype strerror.
16037 * server.h: Optionally prototype strerror.
16038 * gdbreplay.c (perror_with_name): Use strerror.
16039 * linux-low.c (linux_attach_lwp): Use strerror.
16040 * utils.c (perror_with_name): Use strerror.
16041 * config.in, configure: Regenerated.
16042
16043 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16044
16045 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16046 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16047
16048 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16049
16050 * Makefile.in (SFILES): Update.
16051 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16052 low-sun3.c: Remove files.
16053
16054 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16055
16056 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16057 (linux_detach_one_process, linux_detach): New functions.
16058 (linux_target_ops): Add linux_detach.
16059 * server.c (main): Handle 'D' packet.
16060 * target.h (struct target_ops): Add "detach" member.
16061 (detach_inferior): Define.
16062
16063 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16064
16065 From Kelley Cook <kelleycook@wideopenwest.com>:
16066 * configure.srv: Accept i[34567]86 variants.
16067
16068 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16069
16070 * linux-low.c (linux_wait_for_event): Correct comment typos.
16071 (linux_resume_one_process): Call check_removed_breakpoint.
16072 (linux_send_signal): New function.
16073 (linux_target_ops): Add linux_send_signal.
16074 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16075 of kill.
16076 * target.h (struct target_ops): Add send_signal.
16077
16078 2003-05-29 Jim Blandy <jimb@redhat.com>
16079
16080 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16081 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16082 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16083 away part of the register's value.
16084
16085 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16086
16087 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16088 (linux_wait_for_event, linux_init_signals): Likewise.
16089
16090 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16091
16092 * configure.in: Check for stdlib.h.
16093 * configure: Regenerated.
16094 * config.in: Regenerated.
16095
16096 2003-01-04 Andreas Schwab <schwab@suse.de>
16097
16098 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16099
16100 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16101
16102 * Makefile.in: Remove obsolete code.
16103
16104 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16105
16106 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16107 defined(PT_FPR0_HI).
16108
16109 2002-11-17 Stuart Hughes <seh@zee2.com>
16110
16111 * linux-arm-low.c (arm_num_regs): Increase.
16112 (arm_regmap): Include status register.
16113
16114 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16115
16116 * linux-low.c (register_addr): Remove incorrect -1 check.
16117
16118 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16119
16120 * linux-low.c (linux_create_inferior): Call setpgid. Return
16121 the new PID.
16122 (unstopped_p, linux_signal_pid): Remove.
16123 (linux_target_ops): Remove linux_signal_pid.
16124 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16125 global instead of target method.
16126 * target.h (struct target_ops): Remove signal_pid. Update comment
16127 for create_inferior.
16128 * server.c (signal_pid): New variable.
16129 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16130 gdbserver. Set the child to be the foreground process group.
16131 (attach_inferior): Set signal_pid.
16132
16133 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16134
16135 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16136
16137 2002-08-20 Jim Blandy <jimb@redhat.com>
16138
16139 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16140 default for this.
16141
16142 2002-08-01 Andrew Cagney <cagney@redhat.com>
16143
16144 * Makefile.in: Make chill references obsolete.
16145
16146 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16147
16148 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16149 * configure: Regenerate.
16150 * config.in: Regenerate.
16151
16152 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16153
16154 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16155 (perror_with_name, remote_close, remote_open, expect, play): Static.
16156
16157 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16158
16159 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16160 byte offsets instead of an array of indexes.
16161 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16162
16163 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16164
16165 * regcache.c: Add comment.
16166
16167 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16168
16169 * thread-db.c: New file.
16170 * proc-service.c: New file.
16171 * acinclude.m4: New file.
16172 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16173 proc-service.o, and thread-db.o.
16174 (linux-low.o): Add USE_THREAD_DB.
16175 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16176 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16177 * aclocal.m4: Regenerated.
16178 * config.in: Regenerated.
16179 * configure: Regenerated.
16180 * configure.in: Check for proc_service.h, sys/procfs.h,
16181 thread_db.h, and linux/elf.h headrs.
16182 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16183 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16184 Check for -lthread_db and thread support.
16185 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16186 PowerPC, and SuperH.
16187 * i387-fp.c: Constify arguments.
16188 * i387-fp.h: Likewise.
16189 * inferiors.c: (struct thread_info): Renamed from
16190 `struct inferior_info'. Remove PID member. Use generic inferior
16191 list header. All uses updated.
16192 (inferiors, signal_pid): Removed.
16193 (all_threads): New variable.
16194 (get_thread): Define.
16195 (add_inferior_to_list): New function.
16196 (for_each_inferior): New function.
16197 (change_inferior_id): New function.
16198 (add_inferior): Removed.
16199 (remove_inferior): New function.
16200 (add_thread): New function.
16201 (free_one_thread): New function.
16202 (remove_thread): New function.
16203 (clear_inferiors): Use for_each_inferior and free_one_thread.
16204 (find_inferior): New function.
16205 (find_inferior_id): New function.
16206 (inferior_target_data): Update argument type.
16207 (set_inferior_target_data): Likewise.
16208 (inferior_regcache_data): Likewise.
16209 (set_inferior_regcache_data): Likewise.
16210 * linux-low.c (linux_bp_reinsert): Remove.
16211 (all_processes, stopping_threads, using_thrads)
16212 (struct pending_signals, debug_threads, pid_of): New.
16213 (inferior_pid): Replace with macro.
16214 (struct inferior_linux_data): Remove.
16215 (get_stop_pc, add_process): New functions.
16216 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16217 Use add_process and add_thread.
16218 (linux_attach_lwp): New function, based on old linux_attach. Use
16219 add_process and add_thread. Set stop_expected for new threads.
16220 (linux_attach): New function.
16221 (linux_kill_one_process): New function.
16222 (linux_kill): Kill all LWPs.
16223 (linux_thread_alive): Use find_inferior_id.
16224 (check_removed_breakpoints, status_pending_p): New functions.
16225 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16226 Update. Use WNOHANG. Wait for cloned processes also. Update process
16227 struct for the found process.
16228 (linux_wait_for_event): New function.
16229 (linux_wait): Use it. Support LWPs.
16230 (send_sigstop, wait_for_sigstop, stop_all_processes)
16231 (linux_resume_one_process, linux_continue_one_process): New functions.
16232 (linux_resume): Support LWPs.
16233 (REGISTER_RAW_SIZE): Remove.
16234 (fetch_register): Use register_size instead. Call supply_register.
16235 (usr_store_inferior_registers): Likewise. Call collect_register.
16236 Fix recursive case.
16237 (regsets_fetch_inferior_registers): Improve error message.
16238 (regsets_store_inferior_registers): Add debugging.
16239 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16240 (unstopped_p, linux_signal_pid): New functions.
16241 (linux_target_ops): Add linux_signal_pid.
16242 (linux_init_signals): New function.
16243 (initialize_low): Call it. Initialize using_threads.
16244 * regcache.c (inferior_regcache_data): Add valid
16245 flag.
16246 (get_regcache): Fetch registers lazily. Add fetch argument
16247 and update all callers.
16248 (regcache_invalidate_one, regcache_invalidate): New
16249 functions.
16250 (new_register_cache): Renamed from create_register_cache.
16251 Return the new regcache.
16252 (free_register_cache): Change argument to a void *.
16253 (registers_to_string, registers_from_string): Call get_regcache
16254 with fetch flag set.
16255 (register_data): Make static. Pass fetch flag to get_regcache.
16256 (supply_register): Call get_regcache with fetch flag clear.
16257 (collect_register): Call get_regcache with fetch flag set.
16258 (collect_register_as_string): New function.
16259 * regcache.h: Update.
16260 * remote-utils.c (putpkt): Flush after debug output and use
16261 stderr.
16262 Handle input interrupts while waiting for an ACK.
16263 (input_interrupt): Use signal_pid method.
16264 (getpkt): Flush after debug output and use stderr.
16265 (outreg): Use collect_register_as_string.
16266 (new_thread_notify, dead_thread_notify): New functions.
16267 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16268 and general_thread.
16269 (look_up_one_symbol): Flush after debug output.
16270 * server.c (step_thread, server_waiting): New variables.
16271 (start_inferior): Don't use signal_pid. Update call to mywait.
16272 (attach_inferior): Update call to mywait.
16273 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16274 (main): Don't fetch/store registers explicitly. Use
16275 set_desired_inferior. Support proposed ``Hs'' packet. Update
16276 calls to mywait.
16277 * server.h: Update.
16278 (struct inferior_list, struct_inferior_list_entry): New.
16279 * target.c (set_desired_inferior): New.
16280 (write_inferior_memory): Constify.
16281 (mywait): New function.
16282 * target.h: Update.
16283 (struct target_ops): New signal_pid method.
16284 (mywait): Removed macro, added prototype.
16285
16286 * linux-low.h (regset_func): Removed.
16287 (regset_fill_func, regset_store_func): New.
16288 (enum regset_type): New.
16289 (struct regset_info): Add type field. Use new operation types.
16290 (struct linux_target_ops): stop_pc renamed to get_pc.
16291 Add decr_pc_after_break and breakpoint_at.
16292 (get_process, get_thread_proess, get_process_thread)
16293 (strut process_info, all_processes, linux_attach_lwp)
16294 (thread_db_init): New.
16295
16296 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16297 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16298 (the_low_target): Add new members.
16299 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16300 (i386_store_fpxregset): Constify.
16301 (target_regsets): Add new kind identifier.
16302 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16303 (i386_set_pc): Add debugging.
16304 (i386_breakpoint_at): New function.
16305 (the_low_target): Add new members.
16306 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16307 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16308 (mips_breakpoint_at): New.
16309 (the_low_target): Add new members.
16310 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16311 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16312 (the_low_target): Add new members.
16313 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16314 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16315 (the_low_target): Add new members.
16316 * linux-x86-64-low.c (target_regsets): Add new kind
16317 identifier.
16318
16319 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16320
16321 From Martin Pool <mbp@samba.org>:
16322 * server.c (gdbserver_usage): New function.
16323 (main): Call it.
16324
16325 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16326
16327 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16328 stop_at -> stop_pc.
16329
16330 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16331
16332 * Makefile.in: Remove obsolete code.
16333
16334 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16335
16336 * linux-low.c (regsets_fetch_inferior_registers),
16337 (regsets_store_inferior_registers): Removed cast to int from
16338 ptrace() calls.
16339 * regcache.h: Added declaration of struct inferior_info.
16340
16341 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16342
16343 * inferiors.c (struct inferior_info): Add regcache_data.
16344 (add_inferior): Call create_register_cache.
16345 (clear_inferiors): Call free_register_cache.
16346 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16347 * regcache.c (struct inferior_regcache_data): New.
16348 (registers): Remove.
16349 (get_regcache): New function.
16350 (create_register_cache, free_register_cache): New functions.
16351 (set_register_cache): Don't initialize the register cache here.
16352 (registers_to_string, registers_from_string, register_data): Call
16353 get_regcache.
16354 * regcache.h: Add prototypes.
16355 * server.h: Likewise.
16356
16357 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16358
16359 * mem-break.c: New file.
16360 * mem-break.h: New file.
16361 * Makefile.in: Add mem-break.o rule; update server.h
16362 dependencies.
16363 * inferiors.c (struct inferior_info): Add target_data
16364 member.
16365 (clear_inferiors): Free target_data member if set.
16366 (inferior_target_data, set_inferior_target_data): New functions.
16367 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16368 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16369 * linux-low.c (linux_bp_reinsert): New variable.
16370 (struct inferior_linux_data): New.
16371 (linux_create_inferior): Use set_inferior_target_data.
16372 (linux_attach): Likewise. Call add_inferior.
16373 (linux_wait_for_one_inferior): New function.
16374 (linux_wait): Call it.
16375 (linux_write_memory): Add const.
16376 (initialize_low): Call set_breakpoint_data.
16377 * linux-low.h (struct linux_target_ops): Add breakpoint
16378 handling members.
16379 * server.c (attach_inferior): Remove extra add_inferior
16380 call.
16381 * server.h: Include mem-break.h. Update inferior.c
16382 prototypes.
16383 * target.c (read_inferior_memory)
16384 (write_inferior_memory): New functions.
16385 * target.h (read_inferior_memory)
16386 (write_inferior_memory): Change macros to prototypes.
16387 (struct target_ops): Update comments. Add const to write_memory
16388 definition.
16389
16390 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16391
16392 * linux-low.c (usr_store_inferior_registers): Support
16393 registers which are allowed to fail to store.
16394 * linux-low.h (linux_target_ops): Likewise.
16395 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16396 (ppc_cannot_store_register): FPSCR may not be storable.
16397
16398 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16399
16400 * server.h: Include <string.h> if HAVE_STRING_H.
16401 * ChangeLog: Correct paths in last ChangeLog entry.
16402
16403 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16404
16405 * linux-low.h: Remove obsolete prototypes.
16406 (struct linux_target_ops): New.
16407 (extern the_low_target): New.
16408 * linux-low.c (num_regs, regmap): Remove declarations.
16409 (register_addr): Use the_low_target explicitly.
16410 (fetch_register): Likewise.
16411 (usr_fetch_inferior_registers): Likewise.
16412 (usr_store_inferior_registers): Likewise.
16413 * linux-arm-low.c (num_regs): Remove.
16414 (arm_num_regs): Define.
16415 (arm_regmap): Renamed from regmap, made static.
16416 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16417 made static.
16418 (arm_cannot_store_register): Renamed from cannot_store_register,
16419 made static.
16420 (the_low_target): New.
16421 * linux-i386-low.c (num_regs): Remove.
16422 (i386_num_regs): Define.
16423 (i386_regmap): Renamed from regmap, made static.
16424 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16425 made static.
16426 (i386_cannot_store_register): Renamed from cannot_store_register,
16427 made static.
16428 (the_low_target): New.
16429 * linux-ia64-low.c (num_regs): Remove.
16430 (ia64_num_regs): Define.
16431 (ia64_regmap): Renamed from regmap, made static.
16432 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16433 made static.
16434 (ia64_cannot_store_register): Renamed from cannot_store_register,
16435 made static.
16436 (the_low_target): New.
16437 * linux-m68k-low.c (num_regs): Remove.
16438 (m68k_num_regs): Define.
16439 (m68k_regmap): Renamed from regmap, made static.
16440 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16441 made static.
16442 (m68k_cannot_store_register): Renamed from cannot_store_register,
16443 made static.
16444 (the_low_target): New.
16445 * linux-mips-low.c (num_regs): Remove.
16446 (mips_num_regs): Define.
16447 (mips_regmap): Renamed from regmap, made static.
16448 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16449 made static.
16450 (mips_cannot_store_register): Renamed from cannot_store_register,
16451 made static.
16452 (the_low_target): New.
16453 * linux-ppc-low.c (num_regs): Remove.
16454 (ppc_num_regs): Define.
16455 (ppc_regmap): Renamed from regmap, made static.
16456 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16457 made static.
16458 (ppc_cannot_store_register): Renamed from cannot_store_register,
16459 made static.
16460 (the_low_target): New.
16461 * linux-s390-low.c (num_regs): Remove.
16462 (s390_num_regs): Define.
16463 (s390_regmap): Renamed from regmap, made static.
16464 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16465 made static.
16466 (s390_cannot_store_register): Renamed from cannot_store_register,
16467 made static.
16468 (the_low_target): New.
16469 * linux-sh-low.c (num_regs): Remove.
16470 (sh_num_regs): Define.
16471 (sh_regmap): Renamed from regmap, made static.
16472 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16473 made static.
16474 (sh_cannot_store_register): Renamed from cannot_store_register,
16475 made static.
16476 (the_low_target): New.
16477 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16478 (the_low_target): New.
16479
16480 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16481
16482 * Makefile.in: Add stamp-h target.
16483 * configure.in: Create stamp-h.
16484 * configure: Regenerated.
16485
16486 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16487
16488 * inferiors.c: New file.
16489 * target.c: New file.
16490 * target.h: New file.
16491 * Makefile.in: Add target.o and inferiors.o. Update
16492 dependencies.
16493 * linux-low.c (inferior_pid): New static variable,
16494 moved from server.c.
16495 (linux_create_inferior): Renamed from create_inferior.
16496 Call add_inferior. Return 0 on success instead of a PID.
16497 (linux_attach): Renamed from myattach.
16498 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16499 (linux_thread_alive): Renamed from mythread_alive.
16500 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16501 child dies.
16502 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16503 (regsets_store_inferior_registers): Correct error message.
16504 Add missing ``return 0''.
16505 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16506 (linux_store_registers): Renamed from store_inferior_registers.
16507 (linux_read_memory): Renamed from read_inferior_memory.
16508 (linux_write_memory): Renamed from write_inferior_memory.
16509 (linux_target_ops): New structure.
16510 (initialize_low): Call set_target_ops ().
16511 * remote-utils.c (unhexify): New function.
16512 (hexify): New function.
16513 (input_interrupt): Send signals to ``signal_pid''.
16514 * server.c (inferior_pid): Remove.
16515 (start_inferior): Update create_inferior call.
16516 (attach_inferior): Call add_inferior.
16517 (handle_query): New function.
16518 (main): Call handle_query for `q' packets.
16519 * server.h: Include "target.h". Remove obsolete prototypes.
16520 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16521
16522 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16523
16524 * Makefile.in: Add WARN_CFLAGS. Update configury
16525 dependencies.
16526 * configure.in: Check for <string.h>
16527 * configure: Regenerate.
16528 * config.in: Regenerate.
16529 * gdbreplay.c: Include needed system headers.
16530 (remote_open): Remove strchr prototype.
16531 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16532 * regcache.c (supply_register): Change buf argument to const void *.
16533 (supply_register_by_name): Likewise.
16534 (collect_register): Change buf argument to void *.
16535 (collect_register_by_name): Likewise.
16536 * regcache.h: Add missing prototypes.
16537 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16538 * server.c (handle_query): New function.
16539 (attached): New static variable, moved out of main.
16540 (main): Quiet longjmp clobber warnings.
16541 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16542 * utils.c (error): Remove NORETURN.
16543 (fatal): Likewise.