[PowerPC] Consolidate wordsize getter between native and gdbserver
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2
3 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
4 wordsize of the inferior. Call ppc_linux_target_wordsize.
5
6 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7
8 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
9 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
10 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
11 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
12 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
13 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
14 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
15 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
16 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
17 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
18 (tdesc_powerpc_e500l): Remove.
19 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
20 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
21 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
22 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
23 linux-ppc-tdesc.h.
24 (ppc_arch_setup): Remove target description matching code. Fill a
25 ppc_linux_features struct and call ppc_linux_match_description
26 with it.
27
28 2018-05-22 Maciej W. Rozycki <macro@mips.com>
29
30 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
31 width of the requested register exceeds the width of the
32 `ptrace' data type.
33 (mips_cannot_store_register): Likewise.
34
35 2018-05-21 Maciej W. Rozycki <macro@mips.com>
36
37 * linux-mips-low.c (mips_fetch_register): New function. Update
38 preceding comment.
39 (mips_store_gregset): Supply 0 rather than $restart for $zero.
40 (the_low_target): Wire `mips_fetch_register'.
41
42 2018-05-10 Joel Brobecker <brobecker@adacore.com>
43
44 * lynx-i386-low.c (LYNXOS_178): New macro.
45 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
46 the layout on LynxOS-178.
47 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
48 handle floating point registers that are not supported by
49 LynxOS-178.
50
51 2018-05-10 Tom Tromey <tom@tromey.com>
52
53 * configure: Rebuild.
54
55 2018-05-10 Joel Brobecker <brobecker@adacore.com>
56
57 PR server/23158:
58 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
59 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
60 Use it to set the expedite_regs field in the given tdesc.
61 * x86-tdesc.h: New file.
62 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
63 Adjust following the addition of the new expedite_regs parameter
64 to init_target_desc.
65 * linux-tic6x-low.c (tic6x_read_description): Likewise.
66 * linux-x86-tdesc.c: #include "x86-tdesc.h".
67 (i386_linux_read_description, amd64_linux_read_description):
68 Adjust following the addition of the new expedite_regs parameter
69 to init_target_desc.
70 * lynx-i386-low.c: #include "x86-tdesc.h".
71 (lynx_i386_arch_setup): Adjust following the addition of the new
72 expedite_regs parameter to init_target_desc.
73 * nto-x86-low.c: #include "x86-tdesc.h".
74 (nto_x86_arch_setup): Adjust following the addition of the new
75 expedite_regs parameter to init_target_desc.
76 * win32-i386-low.c: #include "x86-tdesc.h".
77 (i386_arch_setup): Adjust following the addition of the new
78 expedite_regs parameter to init_target_desc.
79
80 2018-05-10 Joel Brobecker <brobecker@adacore.com>
81
82 PR server/23158:
83 * win32-low.c (win32_create_inferior): Add call to my_wait
84 setting last_status global.
85
86 2018-05-10 Joel Brobecker <brobecker@adacore.com>
87
88 PR server/23158:
89 * win32-low.c (create_process): Only call gdb_tilde_expand if
90 inferior_cwd is not NULL.
91
92 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
93
94 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
95 registers to the cache if their values have changed.
96 (i387_xsave_to_cache): Provide default values for x87 control
97 registers when these features are available, but disabled.
98 * regcache.c (supply_register_by_name_zeroed): New function.
99 * regcache.h (supply_register_by_name_zeroed): Declare new
100 function.
101
102 2018-05-07 Tom Tromey <tom@tromey.com>
103
104 * configure: Rebuild.
105
106 2018-05-04 Tom Tromey <tom@tromey.com>
107
108 * configure: Rebuild.
109
110 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
111 Pedro Alves <palves@redhat.com>
112
113 * linux-aarch64-low.c (aarch64_stopped_data_address):
114 Likewise.
115
116 2018-04-27 Tom Tromey <tom@tromey.com>
117
118 * configure: Rebuild.
119
120 2018-04-23 Tom Tromey <tom@tromey.com>
121
122 * configure: Rebuild.
123
124 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
125
126 * Makefile.in (depcomp): Add "..".
127 (all_deps_files): New and use it.
128
129 2018-04-18 Alan Hayward <alan.hayward@arm.com>
130
131 * configure.srv (aarch64*-*-linux*): Don't include xml.
132 (i[34567]86-*-cygwin*): Likewise.
133 (i[34567]86-*-linux*): Likewise.
134 (i[34567]86-*-lynxos*): Likewise.
135 (i[34567]86-*-mingw32ce*): Likewise.
136 (i[34567]86-*-mingw*): Likewise.
137 (i[34567]86-*-nto*): Likewise.
138 (tic6x-*-uclinux): Likewise.
139 (x86_64-*-linux*): Likewise.
140 (x86_64-*-mingw*): Likewise.
141 (x86_64-*-cygwin*): Likewise.
142
143 2018-04-18 Alan Hayward <alan.hayward@arm.com>
144
145 * tdesc.c: Remove xml parameter.
146
147 2018-04-18 Alan Hayward <alan.hayward@arm.com>
148
149 * server.c (get_features_xml): Remove cast.
150 * tdesc.c (void target_desc::accept): Fill in function.
151 (tdesc_get_features_xml): Remove old xml creation.
152 (print_xml_feature::visit_pre): Add xml vistor.
153 * tdesc.h (struct target_desc): Make xmltarget mutable.
154 (tdesc_get_features_xml): Remove declaration.
155
156 2018-04-18 Alan Hayward <alan.hayward@arm.com>
157
158 * tdesc.c (tdesc_architecture_name): Add new function.
159 (tdesc_osabi_name): Likewise.
160 (tdesc_get_features_xml): Use new functions.
161
162 2018-04-18 Alan Hayward <alan.hayward@arm.com>
163
164 * tdesc.c (tdesc_create_flags): Remove.
165 (tdesc_add_flag): Likewise.
166 (tdesc_named_type): Likewise.
167 (tdesc_create_union): Likewise.
168 (tdesc_create_struct): Likewise.
169 (tdesc_create_vector): Likewise.
170 (tdesc_add_bitfield): Likewise.
171 (tdesc_add_field): Likewise.
172 (tdesc_set_struct_size): Likewise.
173
174 2018-04-18 Alan Hayward <alan.hayward@arm.com>
175
176 * tdesc.c (~target_desc): Remove implictly deleted items.
177 (init_target_desc): Iterate all features.
178 (tdesc_get_features_xml): Use vector.
179 (tdesc_create_feature): Create feature.
180 * tdesc.h (tdesc_feature) Remove
181 (target_desc): Add features.
182
183 2018-04-18 Alan Hayward <alan.hayward@arm.com>
184
185 * Makefile.in: Add common/tdesc.c
186 * tdesc.c (init_target_desc): init all reg_defs from register
187 vector.
188 (tdesc_create_reg): Create tdesc_reg.
189 * tdesc.h (tdesc_feature): Add register vector.
190
191 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
192
193 * tdesc.h (struct target_desc) <features>: Change type to
194 std::vector<std::string>.
195 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
196 changes.
197 (tdesc_get_features_xml): Likewise.
198 (tdesc_create_feature): Likewise.
199
200 2018-03-26 Alan Hayward <alan.hayward@arm.com>
201
202 * regcache.c (find_register_by_number): Return a ref.
203 (find_regno): Use references.
204 (register_size): Likewise.
205 (register_data): Likewise.
206 * tdesc.c (target_desc::~target_desc): Remove free calls.
207 (target_desc::operator==): Use std::vector compare.
208 (init_target_desc): Use reference.
209 (tdesc_create_reg): Use reg constructors.
210 * tdesc.h (struct target_desc): Replace pointer with object.
211
212 2018-03-23 Alan Hayward <alan.hayward@arm.com>
213
214 * regcache.c (find_register_by_number): Make static.
215 (find_regno): Use find_register_by_number
216 * regcache.h (struct reg): Remove declaration.
217
218 2018-03-23 Alan Hayward <alan.hayward@arm.com>
219
220 * tdesc.c (target_desc::~target_desc): Move to here.
221 (target_desc::operator==): Likewise.
222 * tdesc.h (target_desc::~target_desc): Move from here.
223 (target_desc::operator==): Likewise.
224
225 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
226
227 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
228
229 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
230
231 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
232 S390_TDESC_GS.
233 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
234 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
235 and init_registers_s390_gs_linux64.
236
237 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
238
239 * linux-s390-low.c (s390_fill_gs): Remove function.
240 (s390_fill_gsbc): Remove function.
241 (s390_regsets): Set fill functions for the guarded storage regsets
242 to NULL.
243
244 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
245
246 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
247 the word size. Add comment.
248 (s390_get_wordsize): New function.
249 (s390_arch_setup): No longer select a temporary tdesc to fetch the
250 pswm with it. Instead, use s390_get_wordsize to determine the
251 word size first and derive the correct tdesc from that directly.
252
253 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
254
255 * Makefile.in: Include silent-rules.mk.
256 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
257 (COMPILE): Add ECHO_CXX.
258 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
259 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
260 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
261 (version-generated.c): Add ECHO_GEN.
262 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
263 (IPAGENT_COMPILE): Add ECHO_CXX.
264 (%-generated.c): Add ECHO_REGDAT.
265
266 2018-03-14 Tom Tromey <tom@tromey.com>
267
268 PR cli/14977:
269 * ax.c (ax_printf): Special case for NULL.
270
271 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
272
273 * linux-low.c (linux_qxfer_libraries_svr4): Use
274 xml_escape_text_append.
275
276 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
277
278 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
279
280 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
281
282 * server.c (handle_general_set): Remove unnecessary xstrdup.
283
284 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
285
286 * server.c (parse_debug_format_options): Adjust to
287 delim_string_to_char_ptr_vec changes.
288 * thread-db.c (thread_db_load_search): Adjust to
289 dirnames_to_char_ptr_vec changes.
290
291 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
292
293 * target.h (target_enable_btrace, target_disable_btrace)
294 (target_read_btrace, target_read_btrace_conf): Turn macro into
295 inline function. Throw error if target method is not defined.
296 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
297 check for btrace target method. Be prepared to handle exceptions
298 from btrace target methods.
299
300 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
301
302 * server.c (captured_main): Change order of error message printed
303 when the current working directory cannot be found.
304
305 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
306
307 * server.c: Include "filenames.h" and "pathstuff.h".
308 (program_name): Delete variable.
309 (program_path): New anonymous class.
310 (get_exec_wrapper): Use "program_path" instead of
311 "program_name".
312 (handle_v_run): Likewise.
313 (captured_main): Likewise.
314 (process_serial_event): Likewise.
315
316 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
317
318 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
319 (OBJS): Add "pathstuff.o".
320 * server.c (current_directory): New global variable.
321 (captured_main): Initialize "current_directory".
322
323 2018-02-26 Alan Hayward <alan.hayward@arm.com>
324
325 * tdesc.c: Use common/tdesc.h.
326 * tdesc.h: Likewise.
327
328 2018-02-20 Alan Hayward <alan.hayward@arm.com>
329 Simon Marchi <simon.marchi@ericsson.com>
330
331 * Makefile.in: Switch order of make rules.
332
333 2018-02-19 Alan Hayward <alan.hayward@arm.com>
334
335 * Makefile.in: Add common directory in build.
336 * configure.ac: Add common reference.
337 * configure: Regenerate.
338
339 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
340
341 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
342 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
343 * spu-low.c (spu_target_ops): Likewise.
344 * win32-low.c (win32_target_ops): Likewise.
345 * server.c (supported_btrace_packets): Report packets unconditionally.
346 * target.h (target_ops) <supports_btrace>: Remove.
347 (target_supports_btrace): Remove.
348
349 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
350
351 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
352 (handle_btrace_disable): Change return type to void. Use exceptions
353 to report errors.
354 (handle_btrace_general_set): Catch exception and copy message to
355 return message.
356
357 2018-02-08 Tom Tromey <tom@tromey.com>
358
359 * linux-low.c (install_software_single_step_breakpoints): Use
360 make_scoped_restore.
361 * inferiors.c (make_cleanup_restore_current_thread): Remove.
362 (do_restore_current_thread_cleanup): Remove.
363 * gdbthread.h (make_cleanup_restore_current_thread): Don't
364 declare.
365
366 2018-02-08 Tom Tromey <tom@tromey.com>
367
368 * mem-break.c (set_raw_breakpoint_at): Use
369 gdb::unique_xmalloc_ptr.
370
371 2018-01-30 Pedro Alves <palves@redhat.com>
372
373 PR gdb/13211
374 * target.c (target_terminal::terminal_state): Rename to ...
375 (target_terminal::m_terminal_state): ... this.
376
377 2018-01-19 James Clarke <jrtc27@jrtc27.com>
378
379 * linux-low.c (handle_extended_wait): Surround call to
380 thread_db_notice_clone with #ifdef USE_THREAD_DB.
381
382 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
383
384 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
385 linux_ptrace_attach_fail_reason_string now returning an
386 std::string.
387 (linux_attach): Likewise.
388 * thread-db.c (attach_thread): Likewise.
389
390 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
391
392 PR gdb/21559
393 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
394 checking for fs_base/gs_base fields in struct user_regs_struct.
395 * configure: Regenerate.
396
397 2018-01-16 Yao Qi <yao.qi@linaro.org>
398
399 PR gdb/18749
400 * linux-low.c (fetch_register): Call supply_register instead of
401 error.
402
403 2018-01-08 Yao Qi <yao.qi@linaro.org>
404 Simon Marchi <simon.marchi@ericsson.com>
405
406 * Makefile.in (OBS): Remove selftest.o.
407 * configure.ac: Set srv_selftest_objs if $development is true.
408 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
409 * configure: Re-generated.
410 * server.c (captured_main): Wrap variable selftest_filter with
411 GDB_SELF_TEST.
412
413 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
414
415 * server.c (parse_debug_format_options): Return std::string.
416 (handle_monitor_command, captured_main): Adjust.
417
418 2018-01-05 Pedro Alves <palves@redhat.com>
419
420 PR gdb/18653
421 * server.c (captured_main): Pass quiet=false to
422 save_original_signals_state.
423
424 2018-01-01 Joel Brobecker <brobecker@adacore.com>
425
426 * gdbreplay.c (gdbreplay_version): Update copyright year in
427 version message.
428 * server.c (gdbserver_version): Likewise.
429
430 2017-12-08 Tom Tromey <tom@tromey.com>
431
432 * ax.c (ax_printf): Update.
433
434 2017-12-07 Yao Qi <yao.qi@linaro.org>
435
436 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
437 aarch64_linux_read_description.
438 * linux-amd64-ipa.c (idx2mask): New array.
439 (get_ipa_tdesc): Move idx2mask out.
440 (initialize_low_tracepoint): Initialize target descriptions.
441 * linux-i386-ipa.c (idx2mask): New array.
442 (get_ipa_tdesc): Move idx2mask out.
443 (initialize_low_tracepoint): Initialize target descriptions.
444
445 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
446
447 * tdesc.c (struct tdesc_type): Change return type.
448 (tdesc_add_flag): Change parameter type.
449 (tdesc_add_bitfield): Likewise.
450 (tdesc_add_field): Likewise.
451 (tdesc_set_struct_size): Likewise.
452
453 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
454
455 * regcache.c (registers_to_string): Remove unused variable.
456
457 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
458
459 * inferiors.c (for_each_inferior_with_data): Remove.
460 * inferiors.h (for_each_inferior_with_data): Remove.
461 * server.c (handle_qxfer_threads_worker): Change parameter type.
462 (handle_qxfer_threads_proper): Use for_each_thread.
463
464 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
465
466 * inferiors.c (for_each_inferior): Remove.
467 (clear_inferiors): Use for_each_thread.
468 * inferiors.h (for_each_inferior): Remove.
469 * linux-low.c (linux_wait_for_event_filtered): Use
470 for_each_thread.
471 (linux_stabilize_threads): Likewise.
472 * regcache.c (regcache_release): Likewise.
473 * server.c (gdb_wants_all_threads_stopped): Likewise.
474 (clear_pending_status_callback): Remove.
475 (handle_status): Use for_each_thread.
476 (captured_main): Likewise.
477 * win32-low.c (child_init_thread_list): Likewise.
478 (win32_clear_inferiors): Likewise.
479 (fake_breakpoint_event): Likewise.
480
481 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
482
483 * inferiors.h (find_inferior): Remove.
484 * inferiors.c (find_inferior): Remove.
485
486 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
487
488 * linux-low.c (resume_status_pending_p): Update comment.
489 (need_step_over_p): Update comment.
490
491 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
492
493 * linux-low.c (proceed_one_lwp): Return void, change parameter
494 type.
495 (unsuspend_and_proceed_one_lwp): Likewise.
496 (proceed_all_lwps): Use for_each_thread.
497 (unstop_all_lwps): Likewise.
498
499 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
500
501 * linux-low.c (linux_resume_one_thread): Return void, take
502 parameter directly.
503 (linux_resume): Use for_each_thread.
504
505 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
506
507 * linux-low.c (send_sigstop_callback): Return void, change
508 parameter type. Rename to...
509 (send_sigstop): ... this.
510 (suspend_and_send_sigstop_callback): Return void, change parameter
511 type. Rename to...
512 (suspend_and_send_sigstop): ... this.
513 (stop_all_lwps): Use for_each_thread.
514
515 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
516
517 * linux-low.c (lwp_running): Return bool, remove unused
518 argument.
519 (linux_stabilize_threads): Use find_thread.
520
521 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
522
523 * linux-low.c (select_singlestep_lwp_callback): Remove.
524 (count_events_callback): Remove.
525 (select_event_lwp_callback): Remove.
526 (select_event_lwp): Use find_thread/for_each_thread.
527
528 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
529
530 * linux-low.c (not_stopped_callback): Return bool, take filter
531 argument directly.
532 (linux_wait_for_event_filtered): Use find_thread.
533 (linux_wait_1): Likewise.
534
535 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
536
537 * linux-low.c (same_lwp): Remove.
538 (find_lwp_pid): Use find_thread.
539
540 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
541
542 * linux-low.c (delete_lwp_callback): Remove.
543 (linux_mourn): Use for_each_thread.
544
545 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
546
547 * linux-low.c (linux_detach_lwp_callback): Return void, remove
548 args parameter, don't check for pid.
549 (linux_detach): Use for_each_thread.
550
551 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
552
553 * linux-low.c (struct counter): Remove.
554 (second_thread_of_pid_p): Remove.
555 (last_thread_of_process_p): Use find_thread.
556
557 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
558
559 * inferiors.c (find_inferior_in_random): Remove.
560 * inferiors.h (find_inferior_in_random): Remove.
561 * linux-low.c (status_pending_p_callback): Return bool, accept
562 parameter ptid directly.
563 (linux_wait_for_event_filtered): Use find_thread_in_random.
564 (linux_wait_1): Likewise.
565
566 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
567
568 * inferiors.c (find_inferior_id): Remove.
569 (find_thread_ptid): Move implemention from find_inferior_id to
570 here.
571 * inferiors.h (find_inferior_id): Remove.
572 * server.c (handle_status): Use find_thread_ptid.
573 (process_serial_event): Likewise.
574 * thread-db.c (find_one_thread): Likewise.
575 (thread_db_thread_handle): Likewise.
576 * win32-low.c (thread_rec): Likewise.
577 (child_delete_thread): Likewise.
578 (win32_thread_alive): Likewise.
579 (get_child_debug_event): Likewise.
580
581 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
582
583 * linux-mips-low.c (update_watch_registers_callback): Return
584 void, remove pid_p parameter, don't check for pid.
585 (mips_insert_point, mips_remove_point): Use for_each_thread.
586
587 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
588
589 * lynx.low (lynx_delete_thread_callback): Remove.
590 (lynx_mourn): Use for_each_thread.
591
592 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
593
594 * regcache.c (regcache_invalidate_one): Remove.
595 (regcache_invalidate_pid): use for_each_thread.
596
597 2017-11-26 Tom Tromey <tom@tromey.com>
598
599 * linux-low.c (linux_create_inferior): Update.
600
601 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
602
603 * spu-low.c (spu_create_inferior): Fix typo in argument name.
604
605 2017-11-24 Alan Hayward <alan.hayward@arm.com>
606
607 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
608 * linux-aarch64-low.c (initialize_low_arch): Call init func.
609 * linux-aarch64-tdesc-selftest.c: New file.
610 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
611
612 2017-11-24 Alan Hayward <alan.hayward@arm.com>
613
614 * configure.srv: Add new file.
615 * linux-aarch64-low.c (initialize_low_arch): Call init func.
616 * linux-aarch64-tdesc-selftest.c: New file.
617 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
618
619 2017-11-24 Alan Hayward <alan.hayward@arm.com>
620
621 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
622 * linux-aarch64-low.c (initialize_low_arch): Remove init.
623 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
624
625 2017-11-24 Alan Hayward <alan.hayward@arm.com>
626
627 * configure.srv: Add new files.
628 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
629 aarch64_linux_read_description.
630 * linux-aarch64-low.c (aarch64_linux_read_description):
631 Merge with aarch64_arch_setup.
632 (aarch64_arch_setup): Call aarch64_linux_read_description.
633 * linux-aarch64-tdesc.c: New file.
634 * linux-aarch64-tdesc.h: New file.
635
636 2017-11-24 Yao Qi <yao.qi@linaro.org>
637
638 * configure.srv: Set $srv_regobj for tic6x-linux.
639 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
640 (tic6x_read_description): Move some code to tic6x_arch_setup.
641 (tic6x_tdesc_test): New function.
642 (initialize_low_arch): Call selftests::register_test.
643
644 2017-11-22 Yao Qi <yao.qi@linaro.org>
645
646 * remote-utils.c (prepare_resume_reply): Use memcpy.
647
648 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
649
650 * linux-low.c (kill_one_lwp_callback): Return void, take
651 argument directly, don't filter on pid.
652 (linux_kill): Use for_each_thread.
653
654 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
655
656 * linux-low.c (need_step_over_p): Return bool, remove dummy
657 argument.
658 (linux_resume, proceed_all_lwps): Use find_thread.
659
660 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
661
662 * linux-low.c (resume_status_pending_p): Return bool, remove
663 flag_p argument.
664 (linux_resume): Use find_thread.
665
666 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
667
668 * linux-low.c (struct thread_resume_array): Remove.
669 (linux_set_resume_request): Return void, take arguments
670 directly.
671 (linux_resume): Use for_each_thread.
672
673 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
674
675 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
676 return bool, remove data argument.
677 (linux_stabilize_threads): Use find_thread.
678
679 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
680
681 * linux-low.c (unsuspend_one_lwp): Remove.
682 (unsuspend_all_lwps): Use for_each_thread, inline code from
683 unsuspend_one_lwp.
684
685 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
686
687 * gdbthread.h (find_thread): Add overload with ptid_t filter.
688 * linux-low.c (struct iterate_over_lwps_args): Remove.
689 (iterate_over_lwps_filter): Remove.
690 (iterate_over_lwps): Use find_thread.
691
692 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
693
694 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
695 (linux_handle_new_gdb_connection): Use for_each_thread, inline
696 code from reset_lwp_ptrace_options_callback.
697
698 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
699
700 * linux-arm-low.c (struct update_registers_data): Remove.
701 (update_registers_callback): Return void, take arguments
702 directly, don't check thread's pid.
703 (arm_insert_point, arm_remove_point): Use for_each_thread.
704
705 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
706
707 * win32-low.c (continue_one_thread): Return void, take argument
708 directly.
709 (child_continue): Use for_each_thread.
710
711 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
712
713 * win32-i386-low.c (update_debug_registers_callback): Rename
714 to ...
715 (update_debug_registers): ... this, return void, remove pid_p arg.
716 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
717
718 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
719
720 * inferiors.h (struct process_info): Add constructor, initialize
721 fields..
722 <syscalls_to_catch>: Change type to std::vector<int>.
723 * inferiors.c (add_process): Allocate process_info with new.
724 (remove_process): Free process_info with delete.
725 * linux-low.c (handle_extended_wait): Adjust.
726 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
727 * server.c (handle_general_set): Adjust.
728
729 2017-11-16 Pedro Alves <palves@redhat.com>
730
731 * remote-utils.c (remote_close): Block SIGIO signals instead of
732 uninstalling the SIGIO handler.
733
734 2017-11-16 Alan Hayward <alan.hayward@arm.com>
735
736 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
737
738 2017-11-16 Yao Qi <yao.qi@linaro.org>
739
740 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
741 (tic6x_store_gregset): Likewise.
742 (tic6x_usrregs_info): Move it up.
743
744 2017-11-15 Alan Hayward <alan.hayward@arm.com>
745
746 * Makefile.in: Update arch rules.
747 * configure.srv: Explicitly mark arch/ files.
748
749 2017-11-13 Andreas Schwab <schwab@suse.de>
750
751 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
752 function.
753 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
754
755 2017-11-06 Pedro Alves <palves@redhat.com>
756
757 * config.in, configure: Regenerate.
758
759 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
760
761 * target.c (struct thread_search): Remove.
762 (thread_search_callback): Remove.
763 (prepare_to_access_memory): Use for_each_thread instead of
764 find_inferior. Inline code from thread_search_callback.
765
766 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
767
768 * server.c (struct visit_actioned_threads_data): Remove.
769 (visit_actioned_threads): Change prototype to take arguments
770 directly.
771 (resume): Use find_thread instead of find_inferior.
772
773 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
774
775 * server.c (queue_stop_reply_callback): Change prototype, return
776 void.
777 (find_status_pending_thread_callback): Remove.
778 (handle_status): Replace find_inferior with find_thread and
779 for_each_thread.
780
781 2017-10-25 Alan Hayward <alan.hayward@arm.com>
782
783 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
784 with REGNO.
785 (aarch64_store_gregset): Likewise.
786 (aarch64_fill_fpregset): Likewise.
787 (aarch64_store_fpregset): Likewise.
788
789 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
790
791 * gdbthread.h (find_thread, for_each_thread): New functions.
792 * inferiors.c (thread_of_pid): Remove.
793 (find_any_thread_of_pid): Use find_thread.
794 * linux-low.c (num_lwps): Use for_each_thread.
795
796 2017-10-17 Yao Qi <yao.qi@linaro.org>
797
798 * Makefile.in: Remove one rule.
799 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
800
801 2017-10-17 Yao Qi <yao.qi@linaro.org>
802
803 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
804 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
805
806 2017-10-17 Yao Qi <yao.qi@linaro.org>
807
808 * configure.srv: Rename arm.o with arch/arm.o.
809
810 2017-10-17 Yao Qi <yao.qi@linaro.org>
811
812 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
813 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
814 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
815 (arch-i386.o, arch-amd64.o): Remove rules.
816 (arch/%.o): New rule.
817 Update POSTCOMPILE and COMPILE.pre.
818 * configure.ac: Invoke AC_CONFIG_COMMANDS.
819 * configure: Re-generated.
820 * configure.srv: Replace arch-i386.o with arch/i386.o.
821 Replace arch-amd64.o with arch/amd64.o.
822
823 2017-10-16 Yao Qi <yao.qi@linaro.org>
824
825 * configure: Regenerated.
826
827 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
828
829 * inferiors.h: (struct inferior_list): Remove.
830 (struct inferior_list_entry); Remove.
831 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
832 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
833 get_first_inferior): Remove.
834 (for_each_inferior, for_each_inferior_with_data, find_inferior,
835 find_inferior_id, find_inferior_in_random): Change signature.
836 * inferiors.c (all_threads): Change type to
837 std::list<thread_info *>.
838 (get_thread): Remove macro.
839 (find_inferior, find_inferior_id): Change signature, implement
840 using find_thread.
841 (find_inferior_in_random): Change signature, implement using
842 find_thread_in_random.
843 (for_each_inferior, for_each_inferior_with_data): Change
844 signature, implement using for_each_thread.
845 (add_inferior_to_list, remove_inferior): Remove.
846 (add_thread, get_first_thread, thread_of_pid,
847 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
848 (get_first_inferior, one_inferior_p, clear_inferior_list):
849 Remove.
850 (clear_inferiors, get_thread_process): Update.
851 * gdbthread.h: Include <list>.
852 (struct thread_info) <entry>: Remove field.
853 <id>: New field.
854 (all_threads): Change type to std::list<thread_info *>.
855 (get_first_inferior): Add doc.
856 (find_thread, for_each_thread, find_thread_in_random): New
857 functions.
858 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
859 * linux-arm-low.c (update_registers_callback): Update.
860 * linux-low.c (second_thread_of_pid_p): Update.
861 (kill_one_lwp_callback, linux_detach_lwp_callback,
862 delete_lwp_callback, status_pending_p_callback, same_lwp,
863 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
864 iterate_over_lwps, not_stopped_callback,
865 resume_stopped_resumed_lwps, count_events_callback,
866 select_singlestep_lwp_callback, select_event_lwp_callback,
867 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
868 suspend_and_send_sigstop_callback, wait_for_sigstop,
869 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
870 lwp_running, linux_set_resume_request, resume_status_pending_p,
871 need_step_over_p, start_step_over, linux_resume_one_thread,
872 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
873 reset_lwp_ptrace_options_callback): Update.
874 * linux-mips-low.c (update_watch_registers_callback): Update.
875 * regcache.c (regcache_invalidate_one, regcache_invalidate):
876 Update.
877 (free_register_cache_thread_one): Remove.
878 (regcache_release): Update.
879 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
880 handle_qxfer_threads_worker): Update.
881 (handle_query): Update, use list iterator.
882 (visit_actioned_threads, handle_pending_status,
883 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
884 clear_pending_status_callback, set_pending_status_callback,
885 find_status_pending_thread_callback, handle_status,
886 process_serial_event): Update.
887 * target.c (thread_search_callback): Update.
888 * thread-db.c (thread_db_get_tls_address): Update.
889 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
890 Update.
891 * win32-i386-low.c (update_debug_registers_callback): Update.
892 * win32-low.c (delete_thread_info, child_delete_thread,
893 continue_one_thread, suspend_one_thread,
894 get_child_debug_event): Adjust.
895
896 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
897
898 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
899 * inferiors.h: Include <list>.
900 (struct process_info) <entry>: Remove field.
901 <pid>: New field.
902 (pid_of): Change macro to function.
903 (ptid_of, lwpid_of): Remove macro.
904 (all_processes): Change type to std::list<process_info *>.
905 (ALL_PROCESSES): Remove macro.
906 (for_each_process, find_process): New function.
907 * inferiors.c (all_processes): Change type to
908 std::list<process_info *>.
909 (find_thread_process): Adjust.
910 (add_process): Likewise.
911 (remove_process): Likewise.
912 (find_process_pid): Likewise.
913 (get_first_process): Likewise.
914 (started_inferior_callback): Remove.
915 (have_started_inferiors_p): Adjust.
916 (attached_inferior_callback): Remove.
917 (have_attached_inferiors_p): Adjust.
918 * linux-low.c (check_zombie_leaders): Likewise.
919 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
920 (x86_linux_update_xmltarget): Adjust.
921 * server.c (handle_query): Likewise.
922 (gdb_reattached_process): Remove.
923 (handle_status): Adjust.
924 (kill_inferior_callback): Likewise.
925 (detach_or_kill_inferior): Remove.
926 (print_started_pid): Likewise.
927 (print_attached_pid): Likewise.
928 (detach_or_kill_for_exit): Update.
929 (process_serial_event): Likewise.
930 * linux-arm-low.c (arm_new_fork): Likewise.
931
932 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
933
934 * dll.h: Include <list>.
935 (struct dll_info): Add constructor.
936 <entry>: Remove field.
937 (all_dlls): Change type to std::list<dll_info>.
938 * dll.c: Include <algorithm>.
939 (get_dll): Remove macro.
940 (all_dlls): Change type to std::list<dll_info *>.
941 (free_one_dll): Remove.
942 (match_dll): Likewise.
943 (loaded_dll): Adjust.
944 (unloaded_dll): Adjust to all_dlls type change, use
945 std::find_if. Inline code from match_dll.
946 (clear_dlls): Adjust to all_dlls type change.
947 * server.c (emit_dll_description): Remove.
948 (handle_qxfer_libraries): Adjust to all_dlls type change,
949 integrate emit_dll_description's functionality.
950
951 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
952
953 * linux-low.h (struct linux_target_ops) <delete_process>: New
954 field.
955 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
956 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
957 (struct linux_target_ops): Add delete_process callback.
958 * linux-arm-low.c (arm_delete_process): New.
959 (struct linux_target_ops): Add delete_process callback.
960 * linux-bfin-low.c (struct linux_target_ops): Likewise.
961 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
962 * linux-m32r-low.c (struct linux_target_ops): Likewise.
963 * linux-mips-low.c (mips_linux_delete_process): New.
964 (struct linux_target_ops): Add delete_process callback.
965 * linux-ppc-low.c (struct linux_target_ops): Likewise.
966 * linux-s390-low.c (struct linux_target_ops): Likewise.
967 * linux-sh-low.c (struct linux_target_ops): Likewise.
968 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
969 * linux-tile-low.c (struct linux_target_ops): Likewise.
970 * linux-x86-low.c (x86_linux_delete_process): New.
971 (struct linux_target_ops): Add delete_process callback.
972 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
973
974 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
975
976 * linux-aarch64-low.c (the_low_target): Add thread delete
977 callback.
978 * linux-arm-low.c (arm_delete_thread): New function.
979 (the_low_target): Add thread delete callback.
980 * linux-bfin-low.c (the_low_target): Likewise.
981 * linux-crisv32-low.c (the_low_target): Likewise.
982 * linux-low.c (delete_lwp): Invoke delete_thread callback if
983 set.
984 * linux-low.h (struct linux_target_ops) <delete_thread>: New
985 field.
986 * linux-m32r-low.c (the_low_target): Add thread delete callback.
987 * linux-mips-low.c (mips_linux_delete_thread): New function.
988 (the_low_target): Add thread delete callback.
989 * linux-ppc-low.c (the_low_target): Likewise.
990 * linux-s390-low.c (the_low_target): Likewise.
991 * linux-sh-low.c (the_low_target): Likewise.
992 * linux-tic6x-low.c (the_low_target): Likewise.
993 * linux-tile-low.c (the_low_target): Likewise.
994 * linux-x86-low.c (the_low_target): Likewise.
995 * linux-xtensa-low.c (the_low_target): Likewise.
996
997 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
998
999 * win32-low.c: Include "common-inferior.h".
1000
1001 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1002
1003 * inferiors.c (set_inferior_cwd): New function.
1004 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1005 (handle_query): Inform that QSetWorkingDir is supported.
1006 * win32-low.c (create_process): Pass the inferior's cwd to
1007 CreateProcess.
1008
1009 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1010
1011 * inferiors.c (current_inferior_cwd): New global variable.
1012 (get_inferior_cwd): New function.
1013 * inferiors.h (struct process_info) <cwd>: New field.
1014
1015 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1016
1017 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1018 (OBS): Add gdb_tilde_expand.o.
1019
1020 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1021
1022 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1023 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1024
1025 2017-09-29 Pedro Alves <palves@redhat.com>
1026
1027 * ax.c (gdb_parse_agent_expr): Constify.
1028 * ax.h (gdb_parse_agent_expr): Constify.
1029 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1030 Constify.
1031 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1032 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1033 * remote-utils.h (read_ptid): Constify.
1034 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1035 (process_point_options, process_serial_event): Constify.
1036 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1037 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1038 (cmd_qtbuffer): Constify.
1039
1040 2017-09-29 Pedro Alves <palves@redhat.com>
1041
1042 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1043 fails.
1044
1045 2017-09-29 Pedro Alves <palves@redhat.com>
1046
1047 * linux-low.c (handle_extended_wait): Pass parent thread instead
1048 of process to thread_db_notice_clone.
1049 * linux-low.h (thread_db_notice_clone): Replace parent process
1050 parameter with parent thread parameter.
1051 * thread-db.c (find_one_thread): Add comment.
1052 (thread_db_notice_clone): Replace parent process parameter with
1053 parent thread parameter. Temporarily switch to the parent thread.
1054
1055 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1056
1057 * gdbthread.h: Include "common-gdbthread.h".
1058 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1059 "if" when validating the ptid.
1060 * remote-utils.c: Include "gdbthread.h".
1061 (prepare_resume_reply): Use "switch_to_thread".
1062 * target.c (done_accessing_memory): Likewise.
1063
1064 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1065
1066 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1067 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1068 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1069 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1070 s390x-gs-linux64-ipa.o to ipa_obj.
1071 * linux-s390-low.c (HWCAP_S390_GS): New define.
1072 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1073 New functions.
1074 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1075 (s390_arch_setup): Check for guarded-storage support and choose
1076 appropriate tdesc.
1077 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1078 init_registers_s390x_gs_linux64.
1079 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1080 enum value.
1081 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1082 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1083
1084 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1085
1086 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1087
1088 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1089
1090 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1091 (thread_db_thread_handle): Declare.
1092 * linux-low.c (linux_target_ops): Initialize thread_handle.
1093 * server.c (handle_qxfer_threads_worker): Add support for
1094 "handle" attribute.
1095 * target.h (struct target_ops): Add new function pointer,
1096 thread_handle.
1097 (target_thread_handle): Define.
1098 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1099 field in lwp.
1100 (thread_db_thread_handle): New function.
1101
1102 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1103
1104 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1105 * linux-low.h (thread_db_notice_clone): Declare.
1106 * thread-db.c (thread_db_notice_clone): New function.
1107
1108 2017-09-21 Pedro Alves <palves@redhat.com>
1109
1110 * server.c (gdb_read_memory, handle_status, process_serial_event)
1111 (handle_serial_event, handle_target_event): Adjust to
1112 set_desired_thread prototype change.
1113 * target.c (set_desired_thread): Remove 'use_general' parameter
1114 and adjust.
1115 * target.h (set_desired_thread): Remove 'use_general' parameter.
1116
1117 2017-09-20 Tom Tromey <tom@tromey.com>
1118
1119 * target.c (target_terminal::terminal_state): Define.
1120 (target_terminal::init): Rename from target_terminal_init.
1121 (target_terminal::inferior): Rename from
1122 target_terminal_inferior.
1123 (target_terminal::ours): Rename from target_terminal_ours.
1124 (target_terminal::ours_for_output, target_terminal::info): New.
1125
1126 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1127
1128 * server.c (accumulate_file_name_length): Remove.
1129 (emit_dll_description): Adjust to std::string change.
1130 (handle_qxfer_libraries): Use std::string to hold document.
1131
1132 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1133
1134 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1135 return type of xml_escape_text.
1136 * server.c (emit_dll_description): Likewise.
1137
1138 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1139
1140 * server.c (captured_main): Accept argument for --selftest.
1141 Update run_tests call.
1142 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1143 when registering selftests.
1144
1145 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1146
1147 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1148 instead of "VEC" for "target_desc.reg_defs".
1149 (regcache_cpy): Likewise.
1150 (registers_to_string): Likewise.
1151 (registers_from_string): Likewise.
1152 (find_regno): Likewise.
1153 (supply_regblock): Likewise.
1154 (regcache_raw_read_unsigned): Likewise.
1155 * tdesc.c (init_target_desc): Likewise.
1156 (tdesc_create_reg): Likewise.
1157 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1158 (struct target_desc) <reg_defs>: Convert to "std::vector".
1159 (target_desc): Do not initialize "reg_defs".
1160 (~target_desc): Update code to use "std::vector" instead of "VEC"
1161 for "target_desc.reg_defs".
1162 (operator==): Likewise.
1163
1164 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1165
1166 * inferiors.h (thread_to_gdb_id): Remove.
1167 * inferiors.c (thread_to_gdb_id): Remove.
1168 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1169 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1170 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1171 Likewise.
1172 * nto-low.c (nto_fetch_registers, nto_store_registers,
1173 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1174
1175 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1176
1177 * inferiors.h (gdb_id_to_thread_id): Remove.
1178 * inferiors.c (gdb_id_to_thread_id): Remove.
1179 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1180 removal. Move pid declaration closer to where it's used.
1181
1182 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1183
1184 * server.c (handle_detach): New function.
1185 (process_serial_event): Move code out, call handle_detach.
1186
1187 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1188
1189 * server.c (require_running): Rename to ...
1190 (require_running_or_return): ... this ...
1191 (require_running_or_break): ... and this.
1192 (handle_query, process_serial_event): Adjust.
1193
1194 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1195
1196 * linux-low.c (linux_set_resume_request): Remove unused
1197 variables.
1198
1199 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1200
1201 * server.c (first_thread_of): Remove.
1202 (process_serial_event): Replace usage of first_thread_of with
1203 find_any_thread_of_pid.
1204 * tracepoint.c (same_process_p): Remove.
1205 (gdb_agent_about_to_close): Replace usage of same_process_p with
1206 find_any_thread_of_pid.
1207 * linux-x86-low.c (same_process_callback): Remove.
1208 (x86_arch_setup_process_callback): Replace usage of
1209 same_process_callback with find_any_thread_of_pid.
1210 * thread-db.c (any_thread_of): Remove.
1211 (switch_to_process): Replace usage of any_thread_of with
1212 find_any_thread_of_pid.
1213 * inferiors.c (thread_pid_matches_callback): Remove.
1214 (find_thread_process): Adjust to use find_any_thread_of_pid.
1215
1216 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1217
1218 * regcache.c (get_thread_regcache): Guard calls to "memset"
1219 with "!VEC_empty".
1220
1221 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1222
1223 * linux-low.c (handle_extended_wait): Use
1224 "allocate_target_description" instead of "XNEW".
1225 * linux-x86-low.c (initialize_low_arch): Likewise.
1226
1227 2017-09-05 Yao Qi <yao.qi@linaro.org>
1228
1229 * configure.srv (srv_i386_regobj): Remove.
1230 (srv_amd64_regobj): Remove.
1231 (srv_regobj): Set it to "" for x86 non-linux targets.
1232 * linux-x86-tdesc.c (i386_linux_read_description):
1233 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1234 (init_registers_i386): Remove the declaration.
1235 (tdesc_i386): Remove the declaration.
1236 (lynx_i386_arch_setup): Call i386_create_target_description.
1237 * nto-x86-low.c: Likewise.
1238 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1239 [!__x86_64__]: include arch/i386.h.
1240 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1241
1242 2017-09-05 Yao Qi <yao.qi@linaro.org>
1243
1244 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1245 i386/amd64-XXX-linux from it.
1246
1247 2017-09-05 Yao Qi <yao.qi@linaro.org>
1248
1249 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1250 false.
1251 (ipa_amd64_linux_regobj): Remove.
1252 (ipa_x32_linux_regobj): Remove.
1253
1254 2017-09-05 Yao Qi <yao.qi@linaro.org>
1255
1256 * Makefile.in (arch-amd64.o): New rule.
1257 * configure.srv: Append arch-amd64.o.
1258 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1259 (get_ipa_tdesc): Call amd64_linux_read_description.
1260 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1261 and init_registers_amd64_XXX.
1262 * linux-x86-low.c (x86_linux_read_description): Call
1263 amd64_linux_read_description.
1264 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1265 (initialize_low_arch): Don't call init_registers_x32_XXX and
1266 init_registers_amd64_XXX.
1267 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1268 and tdesc_amd64_XXX.
1269 [__x86_64__] (amd64_tdesc_test): New function.
1270 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1271 and init_registers_amd64_XXX.
1272 * linux-x86-tdesc.c: Include arch/amd64.h.
1273 (xcr0_to_tdesc_idx): New function.
1274 (i386_linux_read_description): New function.
1275 (amd64_get_ipa_tdesc_idx): New function.
1276 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1277 (amd64_get_ipa_tdesc): Declare.
1278
1279 2017-09-05 Yao Qi <yao.qi@linaro.org>
1280
1281 * configure.srv (srv_i386_linux_xmlfiles): Remove
1282 i386/i386-XXX-linux.xml from it.
1283
1284 2017-09-05 Yao Qi <yao.qi@linaro.org>
1285
1286 * configure.srv: Set srv_i386_linux_regobj empty if $development
1287 is false.
1288 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1289 initialize_low_tdesc.
1290 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1291 with #if initialize_low_tdesc.
1292 * linux-x86-tdesc-selftest.c: New file.
1293 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1294
1295 2017-09-05 Yao Qi <yao.qi@linaro.org>
1296
1297 * Makefile.in (arch-i386.o): New rule.
1298 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1299 (x86_64-*-linux*): Likewise.
1300 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1301 include arch/i386.h.
1302 (i386_linux_read_description): Remove code and call
1303 i386_create_target_description.
1304 * tdesc.c (allocate_target_description): New function.
1305 * tdesc.h (set_tdesc_architecture): Remove declaration.
1306 (set_tdesc_osabi): Likewise.
1307
1308 2017-09-05 Yao Qi <yao.qi@linaro.org>
1309
1310 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1311 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1312 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1313 .xmltarget.
1314 * server.c (get_features_xml): Call tdesc_get_features_xml.
1315 * tdesc.c (set_tdesc_architecture): New function.
1316 (set_tdesc_osabi): New function.
1317 (tdesc_get_features_xml): New function.
1318 (tdesc_create_feature): Add an argument.
1319 * tdesc.h (struct target_desc) <features>: New field.
1320 <arch, osabi>: New field.
1321 (~target_desc): xfree features, arch, and osabi.
1322 (target_desc::oerator==): Don't compare .xmltarget.
1323 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1324 (set_tdesc_osabi): Likewise.
1325 (tdesc_get_features_xml): Likewise.
1326
1327 2017-09-05 Yao Qi <yao.qi@linaro.org>
1328
1329 * linux-x86-tdesc.c: Include selftest.h.
1330 (i386_tdesc_test): New function.
1331 (initialize_low_tdesc): Call selftests::register_test.
1332 * tdesc.h: Include regdef.h.
1333 (target_desc): Override operator == and !=.
1334
1335 2017-09-05 Yao Qi <yao.qi@linaro.org>
1336
1337 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1338 (ipa_obj): Likewise.
1339 * linux-i386-ipa.c: Include common/x86-xstate.h
1340 (get_ipa_tdesc): Call i386_linux_read_description.
1341 (initialize_low_tracepoint): Don't call init_registers_XXX
1342 functions, call initialize_low_tdesc instead.
1343 * linux-x86-low.c (x86_linux_read_description): Call
1344 i386_linux_read_description.
1345 (initialize_low_arch): Don't call init_registers_i386_XXX
1346 functions, call initialize_low_tdesc.
1347 * linux-x86-tdesc.c: New file.
1348 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1349 (i386_get_ipa_tdesc_idx): Declare.
1350 (i386_get_ipa_tdesc): Declare.
1351 (initialize_low_tdesc): Declare.
1352
1353 2017-09-05 Yao Qi <yao.qi@linaro.org>
1354
1355 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1356 instead of 0.
1357
1358 2017-09-05 Yao Qi <yao.qi@linaro.org>
1359
1360 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1361 * regcache.c (get_thread_regcache): Use VEC_length.
1362 (init_register_cache): Likewise.
1363 (regcache_cpy): Likewise.
1364 (registers_to_string): Iterate reg_defs via VEC_iterate.
1365 (find_regno): Likewise.
1366 (find_register_by_number): Use VEC_index.
1367 (register_size): Call find_register_by_number.
1368 (register_data): Call find_register_by_number.
1369 (supply_regblock): Use VEC_length.
1370 (regcache_raw_read_unsigned): Likewise.
1371 * tdesc.c (init_target_desc): Iterate reg_defs via
1372 VEC_iterate.
1373 (default_description): Update initializer.
1374 (copy_target_description): Don't update field num_registers.
1375 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1376 <num_registers>: Remove.
1377
1378 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1379
1380 * Makefile.in (.SECONDARY): Define target.
1381
1382 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1383
1384 * linux-low.c (linux_wait_1): Adjust.
1385 * server.c (queue_stop_reply_callback): Adjust.
1386
1387 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1388
1389 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1390 QEnvironmentUnset and QEnvironmentReset packets.
1391 (handle_query): Inform remote that QEnvironmentHexEncoded,
1392 QEnvironmentUnset and QEnvironmentReset are supported.
1393
1394 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1395
1396 * inferiors.h (inferior_target_data): Rename to ...
1397 (thread_target_data): ... this.
1398 (inferior_regcache_data): Rename to ...
1399 (thread_regcache_data): ... this.
1400 (set_inferior_regcache_data): Rename to ...
1401 (set_thread_regcache_data): ... this.
1402 * inferiors.c (inferior_target_data): Rename to ...
1403 (thread_target_data): ... this.
1404 (inferior_regcache_data): Rename to ...
1405 (thread_regcache_data): ... this.
1406 (set_inferior_regcache_data): Rename to ...
1407 (set_thread_regcache_data): ... this.
1408 (free_one_thread): Update.
1409 * linux-low.h (get_thread_lwp): Update.
1410 * regcache.c (get_thread_regcache): Update.
1411 (regcache_invalidate_thread): Update.
1412 (free_register_cache_thread): Update.
1413 * win32-i386-low.c (update_debug_registers_callback): Update.
1414 (win32_get_current_dr): Update.
1415 * win32-low.c (thread_rec): Update.
1416 (delete_thread_info): Update.
1417 (continue_one_thread): Update.
1418 (suspend_one_thread): Update.
1419
1420 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1421
1422 * inferiors.c (set_inferior_target_data): Remove.
1423 * inferiors.h (set_inferior_target_data): Remove.
1424
1425 2017-08-18 Yao Qi <yao.qi@linaro.org>
1426
1427 * Makefile.in (OBS): Add selftest.o.
1428 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1429 * configure, config.in: Re-generated.
1430 * server.c: Include common/sefltest.h.
1431 (captured_main): Handle option --selftest.
1432
1433 2017-08-09 Yao Qi <yao.qi@linaro.org>
1434
1435 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1436 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1437 i386-avx-mpx.o and i386-mmx.o.
1438 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1439 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1440 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1441 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1442 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1443 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1444 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1445 i386/amd64-avx-mpx.xml.
1446
1447 2017-08-09 Yao Qi <yao.qi@linaro.org>
1448
1449 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1450 and x32-avx-avx512.o.
1451 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1452 i386/x32-avx-avx512.xml.
1453
1454 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1455
1456 * tracepoint.h (enum class fast_tpoint_collect_result): New
1457 enumeration.
1458 (fast_tracepoint_collecting): Change return type to
1459 fast_tpoint_collect_result.
1460 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1461 * linux-low.h: Include tracepoint.h.
1462 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1463 fast_tpoint_collect_result.
1464 * linux-low.c (handle_tracepoints): Adjust.
1465 (linux_fast_tracepoint_collecting): Change return type to
1466 fast_tpoint_collect_result.
1467 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1468 linux_wait_1, stuck_in_jump_pad_callback,
1469 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1470 proceed_one_lwp): Adjust to type change.
1471
1472 2017-07-10 Yao Qi <yao.qi@linaro.org>
1473
1474 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1475
1476 2017-06-29 Yao Qi <yao.qi@linaro.org>
1477
1478 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1479 Remove.
1480 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1481
1482 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1483
1484 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1485
1486 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1487
1488 * linux-low.c (linux_create_inferior): Adjust code to access the
1489 environment information via 'gdb_environ' class.
1490 * lynx-low.c (lynx_create_inferior): Likewise.
1491 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1492 (get_environ): Return a pointer to 'our_environ'.
1493 (captured_main): Initialize 'our_environ'.
1494 * server.h (get_environ): Adjust prototype.
1495 * spu-low.c (spu_create_inferior): Adjust code to access the
1496 environment information via 'gdb_environ' class.
1497
1498 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1499
1500 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1501 usage of "register" keyword.
1502
1503 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1504
1505 * configure: Re-generate.
1506
1507 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1508
1509 * configure: Re-generate.
1510
1511 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1512
1513 * Makefile.in (COMPILE.pre): Add "-x c++".
1514
1515 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1516
1517 * fork-child.c: Conditionally include <signal.h>.
1518
1519 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1520
1521 * server.c (handle_general_set): Handle new packet
1522 "QStartupWithShell".
1523 (handle_query): Add "QStartupWithShell" to the list of supported
1524 packets.
1525 (gdbserver_usage): Add help text explaining the
1526 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1527 options.
1528 (captured_main): Recognize and act upon the presence of the new
1529 CLI options.
1530
1531 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1532 Pedro Alves <palves@redhat.com>
1533
1534 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1535 * configure: Regenerate.
1536 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1537 "fork-inferior.o".
1538 (i[34567]86-*-lynxos*): Likewise.
1539 (spu*-*-*): Likewise.
1540 * fork-child.c: New file.
1541 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1542 and "environ.h".
1543 (linux_ptrace_fun): New function.
1544 (linux_create_inferior): Adjust function prototype to reflect
1545 change on "target.h". Adjust function code to use
1546 "fork_inferior".
1547 (linux_request_interrupt): Delete "signal_pid".
1548 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1549 (lynx_ptrace_fun): New function.
1550 (lynx_create_inferior): Adjust function prototype to reflect
1551 change on "target.h". Adjust function code to use
1552 "fork_inferior".
1553 * nto-low.c (nto_create_inferior): Adjust function prototype and
1554 code to reflect change on "target.h". Update comments.
1555 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1556 "common-terminal.h" and "environ.h".
1557 (terminal_fd): Moved to fork-child.c.
1558 (old_foreground_pgrp): Likewise.
1559 (restore_old_foreground_pgrp): Likewise.
1560 (last_status): Make it global.
1561 (last_ptid): Likewise.
1562 (our_environ): New variable.
1563 (startup_with_shell): Likewise.
1564 (program_name): Likewise.
1565 (program_argv): Rename to...
1566 (program_args): ...this.
1567 (wrapper_argv): New variable.
1568 (start_inferior): Delete function.
1569 (get_exec_wrapper): New function.
1570 (get_exec_file): Likewise.
1571 (get_environ): Likewise.
1572 (prefork_hook): Likewise.
1573 (post_fork_inferior): Likewise.
1574 (postfork_hook): Likewise.
1575 (postfork_child_hook): Likewise.
1576 (handle_v_run): Update code to deal with arguments coming from the
1577 remote host. Update calls from "start_inferior" to
1578 "create_inferior".
1579 (captured_main): Likewise. Initialize environment variable. Call
1580 "have_job_control".
1581 * server.h (post_fork_inferior): New prototype.
1582 (get_environ): Likewise.
1583 (last_status): Declare.
1584 (last_ptid): Likewise.
1585 (signal_pid): Likewise.
1586 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1587 (spu_ptrace_fun): New function.
1588 (spu_create_inferior): Adjust function prototype to reflect change
1589 on "target.h". Adjust function code to use "fork_inferior".
1590 * target.c (target_terminal_init): New function.
1591 (target_terminal_inferior): Likewise.
1592 (target_terminal_ours): Likewise.
1593 * target.h: Include <vector>.
1594 (struct target_ops) <create_inferior>: Update prototype.
1595 (create_inferior): Update macro.
1596 * utils.c (gdb_flush_out_err): New function.
1597 * win32-low.c (win32_create_inferior): Adjust function prototype
1598 and code to reflect change on "target.h".
1599
1600 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1601
1602 * inferiors.c (switch_to_thread): New function.
1603
1604 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1605
1606 * Makefile.in (SFILE): Add "common/job-control.c".
1607 (OBS): Add "job-control.o".
1608
1609 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1610
1611 * Makefile: Remove "@host_makefile_frag@".
1612
1613 2017-05-05 Pedro Alves <palves@redhat.com>
1614
1615 * configure: Regenerate.
1616
1617 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1618
1619 * configure: Regenerate.
1620
1621 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1622
1623 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1624 software_single_step change of return type to
1625 std::vector<CORE_ADDR>.
1626 * linux-low.c (install_software_single_step_breakpoints):
1627 Likewise.
1628 * linux-low.h (install_software_single_step_breakpoints):
1629 Likewise.
1630
1631 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1632
1633 * remote-utils.c: Include "gdb_termios.h" instead of
1634 "terminal.h".
1635 * terminal.h: Delete file.
1636
1637 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1638
1639 * server.c: Include <vector>.
1640 <program_argv, wrapper_argv>: Convert to std::vector.
1641 (start_inferior): Rewrite function to use C++.
1642 (handle_v_run): Likewise. Update code that calculates the argv
1643 based on the vRun packet; use C++.
1644 (captured_main): Likewise.
1645
1646 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1647
1648 * server.c (handle_v_cont): Initialize thread_resume::thread
1649 with null_ptid.
1650
1651 2017-04-05 Pedro Alves <palves@redhat.com>
1652
1653 * configure: Regenerate.
1654
1655 2017-04-05 Pedro Alves <palves@redhat.com>
1656
1657 * gdbreplay.c (sync_error): Constify.
1658 * linux-x86-low.c (push_opcode): Constify.
1659
1660 2017-04-05 Pedro Alves <palves@redhat.com>
1661
1662 * win32-low.c (get_child_debug_event)
1663 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1664 Report TARGET_WAITKIND_SPURIOUS instead.
1665
1666 2017-04-05 Pedro Alves <palves@redhat.com>
1667
1668 * remote-utils.c (remote_prepare, remote_open): Constify.
1669 * remote-utils.h (remote_prepare, remote_open): Constify.
1670 * server.c (captured_main): Constify 'port' handling.
1671
1672 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1673
1674 * Makefile.in (clean): Clear .deps.
1675
1676 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1677
1678 * .gitignore: Remove generated files, replace with wildcard.
1679 * (clean): Replace removal of generated files with wildcard.
1680 (version.c): Replace with...
1681 (version-generated.c): ...this.
1682 (xml-builtin.c): Replace with...
1683 (xml-builtin-generated.c): ...this.
1684 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1685 (%.c: *regformats*): Replace with...
1686 (%-generated.c: *regformats*): ...this.
1687
1688 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1689
1690 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1691 (xtensa_fill_gregset): Call collect_register_by_name for
1692 threadptr register.
1693 (xtensa_store_gregset): Call supply_register_by_name for
1694 threadptr register.
1695
1696 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1697
1698 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1699 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1700 (xtensa_store_gregset): Call supply_register for all registers in
1701 a0_regnum..a0_regnum + C0_NREGS range.
1702
1703 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1704
1705 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1706 (ax-ipa.o: ax.c): Remove.
1707 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1708 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1709 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1710 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1711 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1712
1713 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1714
1715 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1716 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1717 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1718 (errors-ipa.o: ../common/errors.c): Remove.
1719 (format-ipa.o: ../common/format.c): Remove.
1720 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1721
1722 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1723
1724 * Makefile.in (%-ipa.o: %.c): New rule.
1725 (tracepoint-ipa.o: tracepoint.c): Remove.
1726 (utils-ipa.o: utils.c): Remove.
1727 (remote-utils-ipa.o: remote-utils.c): Remove.
1728 (regcache-ipa.o: regcache.c): Remove.
1729 (i386-linux-ipa.o: i386-linux.c): Remove.
1730 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1731 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1732 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1733 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1734 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1735 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1736 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1737 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1738 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1739 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1740 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1741 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1742 (aarch64-ipa.o: aarch64.c): Remove.
1743 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1744 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1745 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1746 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1747 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1748 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1749 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1750 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1751 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1752 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1753 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1754 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1755 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1756 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1757 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1758 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1759 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1760 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1761 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1762 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1763 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1764 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1765 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1766 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1767 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1768 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1769 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1770 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1771 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1772 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1773 (tdesc-ipa.o: tdesc.c): Remove.
1774 (x32-linux-ipa.o: x32-linux.c): Remove.
1775 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1776 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1777
1778 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1779
1780 * Makefile.in (%.o: ../arch/%.c): New rule.
1781 (arm.o: ../arch/arm.c): Remove.
1782 (arm-linux.o: ../arch/arm-linux.c): Remove.
1783 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1784 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1785
1786 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1787
1788 * Makefile.in (%.o: ../nat/%.c): New rule.
1789 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1790 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1791 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1792 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1793 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1794 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1795 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1796 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1797 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1798 (linux-personality.o: ../nat/linux-personality.c): Remove.
1799 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1800 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1801 (x86-linux.o: ../nat/x86-linux.c): Remove.
1802 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1803 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1804
1805 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1806
1807 * Makefile.in (%.o: ../common/%.c): New rule.
1808 (signals.o: ../common/signals.c): Remove.
1809 (print-utils.o: ../common/print-utils.c): Remove.
1810 (rsp-low.o: ../common/rsp-low.c): Remove.
1811 (common-utils.o: ../common/common-utils.c): Remove.
1812 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1813 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1814 (vec.o: ../common/vec.c): Remove.
1815 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1816 (xml-utils.o: ../common/xml-utils.c): Remove.
1817 (ptid.o: ../common/ptid.c): Remove.
1818 (buffer.o: ../common/buffer.c): Remove.
1819 (format.o: ../common/format.c): Remove.
1820 (filestuff.o: ../common/filestuff.c): Remove.
1821 (agent.o: ../common/agent.c): Remove.
1822 (errors.o: ../common/errors.c): Remove.
1823 (environ.o: ../common/environ.c): Remove.
1824 (common-debug.o: ../common/common-debug.c): Remove.
1825 (cleanups.o: ../common/cleanups.c): Remove.
1826 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1827 (fileio.o: ../common/fileio.c): Remove.
1828 (common-regcache.o: ../common/common-regcache.c): Remove.
1829 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1830 (new-op.o: ../common/new-op.c): Remove.
1831 (btrace-common.o: ../common/btrace-common.c): Remove.
1832
1833 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1834
1835 * Makefile.in (%.o: ../target/%.c): New rule.
1836 (waitstatus.o: ../target/waitstatus.c): Remove.
1837
1838 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1839
1840 * Makefile.in
1841 (%.c: ../regformats/%.dat,
1842 (%.c: ../regformats/arm/%.dat,
1843 (%.c: ../regformats/i386/%.dat,
1844 (%.c: ../regformats/rs6000/%.dat): New rules.
1845 (aarch64.c): Remove.
1846 (reg-arm.c): Remove.
1847 (arm-with-iwmmxt.c): Remove.
1848 (arm-with-vfpv2.c): Remove.
1849 (arm-with-vfpv3.c): Remove.
1850 (arm-with-neon.c): Remove.
1851 (reg-bfin.c): Remove.
1852 (reg-cris.c): Remove.
1853 (reg-crisv32.c): Remove.
1854 (i386.c): Remove.
1855 (i386-linux.c): Remove.
1856 (i386-avx.c): Remove.
1857 (i386-avx-linux.c): Remove.
1858 (i386-avx-avx512.c): Remove.
1859 (i386-avx-avx512-linux.c): Remove.
1860 (i386-mpx.c): Remove.
1861 (i386-mpx-linux.c): Remove.
1862 (i386-avx-mpx-avx512-pku.c): Remove.
1863 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1864 (i386-avx-mpx.c): Remove.
1865 (i386-avx-mpx-linux.c): Remove.
1866 (i386-mmx.c): Remove.
1867 (i386-mmx-linux.c): Remove.
1868 (reg-ia64.c): Remove.
1869 (reg-m32r.c): Remove.
1870 (reg-m68k.c): Remove.
1871 (reg-cf.c): Remove.
1872 (mips-linux.c): Remove.
1873 (mips-dsp-linux.c): Remove.
1874 (mips64-linux.c): Remove.
1875 (mips64-dsp-linux.c): Remove.
1876 (nios2-linux.c): Remove.
1877 (powerpc-32.c): Remove.
1878 (powerpc-32l.c): Remove.
1879 (powerpc-altivec32l.c): Remove.
1880 (powerpc-cell32l.c): Remove.
1881 (powerpc-vsx32l.c): Remove.
1882 (powerpc-isa205-32l.c): Remove.
1883 (powerpc-isa205-altivec32l.c): Remove.
1884 (powerpc-isa205-vsx32l.c): Remove.
1885 (powerpc-e500l.c): Remove.
1886 (powerpc-64l.c): Remove.
1887 (powerpc-altivec64l.c): Remove.
1888 (powerpc-cell64l.c): Remove.
1889 (powerpc-vsx64l.c): Remove.
1890 (powerpc-isa205-64l.c): Remove.
1891 (powerpc-isa205-altivec64l.c): Remove.
1892 (powerpc-isa205-vsx64l.c): Remove.
1893 (s390-linux32.c): Remove.
1894 (s390-linux32v1.c): Remove.
1895 (s390-linux32v2.c): Remove.
1896 (s390-linux64.c): Remove.
1897 (s390-linux64v1.c): Remove.
1898 (s390-linux64v2.c): Remove.
1899 (s390-te-linux64.c): Remove.
1900 (s390-vx-linux64.c): Remove.
1901 (s390-tevx-linux64.c): Remove.
1902 (s390x-linux64.c): Remove.
1903 (s390x-linux64v1.c): Remove.
1904 (s390x-linux64v2.c): Remove.
1905 (s390x-te-linux64.c): Remove.
1906 (s390x-vx-linux64.c): Remove.
1907 (s390x-tevx-linux64.c): Remove.
1908 (tic6x-c64xp-linux.c): Remove.
1909 (tic6x-c64x-linux.c): Remove.
1910 (tic6x-c62x-linux.c): Remove.
1911 (reg-sh.c): Remove.
1912 (reg-sparc64.c): Remove.
1913 (reg-spu.c): Remove.
1914 (amd64.c): Remove.
1915 (amd64-linux.c): Remove.
1916 (amd64-avx.c): Remove.
1917 (amd64-avx-linux.c): Remove.
1918 (amd64-avx-avx512.c): Remove.
1919 (amd64-avx-avx512-linux.c): Remove.
1920 (amd64-mpx.c): Remove.
1921 (amd64-mpx-linux.c): Remove.
1922 (amd64-avx-mpx-avx512-pku.c): Remove.
1923 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1924 (amd64-avx-mpx.c): Remove.
1925 (amd64-avx-mpx-linux.c): Remove.
1926 (x32.c): Remove.
1927 (x32-linux.c): Remove.
1928 (x32-avx.c): Remove.
1929 (x32-avx-linux.c): Remove.
1930 (x32-avx-avx512.c): Remove.
1931 (x32-avx-avx512-linux.c): Remove.
1932 (reg-xtensa.c): Remove.
1933 (reg-tilegx.c): Remove.
1934 (reg-tilegx32.c): Remove.
1935
1936 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1937
1938 * Makefile.in (SFILES): Add "common/environ.c".
1939 (OBJS): Add "common/environ.h".
1940
1941 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1942
1943 * configure.ac: Check if the fs_base and gs_base members of
1944 `struct user_regs_struct' exist.
1945 * config.in: Regenerated.
1946 * configure: Likewise.
1947
1948 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1949
1950 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1951 target_read_memory.
1952 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1953 (get_next_pcs_syscall_next_pc): Likewise.
1954
1955 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1956
1957 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1958 * nto-x86-low.c: Likewise.
1959
1960 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1961
1962 * Makefile.in: Include disable-implicit-rules.mk.
1963
1964 2016-11-23 Pedro Alves <palves@redhat.com>
1965
1966 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1967 (debug_vprintf): Use std::chrono::steady_clock instead of
1968 gettimeofday. Use '.' instead of ':'.
1969 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1970 (get_timestamp): Use std::chrono::steady_clock instead of
1971 gettimeofday.
1972
1973 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1974
1975 * Makefile.in: Fix whitespace formatting.
1976
1977 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1978
1979 * Makefile.in (SFILES, OBS): Flatten list and order
1980 alphabetically.
1981
1982 2016-11-23 Pedro Alves <palves@redhat.com>
1983
1984 * event-loop.c (handle_file_event): Use warning.
1985 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1986 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1987 Use warning.
1988
1989 2016-11-23 Pedro Alves <palves@redhat.com>
1990
1991 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1992 output.
1993 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1994 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1995 debug_printf and debug_flush for debug output.
1996 * server.c (handle_general_set): Likewise.
1997 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1998 output.
1999
2000 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2001
2002 * Makefile.in (.c.o): Replace rule with ...
2003 (%.o: %.c): ... this one.
2004
2005 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2006
2007 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2008 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2009 make.
2010 * configure.ac: Remove checks for the make program.
2011 * configure: Re-generate.
2012
2013 2016-10-28 Pedro Alves <palves@redhat.com>
2014
2015 * Makefile.in (CXX_DIALECT): Get from configure.
2016 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2017 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2018 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2019 * config.in: Regenerate.
2020 * configure: Regenerate.
2021
2022 2016-10-27 Yao Qi <yao.qi@linaro.org>
2023
2024 * linux-low.c (linux_supports_range_stepping): Return true if
2025 can_software_single_step return true.
2026
2027 2016-10-27 Yao Qi <yao.qi@linaro.org>
2028
2029 * inferiors.c (find_inferior_in_random): New function.
2030 * inferiors.h (find_inferior_in_random): Declare.
2031 * linux-low.c (linux_wait_for_event_filtered): Call
2032 find_inferior_in_random instead of find_inferior.
2033
2034 2016-10-27 Yao Qi <yao.qi@linaro.org>
2035
2036 * linux-low.c (linux_wait_1): If single-step breakpoints are
2037 inserted, remove them.
2038
2039 2016-10-26 Pedro Alves <palves@redhat.com>
2040
2041 * linux-low.c (handle_extended_wait): Link parent/child fork
2042 threads.
2043 (linux_wait_1): Unlink them.
2044 (linux_set_resume_request): Ignore resume requests for
2045 already-resumed and unhandled fork child threads.
2046 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2047 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2048 New functions.
2049 (handle_v_requests) <vCont>: Don't call require_running.
2050 * server.h (in_queued_stop_replies): New declaration.
2051
2052 2016-10-24 Yao Qi <yao.qi@linaro.org>
2053
2054 PR server/20733
2055 * linux-aarch64-low.c (append_insns): Cast the return value to
2056 'uint32_t *'.
2057
2058 2016-10-10 Yao Qi <yao.qi@linaro.org>
2059
2060 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2061
2062 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2063
2064 * target.c (target_supports_multi_process): New function, moved
2065 from...
2066 * target.h (target_supports_multi_process): ... here. Remove
2067 macro.
2068
2069 2016-10-05 Tom Tromey <tom@tromey.com>
2070
2071 PR remote/20655:
2072 * tracepoint.c (handle_tracepoint_bkpts): Check
2073 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2074
2075 2016-10-05 Yao Qi <yao.qi@linaro.org>
2076
2077 * configure.srv: Update the path of arm-*.xml files.
2078
2079 2016-10-05 Terry Guo <terry.guo@arm.com>
2080 Yao Qi <yao.qi@linaro.org>
2081
2082 * Makefile.in: Adjust the path of rules.
2083 * configure.srv: Update the path of xml files.
2084 * regformats/arm-with-iwmmxt.dat: Regenerated.
2085 * regformats/arm-with-neon.dat: Likewise.
2086 * regformats/arm-with-vfpv2.dat: Likewise.
2087 * regformats/arm-with-vfpv3.dat Likewise.
2088
2089 2016-09-30 Yao Qi <yao.qi@linaro.org>
2090
2091 PR gdbserver/20627
2092 * target.c (target_stop_and_wait): Don't call
2093 target_continue_no_signal, use resume_stop instead.
2094
2095 2016-09-26 Yao Qi <yao.qi@linaro.org>
2096
2097 * linux-low.c (linux_wait_1): Call debug_exit.
2098
2099 2016-09-23 Pedro Alves <palves@redhat.com>
2100
2101 * Makefile.in (SFILES): Add common/new-op.c.
2102 (OBS): Add common/new-op.o.
2103 (new-op.o): New rule.
2104
2105 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2106
2107 * .gitinore: Ignore more files.
2108
2109 2016-09-21 Yao Qi <yao.qi@linaro.org>
2110
2111 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2112 23.
2113
2114 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2115
2116 * server.c (start_inferior): Call target_mourn_inferior instead of
2117 mourn_inferior; pass ptid_t argument to it.
2118 (resume): Likewise.
2119 (handle_target_event): Likewise.
2120 * target.c (target_mourn_inferior): New function.
2121 * target.h (mourn_inferior): Delete macro.
2122
2123 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2124
2125 * linux-low.c (lwp_is_stepping): New function.
2126
2127 2016-09-06 Carl Love <cel@us.ibm.com>
2128
2129 * server.c (start_inferior): Fixed comment, requested comment change
2130 didn't get updated correctly. Removed reference to ptrace () call as
2131 it is only true on Linux systems.
2132
2133 2016-09-06 Carl Love <cel@us.ibm.com>
2134
2135 * server.c (start_inferior): Do not call
2136 function target_post_create_inferior () if the
2137 inferior process has already exited.
2138
2139 2016-09-05 Pedro Alves <palves@redhat.com>
2140
2141 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2142 (COMPILE.pre, CC_LD): Use CXX directly.
2143 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2144 * acinclude.m4: Don't include build-with-cxx.m4.
2145 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2146 * configure: Regenerate.
2147
2148 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2149
2150 PR gdb/19495
2151 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2152 call writing data to own_buf.
2153
2154 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2155
2156 * target.c (mywait): Call target_wait instead of
2157 the_target->wait.
2158 (target_wait): New function.
2159
2160 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2161
2162 * server.c (start_inferior): New variable 'ptid'. Replace calls
2163 to the_target->resume by target_continue{,_no_signal}, depending
2164 on the case.
2165 * target.c (target_stop_and_wait): Call target_continue_no_signal
2166 instead of the_target->resume.
2167 (target_continue): New function.
2168
2169 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2170
2171 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2172
2173 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2174
2175 PR server/20491
2176 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2177 ps_prochandle.
2178 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2179 * linux-arm-low.c (ps_get_thread_area): Likewise.
2180 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2181 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2182 * linux-mips-low.c (ps_get_thread_area): Likewise.
2183 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2184 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2185 * linux-x86-low.c (ps_get_thread_area): Likewise.
2186 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2187
2188 2016-08-19 Pedro Alves <palves@redhat.com>
2189
2190 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2191
2192 2016-08-19 Pedro Alves <palves@redhat.com>
2193
2194 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2195 comment. Use memcpy instead of casting through unsigned long.
2196
2197 2016-08-19 Pedro Alves <palves@redhat.com>
2198
2199 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2200 allocating around 0x80000000.
2201
2202 2016-08-19 Pedro Alves <palves@redhat.com>
2203
2204 PR gdb/20415
2205 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2206 (x32-avx512-linux-ipa.o): New rules.
2207 * configure.ac (x86_64-*-linux*): New x32 check.
2208 * configure.srv (ipa_x32_linux_regobj): New.
2209 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2210 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2211 descriptions.
2212 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2213 descriptions.
2214 * configure: Regenerate.
2215
2216 2016-08-09 Pedro Alves <palves@redhat.com>
2217
2218 PR gdb/18653
2219 * Makefile.in (OBS): Add signals-state-save-restore.o.
2220 (signals-state-save-restore.o): New rule.
2221 * config.in: Regenerate.
2222 * configure: Regenerate.
2223 * linux-low.c: Include "signals-state-save-restore.h".
2224 (linux_create_inferior): Call
2225 restore_original_signals_state.
2226 * server.c: Include "dispositions-save-restore.h".
2227 (captured_main): Call save_original_signals_state.
2228
2229 2016-08-05 Pedro Alves <palves@redhat.com>
2230
2231 * configure: Regenerate.
2232
2233 2016-08-04 Yao Qi <yao.qi@linaro.org>
2234
2235 * linux-low.c (regsets_fetch_inferior_registers): Check
2236 errno is ESRCH or not.
2237
2238 2016-08-02 Yao Qi <yao.qi@linaro.org>
2239
2240 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2241 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2242 (thread_db_load_search): Update.
2243 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2244 td_ta_set_event and td_ta_event_getmsg.
2245
2246 2016-07-26 Pedro Alves <palves@redhat.com>
2247
2248 PR server/20414
2249 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2250 of unsigned long for 64-bit registers and use uint32_t instead of
2251 unsigned int for 32-bit registers.
2252
2253 2016-07-26 Pedro Alves <palves@redhat.com>
2254
2255 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2256 to 'ptrace'.
2257
2258 2016-07-21 Tom Tromey <tom@tromey.com>
2259
2260 * configure: Rebuild.
2261
2262 2016-07-21 Yao Qi <yao.qi@linaro.org>
2263
2264 * mem-break.c (find_gdb_breakpoint): Cast bp to
2265 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2266
2267 2016-07-21 Yao Qi <yao.qi@linaro.org>
2268
2269 * server.c (handle_v_requests): Support s and S actions
2270 if target_supports_software_single_step return true.
2271
2272 2016-07-21 Yao Qi <yao.qi@linaro.org>
2273
2274 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2275 is resume_step, call maybe_hw_step.
2276 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2277 and unstop them.
2278 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2279 breakpoints or not.
2280 (proceed_one_lwp): If resume request is resume_step, install
2281 reinsert breakpoints and call maybe_hw_step.
2282
2283 2016-07-21 Yao Qi <yao.qi@linaro.org>
2284
2285 * linux-low.c (proceed_one_lwp): Declare.
2286 (linux_resume_one_thread): Remove local variable 'step'.
2287 Lift code enqueue signal. Call proceed_one_lwp instead of
2288 linux_resume_one_lwp.
2289
2290 2016-07-21 Yao Qi <yao.qi@linaro.org>
2291
2292 * linux-low.c (linux_resume_one_thread): Call
2293 enqueue_pending_signal.
2294
2295 2016-07-21 Yao Qi <yao.qi@linaro.org>
2296
2297 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2298 * inferiors.c (do_restore_current_thread_cleanup): New function.
2299 (make_cleanup_restore_current_thread): Likewise.
2300 * linux-low.c (install_software_single_step_breakpoints): Call
2301 make_cleanup_restore_current_thread. Switch current_thread to
2302 thread.
2303
2304 2016-07-21 Yao Qi <yao.qi@linaro.org>
2305
2306 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2307 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2308 (clone_one_breakpoint): Likewise.
2309 (delete_reinsert_breakpoints): Change parameter to thread.
2310 Callers updated.
2311 (has_reinsert_breakpoints): Likewise.
2312 (uninsert_reinsert_breakpoints): Likewise.
2313 (reinsert_reinsert_breakpoints): Likewise.
2314 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2315 (delete_reinsert_breakpoints): Likewise.
2316 (reinsert_reinsert_breakpoints): Likewise.
2317 (uninsert_reinsert_breakpoints): Likewise.
2318 (has_reinsert_breakpoints): Likewise.
2319
2320 2016-07-21 Yao Qi <yao.qi@linaro.org>
2321
2322 * inferiors.c (get_thread_process): Make parameter const.
2323 * inferiors.h (get_thread_process): Update declaration.
2324 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2325 Add new parameters child_thread and parent_thread. Callers
2326 updated.
2327 * mem-break.h (clone_all_breakpoints): Update declaration.
2328
2329 2016-07-21 Yao Qi <yao.qi@linaro.org>
2330
2331 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2332 <command_list, handler>: Remove.
2333 (struct gdb_breakpoint): New.
2334 (struct other_breakpoint): New.
2335 (struct reinsert_breakpoint): New.
2336 (is_gdb_breakpoint): New function.
2337 (any_persistent_commands): Update command_list if
2338 is_gdb_breakpoint returns true.
2339 (set_breakpoint): Create breakpoints according to their types.
2340 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2341 (set_gdb_breakpoint_1): Likewise.
2342 (set_gdb_breakpoint): Likewise.
2343 (clear_breakpoint_conditions): Change parameter type to
2344 'struct gdb_breakpoint *'.
2345 (clear_breakpoint_commands): Likewise.
2346 (clear_breakpoint_conditions_and_commands): Likewise.
2347 (add_condition_to_breakpoint): Likewise.
2348 (add_breakpoint_condition): Likewise.
2349 (add_commands_to_breakpoint): Likewise.
2350 (check_breakpoints): Check other_breakpoint.
2351 (clone_one_breakpoint): Clone breakpopint according to its type.
2352 * mem-break.h (struct gdb_breakpoint): Declare.
2353 (set_gdb_breakpoint): Update declaration.
2354 (clear_breakpoint_conditions_and_commands): Likewise.
2355 (add_breakpoint_condition): Likewise.
2356 (add_breakpoint_commands): Likewise.
2357 * server.c (process_point_options): Change parameter type to
2358 'struct gdb_breakpoint *'.
2359
2360 2016-07-21 Yao Qi <yao.qi@linaro.org>
2361
2362 * mem-break.c (set_breakpoint_at): Rename it to ...
2363 (set_breakpoint_type_at): ... it.
2364 (set_breakpoint_at): Call set_breakpoint_type_at.
2365 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2366 * mem-break.h (set_breakpoint_at): Update comments.
2367
2368 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2369
2370 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2371 to buf parameter.
2372 (nios2_store_gregset): Likewise.
2373
2374 2016-07-01 Pedro Alves <palves@redhat.com>
2375 Antoine Tremblay <antoine.tremblay@ericsson.com>
2376
2377 * linux-low.c: Change interface to take the target lwp_info
2378 pointer directly and return void. Handle detaching from a zombie
2379 thread.
2380 (linux_detach_lwp_callback): New function.
2381 (linux_detach): Detach from the leader thread after detaching from
2382 the clone threads.
2383
2384 2016-06-28 Yao Qi <yao.qi@linaro.org>
2385
2386 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2387 for variable new_offset.
2388 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2389 (aarch64_ftrace_insn_reloc_cb): Likewise.
2390 (aarch64_ftrace_insn_reloc_tb): Likewise.
2391 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2392 PRIx64 instead of PRIx32.
2393
2394 2016-06-28 Yao Qi <yao.qi@linaro.org>
2395
2396 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2397 (the_low_target): Install arm_get_syscall_trapinfo.
2398
2399 2016-06-28 Yao Qi <yao.qi@linaro.org>
2400
2401 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2402 function.
2403 (the_low_target): Install aarch64_get_syscall_trapinfo.
2404
2405 2016-06-28 Yao Qi <yao.qi@linaro.org>
2406
2407 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2408 Callers updated.
2409 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2410 Remove parameter sysno.
2411 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2412 sysret.
2413
2414 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2415
2416 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2417 (s390_emit_ne_goto): Likewise.
2418 (s390_emit_lt_goto): Likewise.
2419 (s390_emit_le_goto): Likewise.
2420 (s390_emit_gt_goto): Likewise.
2421 (s390_emit_ge_goto): Likewise.
2422 (s390x_emit_eq_goto): Likewise.
2423 (s390x_emit_ne_goto): Likewise.
2424 (s390x_emit_lt_goto): Likewise.
2425 (s390x_emit_le_goto): Likewise.
2426 (s390x_emit_gt_goto): Likewise.
2427 (s390x_emit_ge_goto): Likewise.
2428 (s390_emit_ops_impl): Mark variable static.
2429 (s390x_emit_ops): Likewise.
2430
2431 2016-06-17 Yao Qi <yao.qi@linaro.org>
2432
2433 * linux-low.c (handle_extended_wait): Call
2434 uninsert_reinsert_breakpoints for the parent process. Remove
2435 reinsert breakpoints from the child process. Reinsert them to
2436 the parent process when vfork is done.
2437 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2438 (reinsert_reinsert_breakpoints): New function.
2439 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2440 (reinsert_reinsert_breakpoints): Declare.
2441
2442 2016-06-17 Yao Qi <yao.qi@linaro.org>
2443
2444 * linux-low.c (handle_extended_wait): If the parent is doing
2445 step-over, remove the reinsert breakpoints from the forked child.
2446
2447 2016-06-17 Yao Qi <yao.qi@linaro.org>
2448
2449 * linux-low.c (unsuspend_all_lwps): Declare.
2450 (linux_low_filter_event): If thread exited, call finish_step_over.
2451 If step-over is finished, unsuspend other threads.
2452
2453 2016-06-17 Yao Qi <yao.qi@linaro.org>
2454
2455 * linux-low.c (linux_resume_one_lwp_throw): Assert
2456 has_reinsert_breakpoints returns false.
2457 * mem-break.c (delete_disabled_breakpoints): Assert
2458 bp type isn't reinsert_breakpoint.
2459
2460 2016-06-17 Yao Qi <yao.qi@linaro.org>
2461
2462 * linux-low.c (maybe_hw_step): New function.
2463 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2464 (finish_step_over): Switch current_thread to lwp temporarily,
2465 and assert has_reinsert_breakpoints returns true.
2466 (proceed_one_lwp): Call maybe_hw_step.
2467 * mem-break.c (has_reinsert_breakpoints): New function.
2468 * mem-break.h (has_reinsert_breakpoints): Declare.
2469
2470 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2471
2472 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2473
2474 2016-05-17 Yao Qi <yao.qi@linaro.org>
2475
2476 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2477 instead of find_inferior.
2478
2479 2016-05-05 Yao Qi <yao.qi@linaro.org>
2480
2481 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2482 Initialize res to zero.
2483
2484 2016-05-05 Yao Qi <yao.qi@linaro.org>
2485
2486 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2487 to uint32_t.
2488
2489 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2490
2491 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2492 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2493 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2494
2495 2016-04-28 Par Olsson <par.olsson@windriver.com>
2496 Simon Marchi <simon.marchi@ericsson.com>
2497
2498 * tracepoint.c (write_inferior_int8): New function.
2499 (cmd_qtenable_disable): Write enable flag using
2500 write_inferior_int8.
2501
2502 2016-04-25 Yao Qi <yao.qi@linaro.org>
2503
2504 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2505 (need_step_over_p): Return zero if the LWP has pending signals
2506 can be delivered on software single step target.
2507
2508 2016-04-25 Yao Qi <yao.qi@linaro.org>
2509
2510 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2511 return instead of error.
2512
2513 2016-04-22 Yao Qi <yao.qi@linaro.org>
2514
2515 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2516 to 23.
2517
2518 2016-04-22 Yao Qi <yao.qi@linaro.org>
2519
2520 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2521 signal when stepping over breakpoint with software single
2522 step.
2523
2524 2016-04-21 Pedro Alves <palves@redhat.com>
2525
2526 * linux-s390-low.c (s390_collect_ptrace_register)
2527 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2528 add casts.
2529 (s390_check_regset): Use void * instead of gdb_byte *.
2530
2531 2016-04-20 Pedro Alves <palves@redhat.com>
2532
2533 * configure: Renegerate.
2534
2535 2016-04-20 Yao Qi <yao.qi@linaro.org>
2536
2537 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2538 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2539 number 16.
2540 (arm_store_gregset): Likewise.
2541
2542 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2543
2544 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2545 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2546 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2547 (amd64-avx-mpx-linux.c): New rules.
2548 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2549 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2550 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2551 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2552 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2553 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2554 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2555 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2556 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2557 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2558 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2559 * linux-x86-low.c (x86_linux_read_description): Add case for
2560 X86_XSTATE_AVX_MPX_MASK.
2561 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2562 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2563 init_registers_i386_avx_mpx_linux.
2564 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2565 (initialize_low_tracepoint): Call
2566 init_registers_i386_avx_mpx_linux.
2567 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2568 (initialize_low_tracepoint): Call
2569 init_registers_amd64_avx_mpx_linux.
2570 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2571 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2572 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2573 declarations.
2574
2575 2016-04-18 Pedro Alves <palves@redhat.com>
2576
2577 * configure: Regenerate.
2578
2579 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2580
2581 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2582 (aarch64_emit_sub): Likewise.
2583
2584 2016-04-12 Pedro Alves <palves@redhat.com>
2585
2586 * utils.c (prepare_to_throw_exception): Delete.
2587
2588 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2589
2590 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2591
2592 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2593
2594 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2595
2596 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2597
2598 * linux-aarch64-ipa.c: Add <elf.h> include.
2599 * linux-ppc-ipa.c: Add <elf.h> include.
2600 * linux-s390-ipa.c: Add <elf.h> include.
2601
2602 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2603
2604 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2605 (get_raw_reg_ptr): Likewise.
2606 (get_trace_state_variable_value_ptr): Likewise.
2607 (set_trace_state_variable_value_ptr): Likewise.
2608 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2609 char *.
2610
2611 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2612 Marcin Kościelnicki <koriakin@0x04.net>
2613
2614 PR/17221
2615 * linux-ppc-low.c (emit_insns): New function.
2616 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2617 (ppc_emit_prologue): New function.
2618 (ppc_emit_epilogue): New function.
2619 (ppc_emit_add): New function.
2620 (ppc_emit_sub): New function.
2621 (ppc_emit_mul): New function.
2622 (ppc_emit_lsh): New function.
2623 (ppc_emit_rsh_signed): New function.
2624 (ppc_emit_rsh_unsigned): New function.
2625 (ppc_emit_ext): New function.
2626 (ppc_emit_zero_ext): New function.
2627 (ppc_emit_log_not): New function.
2628 (ppc_emit_bit_and): New function.
2629 (ppc_emit_bit_or): New function.
2630 (ppc_emit_bit_xor): New function.
2631 (ppc_emit_bit_not): New function.
2632 (ppc_emit_equal): New function.
2633 (ppc_emit_less_signed): New function.
2634 (ppc_emit_less_unsigned): New function.
2635 (ppc_emit_ref): New function.
2636 (ppc_emit_const): New function.
2637 (ppc_emit_reg): New function.
2638 (ppc_emit_pop): New function.
2639 (ppc_emit_stack_flush): New function.
2640 (ppc_emit_swap): New function.
2641 (ppc_emit_stack_adjust): New function.
2642 (ppc_emit_call): New function.
2643 (ppc_emit_int_call_1): New function.
2644 (ppc_emit_void_call_2): New function.
2645 (ppc_emit_if_goto): New function.
2646 (ppc_emit_goto): New function.
2647 (ppc_emit_eq_goto): New function.
2648 (ppc_emit_ne_goto): New function.
2649 (ppc_emit_lt_goto): New function.
2650 (ppc_emit_le_goto): New function.
2651 (ppc_emit_gt_goto): New function.
2652 (ppc_emit_ge_goto): New function.
2653 (ppc_write_goto_address): New function.
2654 (ppc_emit_ops_impl): New static variable.
2655 (ppc64v1_emit_prologue): New function.
2656 (ppc64v2_emit_prologue): New function.
2657 (ppc64_emit_epilogue): New function.
2658 (ppc64_emit_add): New function.
2659 (ppc64_emit_sub): New function.
2660 (ppc64_emit_mul): New function.
2661 (ppc64_emit_lsh): New function.
2662 (ppc64_emit_rsh_signed): New function.
2663 (ppc64_emit_rsh_unsigned): New function.
2664 (ppc64_emit_ext): New function.
2665 (ppc64_emit_zero_ext): New function.
2666 (ppc64_emit_log_not): New function.
2667 (ppc64_emit_bit_and): New function.
2668 (ppc64_emit_bit_or): New function.
2669 (ppc64_emit_bit_xor): New function.
2670 (ppc64_emit_bit_not): New function.
2671 (ppc64_emit_equal): New function.
2672 (ppc64_emit_less_signed): New function.
2673 (ppc64_emit_less_unsigned): New function.
2674 (ppc64_emit_ref): New function.
2675 (ppc64_emit_const): New function.
2676 (ppc64v1_emit_reg): New function.
2677 (ppc64v2_emit_reg): New function.
2678 (ppc64_emit_pop): New function.
2679 (ppc64_emit_stack_flush): New function.
2680 (ppc64_emit_swap): New function.
2681 (ppc64v1_emit_call): New function.
2682 (ppc64v2_emit_call): New function.
2683 (ppc64v1_emit_int_call_1): New function.
2684 (ppc64v2_emit_int_call_1): New function.
2685 (ppc64v1_emit_void_call_2): New function.
2686 (ppc64v2_emit_void_call_2): New function.
2687 (ppc64_emit_if_goto): New function.
2688 (ppc64_emit_eq_goto): New function.
2689 (ppc64_emit_ne_goto): New function.
2690 (ppc64_emit_lt_goto): New function.
2691 (ppc64_emit_le_goto): New function.
2692 (ppc64_emit_gt_goto): New function.
2693 (ppc64_emit_ge_goto): New function.
2694 (ppc64v1_emit_ops_impl): New static variable.
2695 (ppc64v2_emit_ops_impl): New static variable.
2696 (ppc_emit_ops): New function.
2697 (linux_low_target): Wire in ppc_emit_ops.
2698
2699 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2700 Marcin Kościelnicki <koriakin@0x04.net>
2701
2702 PR/17221
2703 * Makefile.in: Add powerpc-*-ipa.o
2704 * configure.srv: Add ipa_obj for powerpc*-linux.
2705 * linux-ppc-ipa.c: New file.
2706 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2707 includes.
2708 (PPC_FIELD): New macro.
2709 (PPC_SEXT): New macro.
2710 (PPC_OP6): New macro.
2711 (PPC_BO): New macro.
2712 (PPC_LI): New macro.
2713 (PPC_BD): New macro.
2714 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2715 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2716 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2717 (ppc_get_thread_area): New function.
2718 (is_elfv2_inferior): New function.
2719 (gen_ds_form): New function.
2720 (GEN_STD): New macro.
2721 (GEN_STDU): New macro.
2722 (GEN_LD): New macro.
2723 (GEN_LDU): New macro.
2724 (gen_d_form): New function.
2725 (GEN_ADDI): New macro.
2726 (GEN_ADDIS): New macro.
2727 (GEN_LI): New macro.
2728 (GEN_LIS): New macro.
2729 (GEN_ORI): New macro.
2730 (GEN_ORIS): New macro.
2731 (GEN_LWZ): New macro.
2732 (GEN_STW): New macro.
2733 (GEN_STWU): New macro.
2734 (gen_xfx_form): New function.
2735 (GEN_MFSPR): New macro.
2736 (GEN_MTSPR): New macro.
2737 (GEN_MFCR): New macro.
2738 (GEN_MTCR): New macro.
2739 (GEN_SYNC): New macro.
2740 (GEN_LWSYNC): New macro.
2741 (gen_x_form): New function.
2742 (GEN_OR): New macro.
2743 (GEN_MR): New macro.
2744 (GEN_LWARX): New macro.
2745 (GEN_STWCX): New macro.
2746 (GEN_CMPW): New macro.
2747 (gen_md_form): New function.
2748 (GEN_RLDICL): New macro.
2749 (GEN_RLDICR): New macro.
2750 (gen_i_form): New function.
2751 (GEN_B): New macro.
2752 (GEN_BL): New macro.
2753 (gen_b_form): New function.
2754 (GEN_BNE): New macro.
2755 (GEN_LOAD): New macro.
2756 (GEN_STORE): New macro.
2757 (gen_limm): New function.
2758 (gen_atomic_xchg): New function.
2759 (gen_call): New function.
2760 (ppc_relocate_instruction): New function.
2761 (ppc_install_fast_tracepoint_jump_pad): New function.
2762 (ppc_get_min_fast_tracepoint_insn_len): New function.
2763 (ppc_get_ipa_tdesc_idx): New function.
2764 (the_low_target): Wire in the new functions.
2765 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2766 tdescs.
2767 * linux-ppc-tdesc.h: New file.
2768
2769 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2770
2771 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2772 (alloc_jump_pad_buffer): New function.
2773 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2774 (alloc_jump_pad_buffer): New function.
2775 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2776 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2777 (alloc_jump_pad_buffer): New function.
2778 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2779 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2780 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2781 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2782
2783 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2784
2785 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2786 * linux-amd64-ipa.c: Likewise.
2787 * linux-i386-ipa.c: Likewise.
2788 * linux-s390-ipa.c: Likewise.
2789 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2790 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2791 set_trace_state_variable_value_ptr.
2792 (struct ipa_sym_addresses): Likewise.
2793 (symbol_list): Likewise.
2794 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2795 accessing gdb_collect directly.
2796 (gdb_collect_ptr_type): New typedef.
2797 (get_raw_reg_ptr_type): New typedef.
2798 (get_trace_state_variable_value_ptr_type): New typedef.
2799 (set_trace_state_variable_value_ptr_type): New typedef.
2800 (gdb_collect_ptr): New global.
2801 (get_raw_reg_ptr): New global.
2802 (get_trace_state_variable_value_ptr): New global.
2803 (set_trace_state_variable_value_ptr): New global.
2804 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2805 accessing get_raw_reg directly.
2806 (get_get_tsv_func_addr): Likewise for
2807 get_trace_state_variable_value_ptr.
2808 (get_set_tsv_func_addr): Likewise for
2809 set_trace_state_variable_value_ptr.
2810 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2811
2812 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2813
2814 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2815
2816 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2817
2818 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2819 packets.
2820 (relocate_instruction): Remove own_buf.
2821 * server.c (own_buf): Make global.
2822 (handle_v_requests): Make global.
2823 * server.h (own_buf): New declaration.
2824 (handle_v_requests): New prototype.
2825
2826 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2827
2828 PR 18377
2829 * linux-s390-low.c (add_insns): New function.
2830 (s390_emit_prologue): New function.
2831 (s390_emit_epilogue): New function.
2832 (s390_emit_add): New function.
2833 (s390_emit_sub): New function.
2834 (s390_emit_mul): New function.
2835 (s390_emit_lsh): New function.
2836 (s390_emit_rsh_signed): New function.
2837 (s390_emit_rsh_unsigned): New function.
2838 (s390_emit_ext): New function.
2839 (s390_emit_log_not): New function.
2840 (s390_emit_bit_and): New function.
2841 (s390_emit_bit_or): New function.
2842 (s390_emit_bit_xor): New function.
2843 (s390_emit_bit_not): New function.
2844 (s390_emit_equal): New function.
2845 (s390_emit_less_signed): New function.
2846 (s390_emit_less_unsigned): New function.
2847 (s390_emit_ref): New function.
2848 (s390_emit_if_goto): New function.
2849 (s390_emit_goto): New function.
2850 (s390_write_goto_address): New function.
2851 (s390_emit_litpool): New function.
2852 (s390_emit_const): New function.
2853 (s390_emit_call): New function.
2854 (s390_emit_reg): New function.
2855 (s390_emit_pop): New function.
2856 (s390_emit_stack_flush): New function.
2857 (s390_emit_zero_ext): New function.
2858 (s390_emit_swap): New function.
2859 (s390_emit_stack_adjust): New function.
2860 (s390_emit_set_r2): New function.
2861 (s390_emit_int_call_1): New function.
2862 (s390_emit_void_call_2): New function.
2863 (s390_emit_eq_goto): New function.
2864 (s390_emit_ne_goto): New function.
2865 (s390_emit_lt_goto): New function.
2866 (s390_emit_le_goto): New function.
2867 (s390_emit_gt_goto): New function.
2868 (s390_emit_ge_goto): New function.
2869 (s390x_emit_prologue): New function.
2870 (s390x_emit_epilogue): New function.
2871 (s390x_emit_add): New function.
2872 (s390x_emit_sub): New function.
2873 (s390x_emit_mul): New function.
2874 (s390x_emit_lsh): New function.
2875 (s390x_emit_rsh_signed): New function.
2876 (s390x_emit_rsh_unsigned): New function.
2877 (s390x_emit_ext): New function.
2878 (s390x_emit_log_not): New function.
2879 (s390x_emit_bit_and): New function.
2880 (s390x_emit_bit_or): New function.
2881 (s390x_emit_bit_xor): New function.
2882 (s390x_emit_bit_not): New function.
2883 (s390x_emit_equal): New function.
2884 (s390x_emit_less_signed): New function.
2885 (s390x_emit_less_unsigned): New function.
2886 (s390x_emit_ref): New function.
2887 (s390x_emit_if_goto): New function.
2888 (s390x_emit_const): New function.
2889 (s390x_emit_call): New function.
2890 (s390x_emit_reg): New function.
2891 (s390x_emit_pop): New function.
2892 (s390x_emit_stack_flush): New function.
2893 (s390x_emit_zero_ext): New function.
2894 (s390x_emit_swap): New function.
2895 (s390x_emit_stack_adjust): New function.
2896 (s390x_emit_int_call_1): New function.
2897 (s390x_emit_void_call_2): New function.
2898 (s390x_emit_eq_goto): New function.
2899 (s390x_emit_ne_goto): New function.
2900 (s390x_emit_lt_goto): New function.
2901 (s390x_emit_le_goto): New function.
2902 (s390x_emit_gt_goto): New function.
2903 (s390x_emit_ge_goto): New function.
2904 (s390_emit_ops): New function.
2905 (struct linux_target_ops): Fill in emit_ops hook.
2906
2907 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2908
2909 PR 18377
2910 * Makefile.in: Add s390 IPA files.
2911 * configure.srv: Build IPA for s390.
2912 * linux-s390-ipa.c: New file.
2913 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2914 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2915 (tdesc_s390_linux32): Likewise.
2916 (init_registers_s390_linux32v1): Likewise.
2917 (tdesc_s390_linux32v1): Likewise.
2918 (init_registers_s390_linux32v2): Likewise.
2919 (tdesc_s390_linux32v2): Likewise.
2920 (init_registers_s390_linux64): Likewise.
2921 (tdesc_s390_linux64): Likewise.
2922 (init_registers_s390_linux64v1): Likewise.
2923 (tdesc_s390_linux64v1): Likewise.
2924 (init_registers_s390_linux64v2): Likewise.
2925 (tdesc_s390_linux64v2): Likewise.
2926 (init_registers_s390_te_linux64): Likewise.
2927 (tdesc_s390_te_linux64): Likewise.
2928 (init_registers_s390_vx_linux64): Likewise.
2929 (tdesc_s390_vx_linux64): Likewise.
2930 (init_registers_s390_tevx_linux64): Likewise.
2931 (tdesc_s390_tevx_linux64): Likewise.
2932 (init_registers_s390x_linux64): Likewise.
2933 (tdesc_s390x_linux64): Likewise.
2934 (init_registers_s390x_linux64v1): Likewise.
2935 (tdesc_s390x_linux64v1): Likewise.
2936 (init_registers_s390x_linux64v2): Likewise.
2937 (tdesc_s390x_linux64v2): Likewise.
2938 (init_registers_s390x_te_linux64): Likewise.
2939 (tdesc_s390x_te_linux64): Likewise.
2940 (init_registers_s390x_vx_linux64): Likewise.
2941 (tdesc_s390x_vx_linux64): Likewise.
2942 (init_registers_s390x_tevx_linux64): Likewise.
2943 (tdesc_s390x_tevx_linux64): Likewise.
2944 (have_hwcap_s390_vx): New static variable.
2945 (s390_arch_setup): Fill have_hwcap_s390_vx.
2946 (s390_get_thread_area): New function.
2947 (s390_ft_entry_gpr_esa): New const.
2948 (s390_ft_entry_gpr_zarch): New const.
2949 (s390_ft_entry_misc): New const.
2950 (s390_ft_entry_fr): New const.
2951 (s390_ft_entry_vr): New const.
2952 (s390_ft_main_31): New const.
2953 (s390_ft_main_64): New const.
2954 (s390_ft_exit_fr): New const.
2955 (s390_ft_exit_vr): New const.
2956 (s390_ft_exit_misc): New const.
2957 (s390_ft_exit_gpr_esa): New const.
2958 (s390_ft_exit_gpr_zarch): New const.
2959 (append_insns): New function.
2960 (s390_relocate_instruction): New function.
2961 (s390_install_fast_tracepoint_jump_pad): New function.
2962 (s390_get_min_fast_tracepoint_insn_len): New function.
2963 (s390_get_ipa_tdesc_idx): New function.
2964 (struct linux_target_ops): Wire in the above functions.
2965 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2966 * linux-s390-tdesc.h: New file.
2967
2968 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2969
2970 * linux-s390-low.c (s390_supports_tracepoints): New function.
2971 (struct linux_target_ops): Fill supports_tracepoints hook.
2972
2973 2016-03-18 Yao Qi <yao.qi@linaro.org>
2974
2975 * linux-low.c (lwp_signal_can_be_delivered): New function.
2976 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2977
2978 2016-03-18 Yao Qi <yao.qi@linaro.org>
2979
2980 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2981 0 if signal is enqueued. Remove 'signal' from one debugging
2982 message. Move one debugging message to some lines below.
2983 Remove code setting 'signal' to 0.
2984
2985 2016-03-18 Yao Qi <yao.qi@linaro.org>
2986
2987 * linux-low.c (linux_low_filter_event): Remove redundant
2988 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2989
2990 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2991
2992 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2993 (struct linux_target_ops): Wire in the above.
2994
2995 2016-03-03 Yao Qi <yao.qi@linaro.org>
2996
2997 * linux-low.c: Update comments to start_step_over.
2998
2999 2016-03-03 Yao Qi <yao.qi@linaro.org>
3000
3001 PR server/19736
3002 * linux-low.c (handle_extended_wait): Set child suspended
3003 if event_lwp->bp_reinsert isn't zero.
3004
3005 2016-03-02 Yao Qi <yao.qi@linaro.org>
3006
3007 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3008 enqueue_pending_signal.
3009
3010 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3011
3012 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3013 is actually loaded.
3014
3015 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3016
3017 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3018 (s390_regmap_3264) [!__s390x__]: New global.
3019 (s390_collect_ptrace_register): Skip map entries containing -1.
3020 (s390_supply_ptrace_register): Ditto.
3021 (s390_fill_gprs_high): New function.
3022 (s390_store_gprs_high): New function.
3023 (s390_regsets): Add NT_S390_HIGH_GPRS.
3024 (s390_get_hwcap): Enable on 31-bit.
3025 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3026 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3027 Detect NT_S390_HIGH_GPRS.
3028 (s390_usrregs_info_3264): Enable on 31-bit.
3029 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3030 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3031
3032 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3033
3034 PR gdb/13808
3035 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3036 * configure.srv: Ditto.
3037 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3038 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3039 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3040 (init_registers_amd64_linux): Remove prototype.
3041 (tdesc_amd64_linux): Remove declaration.
3042 (get_ipa_tdesc): New function.
3043 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3044 initialize remaining tdescs.
3045 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3046 (init_registers_i386_linux): Remove prototype.
3047 (tdesc_i386_linux): Remove declaration.
3048 (get_ipa_tdesc): New function.
3049 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3050 initialize remaining tdescs.
3051 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3052 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3053 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3054 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3055 (x86_get_ipa_tdesc_idx): New function.
3056 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3057 * linux-x86-tdesc.h: New file.
3058 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3059 (target_get_ipa_tdesc_idx): New macro.
3060 * tracepoint.c (ipa_tdesc_idx): New macro.
3061 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3062 (symbol_list): Add ipa_tdesc_idx.
3063 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3064 (ipa_tdesc): Remove.
3065 (ipa_tdesc_idx): New variable.
3066 (get_context_regcache): Use get_ipa_tdesc.
3067 (gdb_collect): Ditto.
3068 (gdb_probe): Ditto.
3069 * tracepoint.h (get_ipa_tdesc): New prototype.
3070 (ipa_tdesc): Remove.
3071
3072 2016-02-24 Pedro Alves <palves@redhat.com>
3073
3074 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3075 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3076 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3077 Factor out common code between the USE_SIGTRAP_SIGINFO and
3078 !USE_SIGTRAP_SIGINFO blocks.
3079 (linux_low_filter_event): Call save_stop_reason instead of
3080 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3081 Update comments.
3082 (linux_wait_1): Update comments.
3083
3084 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3085
3086 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3087 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3088 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3089 ppc_insert_point, ppc_remove_point.
3090
3091 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3092
3093 * linux-s390-low.c (s390_supports_z_point_type): New function.
3094 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3095
3096 2016-02-16 Yao Qi <yao.qi@linaro.org>
3097
3098 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3099 PC. Get pc from regcache_read_pc.
3100
3101 2016-02-12 Yao Qi <yao.qi@linaro.org>
3102
3103 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3104 or linux_get_pc_32bit.
3105 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3106
3107 2016-02-12 Yao Qi <yao.qi@linaro.org>
3108
3109 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3110 arm_linux_get_next_pcs_fixup.
3111
3112 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3113
3114 * tracepoint.c (x_tracepoint_action_download): Change
3115 write_inferior_data_ptr to write_inferior_data_pointer.
3116 (cmd_qtstart): Likewise.
3117 (write_inferior_data_ptr): Remove.
3118 (download_agent_expr): Change write_inferior_data_ptr to
3119 write_inferior_data_pointer.
3120 (download_tracepoint_1): Likewise.
3121 (download_tracepoint): Likewise.
3122 (download_trace_state_variables): Likewise.
3123
3124 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3125 Marcin Kościelnicki <koriakin@0x04.net>
3126
3127 * tracepoint.c (struct tracepoint_action_ops): Remove.
3128 (struct tracepoint_action): Remove ops.
3129 (m_tracepoint_action_download, r_tracepoint_action_download)
3130 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3131 size and offset accordingly.
3132 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3133 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3134 (tracepoint_action_send, tracepoint_action_download): New functions.
3135 Helpers for trace action handlers.
3136 (add_tracepoint_action): Remove setup actions ops.
3137 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3138
3139 2016-02-10 Yao Qi <yao.qi@linaro.org>
3140
3141 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3142
3143 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3144
3145 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3146 to AC_OUTPUT.
3147 * configure: Regenerate.
3148
3149 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3150
3151 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3152 void * to gdb_byte *.
3153 * linux-low.c (siginfo_fixup): Likewise.
3154 (linux_xfer_siginfo): Likewise.
3155 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3156 Likewise.
3157 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3158
3159 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3160
3161 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3162 to srv_tgtobj.
3163 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3164 to srv_tgtobj.
3165 * linux-x86-low.c [__x86_64__]: Include
3166 "nat/amd64-linux-siginfo.h".
3167 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3168 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3169 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3170 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3171 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3172 (cpt_si_fd, si_timerid, si_overrun): Move from
3173 nat/amd64-linux-siginfo.c.
3174 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3175
3176 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3177
3178 * server.c (skip_to_semicolon): Remove.
3179 (process_point_options): Use strchrnul instead of
3180 skip_to_semicolon.
3181
3182 2016-01-26 Yao Qi <yao.qi@linaro.org>
3183
3184 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3185 * linux-low.c (install_software_single_step_breakpoints): Don't
3186 call regcache_read_pc.
3187 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3188 argument pc.
3189
3190 2016-01-26 Yao Qi <yao.qi@linaro.org>
3191
3192 * linux-low.c (install_software_single_step_breakpoints): Call
3193 regcache_read_pc instead of get_pc.
3194
3195 2016-01-26 Yao Qi <yao.qi@linaro.org>
3196
3197 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3198 (unblock_async_io): Rename to ...
3199 (block_unblock_async_io): ... it. New function.
3200 (enable_async_io): Don't install SIGIO handler. Unblock it
3201 instead.
3202 (disable_async_io): Don't ignore SIGIO. Block it instead.
3203 (initialize_async_io): Install SIGIO handler. Don't call
3204 unblock_async_io.
3205
3206 2016-01-26 Yao Qi <yao.qi@linaro.org>
3207
3208 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3209 first character is '\003', call *the_target->request_interrupt.
3210
3211 2016-01-25 Yao Qi <yao.qi@linaro.org>
3212
3213 * remote-utils.c (new_thread_notify): Remove.
3214 (dead_thread_notify): Likewise.
3215 * remote-utils.h (new_thread_notify): Remove declaration.
3216 (dead_thread_notify): Likewise.
3217
3218 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3219
3220 * gdb.trace/pending.exp: Fix expected message on continue.
3221
3222 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3223
3224 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3225 it works properly on big-endian machines where sizeof (CORE_ADDR)
3226 != sizeof (void *).
3227
3228 2016-01-21 Pedro Alves <palves@redhat.com>
3229
3230 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3231 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3232 * configure: Regenerate.
3233
3234 2016-01-21 Yao Qi <yao.qi@linaro.org>
3235
3236 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3237 is_thumb and set it according to CPSR saved on the stack.
3238 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3239 arm_sigreturn_next_pc.
3240
3241 2016-01-18 Yao Qi <yao.qi@linaro.org>
3242
3243 * linux-low.c (linux_set_pc_64bit): New function.
3244 (linux_get_pc_64bit): New function.
3245 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3246 Declare.
3247 * linux-sparc-low.c (debug_threads): Remove declaration.
3248 (sparc_get_pc): Remove.
3249 (the_low_target): Use linux_get_pc_64bit instead of
3250 sparc_get_pc.
3251 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3252 (the_low_target): Use linux_get_pc_64bit and
3253 linux_set_pc_64bit.
3254
3255 2016-01-18 Yao Qi <yao.qi@linaro.org>
3256
3257 * linux-arm-low.c (debug_threads): Remove declaration.
3258 (arm_get_pc, arm_set_pc): Remove.
3259 (the_low_target): Use linux_get_pc_32bit and
3260 linux_set_pc_32bit.
3261 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3262 (the_low_target): Use linux_get_pc_32bit and
3263 linux_set_pc_32bit.
3264 * linux-cris-low.c (debug_threads): Remove declaration.
3265 (cris_get_pc, cris_set_pc,): Remove.
3266 (the_low_target): Use linux_get_pc_32bit and
3267 linux_set_pc_32bit.
3268 * linux-crisv32-low.c (debug_threads): Remove declaration.
3269 (cris_get_pc, cris_set_pc): Remove.
3270 (the_low_target): Use linux_get_pc_32bit and
3271 linux_set_pc_32bit.
3272 * linux-low.c: Include inttypes.h.
3273 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3274 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3275 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3276 (the_low_target): Use linux_get_pc_32bit and
3277 linux_set_pc_32bit.
3278 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3279 (the_low_target): Use linux_get_pc_32bit and
3280 linux_set_pc_32bit.
3281 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3282 (the_low_target): Use linux_get_pc_32bit and
3283 linux_set_pc_32bit.
3284 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3285 (the_low_target): Use linux_get_pc_32bit and
3286 linux_set_pc_32bit.
3287 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3288 (the_low_target): Use linux_get_pc_32bit and
3289 linux_set_pc_32bit.
3290
3291 2016-01-18 Gary Benson <gbenson@redhat.com>
3292
3293 * configure.ac (AC_FUNC_FORK): New check.
3294 * config.in: Regenerate.
3295 * configure: Likewise.
3296
3297 2016-01-14 Yao Qi <yao.qi@linaro.org>
3298
3299 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3300 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3301 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3302 arm_get_next_pcs_ctor.
3303
3304 2016-01-12 Josh Stone <jistone@redhat.com>
3305 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3306
3307 * inferiors.h: Include "gdb_vecs.h".
3308 (struct process_info): Add syscalls_to_catch.
3309 * inferiors.c (remove_process): Free syscalls_to_catch.
3310 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3311 syscall_return stops.
3312 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3313 * server.c (handle_general_set): Handle QCatchSyscalls.
3314 (handle_query): Report support for QCatchSyscalls.
3315 * target.h (struct target_ops): Add supports_catch_syscall.
3316 (target_supports_catch_syscall): New macro.
3317 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3318 (struct lwp_info): Add syscall_state.
3319 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3320 Maintain syscall_state and syscalls_to_catch across exec.
3321 (get_syscall_trapinfo): New function, proxy to the_low_target.
3322 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3323 (linux_low_filter_event): Toggle syscall_state entry/return for
3324 syscall traps, and set it ignored for all others.
3325 (gdb_catching_syscalls_p): New function.
3326 (gdb_catch_this_syscall_p): New function.
3327 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3328 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3329 (linux_supports_catch_syscall): New function.
3330 (linux_target_ops): Install it.
3331 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3332 (the_low_target): Install it.
3333
3334 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3335
3336 * acinclude.m4: Include new ../warning.m4 file.
3337 * configure: Regenerated.
3338 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3339
3340 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3341
3342 * ax.c (is_goto_target): Mark static.
3343 * linux-low.c (register_addr): Likewise.
3344 (linux_fetch_registers, linux_store_registers): Likewise.
3345 * mem-break.c (any_persistent_commands): Fix old prototype.
3346 (add_commands_to_breakpoint): Mark static.
3347 * regcache.c (find_register_by_name): Delete unused func.
3348 * remote-utils.c (hex_or_minus_one): Mark static.
3349 * server.c (monitor_show_help): Mark static.
3350 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3351 handle_v_requests): Likewise.
3352
3353 2016-01-12 Pedro Alves <palves@redhat.com>
3354
3355 Remove use of the registered trademark symbol throughout.
3356
3357 2016-01-08 Yao Qi <yao.qi@linaro.org>
3358
3359 * remote-utils.c (getpkt): If c is '\003', call target hook
3360 request_interrupt.
3361
3362 2016-01-06 Yao Qi <yao.qi@linaro.org>
3363
3364 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3365 linux-aarch32-low.c.
3366 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3367 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3368 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3369 (thumb2_breakpoint): Declare.
3370 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3371 linux-aarch32-low.h.
3372 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3373 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3374 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3375
3376 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3377
3378 * gdbreplay.c (gdbreplay_version): Change copyright year in
3379 version message.
3380 * server.c (gdbserver_version): Likewise.
3381
3382 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3383
3384 * server.c (crc32_table): Delete.
3385 (crc32): Use libiberty's xcrc32 function.
3386
3387 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3388
3389 * lynx-low.c (lynx_delete_thread_callback): New function.
3390 (lynx_mourn): Properly delete our process and all of its
3391 threads. Remove call to clear_inferiors.
3392
3393 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3394
3395 * target.c (thread_search_callback): Add check that
3396 the thread_stopped target callback is not NULL before
3397 calling it.
3398
3399 2015-12-21 Yao Qi <yao.qi@linaro.org>
3400
3401 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3402 arm breakpoint.
3403
3404 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3405
3406 * server.c (handle_query): Call target_supports_software_single_step.
3407
3408 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3409
3410 * linux-low.c (single_step): New function.
3411 (linux_resume_one_lwp_throw): Call single_step.
3412 (start_step_over): Likewise.
3413
3414 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3415
3416 * Makefile.in (SFILES): Append arch/arm-linux.c,
3417 arch/arm-get-next-pcs.c.
3418 (arm-linux.o): New rule.
3419 (arm-get-next-pcs.o): New rule.
3420 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3421 arm-linux.o.
3422 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3423 to linux-aarch32-low.c.
3424 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3425 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3426 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3427 (thumb2_breakpoint_len): Likewise.
3428 (arm_is_thumb_mode): Make non-static.
3429 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3430 from linux-aarch32-low.c.
3431 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3432 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3433 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3434 (thumb2_breakpoint_len): Likewise.
3435 (arm_is_thumb_mode): New declaration.
3436 * linux-arm-low.c: Include arch/arm-linux.h
3437 aarch/arm-get-next-pcs.h, sys/syscall.h.
3438 (get_next_pcs_ops): New struct.
3439 (get_next_pcs_addr_bits_remove): New function.
3440 (get_next_pcs_is_thumb): New function.
3441 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3442 (arm_sigreturn_next_pc): Likewise.
3443 (get_next_pcs_syscall_next_pc): Likewise.
3444 (arm_gdbserver_get_next_pcs): Likewise.
3445 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3446 Initialize.
3447 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3448 * server.h: Include gdb_vecs.h.
3449
3450 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3451
3452 * Makefile.in (SFILES): Append common/common-regcache.c.
3453 (OBS): Append common-regcache.o.
3454 (common-regcache.o): New rule.
3455 * regcache.c (init_register_cache): Initialize cache to
3456 REG_UNAVAILABLE.
3457 (regcache_raw_read_unsigned): New function.
3458 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3459 register_status enum.
3460
3461 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3462
3463 * linux-aarch64-low.c (the_low_targets): Rename
3464 breakpoint_reinsert_addr to get_next_pcs.
3465 * linux-arm-low.c (the_low_targets): Likewise.
3466 * linux-bfin-low.c (the_low_targets): Likewise.
3467 * linux-cris-low.c (the_low_targets): Likewise.
3468 * linux-crisv32-low.c (the_low_targets): Likewise.
3469 * linux-low.c (can_software_single_step): Likewise.
3470 (install_software_single_step_breakpoints): New function.
3471 (start_step_over): Use install_software_single_step_breakpoints.
3472 * linux-low.h: New CORE_ADDR vector.
3473 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3474 get_next_pcs.
3475 * linux-mips-low.c (the_low_targets): Likewise.
3476 * linux-nios2-low.c (the_low_targets): Likewise.
3477 * linux-sparc-low.c (the_low_targets): Likewise.
3478
3479 2015-12-17 Pedro Alves <palves@redhat.com>
3480
3481 * linux-low.c (linux_kill_one_lwp): Remove references to
3482 LinuxThreads.
3483 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3484 to 'kill'.
3485 (linux_init_signals): Delete.
3486 (initialize_low): Adjust.
3487 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3488
3489 2015-12-16 Pedro Alves <palves@redhat.com>
3490
3491 * configure.ac (compiler warning flags): When testing a
3492 -Wno-foo option, check whether -Wfoo works instead.
3493 * configure: Regenerate.
3494
3495 2015-12-11 Don Breazeal <donb@codesourcery.com>
3496
3497 * server.c (process_serial_event): Don't exit from gdbserver
3498 in remote mode if there are still active inferiors.
3499
3500 2015-12-11 Yao Qi <yao.qi@linaro.org>
3501
3502 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3503 arm_breakpoint_at if the process is 32-bit.
3504
3505 2015-12-11 Yao Qi <yao.qi@linaro.org>
3506
3507 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3508 arm breakpoint.
3509
3510 2015-12-07 Yao Qi <yao.qi@linaro.org>
3511
3512 * configure.srv: Append arm.o to srv_tgtobj for
3513 aarch64*-*-linux* target.
3514 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3515 from linux-arm-low.c.
3516 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3517 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3518 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3519 (thumb2_breakpoint_len): Likewise.
3520 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3521 (arm_breakpoint_kinds): Likewise.
3522 (arm_breakpoint_kind_from_pc): Likewise.
3523 (arm_sw_breakpoint_from_kind): Likewise.
3524 (arm_breakpoint_kind_from_current_state): Likewise.
3525 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3526 (arm_sw_breakpoint_from_kind): Declare.
3527 (arm_breakpoint_kind_from_current_state): Declare.
3528 (arm_breakpoint_at): Declare.
3529 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3530 arm_sw_breakpoint_from_kind if process is 32-bit.
3531 (aarch64_breakpoint_kind_from_pc): New function.
3532 (aarch64_breakpoint_kind_from_current_state): New function.
3533 (the_low_target): Initialize fields breakpoint_kind_from_pc
3534 and breakpoint_kind_from_current_state.
3535 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3536 linux-aarch32-low.c.
3537 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3538 (arm_breakpoint, arm_breakpoint_len): Likewise.
3539 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3540 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3541 (arm_is_thumb_mode): Likewise.
3542 (arm_breakpoint_at): Likewise.
3543 (arm_breakpoint_kind_from_pc): Likewise.
3544 (arm_sw_breakpoint_from_kind): Likewise.
3545 (arm_breakpoint_kind_from_current_state): Likewise.
3546
3547 Revert:
3548 2015-08-04 Yao Qi <yao.qi@linaro.org>
3549
3550 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3551 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3552 * server.c (extended_protocol): Remove "static".
3553 * server.h (extended_protocol): Declare it.
3554
3555 2015-12-04 Josh Stone <jistone@redhat.com>
3556
3557 * target.h (struct target_ops) <arch_setup>: Rename to ...
3558 (struct target_ops) <post_create_inferior>: ... this.
3559 (target_arch_setup): Rename to ...
3560 (target_post_create_inferior): ... this, calling post_create_inferior.
3561 * server.c (start_inferior): Update target_arch_setup calls to
3562 target_post_create_inferior.
3563 * linux-low.c (linux_low_ptrace_options): Forward declare.
3564 (linux_arch_setup): Update its comment for general use.
3565 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3566 (struct linux_target_ops): Use linux_post_create_inferior.
3567 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3568 to post_create_inferior.
3569 * nto-low.c (struct nto_target_ops): Likewise.
3570 * spu-low.c (struct spu_target_ops): Likewise.
3571 * win32-low.c (struct win32_target_ops): Likewise.
3572
3573 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3574
3575 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3576
3577 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3578
3579 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3580 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3581 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3582 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3583 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3584 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3585 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3586 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3587 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3588 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3589 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3590 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3591
3592 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3593
3594 * linux-low.c (linux_look_up_symbols): Don't call
3595 linux_supports_traceclone.
3596 * linux-low.h (thread_db_init): Remove use_events argument.
3597 * thread-db.c (thread_db_use_event): Remove global variable.
3598 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3599 (struct thread_db) <td_create_bp>: Remove field.
3600 (thread_db_create_event): Remove function.
3601 (thread_db_enable_reporting): Likewise.
3602 (find_one_thread): Don't check for thread_db_use_events.
3603 (attach_thread): Likewise.
3604 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3605 (try_thread_db_load_1): Don't check for thread_db_use_events.
3606 (thread_db_init): Remove use_events argument and thread events
3607 handling.
3608 (remove_thread_event_breakpoints): Remove function.
3609 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3610
3611 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3612
3613 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3614 New function.
3615 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3616 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3617 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3618 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3619 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3620 Initialize.
3621 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3622 New function.
3623 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3624 * linux-low.c (can_hardware_single_step): Use
3625 supports_hardware_single_step.
3626 (can_software_single_step): New function.
3627 (start_step_over): Call can_software_single_step.
3628 (linux_supports_hardware_single_step): New function.
3629 (struct target_ops) <supports_software_single_step>: Initialize.
3630 * linux-low.h (struct linux_target_ops)
3631 <supports_hardware_single_step>: Initialize.
3632 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3633 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3634 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3635 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3636 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3637 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3638 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3639 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3640 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3641 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3642 Initialize.
3643 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3644 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3645 Initialize.
3646 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3647 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3648 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3649 New function.
3650 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3651 * target.h (struct target_ops): <supports_software_single_step>:
3652 New field.
3653 (target_supports_software_single_step): New macro.
3654
3655 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3656
3657 * linux-low.c (linux_wait_1): Fix pc advance condition.
3658 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3659 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3660
3661 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3662
3663 * linux-arm-low.c (arm_is_thumb_mode): New function.
3664 (arm_breakpoint_at): Use arm_is_thumb_mode.
3665 (arm_breakpoint_kind_from_current_state): New function.
3666 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3667 Initialize.
3668 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3669 (linux_breakpoint_kind_from_current_state): New function.
3670 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3671 * linux-low.h (struct linux_target_ops)
3672 <breakpoint_kind_from_current_state>: New field.
3673 * target.h (struct target_ops): Likewise.
3674 (target_breakpoint_kind_from_current_state): New macro.
3675
3676 2015-11-30 Pedro Alves <palves@redhat.com>
3677
3678 * linux-low.c (linux_resume): Wake up the event loop before
3679 returning.
3680
3681 2015-11-30 Pedro Alves <palves@redhat.com>
3682
3683 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3684 check.
3685 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3686 to -1.
3687 * target.c (struct thread_search): New structure.
3688 (thread_search_callback): New function.
3689 (prev_general_thread): New global.
3690 (prepare_to_access_memory, done_accessing_memory): New functions.
3691 * target.h (prepare_to_access_memory, done_accessing_memory):
3692 Replace macros with function declarations.
3693
3694 2015-11-30 Pedro Alves <palves@redhat.com>
3695
3696 PR 14618
3697 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3698 report TARGET_WAITKIND_NO_RESUMED.
3699 * remote-utils.c (prepare_resume_reply): Handle
3700 TARGET_WAITKIND_NO_RESUMED.
3701 * server.c (report_no_resumed): New global.
3702 (handle_query) <qSupported>: Handle "no-resumed+". Report
3703 "no-resumed+" support.
3704 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3705 return error if the client doesn't support no-resumed events.
3706 (push_stop_notification): New function.
3707 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3708 events if the client supports them.
3709
3710 2015-11-30 Pedro Alves <palves@redhat.com>
3711
3712 * linux-low.c (thread_still_has_status_pending_p): Don't check
3713 vCont;t here.
3714 (lwp_resumed): New function.
3715 (status_pending_p_callback): Return early if the LWP is not
3716 supposed to be resumed.
3717
3718 2015-11-30 Pedro Alves <palves@redhat.com>
3719
3720 * linux-low.c (handle_extended_wait): Assert that the LWP's
3721 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3722 thread create events, leave the new child's status pending.
3723 (linux_low_filter_event): If GDB wants to hear about thread exit
3724 events, leave the LWP marked dead and don't delete it.
3725 (linux_wait_for_event_filtered): Don't check for thread exit.
3726 (filter_exit_event): New function.
3727 (linux_wait_1): Use it, when returning an exit event.
3728 (linux_resume_one_lwp_throw): Assert that the LWP's
3729 waitstatus is TARGET_WAITKIND_IGNORE.
3730 * remote-utils.c (prepare_resume_reply): Handle
3731 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3732 * server.c (report_thread_events): New global.
3733 (handle_general_set): Handle QThreadEvents.
3734 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3735 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3736 TARGET_WAITKIND_THREAD_EXITED.
3737 * server.h (report_thread_events): Declare.
3738
3739 2015-11-30 Pedro Alves <palves@redhat.com>
3740
3741 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3742 the thread's last_resume_kind was resume_stop.
3743
3744 2015-11-30 Pedro Alves <palves@redhat.com>
3745
3746 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3747 before returning.
3748
3749 2015-11-30 Pedro Alves <palves@redhat.com>
3750
3751 * server.c (handle_v_requests): Handle vCtrlC.
3752
3753 2015-11-30 Pedro Alves <palves@redhat.com>
3754
3755 * gdbthread.h (find_any_thread_of_pid): Declare.
3756 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3757 functions.
3758 * server.c (handle_query): If current_thread is NULL, look for
3759 another thread of the selected process.
3760
3761 2015-11-26 Daniel Colascione <dancol@dancol.org>
3762 Simon Marchi <simon.marchi@ericsson.com>
3763
3764 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3765 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3766 name in reply.
3767 * target.h (struct target_ops) <thread_name>: New field.
3768 (target_thread_name): New macro.
3769
3770 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3771
3772 * regcache.h (regcache_invalidate_pid): Add declaration.
3773 * regcache.c (regcache_invalidate_pid): New function, extracted
3774 from regcache_invalidate.
3775 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3776 Add trivial documentation comment.
3777 * lynx-low.c: Use regcache_invalidate_pid instead of
3778 regcache_invalidate.
3779
3780 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3781
3782 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3783 and Elf64_auxv_t if the target is Android.
3784
3785 2015-11-22 Doug Evans <xdje42@gmail.com>
3786
3787 * target.h: #include <sys/types.h>.
3788
3789 2015-11-19 Pedro Alves <palves@redhat.com>
3790
3791 * linux-low.c (linux_process_qsupported): Change prototype.
3792 Adjust.
3793 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3794 Change prototype.
3795 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3796 and adjust to loop over all features.
3797 * server.c (handle_query) <qSupported>: Adjust to call
3798 target_process_qsupported once, passing it a vector of unprocessed
3799 features.
3800 * target.h (struct target_ops) <process_qsupported>: Change
3801 prototype.
3802 (target_process_qsupported): Adjust.
3803
3804 2015-11-19 Pedro Alves <palves@redhat.com>
3805
3806 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3807 mode.
3808 * configure: Regenerate.
3809
3810 2015-11-19 Pedro Alves <palves@redhat.com>
3811
3812 * configure: Regenerate.
3813
3814 2015-11-19 Yao Qi <yao.qi@linaro.org>
3815
3816 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3817 type to uint32_t.
3818
3819 2015-11-19 Yao Qi <yao.qi@linaro.org>
3820
3821 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3822 (struct aarch64_operand): Move enum out.
3823
3824 2015-11-19 Yao Qi <yao.qi@linaro.org>
3825
3826 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3827 struct user_fpsimd_state *.
3828 (aarch64_store_fpregset): Likewise.
3829
3830 2015-11-19 Yao Qi <yao.qi@linaro.org>
3831
3832 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3833 struct user_pt_regs *.
3834 (aarch64_store_gregset): Likewise.
3835
3836 2015-11-18 Pedro Alves <palves@redhat.com>
3837
3838 * Makefile.in (all_object_files): Add $IPA_OBJS.
3839
3840 2015-11-17 Pedro Alves <palves@redhat.com>
3841
3842 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3843 GDB_SIGNAL_0 and gdb_signal_to_string.
3844
3845 2015-11-17 Pedro Alves <palves@redhat.com>
3846
3847 * win32-low.c (handle_output_debug_string): Remove parameter.
3848 (win32_kill): Remove our_status local and adjust call to
3849 handle_output_debug_string.
3850 (get_child_debug_event): Adjust call to
3851 handle_output_debug_string.
3852
3853 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3854
3855 * linux-mips-low.c (mips_fill_gregset): Add cast.
3856 (mips_store_gregset): Likewise.
3857 (mips_fill_fpregset): Likewise.
3858 (mips_store_fpregset): Likewise.
3859
3860 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3861
3862 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3863 priv.
3864
3865 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3866
3867 * linux-mips-low.c (mips_linux_new_thread): Change type of
3868 watch_type to enum target_hw_bp_type.
3869
3870 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3871
3872 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3873 Change return type to arm_hwbp_type.
3874
3875 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3876
3877 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3878 (arm_store_gregset): Likewise.
3879 * linux-arm-low.c (arm_get_hwcap): Likewise.
3880 (arm_read_description): Likewise.
3881
3882 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3883
3884 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3885
3886 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3887
3888 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3889 (ppc_fill_vsxregset): Likewise.
3890 (ppc_store_vsxregset): Likewise.
3891 (ppc_fill_vrregset): Likewise.
3892 (ppc_store_vrregset): Likewise.
3893 (ppc_fill_evrregset): Likewise.
3894 (ppc_store_evrregset): Likewise.
3895
3896 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3897
3898 * linux-ppc-low.c (ppc_usrregs_info): Remove
3899 forward-declaration.
3900 (ppc_arch_setup): Move lower in file.
3901
3902 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3903
3904 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3905 (ps_pdwrite): Likewise.
3906
3907 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3908
3909 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3910 to after assert checks.
3911
3912 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3913
3914 * proc-service.c (ps_pdread): Add/adjust casts.
3915 (ps_pdwrite): Add/adjust casts.
3916
3917 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3918
3919 * server.c (handle_search_memory_1): Cast return value of
3920 memmem.
3921
3922 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3923
3924 * server.c (write_qxfer_response): Change type of data to
3925 gdb_byte *.
3926
3927 2015-10-29 Pedro Alves <palves@redhat.com>
3928
3929 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3930
3931 2015-10-29 Pedro Alves <palves@redhat.com>
3932
3933 * tracepoint.c (clear_installed_tracepoints): Add casts.
3934
3935 2015-10-29 Pedro Alves <palves@redhat.com>
3936
3937 * server.c (handle_v_cont, process_serial_event): Add enum
3938 gdb_signal casts to signal parsing code.
3939
3940 2015-10-29 Pedro Alves <palves@redhat.com>
3941
3942 * linux-low.h (NULL_REGSET): Define.
3943 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3944 * linux-arm-low.c (arm_regsets): Likewise.
3945 * linux-crisv32-low.c (cris_regsets): Likewise.
3946 * linux-m68k-low.c (m68k_regsets): Likewise.
3947 * linux-mips-low.c (mips_regsets): Likewise.
3948 * linux-nios2-low.c (nios2_regsets): Likewise.
3949 * linux-ppc-low.c (ppc_regsets): Likewise.
3950 * linux-s390-low.c (s390_regsets): Likewise.
3951 * linux-sh-low.c (sh_regsets): Likewise.
3952 * linux-sparc-low.c (sparc_regsets): Likewise.
3953 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3954 * linux-tile-low.c (tile_regsets): Likewise.
3955 * linux-x86-low.c (x86_regsets): Likewise.
3956 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3957
3958 2015-10-29 Pedro Alves <palves@redhat.com>
3959
3960 * linux-low.h (NULL_REGSET): Define.
3961 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3962 * linux-arm-low.c (arm_regsets): Likewise.
3963 * linux-crisv32-low.c (cris_regsets): Likewise.
3964 * linux-m68k-low.c (m68k_regsets): Likewise.
3965 * linux-mips-low.c (mips_regsets): Likewise.
3966 * linux-nios2-low.c (nios2_regsets): Likewise.
3967 * linux-ppc-low.c (ppc_regsets): Likewise.
3968 * linux-s390-low.c (s390_regsets): Likewise.
3969 * linux-sh-low.c (sh_regsets): Likewise.
3970 * linux-sparc-low.c (sparc_regsets): Likewise.
3971 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3972 * linux-tile-low.c (tile_regsets): Likewise.
3973 * linux-x86-low.c (x86_regsets): Likewise.
3974 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3975
3976 2015-10-26 Doug Evans <dje@google.com>
3977
3978 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3979
3980 2015-10-26 Doug Evans <dje@google.com>
3981
3982 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3983
3984 2015-10-26 Doug Evans <dje@google.com>
3985
3986 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3987 for debug_printf.
3988 (attach_thread, find_new_threads_callback): Ditto.
3989
3990 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3991
3992 * mem-break.h (set_breakpoint_data): Remove.
3993
3994 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3995
3996 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3997 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3998 (initialize_low): Remove set_breakpoint_data call.
3999 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4000 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4001 (initialize_low): Remove set_breakpoint_data call.
4002 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4003 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4004 (initialize_low): Remove set_breakpoint_data call.
4005
4006 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4007
4008 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4009 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4010 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4011 * target.h (target_breakpoint_kind_from_pc): New macro.
4012
4013 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4014
4015 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4016 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4017 the default breakpoint kind.
4018
4019 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4020
4021 * linux-arm-low.c (arm_supports_z_point_type): Add software
4022 breakpoint support.
4023
4024 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4025
4026 * linux-arm-low.c: Refactor breakpoint definitions.
4027 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4028 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4029
4030 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4031
4032 * Makefile.in: Add arm.c/o.
4033 * configure.srv: Likewise.
4034 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4035 (arm_breakpoint_kind_from_pc): New function.
4036 (arm_sw_breakpoint_from_kind): Return proper kind.
4037 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4038
4039 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4040
4041 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4042 removal.
4043 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4044 (struct raw_breakpoint) <size>: Remove.
4045 (struct raw_breakpoint) <kind>: Add.
4046 (bp_size): New function.
4047 (bp_opcode): Likewise.
4048 (find_raw_breakpoint_at): Adjust for kind.
4049 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4050 (remove_memory_breakpoint): Adjust for kind call bp_size.
4051 (set_raw_breakpoint_at): Adjust for kind.
4052 (set_breakpoint): Likewise.
4053 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4054 (delete_raw_breakpoint): Adjust for kind.
4055 (delete_breakpoint): Likewise.
4056 (find_gdb_breakpoint): Likewise.
4057 (set_gdb_breakpoint_1): Likewise.
4058 (set_gdb_breakpoint): Likewise.
4059 (delete_gdb_breakpoint_1): Likewise.
4060 (delete_gdb_breakpoint): Likewise.
4061 (uninsert_raw_breakpoint): Likewise.
4062 (reinsert_raw_breakpoint): Likewise.
4063 (set_breakpoint_data): Remove.
4064 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4065 (check_mem_read): Adjust for kind call bp_size.
4066 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4067 (clone_one_breakpoint): Adjust for kind.
4068 * mem-break.h (set_gdb_breakpoint): Likewise.
4069 (delete_gdb_breakpoint): Likewise.
4070 * server.c (process_serial_event): Likewise.
4071
4072 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4073
4074 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4075 (struct linux_target_ops) <breakpoint>: Remove.
4076 (struct linux_target_ops) <breakpoint_len>: Remove.
4077 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4078 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4079 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4080 (arm_sw_breakpoint_from_kind): New function.
4081 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4082 (struct linux_target_ops) <breakpoint>: Remove.
4083 (struct linux_target_ops) <breakpoint_len>: Remove.
4084 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4085 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4086 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4087 (struct linux_target_ops) <breakpoint>: Remove.
4088 (struct linux_target_ops) <breakpoint_len>: Remove.
4089 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4090 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4091 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4092 (struct linux_target_ops) <breakpoint>: Remove.
4093 (struct linux_target_ops) <breakpoint_len>: Remove.
4094 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4095 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4096 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4097 and sw_breakpoint_from_kind to increment the pc.
4098 (linux_breakpoint_kind_from_pc): New function.
4099 (linux_sw_breakpoint_from_kind): New function.
4100 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4101 (initialize_low): Call breakpoint_kind_from_pc and
4102 sw_breakpoint_from_kind to replace breakpoint_data/len.
4103 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4104 New field.
4105 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4106 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4107 (struct linux_target_ops) <breakpoint>: Remove.
4108 (struct linux_target_ops) <breakpoint_len>: Remove.
4109 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4110 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4111 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4112 (struct linux_target_ops) <breakpoint>: Remove.
4113 (struct linux_target_ops) <breakpoint_len>: Remove.
4114 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4115 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4116 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4117 (struct linux_target_ops) <breakpoint>: Remove.
4118 (struct linux_target_ops) <breakpoint_len>: Remove.
4119 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4120 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4121 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4122 (struct linux_target_ops) <breakpoint>: Remove.
4123 (struct linux_target_ops) <breakpoint_len>: Remove.
4124 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4125 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4126 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4127 (struct linux_target_ops) <breakpoint>: Remove.
4128 (struct linux_target_ops) <breakpoint_len>: Remove.
4129 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4130 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4131 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4132 (struct linux_target_ops) <breakpoint>: Remove.
4133 (struct linux_target_ops) <breakpoint_len>: Remove.
4134 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4135 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4136 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4137 (struct linux_target_ops) <breakpoint>: Remove.
4138 (struct linux_target_ops) <breakpoint_len>: Remove.
4139 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4140 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4141 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4142 (struct linux_target_ops) <breakpoint>: Remove.
4143 (struct linux_target_ops) <breakpoint_len>: Remove.
4144 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4145 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4146 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4147 (struct linux_target_ops) <breakpoint>: Remove.
4148 (struct linux_target_ops) <breakpoint_len>: Remove.
4149 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4150 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4151 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4152 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4153 (struct linux_target_ops) <breakpoint>: Remove.
4154 (struct linux_target_ops) <breakpoint_len>: Remove.
4155 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4156 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4157 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4158 (struct linux_target_ops) <breakpoint>: Remove.
4159 (struct linux_target_ops) <breakpoint_len>: Remove.
4160 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4161 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4162
4163 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4164
4165 * linux-cris-low.c (cris_get_pc): Remove void arg.
4166
4167 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4168
4169 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4170 variable name.
4171
4172 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4173
4174 * inferiors.c (thread_pid_matches_callback): New function.
4175 (find_thread_process): New function.
4176 (remove_thread): Reset current_thread.
4177 (remove_process): Assert threads have been removed first.
4178
4179 2015-10-15 Yao Qi <yao.qi@linaro.org>
4180
4181 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4182 if it is 3.
4183 (aarch64_remove_point): Likewise.
4184 * regcache.c (regcache_register_size): New function.
4185
4186 2015-10-12 Yao Qi <yao.qi@linaro.org>
4187
4188 * linux-aarch64-low.c: Update all callers as emit_load_store
4189 is renamed to aarch64_emit_load_store.
4190
4191 2015-10-12 Yao Qi <yao.qi@linaro.org>
4192
4193 * linux-aarch64-low.c: Update all callers of function renaming
4194 from emit_insn to aarch64_emit_insn.
4195
4196 2015-10-12 Yao Qi <yao.qi@linaro.org>
4197
4198 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4199 arch/aarch64-insn.h.
4200 (struct aarch64_memory_operand): Likewise.
4201 (ENCODE): Likewise.
4202 (emit_insn): Move to arch/aarch64-insn.c.
4203 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4204 (emit_load_store): Move to arch/aarch64-insn.c.
4205 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4206 (can_encode_int32): Remove.
4207
4208 2015-10-12 Yao Qi <yao.qi@linaro.org>
4209
4210 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4211 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4212 (aarch64_relocate_instruction): Likewise.
4213 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4214 (struct aarch64_insn_visitor): Likewise.
4215
4216 2015-10-12 Yao Qi <yao.qi@linaro.org>
4217
4218 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4219 (struct aarch64_insn_visitor): New.
4220 (struct aarch64_insn_relocation_data): New.
4221 (aarch64_ftrace_insn_reloc_b): New function.
4222 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4223 (aarch64_ftrace_insn_reloc_cb): Likewise.
4224 (aarch64_ftrace_insn_reloc_tb): Likewise.
4225 (aarch64_ftrace_insn_reloc_adr): Likewise.
4226 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4227 (aarch64_ftrace_insn_reloc_others): Likewise.
4228 (visitor): New.
4229 (aarch64_relocate_instruction): Use visitor.
4230
4231 2015-10-12 Yao Qi <yao.qi@linaro.org>
4232
4233 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4234 int. Add argument buf.
4235 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4236 aarch64_relocate_instruction.
4237
4238 2015-10-12 Yao Qi <yao.qi@linaro.org>
4239
4240 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4241 argument insn. Remove local variable insn. Don't call
4242 target_read_uint32.
4243 (aarch64_install_fast_tracepoint_jump_pad): Call
4244 target_read_uint32.
4245
4246 2015-09-30 Yao Qi <yao.qi@linaro.org>
4247
4248 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4249 (emit_load_store_pair): Likewise.
4250
4251 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4252
4253 * dll.c (match_dll): Add cast(s).
4254 (unloaded_dll): Likewise.
4255 * linux-low.c (second_thread_of_pid_p): Likewise.
4256 (delete_lwp_callback): Likewise.
4257 (count_events_callback): Likewise.
4258 (select_event_lwp_callback): Likewise.
4259 (linux_set_resume_request): Likewise.
4260 * server.c (accumulate_file_name_length): Likewise.
4261 (emit_dll_description): Likewise.
4262 (handle_qxfer_threads_worker): Likewise.
4263 (visit_actioned_threads): Likewise.
4264 * thread-db.c (any_thread_of): Likewise.
4265 * tracepoint.c (same_process_p): Likewise.
4266 (match_blocktype): Likewise.
4267 (build_traceframe_info_xml): Likewise.
4268
4269 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4270
4271 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4272 assignment.
4273 (gdb_unparse_agent_expr): Likewise.
4274 * hostio.c (require_data): Likewise.
4275 (handle_pread): Likewise.
4276 * linux-low.c (disable_regset): Likewise.
4277 (fetch_register): Likewise.
4278 (store_register): Likewise.
4279 (get_dynamic): Likewise.
4280 (linux_qxfer_libraries_svr4): Likewise.
4281 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4282 (set_fast_tracepoint_jump): Likewise.
4283 (uninsert_fast_tracepoint_jumps_at): Likewise.
4284 (reinsert_fast_tracepoint_jumps_at): Likewise.
4285 (validate_inserted_breakpoint): Likewise.
4286 (clone_agent_expr): Likewise.
4287 * regcache.c (init_register_cache): Likewise.
4288 * remote-utils.c (putpkt_binary_1): Likewise.
4289 (decode_M_packet): Likewise.
4290 (decode_X_packet): Likewise.
4291 (look_up_one_symbol): Likewise.
4292 (relocate_instruction): Likewise.
4293 (monitor_output): Likewise.
4294 * server.c (handle_search_memory): Likewise.
4295 (handle_qxfer_exec_file): Likewise.
4296 (handle_qxfer_libraries): Likewise.
4297 (handle_qxfer): Likewise.
4298 (handle_query): Likewise.
4299 (handle_v_cont): Likewise.
4300 (handle_v_run): Likewise.
4301 (captured_main): Likewise.
4302 * target.c (write_inferior_memory): Likewise.
4303 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4304 * tracepoint.c (init_trace_buffer): Likewise.
4305 (add_tracepoint_action): Likewise.
4306 (add_traceframe): Likewise.
4307 (add_traceframe_block): Likewise.
4308 (cmd_qtdpsrc): Likewise.
4309 (cmd_qtdv): Likewise.
4310 (cmd_qtstatus): Likewise.
4311 (response_source): Likewise.
4312 (response_tsv): Likewise.
4313 (cmd_qtnotes): Likewise.
4314 (gdb_collect): Likewise.
4315 (initialize_tracepoint): Likewise.
4316
4317 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4318
4319 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4320 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4321 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4322 <NOP>: New.
4323 (enum aarch64_condition_codes): New enum.
4324 (w0): New static global.
4325 (fp): Likewise.
4326 (lr): Likewise.
4327 (struct aarch64_memory_operand) <type>: New
4328 MEMORY_OPERAND_POSTINDEX type.
4329 (postindex_memory_operand): New helper function.
4330 (emit_ret): New function.
4331 (emit_load_store_pair): New function, factored out of emit_stp
4332 with support for MEMORY_OPERAND_POSTINDEX.
4333 (emit_stp): Rewrite using emit_load_store_pair.
4334 (emit_ldp): New function.
4335 (emit_load_store): Likewise.
4336 (emit_ldr): Mention post-index instruction in comment.
4337 (emit_ldrh): New function.
4338 (emit_ldrb): New function.
4339 (emit_ldrsw): Mention post-index instruction in comment.
4340 (emit_str): Likewise.
4341 (emit_subs): New function.
4342 (emit_cmp): Likewise.
4343 (emit_and): Likewise.
4344 (emit_orr): Likewise.
4345 (emit_orn): Likewise.
4346 (emit_eor): Likewise.
4347 (emit_mvn): Likewise.
4348 (emit_lslv): Likewise.
4349 (emit_lsrv): Likewise.
4350 (emit_asrv): Likewise.
4351 (emit_mul): Likewise.
4352 (emit_sbfm): Likewise.
4353 (emit_sbfx): Likewise.
4354 (emit_ubfm): Likewise.
4355 (emit_ubfx): Likewise.
4356 (emit_csinc): Likewise.
4357 (emit_cset): Likewise.
4358 (emit_nop): Likewise.
4359 (emit_ops_insns): New helper function.
4360 (emit_pop): Likewise.
4361 (emit_push): Likewise.
4362 (aarch64_emit_prologue): New function.
4363 (aarch64_emit_epilogue): Likewise.
4364 (aarch64_emit_add): Likewise.
4365 (aarch64_emit_sub): Likewise.
4366 (aarch64_emit_mul): Likewise.
4367 (aarch64_emit_lsh): Likewise.
4368 (aarch64_emit_rsh_signed): Likewise.
4369 (aarch64_emit_rsh_unsigned): Likewise.
4370 (aarch64_emit_ext): Likewise.
4371 (aarch64_emit_log_not): Likewise.
4372 (aarch64_emit_bit_and): Likewise.
4373 (aarch64_emit_bit_or): Likewise.
4374 (aarch64_emit_bit_xor): Likewise.
4375 (aarch64_emit_bit_not): Likewise.
4376 (aarch64_emit_equal): Likewise.
4377 (aarch64_emit_less_signed): Likewise.
4378 (aarch64_emit_less_unsigned): Likewise.
4379 (aarch64_emit_ref): Likewise.
4380 (aarch64_emit_if_goto): Likewise.
4381 (aarch64_emit_goto): Likewise.
4382 (aarch64_write_goto_address): Likewise.
4383 (aarch64_emit_const): Likewise.
4384 (aarch64_emit_call): Likewise.
4385 (aarch64_emit_reg): Likewise.
4386 (aarch64_emit_pop): Likewise.
4387 (aarch64_emit_stack_flush): Likewise.
4388 (aarch64_emit_zero_ext): Likewise.
4389 (aarch64_emit_swap): Likewise.
4390 (aarch64_emit_stack_adjust): Likewise.
4391 (aarch64_emit_int_call_1): Likewise.
4392 (aarch64_emit_void_call_2): Likewise.
4393 (aarch64_emit_eq_goto): Likewise.
4394 (aarch64_emit_ne_goto): Likewise.
4395 (aarch64_emit_lt_goto): Likewise.
4396 (aarch64_emit_le_goto): Likewise.
4397 (aarch64_emit_gt_goto): Likewise.
4398 (aarch64_emit_ge_got): Likewise.
4399 (aarch64_emit_ops_impl): New static global variable.
4400 (aarch64_emit_ops): New target function, return
4401 &aarch64_emit_ops_impl.
4402 (struct linux_target_ops): Install it.
4403
4404 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4405
4406 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4407 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4408 aarch64-ipa.o.
4409 * linux-aarch64-ipa.c: New file.
4410 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4411 and endian.h.
4412 (aarch64_get_thread_area): New target method.
4413 (extract_signed_bitfield): New helper function.
4414 (aarch64_decode_ldr_literal): New function.
4415 (enum aarch64_opcodes): New enum.
4416 (struct aarch64_register): New struct.
4417 (struct aarch64_operand): New struct.
4418 (x0): New static global.
4419 (x1): Likewise.
4420 (x2): Likewise.
4421 (x3): Likewise.
4422 (x4): Likewise.
4423 (w2): Likewise.
4424 (ip0): Likewise.
4425 (sp): Likewise.
4426 (xzr): Likewise.
4427 (aarch64_register): New helper function.
4428 (register_operand): Likewise.
4429 (immediate_operand): Likewise.
4430 (struct aarch64_memory_operand): New struct.
4431 (offset_memory_operand): New helper function.
4432 (preindex_memory_operand): Likewise.
4433 (enum aarch64_system_control_registers): New enum.
4434 (ENCODE): New macro.
4435 (emit_insn): New helper function.
4436 (emit_b): New function.
4437 (emit_bcond): Likewise.
4438 (emit_cb): Likewise.
4439 (emit_tb): Likewise.
4440 (emit_blr): Likewise.
4441 (emit_stp): Likewise.
4442 (emit_ldp_q_offset): Likewise.
4443 (emit_stp_q_offset): Likewise.
4444 (emit_load_store): Likewise.
4445 (emit_ldr): Likewise.
4446 (emit_ldrsw): Likewise.
4447 (emit_str): Likewise.
4448 (emit_ldaxr): Likewise.
4449 (emit_stxr): Likewise.
4450 (emit_stlr): Likewise.
4451 (emit_data_processing_reg): Likewise.
4452 (emit_data_processing): Likewise.
4453 (emit_add): Likewise.
4454 (emit_sub): Likewise.
4455 (emit_mov): Likewise.
4456 (emit_movk): Likewise.
4457 (emit_mov_addr): Likewise.
4458 (emit_mrs): Likewise.
4459 (emit_msr): Likewise.
4460 (emit_sevl): Likewise.
4461 (emit_wfe): Likewise.
4462 (append_insns): Likewise.
4463 (can_encode_int32_in): New helper function.
4464 (aarch64_relocate_instruction): New function.
4465 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4466 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4467 (struct linux_target_ops): Install aarch64_get_thread_area,
4468 aarch64_install_fast_tracepoint_jump_pad and
4469 aarch64_get_min_fast_tracepoint_insn_len.
4470
4471 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4472
4473 * Makefile.in (aarch64-insn.o): New rule.
4474 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4475
4476 2015-09-21 Yao Qi <yao.qi@linaro.org>
4477
4478 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4479
4480 2015-09-21 Yao Qi <yao.qi@linaro.org>
4481
4482 * tracepoint.c (max_jump_pad_size): Remove.
4483
4484 2015-09-18 Yao Qi <yao.qi@linaro.org>
4485
4486 * linux-aarch64-low.c: Don't include sys/uio.h.
4487 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4488
4489 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4490
4491 * tracepoint.c (eval_result_type): Change prototype.
4492 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4493
4494 2015-09-15 Pedro Alves <palves@redhat.com>
4495
4496 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4497 Check whether to report exec events instead of checking whether
4498 multiprocess is enabled.
4499
4500 2015-09-15 Pedro Alves <palves@redhat.com>
4501
4502 PR remote/18965
4503 * remote-utils.c (prepare_resume_reply): Merge
4504 TARGET_WAITKIND_VFORK_DONE switch case with the
4505 TARGET_WAITKIND_FORKED case.
4506
4507 2015-09-15 Yao Qi <yao.qi@linaro.org>
4508
4509 * server.c (handle_query): Check string comparison using
4510 "else if" instead of "if".
4511
4512 2015-09-15 Yao Qi <yao.qi@linaro.org>
4513
4514 * server.c (vCont_supported): New global variable.
4515 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4516 matches. Append ";vContSupported+" to own_buf.
4517 (handle_v_requests): Append ";s;S" to own_buf if target supports
4518 hardware single step or vCont_supported is false.
4519 (capture_main): Set vCont_supported to zero.
4520
4521 2015-09-15 Yao Qi <yao.qi@linaro.org>
4522
4523 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4524 it to ...
4525 (linux_supports_hardware_single_step): ... New function.
4526 (linux_target_ops): Update.
4527 * lynx-low.c (lynx_target_ops): Set field
4528 supports_hardware_single_step to target_can_do_hardware_single_step.
4529 * nto-low.c (nto_target_ops): Likewise.
4530 * spu-low.c (spu_target_ops): Likewise.
4531 * win32-low.c (win32_target_ops): Likewise.
4532 * target.c (target_can_do_hardware_single_step): New function.
4533 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4534 Remove. <supports_hardware_single_step>: New field.
4535 (target_supports_conditional_breakpoints): Remove.
4536 (target_supports_hardware_single_step): New macro.
4537 (target_can_do_hardware_single_step): Declare.
4538 * server.c (handle_query): Use target_supports_hardware_single_step
4539 instead of target_supports_conditional_breakpoints.
4540
4541 2015-09-15 Yao Qi <yao.qi@linaro.org>
4542
4543 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4544 function.
4545 (struct linux_target_ops the_low_target): Install
4546 aarch64_linux_siginfo_fixup.
4547
4548 2015-09-11 Don Breazeal <donb@codesourcery.com>
4549 Luis Machado <lgustavo@codesourcery.com>
4550
4551 * linux-low.c (linux_mourn): Static declaration.
4552 (linux_arch_setup): Move in front of
4553 handle_extended_wait.
4554 (linux_arch_setup_thread): New function.
4555 (handle_extended_wait): Handle exec events. Call
4556 linux_arch_setup_thread. Make event_lwp argument a
4557 pointer-to-a-pointer.
4558 (check_zombie_leaders): Do not check stopped threads.
4559 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4560 (linux_low_filter_event): Add lwp and thread for exec'ing
4561 non-leader thread if leader thread has been deleted.
4562 Refactor code into linux_arch_setup_thread and call it.
4563 Pass child lwp pointer by reference to handle_extended_wait.
4564 (linux_wait_for_event_filtered): Update comment.
4565 (linux_wait_1): Prevent clobbering exec event status.
4566 (linux_supports_exec_events): New function.
4567 (linux_target_ops) <supports_exec_events>: Initialize new member.
4568 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4569 new member.
4570 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4571 * server.c (report_exec_events): New global variable.
4572 (handle_query): Handle qSupported query for exec-events feature.
4573 (captured_main): Initialize report_exec_events.
4574 * server.h (report_exec_events): Declare new global variable.
4575 * target.h (struct target_ops) <supports_exec_events>: New
4576 member.
4577 (target_supports_exec_events): New macro.
4578 * win32-low.c (win32_target_ops) <supports_exec_events>:
4579 Initialize new member.
4580
4581 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4582
4583 * linux-low.c (linux_low_enable_btrace): Remove.
4584 (linux_target_ops): Replace linux_low_enable_btrace with
4585 linux_enable_btrace.
4586
4587 2015-09-03 Yao Qi <yao.qi@linaro.org>
4588
4589 * linux-aarch64-low.c (aarch64_insert_point): Call
4590 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4591 returns true.
4592
4593 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4594
4595 * linux-low.c (check_stopped_by_breakpoint): Use
4596 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4597
4598 2015-08-27 Pedro Alves <palves@redhat.com>
4599
4600 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4601
4602 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4603
4604 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4605 the XNEW-family equivalent.
4606 (compile_bytecodes): Likewise.
4607 * dll.c (loaded_dll): Likewise.
4608 * event-loop.c (append_callback_event): Likewise.
4609 (create_file_handler): Likewise.
4610 (create_file_event): Likewise.
4611 * hostio.c (handle_open): Likewise.
4612 * inferiors.c (add_thread): Likewise.
4613 (add_process): Likewise.
4614 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4615 * linux-arm-low.c (arm_new_process): Likewise.
4616 (arm_new_thread): Likewise.
4617 * linux-low.c (add_to_pid_list): Likewise.
4618 (linux_add_process): Likewise.
4619 (handle_extended_wait): Likewise.
4620 (add_lwp): Likewise.
4621 (enqueue_one_deferred_signal): Likewise.
4622 (enqueue_pending_signal): Likewise.
4623 (linux_resume_one_lwp_throw): Likewise.
4624 (linux_resume_one_thread): Likewise.
4625 (linux_read_memory): Likewise.
4626 (linux_write_memory): Likewise.
4627 * linux-mips-low.c (mips_linux_new_process): Likewise.
4628 (mips_linux_new_thread): Likewise.
4629 (mips_add_watchpoint): Likewise.
4630 * linux-x86-low.c (initialize_low_arch): Likewise.
4631 * lynx-low.c (lynx_add_process): Likewise.
4632 * mem-break.c (set_raw_breakpoint_at): Likewise.
4633 (set_breakpoint): Likewise.
4634 (add_condition_to_breakpoint): Likewise.
4635 (add_commands_to_breakpoint): Likewise.
4636 (clone_agent_expr): Likewise.
4637 (clone_one_breakpoint): Likewise.
4638 * regcache.c (new_register_cache): Likewise.
4639 * remote-utils.c (look_up_one_symbol): Likewise.
4640 * server.c (queue_stop_reply): Likewise.
4641 (start_inferior): Likewise.
4642 (queue_stop_reply_callback): Likewise.
4643 (handle_target_event): Likewise.
4644 * spu-low.c (fetch_ppc_memory): Likewise.
4645 (store_ppc_memory): Likewise.
4646 * target.c (set_target_ops): Likewise.
4647 * thread-db.c (thread_db_load_search): Likewise.
4648 (try_thread_db_load_1): Likewise.
4649 * tracepoint.c (add_tracepoint): Likewise.
4650 (add_tracepoint_action): Likewise.
4651 (create_trace_state_variable): Likewise.
4652 (cmd_qtdpsrc): Likewise.
4653 (cmd_qtro): Likewise.
4654 (add_while_stepping_state): Likewise.
4655 * win32-low.c (child_add_thread): Likewise.
4656 (get_image_name): Likewise.
4657
4658 2015-08-25 Yao Qi <yao.qi@linaro.org>
4659
4660 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4661
4662 2015-08-25 Yao Qi <yao.qi@linaro.org>
4663
4664 * Makefile.in (aarch64-linux.o): New rule.
4665 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4666 srv_tgtobj.
4667 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4668 (aarch64_init_debug_reg_state): Make it extern.
4669 (aarch64_linux_prepare_to_resume): Remove.
4670
4671 2015-08-25 Yao Qi <yao.qi@linaro.org>
4672
4673 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4674 lwp_arch_private_info and ptid_of_lwp.
4675
4676 2015-08-25 Yao Qi <yao.qi@linaro.org>
4677
4678 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4679 Find proc_info by find_process_pid. All callers updated.
4680
4681 2015-08-25 Yao Qi <yao.qi@linaro.org>
4682
4683 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4684 Remove.
4685 (debug_reg_change_callback): Remove.
4686 (aarch64_notify_debug_reg_change): Remove.
4687
4688 2015-08-25 Yao Qi <yao.qi@linaro.org>
4689
4690 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4691 Call current_lwp_ptid.
4692
4693 2015-08-25 Yao Qi <yao.qi@linaro.org>
4694
4695 * linux-aarch64-low.c (debug_reg_change_callback): Use
4696 debug_printf.
4697
4698 2015-08-25 Yao Qi <yao.qi@linaro.org>
4699
4700 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4701
4702 2015-08-25 Yao Qi <yao.qi@linaro.org>
4703
4704 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4705
4706 2015-08-25 Yao Qi <yao.qi@linaro.org>
4707
4708 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4709 the code.
4710
4711 2015-08-25 Yao Qi <yao.qi@linaro.org>
4712
4713 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4714 Remove.
4715 (debug_reg_change_callback): Remove argument entry and add argument
4716 lwp. Remove local variable thread. Don't print thread id in the
4717 debugging output. Don't check whether pid of thread equals to pid.
4718 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4719 iterate_over_lwps instead find_inferior.
4720
4721 2015-08-24 Pedro Alves <palves@redhat.com>
4722
4723 * inferiors.c (get_first_process): New function.
4724 * inferiors.h (get_first_process): New declaration.
4725 * remote-utils.c (read_ptid): Default to the first process in the
4726 list, instead of to the current thread's process.
4727
4728 2015-08-24 Pedro Alves <palves@redhat.com>
4729
4730 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4731 * event-loop.c: Likewise.
4732 * remote-utils.c: Likewise.
4733 * tracepoint.c: Likewise.
4734
4735 2015-08-24 Pedro Alves <palves@redhat.com>
4736
4737 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4738 ptid_get_lwp.
4739
4740 2015-08-21 Pedro Alves <palves@redhat.com>
4741
4742 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4743 instead of literal 1.
4744
4745 2015-08-21 Pedro Alves <palves@redhat.com>
4746
4747 * tdesc.c (default_description): Explicitly zero-initialize.
4748
4749 2015-08-21 Pedro Alves <palves@redhat.com>
4750
4751 PR gdb/18749
4752 * inferiors.c (remove_thread): Discard any pending stop reply for
4753 this thread.
4754 * server.c (remove_all_on_match_pid): Rename to ...
4755 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4756 instead of a pid.
4757 (discard_queued_stop_replies): Change parameter to a ptid. Now
4758 extern.
4759 (handle_v_kill, kill_inferior_callback, captured_main)
4760 (process_serial_event): Adjust.
4761 * server.h (discard_queued_stop_replies): Declare.
4762
4763 2015-08-21 Pedro Alves <palves@redhat.com>
4764
4765 * linux-low.c (wait_for_sigstop): Always switch to no thread
4766 selected if the previously current thread dies.
4767 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4768 process instead of the current thread's.
4769 * remote-utils.c (input_interrupt): Don't check if there's no
4770 current thread.
4771 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4772 current thread to the general thread fails, error out.
4773 (handle_qxfer_auxv, handle_qxfer_libraries)
4774 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4775 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4776 (handle_query): Check if there's a thread selected instead of
4777 checking whether there's any thread in the thread list.
4778 (handle_qxfer_threads, handle_qxfer_btrace)
4779 (handle_qxfer_btrace_conf): Don't error out early if there's no
4780 thread in the thread list.
4781 (handle_v_cont, myresume): Don't set the current thread to the
4782 continue thread.
4783 (process_serial_event) <Hg handling>: Also set thread_id if the
4784 previous general thread is still alive.
4785 (process_serial_event) <g/G handling>: If setting the current
4786 thread to the general thread fails, error out.
4787 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4788 thread's lwp instead of the current thread's.
4789 * target.c (set_desired_thread): If the desired thread was not
4790 found, leave the current thread pointing to NULL. Return an int
4791 (boolean) indicating success.
4792 * target.h (set_desired_thread): Change return type to int.
4793
4794 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4795
4796 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4797 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4798 #includes.
4799 (ps_get_thread_area): New function.
4800
4801 2015-08-19 Gary Benson <gbenson@redhat.com>
4802
4803 * hostio.c (handle_pread): Do not attempt to read more data
4804 than hostio_reply_with_data can fit in a packet.
4805
4806 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4807
4808 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4809
4810 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4811
4812 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4813
4814 2015-08-06 Pedro Alves <palves@redhat.com>
4815
4816 * tracepoint.c (expr_eval_result): Now an int.
4817
4818 2015-08-06 Pedro Alves <palves@redhat.com>
4819
4820 * gdbthread.h (struct regcache): Forward declare.
4821 (struct thread_info) <regcache_data>: Now a struct regcache
4822 pointer.
4823 * inferiors.c (inferior_regcache_data)
4824 (set_inferior_regcache_data): Now work with struct regcache
4825 pointers.
4826 * inferiors.h (struct regcache): Forward declare.
4827 (inferior_regcache_data, set_inferior_regcache_data): Now work
4828 with struct regcache pointers.
4829 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4830 (free_register_cache_thread): Remove struct regcache pointer
4831 casts.
4832
4833 2015-08-06 Pedro Alves <palves@redhat.com>
4834
4835 * server.c (captured_main): On error, print the exception message
4836 to stderr, and if run_once is set, throw a quit.
4837
4838 2015-08-06 Pedro Alves <palves@redhat.com>
4839
4840 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4841 the current thread.
4842
4843 2015-08-06 Pedro Alves <palves@redhat.com>
4844
4845 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4846 reading beyond the passed in buffer length.
4847
4848 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4849
4850 * tracepoint.c (symbol_list) <required>: Remove.
4851
4852 2015-08-06 Pedro Alves <palves@redhat.com>
4853
4854 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4855 count if stopping and suspending threads.
4856 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4857 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4858 (linux_detach): Complete an ongoing step-over.
4859 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4860 throughout.
4861 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4862 (linux_wait_1): If passing a signal to the inferior after
4863 finishing a step-over, unsuspend and re-resume all lwps. If we
4864 see a single-step event but the thread should be continuing, don't
4865 pass the trap to gdb.
4866 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4867 internal_error instead of gdb_assert.
4868 (enqueue_pending_signal): New function.
4869 (check_ptrace_stopped_lwp_gone): Add debug output.
4870 (start_step_over): Use internal_error instead of gdb_assert.
4871 (complete_ongoing_step_over): New function.
4872 (linux_resume_one_thread): Don't resume a suspended thread.
4873 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4874 it stepping.
4875
4876 2015-08-06 Pedro Alves <palves@redhat.com>
4877
4878 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4879 (linux_thread_alive): Use lwp_is_marked_dead.
4880 (extended_event_reported): Delete.
4881 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4882 instead of extended_event_reported.
4883 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4884 as well.
4885 (lwp_is_marked_dead): New function.
4886 (lwp_running): Use lwp_is_marked_dead.
4887 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4888 comment.
4889
4890 2015-08-06 Pedro Alves <palves@redhat.com>
4891
4892 * linux-low.c (linux_wait_1): Move fork event output out of the
4893 !report_to_gdb check. Pass event_child->waitstatus to
4894 target_waitstatus_to_string instead of ourstatus.
4895
4896 2015-08-04 Yao Qi <yao.qi@linaro.org>
4897
4898 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4899 if current_thread is 32 bit.
4900
4901 2015-08-04 Yao Qi <yao.qi@linaro.org>
4902
4903 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4904 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4905 * server.c (extended_protocol): Remove "static".
4906 * server.h (extended_protocol): Declare it.
4907
4908 2015-08-04 Yao Qi <yao.qi@linaro.org>
4909
4910 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4911 both aarch64 and aarch32.
4912 (aarch64_set_pc): Likewise.
4913
4914 2015-08-04 Yao Qi <yao.qi@linaro.org>
4915
4916 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4917 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4918 arm-with-neon.xml to srv_xmlfiles.
4919 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4920 (is_64bit_tdesc): New function.
4921 (aarch64_linux_read_description): New function.
4922 (aarch64_arch_setup): Call aarch64_linux_read_description.
4923 (regs_info): Rename to regs_info_aarch64.
4924 (aarch64_regs_info): Return right regs_info.
4925 (initialize_low_arch): Call initialize_low_arch_aarch32.
4926
4927 2015-08-04 Yao Qi <yao.qi@linaro.org>
4928
4929 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4930 * linux-aarch32-low.c: New file.
4931 * linux-aarch32-low.h: New file.
4932 * linux-arm-low.c (arm_fill_gregset): Move it to
4933 linux-aarch32-low.c.
4934 (arm_store_gregset): Likewise.
4935 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4936 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4937 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4938 (regs_info): Rename to regs_info_arm.
4939 (arm_regs_info): Return regs_info_aarch32 if
4940 have_ptrace_getregset is 1 and target description is
4941 arm_with_neon or arm_with_vfpv3.
4942 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4943 Call initialize_low_arch_aarch32 instead.
4944
4945 2015-08-04 Yao Qi <yao.qi@linaro.org>
4946
4947 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4948 * linux-low.c: ... here.
4949 * linux-low.h (have_ptrace_getregset): Declare it.
4950
4951 2015-08-04 Pedro Alves <palves@redhat.com>
4952
4953 * thread-db.c (struct thread_db): Use new typedefs.
4954 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4955 CHK calls.
4956 (disable_thread_event_reporting): Cast result of dlsym to
4957 destination function pointer type.
4958 (thread_db_mourn): Use td_ta_delete_ftype.
4959
4960 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4961
4962 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4963 arch variant.
4964 (CDX_BREAKPOINT): Define for R2.
4965 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4966 (the_low_target): Add comments.
4967
4968 2015-07-30 Yao Qi <yao.qi@linaro.org>
4969
4970 * linux-arm-low.c (arm_hwcap): Remove it.
4971 (arm_read_description): New local variable arm_hwcap. Don't
4972 set arm_hwcap to zero.
4973
4974 2015-07-30 Yao Qi <yao.qi@linaro.org>
4975
4976 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4977 Use regcache->tdesc instead.
4978 (arm_store_wmmxregset): Likewise.
4979 (arm_fill_vfpregset): Likewise.
4980 (arm_store_vfpregset): Likewise.
4981
4982 2015-07-30 Yao Qi <yao.qi@linaro.org>
4983
4984 * linux-arm-low.c: Include arch/arm.h.
4985 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4986 (arm_store_gregset): Likewise.
4987
4988 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4989
4990 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4991 ptrace's 4th parameter.
4992
4993 2015-07-27 Yao Qi <yao.qi@linaro.org>
4994
4995 * configure.srv (case aarch64*-*-linux*): Don't set
4996 srv_linux_usrregs.
4997
4998 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4999
5000 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5001 sys/ptrace.h.
5002 * linux-arm-low.c: Likewise.
5003 * linux-cris-low.c: Likewise.
5004 * linux-crisv32-low.c: Likewise.
5005 * linux-low.c: Likewise.
5006 * linux-m68k-low.c: Likewise.
5007 * linux-mips-low.c: Likewise.
5008 * linux-nios2-low.c: Likewise.
5009 * linux-s390-low.c: Likewise.
5010 * linux-sparc-low.c: Likewise.
5011 * linux-tic6x-low.c: Likewise.
5012 * linux-tile-low.c: Likewise.
5013 * linux-x86-low.c: Likewise.
5014
5015 2015-07-24 Pedro Alves <palves@redhat.com>
5016
5017 * config.in: Regenerate.
5018 * configure: Regenerate.
5019
5020 2015-07-24 Pedro Alves <palves@redhat.com>
5021
5022 * acinclude.m4: Include ../ptrace.m4.
5023 * configure.ac: Call GDB_AC_PTRACE.
5024 * config.in, configure: Regenerate.
5025
5026 2015-07-24 Yao Qi <yao.qi@linaro.org>
5027
5028 * linux-low.c (linux_create_inferior): Remove setting to
5029 proc->priv->new_inferior.
5030 (linux_attach): Likewise.
5031 (linux_low_filter_event): Likewise.
5032 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5033
5034 2015-07-24 Yao Qi <yao.qi@linaro.org>
5035
5036 * linux-low.c (linux_arch_setup): New function.
5037 (linux_low_filter_event): If proc->tdesc is NULL and
5038 proc->attached is true, call the_low_target.arch_setup.
5039 Otherwise, keep status pending, and return.
5040 (linux_resume_one_lwp_throw): Don't call get_pc if
5041 thread->while_stepping isn't NULL. Don't call
5042 get_thread_regcache if proc->tdesc is NULL.
5043 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5044 (linux_target_ops): Install arch_setup.
5045 * server.c (start_inferior): Call the_target->arch_setup.
5046 * target.h (struct target_ops) <arch_setup>: New field.
5047 (target_arch_setup): New marco.
5048 * lynx-low.c (lynx_target_ops): Update.
5049 * nto-low.c (nto_target_ops): Update.
5050 * spu-low.c (spu_target_ops): Update.
5051 * win32-low.c (win32_target_ops): Update.
5052
5053 2015-07-24 Yao Qi <yao.qi@linaro.org>
5054
5055 * linux-low.c (linux_add_process): Don't set
5056 proc->priv->new_inferior.
5057 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5058 (linux_attach): Likewise.
5059
5060 2015-07-24 Yao Qi <yao.qi@linaro.org>
5061
5062 * server.c (start_inferior): Code refactor.
5063
5064 2015-07-24 Yao Qi <yao.qi@linaro.org>
5065
5066 * server.c (process_serial_event): Set general_thread.
5067
5068 2015-07-21 Yao Qi <yao.qi@linaro.org>
5069
5070 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5071 aarch64_linux_get_debug_reg_capacity.
5072
5073 2015-07-17 Yao Qi <yao.qi@linaro.org>
5074
5075 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5076 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5077 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5078 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5079 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5080 (AARCH64_HWP_ALIGNMENT): Likewise.
5081 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5082 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5083 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5084 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5085 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5086 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5087 (struct aarch64_debug_reg_state): Likewise.
5088 (struct arch_lwp_info): Likewise.
5089 (aarch64_align_watchpoint): Likewise.
5090 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5091 (aarch64_watchpoint_length): Likewise.
5092 (aarch64_point_encode_ctrl_reg): Likewise
5093 (aarch64_point_is_aligned): Likewise.
5094 (aarch64_align_watchpoint): Likewise.
5095 (aarch64_linux_set_debug_regs):
5096 (aarch64_dr_state_insert_one_point): Likewise.
5097 (aarch64_dr_state_remove_one_point): Likewise.
5098 (aarch64_handle_breakpoint): Likewise.
5099 (aarch64_handle_aligned_watchpoint): Likewise.
5100 (aarch64_handle_unaligned_watchpoint): Likewise.
5101 (aarch64_handle_watchpoint): Likewise.
5102
5103 2015-07-17 Yao Qi <yao.qi@linaro.org>
5104
5105 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5106 and don't aarch64_get_debug_reg_state. All callers update.
5107 (aarch64_handle_aligned_watchpoint): Likewise.
5108 (aarch64_handle_unaligned_watchpoint): Likewise.
5109 (aarch64_handle_watchpoint): Likewise.
5110 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5111 (aarch64_remove_point): Likewise.
5112
5113 2015-07-17 Yao Qi <yao.qi@linaro.org>
5114
5115 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5116 debug_printf.
5117 (aarch64_handle_unaligned_watchpoint): Likewise.
5118
5119 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5120
5121 Revert the previous 3 commits:
5122 Move gdb_regex* to common/
5123 Move linux_find_memory_regions_full & co.
5124 gdbserver build-id attribute generator
5125
5126 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5127 Jan Kratochvil <jan.kratochvil@redhat.com>
5128
5129 gdbserver build-id attribute generator.
5130 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5131 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5132 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5133 (find_phdr): New.
5134 (get_dynamic): Use find_pdhr to traverse program headers.
5135 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5136 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5137 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5138 (get_hex_build_id): New.
5139 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5140 to reply XML document.
5141
5142 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5143 Jan Kratochvil <jan.kratochvil@redhat.com>
5144
5145 * target.c: Include target/target-utils.h and fcntl.h.
5146 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5147 (target_fileio_read_stralloc): New functions.
5148
5149 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5150
5151 * Makefile.in (OBS): Add gdb_regex.o.
5152 (gdb_regex.o): New.
5153 * config.in: Rebuilt.
5154 * configure: Rebuilt.
5155
5156 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5157 Jan Kratochvil <jan.kratochvil@redhat.com>
5158
5159 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5160 * Makefile.in (OBS): Add target-utils.o.
5161 (linux-maps.o, target-utils.o): New.
5162 * configure.srv (srv_linux_obj): Add linux-maps.o.
5163
5164 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5165
5166 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5167 function, return 1.
5168 (the_low_target): Install it.
5169
5170 2015-07-14 Pedro Alves <palves@redhat.com>
5171
5172 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5173 Instead, ignore ECHILD, and throw an error for other errnos.
5174
5175 2015-07-10 Pedro Alves <palves@redhat.com>
5176
5177 * event-loop.c (struct callback_event) <data>: Change type to
5178 gdb_client_data instance instead of gdb_client_data pointer.
5179 (append_callback_event): Adjust.
5180
5181 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5182
5183 * linux-aarch64-low.c: Add comments for each linux_target_ops
5184 method. Remove comments already covered in target_ops and
5185 linux_target_ops definitions.
5186 (the_low_target): Add comments for each unimplemented method.
5187
5188 2015-07-09 Yao Qi <yao.qi@linaro.org>
5189
5190 * linux-aarch64-low.c (aarch64_regmap): Remove.
5191 (aarch64_usrregs_info): Remove.
5192 (regs_info): Set field usrregs to NULL.
5193
5194 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5195
5196 * linux-low.c: Include "rsp-low.h"
5197 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5198 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5199 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5200 (handle_btrace_enable_pt): New.
5201 (handle_btrace_general_set): Support "pt".
5202 (handle_btrace_conf_general_set): Support "pt:size".
5203
5204 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5205
5206 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5207 Z_PACKET_SW_BP.
5208
5209 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5210
5211 * linux-aarch64-low.c: Remove comment about endianness.
5212 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5213 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5214 memcmp.
5215
5216 2015-06-24 Gary Benson <gbenson@redhat.com>
5217
5218 * linux-i386-ipa.c (stdint.h): Do not include.
5219 * lynx-i386-low.c (stdint.h): Likewise.
5220 * lynx-ppc-low.c (stdint.h): Likewise.
5221 * mem-break.c (stdint.h): Likewise.
5222 * thread-db.c (stdint.h): Likewise.
5223 * tracepoint.c (stdint.h): Likewise.
5224 * win32-low.c (stdint.h): Likewise.
5225
5226 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5227
5228 * server.c (write_qxfer_response): Update call to
5229 remote_escape_output.
5230
5231 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5232 Jan Kratochvil <jan.kratochvil@redhat.com>
5233
5234 Merge multiple hex conversions.
5235 * gdbreplay.c (tohex): Rename to 'fromhex'.
5236 (logchar): Use fromhex.
5237
5238 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5239
5240 * server.c (handle_qxfer_libraries): Set `version' attribute for
5241 <library-list>.
5242
5243 2015-06-10 Gary Benson <gbenson@redhat.com>
5244
5245 * target.h (struct target_ops) <multifs_open>: New field.
5246 <multifs_unlink>: Likewise.
5247 <multifs_readlink>: Likewise.
5248 * linux-low.c (nat/linux-namespaces.h): New include.
5249 (linux_target_ops): Initialize the_target->multifs_open,
5250 the_target->multifs_unlink and the_target->multifs_readlink.
5251 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5252 * hostio.c (hostio_fs_pid): New static variable.
5253 (hostio_handle_new_gdb_connection): New function.
5254 (handle_setfs): Likewise.
5255 (handle_open): Use the_target->multifs_open as appropriate.
5256 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5257 (handle_readlink): Use the_target->multifs_readlink as
5258 appropriate.
5259 (handle_vFile): Handle vFile:setfs packets.
5260 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5261 after target_handle_new_gdb_connection.
5262
5263 2015-06-10 Gary Benson <gbenson@redhat.com>
5264
5265 * configure.ac (AC_CHECK_FUNCS): Add setns.
5266 * config.in: Regenerate.
5267 * configure: Likewise.
5268 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5269 (linux-namespaces.o): New rule.
5270 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5271
5272 2015-06-09 Gary Benson <gbenson@redhat.com>
5273
5274 * hostio.c (handle_open): Process mode argument with
5275 fileio_to_host_mode.
5276
5277 2015-06-01 Yao Qi <yao.qi@linaro.org>
5278
5279 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5280 * linux-x86-low.c: Likewise.
5281
5282 2015-05-28 Don Breazeal <donb@codesourcery.com>
5283
5284 * linux-low.c (handle_extended_wait): Initialize
5285 thread_info.last_resume_kind for new fork children.
5286
5287 2015-05-15 Pedro Alves <palves@redhat.com>
5288
5289 * target.h (target_handle_new_gdb_connection): Rewrite using if
5290 wrapped in do/while.
5291
5292 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5293
5294 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5295 * configure, config.in: Regenerate.
5296 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5297 Declare typedef.
5298
5299 2015-05-12 Don Breazeal <donb@codesourcery.com>
5300
5301 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5302 PTRACE_EVENT_VFORK_DONE.
5303 (linux_low_ptrace_options, extended_event_reported): Add vfork
5304 events.
5305 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5306 and "vforkdone" for RSP 'T' Stop Reply Packet.
5307 * server.h (report_vfork_events): Declare
5308 global variable.
5309
5310 2015-05-12 Don Breazeal <donb@codesourcery.com>
5311
5312 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5313 (the_low_target) <new_fork>: Initialize new member.
5314 * linux-arm-low.c (arm_new_fork): New function.
5315 (the_low_target) <new_fork>: Initialize new member.
5316 * linux-low.c (handle_extended_wait): Call new target function
5317 new_fork.
5318 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5319 * linux-mips-low.c (mips_add_watchpoint): New function
5320 extracted from mips_insert_point.
5321 (the_low_target) <new_fork>: Initialize new member.
5322 (mips_linux_new_fork): New function.
5323 (mips_insert_point): Call mips_add_watchpoint.
5324 * linux-x86-low.c (x86_linux_new_fork): New function.
5325 (the_low_target) <new_fork>: Initialize new member.
5326
5327 2015-05-12 Don Breazeal <donb@codesourcery.com>
5328
5329 * linux-low.c (handle_extended_wait): Implement return value,
5330 rename argument 'event_child' to 'event_lwp', handle
5331 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5332 (linux_low_ptrace_options): New function.
5333 (linux_low_filter_event): Call linux_low_ptrace_options,
5334 use different argument fo linux_enable_event_reporting,
5335 use return value from handle_extended_wait.
5336 (extended_event_reported): New function.
5337 (linux_wait_1): Call extended_event_reported and set
5338 status to report fork events.
5339 (linux_write_memory): Add pid to debug message.
5340 (reset_lwp_ptrace_options_callback): New function.
5341 (linux_handle_new_gdb_connection): New function.
5342 (linux_target_ops): Initialize new structure member.
5343 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5344 * lynx-low.c: Initialize new structure member.
5345 * remote-utils.c (prepare_resume_reply): Implement stop reason
5346 "fork" for "T" stop message.
5347 * server.c (handle_query): Call handle_new_gdb_connection.
5348 * server.h (report_fork_events): Declare global flag.
5349 * target.h (struct target_ops) <handle_new_gdb_connection>:
5350 New member.
5351 (target_handle_new_gdb_connection): New macro.
5352 * win32-low.c: Initialize new structure member.
5353
5354 2015-05-12 Don Breazeal <donb@codesourcery.com>
5355
5356 * mem-break.c (APPEND_TO_LIST): Define macro.
5357 (clone_agent_expr): New function.
5358 (clone_one_breakpoint): New function.
5359 (clone_all_breakpoints): New function.
5360 * mem-break.h: Declare new functions.
5361
5362 2015-05-12 Don Breazeal <donb@codesourcery.com>
5363
5364 * linux-low.c (linux_supports_fork_events): New function.
5365 (linux_supports_vfork_events): New function.
5366 (linux_target_ops): Initialize new structure members.
5367 (initialize_low): Call linux_check_ptrace_features.
5368 * lynx-low.c (lynx_target_ops): Initialize new structure
5369 members.
5370 * server.c (report_fork_events, report_vfork_events):
5371 New global flags.
5372 (handle_query): Add new features to qSupported packet and
5373 response.
5374 (captured_main): Initialize new global variables.
5375 * target.h (struct target_ops) <supports_fork_events>:
5376 New member.
5377 <supports_vfork_events>: New member.
5378 (target_supports_fork_events): New macro.
5379 (target_supports_vfork_events): New macro.
5380 * win32-low.c (win32_target_ops): Initialize new structure
5381 members.
5382
5383 2015-05-12 Gary Benson <gbenson@redhat.com>
5384
5385 * server.c (handle_qxfer_exec_file): Use current process
5386 if annex is empty.
5387
5388 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5389
5390 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5391 Remove HAVE_PTRACE_GETREGS conditionals.
5392 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5393 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5394
5395 2015-05-08 Yao Qi <yao.qi@linaro.org>
5396
5397 * linux-low.c (linux_supports_conditional_breakpoints): New
5398 function.
5399 (linux_target_ops): Install new target method.
5400 * lynx-low.c (lynx_target_ops): Install NULL hook for
5401 supports_conditional_breakpoints.
5402 * nto-low.c (nto_target_ops): Likewise.
5403 * spu-low.c (spu_target_ops): Likewise.
5404 * win32-low.c (win32_target_ops): Likewise.
5405 * server.c (handle_query): Check
5406 target_supports_conditional_breakpoints.
5407 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5408 New field.
5409 (target_supports_conditional_breakpoints): New macro.
5410
5411 2015-05-06 Pedro Alves <palves@redhat.com>
5412
5413 PR server/18081
5414 * server.c (start_inferior): If the process exits, mourn it.
5415
5416 2015-04-21 Gary Benson <gbenson@redhat.com>
5417
5418 * hostio.c (fileio_open_flags_to_host): Factored out to
5419 fileio_to_host_openflags in common/fileio.c. Single use
5420 updated.
5421
5422 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5423
5424 * linux-xtensa-low.c (xtensa_fill_gregset)
5425 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5426 XCHAL_HAVE_LOOP.
5427
5428 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5429
5430 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5431 (regs_info): Replace usrregs pointer with NULL.
5432
5433 2015-04-17 Gary Benson <gbenson@redhat.com>
5434
5435 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5436 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5437 * server.c (handle_qxfer_exec_file): New function.
5438 (qxfer_packets): Add exec-file entry.
5439 (handle_query): Report qXfer:exec-file:read as supported packet.
5440
5441 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5442
5443 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5444
5445 2015-04-09 Gary Benson <gbenson@redhat.com>
5446
5447 * hostio-errno.c (errno_to_fileio_error): Remove function.
5448 Update caller to use remote_fileio_to_fio_error.
5449
5450 2015-04-09 Yao Qi <yao.qi@linaro.org>
5451
5452 * linux-low.c (linux_insert_point): Call
5453 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5454 (linux_remove_point): Call remove_memory_breakpoint if type is
5455 raw_bkpt_type_sw.
5456 * linux-x86-low.c (x86_insert_point): Don't call
5457 insert_memory_breakpoint.
5458 (x86_remove_point): Don't call remove_memory_breakpoint.
5459
5460 2015-04-01 Pedro Alves <palves@redhat.com>
5461 Cleber Rosa <crosa@redhat.com>
5462
5463 * server.c (gdbserver_usage): Reorganize and extend the usage
5464 message.
5465
5466 2015-03-24 Pedro Alves <palves@redhat.com>
5467
5468 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5469 output. Also dump TRAP_TRACE.
5470 (linux_low_filter_event): In debug output, distinguish a
5471 resume_stop SIGSTOP from a delayed SIGSTOP.
5472
5473 2015-03-24 Gary Benson <gbenson@redhat.com>
5474
5475 * linux-x86-low.c (x86_linux_new_thread): Moved to
5476 nat/x86-linux.c.
5477 (x86_linux_prepare_to_resume): Likewise.
5478
5479 2015-03-24 Gary Benson <gbenson@redhat.com>
5480
5481 * Makefile.in (x86-linux-dregs.o): New rule.
5482 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5483 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5484 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5485 (x86_linux_dr_get): Likewise.
5486 (x86_linux_dr_set): Likewise.
5487 (update_debug_registers_callback): Likewise.
5488 (x86_linux_dr_set_addr): Likewise.
5489 (x86_linux_dr_get_addr): Likewise.
5490 (x86_linux_dr_set_control): Likewise.
5491 (x86_linux_dr_get_control): Likewise.
5492 (x86_linux_dr_get_status): Likewise.
5493 (x86_linux_update_debug_registers): Likewise.
5494
5495 2015-03-24 Gary Benson <gbenson@redhat.com>
5496
5497 * linux-x86-low.c (x86_linux_update_debug_registers):
5498 New function, factored out from...
5499 (x86_linux_prepare_to_resume): ...this.
5500
5501 2015-03-24 Gary Benson <gbenson@redhat.com>
5502
5503 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5504 (x86_linux_dr_set): Likewise.
5505 (update_debug_registers_callback): Likewise.
5506 (x86_linux_dr_set_addr): Likewise.
5507 (x86_linux_dr_get_addr): Likewise.
5508 (x86_linux_dr_set_control): Likewise.
5509 (x86_linux_dr_get_control): Likewise.
5510 (x86_linux_dr_get_status): Likewise.
5511 (x86_linux_prepare_to_resume): Likewise.
5512
5513 2015-03-24 Gary Benson <gbenson@redhat.com>
5514
5515 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5516 Use perror_with_name. Pass string through gettext.
5517 (x86_linux_dr_set): Likewise.
5518
5519 2015-03-24 Gary Benson <gbenson@redhat.com>
5520
5521 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5522 (x86_linux_dr_set_addr): ...this.
5523 (x86_dr_low_get_addr): Rename to...
5524 (x86_linux_dr_get_addr): ...this.
5525 (x86_dr_low_set_control): Rename to...
5526 (x86_linux_dr_set_control): ...this.
5527 (x86_dr_low_get_control): Rename to...
5528 (x86_linux_dr_get_control): ...this.
5529 (x86_dr_low_get_status): Rename to...
5530 (x86_linux_dr_get_status): ...this.
5531 (x86_dr_low): Update with new function names.
5532
5533 2015-03-24 Gary Benson <gbenson@redhat.com>
5534
5535 * Makefile.in (x86-linux.o): New rule.
5536 * configure.srv: Add x86-linux.o to relevant targets.
5537 * linux-low.c (lwp_set_arch_private_info): New function.
5538 (lwp_arch_private_info): Likewise.
5539 * linux-x86-low.c: Include nat/x86-linux.h.
5540 (arch_lwp_info): Removed structure.
5541 (update_debug_registers_callback):
5542 Use lwp_set_debug_registers_changed.
5543 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5544 and lwp_set_debug_registers_changed.
5545 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5546
5547 2015-03-24 Gary Benson <gbenson@redhat.com>
5548
5549 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5550 * linux-arm-low.c (arm_new_thread): Likewise.
5551 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5552 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5553 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5554 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5555
5556 2015-03-24 Gary Benson <gbenson@redhat.com>
5557
5558 * linux-low.c (ptid_of_lwp): New function.
5559 (lwp_is_stopped): Likewise.
5560 (lwp_stop_reason): Likewise.
5561 * linux-x86-low.c (update_debug_registers_callback):
5562 Use lwp_is_stopped.
5563 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5564 lwp_stop_reason.
5565
5566 2015-03-24 Gary Benson <gbenson@redhat.com>
5567
5568 * linux-low.h (linux_stop_lwp): Remove declaration.
5569
5570 2015-03-24 Gary Benson <gbenson@redhat.com>
5571
5572 * linux-low.h: Include nat/linux-nat.h.
5573 * linux-low.c (iterate_over_lwps_args): New structure.
5574 (iterate_over_lwps_filter): New function.
5575 (iterate_over_lwps): Likewise.
5576 * linux-x86-low.c (update_debug_registers_callback):
5577 Update signature to what iterate_over_lwps expects.
5578 Remove PID check that iterate_over_lwps now performs.
5579 (x86_dr_low_set_addr): Use iterate_over_lwps.
5580 (x86_dr_low_set_control): Likewise.
5581
5582 2015-03-24 Gary Benson <gbenson@redhat.com>
5583
5584 * linux-x86-low.c (x86_debug_reg_state): New function.
5585 (x86_linux_prepare_to_resume): Use the above.
5586
5587 2015-03-24 Gary Benson <gbenson@redhat.com>
5588
5589 * linux-low.c (current_lwp_ptid): New function.
5590 * linux-x86-low.c: Include nat/linux-nat.h.
5591 (x86_dr_low_get_addr): Use current_lwp_ptid.
5592 (x86_dr_low_get_control): Likewise.
5593 (x86_dr_low_get_status): Likewise.
5594
5595 2015-03-20 Pedro Alves <palves@redhat.com>
5596
5597 * tracepoint.c (cmd_qtstatus): Make "str" const.
5598
5599 2015-03-20 Pedro Alves <palves@redhat.com>
5600
5601 * server.c (handle_general_set): Make "req_str" const.
5602
5603 2015-03-19 Pedro Alves <palves@redhat.com>
5604
5605 * linux-low.c (linux_resume_one_lwp): Rename to ...
5606 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5607 instead call perror_with_name.
5608 (check_ptrace_stopped_lwp_gone): New function.
5609 (linux_resume_one_lwp): Reimplement as wrapper around
5610 linux_resume_one_lwp_throw that swallows errors if the LWP is
5611 gone.
5612
5613 2015-03-19 Pedro Alves <palves@redhat.com>
5614
5615 * linux-low.c (count_events_callback, select_event_lwp_callback):
5616 No longer check whether the thread has resume_stop as last resume
5617 kind.
5618
5619 2015-03-19 Pedro Alves <palves@redhat.com>
5620
5621 * linux-low.c (count_events_callback, select_event_lwp_callback):
5622 Use the lwp's status_pending_p field, not the thread's.
5623
5624 2015-03-19 Pedro Alves <palves@redhat.com>
5625
5626 * linux-low.c (select_event_lwp_callback): Update comments to
5627 no longer mention SIGTRAP.
5628
5629 2015-03-18 Gary Benson <gbenson@redhat.com>
5630
5631 * server.c (handle_query): Do not report vFile:fstat as supported.
5632
5633 2015-03-11 Gary Benson <gbenson@redhat.com>
5634
5635 * hostio.c (sys/types.h): New include.
5636 (sys/stat.h): Likewise.
5637 (common-remote-fileio.h): Likewise.
5638 (handle_fstat): New function.
5639 (handle_vFile): Handle vFile:fstat packets.
5640
5641 2015-03-11 Gary Benson <gbenson@redhat.com>
5642
5643 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5644 struct stat.st_blocks and struct stat.st_blksize.
5645 * configure: Regenerate.
5646 * config.in: Likewise.
5647 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5648 (OBS): Add common-remote-fileio.o.
5649 (common-remote-fileio.o): New rule.
5650
5651 2015-03-09 Pedro Alves <palves@redhat.com>
5652
5653 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5654 'struct sockaddr' pointer in 'accept' call.
5655
5656 2015-03-09 Pedro Alves <palves@redhat.com>
5657
5658 Revert:
5659 2015-03-07 Pedro Alves <palves@redhat.com>
5660 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5661 or <winsock2.h> here. Instead include "gdb_socket.h".
5662 (remote_open): Use union gdb_sockaddr_u.
5663 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5664 or <winsock2.h> here. Instead include "gdb_socket.h".
5665 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5666 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5667 or <sys/un.h>.
5668 (init_named_socket, gdb_agent_helper_thread): Use union
5669 gdb_sockaddr_u.
5670
5671 2015-03-07 Pedro Alves <palves@redhat.com>
5672
5673 * configure.ac (build_warnings): Move
5674 -Wdeclaration-after-statement to the C-specific set.
5675 * configure: Regenerate.
5676
5677 2015-03-07 Pedro Alves <palves@redhat.com>
5678
5679 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5680 or <winsock2.h> here. Instead include "gdb_socket.h".
5681 (remote_open): Use union gdb_sockaddr_u.
5682 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5683 or <winsock2.h> here. Instead include "gdb_socket.h".
5684 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5685 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5686 or <sys/un.h>.
5687 (init_named_socket, gdb_agent_helper_thread): Use union
5688 gdb_sockaddr_u.
5689
5690 2015-03-07 Pedro Alves <palves@redhat.com>
5691
5692 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5693 instead.
5694
5695 2015-03-06 Yao Qi <yao.qi@linaro.org>
5696
5697 * linux-aarch64-low.c (aarch64_insert_point): Use
5698 show_debug_regs as a boolean.
5699 (aarch64_remove_point): Likewise.
5700
5701 2015-03-05 Pedro Alves <palves@redhat.com>
5702
5703 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5704 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5705 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5706 * nto-low.c (nto_target_ops): Likewise.
5707 * spu-low.c (spu_target_ops): Likewise.
5708 * win32-low.c (win32_target_ops): Likewise.
5709
5710 2015-03-04 Pedro Alves <palves@redhat.com>
5711
5712 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5713 Decide whether a breakpoint triggered based on the SIGTRAP's
5714 siginfo.si_code.
5715 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5716 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5717 (linux_low_filter_event): Check for breakpoints before checking
5718 watchpoints.
5719 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5720 siginfo.si_code.
5721 (linux_stopped_by_sw_breakpoint)
5722 (linux_supports_stopped_by_sw_breakpoint)
5723 (linux_stopped_by_hw_breakpoint)
5724 (linux_supports_stopped_by_hw_breakpoint): New functions.
5725 (linux_target_ops): Install new target methods.
5726
5727 2015-03-04 Pedro Alves <palves@redhat.com>
5728
5729 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5730 * server.c (swbreak_feature, hwbreak_feature): New globals.
5731 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5732 (captured_main): Clear swbreak_feature and hwbreak_feature.
5733 * server.h (swbreak_feature, hwbreak_feature): Declare.
5734 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5735 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5736 supports_stopped_by_hw_breakpoint>: New fields.
5737 (target_supports_stopped_by_sw_breakpoint)
5738 (target_stopped_by_sw_breakpoint)
5739 (target_supports_stopped_by_hw_breakpoint)
5740 (target_stopped_by_hw_breakpoint): Declare.
5741
5742 2015-03-04 Pedro Alves <palves@redhat.com>
5743
5744 enum lwp_stop_reason -> enum target_stop_reason
5745 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5746 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5747 (linux_wait_1, stuck_in_jump_pad_callback)
5748 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5749 (linux_stopped_by_watchpoint):
5750 * linux-low.h (enum lwp_stop_reason): Delete.
5751 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5752 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5753
5754 2015-03-04 Yao Qi <yao.qi@linaro.org>
5755
5756 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5757
5758 2015-03-03 Gary Benson <gbenson@redhat.com>
5759
5760 * hostio.c (handle_vFile): Fix prefix lengths.
5761
5762 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5763
5764 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5765 ptr_bits.
5766
5767 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5768
5769 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5770 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5771 (clean): Add "rm -f" for above C files.
5772 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5773 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5774 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5775 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5776 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5777 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5778 (init_registers_s390x_vx_linux64)
5779 (init_registers_s390x_tevx_linux64)
5780 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5781 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5782 declarations.
5783 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5784 (s390_store_vxrs_high): New functions.
5785 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5786 NT_S390_VXRS_HIGH.
5787 (s390_arch_setup): Add logic for selecting one of the new target
5788 descriptions. Activate the new vector regsets if applicable.
5789 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5790 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5791 and init_registers_s390x_tevx_linux64.
5792
5793 2015-03-01 Pedro Alves <palves@redhat.com>
5794
5795 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5796 parameter.
5797
5798 2015-02-27 Pedro Alves <palves@redhat.com>
5799
5800 * linux-x86-low.c (u_debugreg_offset): New function.
5801 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5802
5803 2015-02-27 Pedro Alves <palves@redhat.com>
5804
5805 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5806 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5807 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5808 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5809 (ps_lsetfpregs, ps_getpid)
5810 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5811 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5812 (ps_lsetxregs, ps_plog): Declare.
5813
5814 2015-02-27 Pedro Alves <palves@redhat.com>
5815
5816 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5817 IP_AGENT_EXPORT_FUNC.
5818 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5819 IP_AGENT_EXPORT_FUNC.
5820 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5821 (IP_AGENT_EXPORT): Delete.
5822 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5823 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5824 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5825 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5826 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5827 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5828 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5829 (traceframe_read_count, traceframe_write_count)
5830 (traceframes_created, trace_state_variables, get_raw_reg)
5831 (get_trace_state_variable_value, set_trace_state_variable_value)
5832 (ust_loaded, helper_thread_id, cmd_buf): Use
5833 IPA_SYM_EXPORTED_NAME.
5834 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5835 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5836 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5837 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5838 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5839 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5840 EXTERN_C_PUSH/EXTERN_C_POP.
5841 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5842 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5843 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5844 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5845 (traceframe_write_count, traceframe_read_count)
5846 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5847 (about_to_request_buffer_space, get_trace_state_variable_value)
5848 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5849 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5850 EXTERN_C_PUSH/EXTERN_C_POP.
5851 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5852 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5853 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5854 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5855 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5856 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5857 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5858 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5859 Define.
5860 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5861 (IP_AGENT_EXPORT_VAR_DECL): Define.
5862 (tracing): Declare.
5863 (gdb_agent_get_raw_reg): Declare.
5864
5865 2015-02-27 Tom Tromey <tromey@redhat.com>
5866 Pedro Alves <palves@redhat.com>
5867
5868 Rename symbols whose names are reserved C++ keywords throughout.
5869
5870 2015-02-27 Pedro Alves <palves@redhat.com>
5871
5872 * Makefile.in (COMPILER): New, get it from autoconf.
5873 (CXX): Get from autoconf instead.
5874 (COMPILE.pre): Use COMPILER.
5875 (CC-LD): Rename to ...
5876 (CC_LD): ... this. Use COMPILER.
5877 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5878 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5879 * acinclude.m4: Include build-with-cxx.m4.
5880 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5881 Disable -Werror by default if building in C++ mode.
5882 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5883 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5884 the C++ compiler. Save/restore CXXFLAGS too.
5885 * configure: Regenerate.
5886
5887 2015-02-27 Pedro Alves <palves@redhat.com>
5888
5889 * acinclude.m4: Include libiberty.m4.
5890 * configure.ac: Call libiberty_INIT.
5891 * config.in, configure: Regenerate.
5892
5893 2015-02-26 Pedro Alves <palves@redhat.com>
5894
5895 * linux-low.c (linux_wait_1): When incrementing the PC past a
5896 program breakpoint always use the_low_target.breakpoint_len as
5897 increment, rather than the maximum between that and
5898 the_low_target.decr_pc_after_break.
5899
5900 2015-02-23 Pedro Alves <palves@redhat.com>
5901
5902 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5903 thread was doing a step-over; always adjust the PC if
5904 we stepped over a permanent breakpoint.
5905 (linux_wait_1): If we stepped over breakpoint that was on top of a
5906 permanent breakpoint, manually advance the PC past it.
5907
5908 2015-02-23 Pedro Alves <palves@redhat.com>
5909
5910 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5911 modes.
5912 (x86_fill_gregset, x86_store_gregset): Use it when handling
5913 $orig_eax.
5914
5915 2015-02-20 Pedro Alves <palves@redhat.com>
5916
5917 * thread-db.c: Include "nat/linux-procfs.h".
5918 (thread_db_init): Skip listing new threads if the kernel supports
5919 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5920
5921 2015-02-20 Pedro Alves <palves@redhat.com>
5922
5923 * linux-low.c (status_pending_p_callback): Use ptid_match.
5924
5925 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5926
5927 PR breakpoints/16812
5928 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5929 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5930 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5931
5932 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5933
5934 PR breakpoints/15956
5935 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5936
5937 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5938
5939 * linux-low.c (linux_low_btrace_conf): Print size.
5940 * server.c (handle_btrace_conf_general_set): New.
5941 (hanle_general_set): Call handle_btrace_conf_general_set.
5942 (handle_query): Report Qbtrace-conf:bts:size as supported.
5943
5944 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5945
5946 * linux-low.c (linux_low_enable_btrace): Update parameters.
5947 (linux_low_btrace_conf): New.
5948 (linux_target_ops)<to_btrace_conf>: Initialize.
5949 * server.c (current_btrace_conf): New.
5950 (handle_btrace_enable): Rename to ...
5951 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5952 to target_enable_btrace. Update comment. Update users.
5953 (handle_qxfer_btrace_conf): New.
5954 (qxfer_packets): Add btrace-conf entry.
5955 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5956 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5957 (target_ops)<read_btrace_conf>: New.
5958 (target_enable_btrace): Update parameters.
5959 (target_read_btrace_conf): New.
5960
5961 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5962
5963 * server.c (handle_btrace_general_set): Remove call to
5964 target_supports_btrace.
5965 (supported_btrace_packets): New.
5966 (handle_query): Call supported_btrace_packets.
5967 * target.h: include btrace-common.h.
5968 (btrace_target_info): Removed.
5969 (supports_btrace, target_supports_btrace): Update parameters.
5970
5971 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5972
5973 * Makefile.in (SFILES): Add common/btrace-common.c.
5974 (OBS): Add common/btrace-common.o.
5975 (btrace-common.o): Add build rules.
5976 * linux-low: Include btrace-common.h.
5977 (linux_low_read_btrace): Use struct btrace_data. Call
5978 btrace_data_init and btrace_data_fini.
5979
5980 2015-02-06 Pedro Alves <palves@redhat.com>
5981
5982 * thread-db.c (find_new_threads_callback): Add debug output.
5983
5984 2015-02-04 Pedro Alves <palves@redhat.com>
5985
5986 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5987 (resume_stopped_resumed_lwps): New function.
5988 (linux_wait_for_event_filtered): Use it.
5989
5990 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5991
5992 * Makefile.in (SFILES): Add linux-personality.c.
5993 (linux-personality.o): New rule.
5994 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5995 list of objects to be built.
5996 * linux-low.c: Include nat/linux-personality.h.
5997 (linux_create_inferior): Remove code to disable address space
5998 randomization (moved to ../nat/linux-personality.c). Create
5999 cleanup to disable address space randomization.
6000
6001 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6002
6003 * Makefile.in (posix-strerror.o): New rule.
6004 (mingw-strerror.o): Likewise.
6005 * configure: Regenerated.
6006 * configure.ac: Source file ../common/common.host. Initialize new
6007 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6008
6009 2015-01-14 Yao Qi <yao@codesourcery.com>
6010
6011 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6012 (ppc-linux.o): New rule.
6013 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6014 * configure.ac: AC_CHECK_FUNCS(getauxval).
6015 * config.in: Re-generated.
6016 * configure: Re-generated.
6017 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6018 ppc64_64bit_inferior_p
6019
6020 2015-01-14 Yao Qi <yao@codesourcery.com>
6021
6022 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6023 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6024 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6025 (PT_ORIG_R3, PT_TRAP): Likewise.
6026 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6027 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6028 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6029
6030 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6031
6032 * i387-fp.c (i387_cache_to_xsave): In look over
6033 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6034 zmmh_low_space field by use of zmmh_high_space.
6035
6036 2015-01-09 Pedro Alves <palves@redhat.com>
6037
6038 * linux-low.c (step_over_bkpt): Move higher up in the file.
6039 (handle_extended_wait): Don't store the stop_pc here.
6040 (get_stop_pc): Adjust comments and rename to ...
6041 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6042 stopped for a software breakpoint or hardware breakpoint.
6043 (thread_still_has_status_pending_p): New function.
6044 (status_pending_p_callback): Use
6045 thread_still_has_status_pending_p. If the event is no longer
6046 interesting, resume the LWP.
6047 (handle_tracepoints): Add assert.
6048 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6049 (wstatus_maybe_breakpoint): New function.
6050 (cancel_breakpoint): Delete function.
6051 (check_stopped_by_watchpoint): New function, factored out from
6052 linux_low_filter_event.
6053 (lp_status_maybe_breakpoint): Delete function.
6054 (linux_low_filter_event): Remove filter_ptid argument.
6055 Leave thread group exits pending here. Store the LWP's stop PC.
6056 Always leave events pending.
6057 (linux_wait_for_event_filtered): Pull all events out of the
6058 kernel, and leave them all pending.
6059 (count_events_callback, select_event_lwp_callback): Consider all
6060 events.
6061 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6062 (select_event_lwp): Only give preference to the stepping LWP in
6063 all-stop mode. Adjust comments.
6064 (ignore_event): New function.
6065 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6066 references to cancel_breakpoints. Adjust to renames. Also give
6067 equal priority to all LWPs that have had events in non-stop mode.
6068 If reporting a software breakpoint event, unadjust the LWP's PC.
6069 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6070 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6071 Adjust.
6072 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6073 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6074 (linux_stopped_by_watchpoint): Adjust.
6075 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6076 * linux-low.h (enum lwp_stop_reason): New.
6077 (struct lwp_info) <stop_pc>: Adjust comment.
6078 <stopped_by_watchpoint>: Delete field.
6079 <stop_reason>: New field.
6080 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6081 * mem-break.c (software_breakpoint_inserted_here)
6082 (hardware_breakpoint_inserted_here): New function.
6083 * mem-break.h (software_breakpoint_inserted_here)
6084 (hardware_breakpoint_inserted_here): Declare.
6085 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6086 (cancel_breakpoints): Delete.
6087 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6088 (upload_fast_traceframes): Remove references to
6089 cancel_breakpoints.
6090
6091 2015-01-09 Pedro Alves <palves@redhat.com>
6092
6093 * thread-db.c (find_new_threads_callback): Ignore thread if the
6094 kernel thread ID is -1.
6095
6096 2015-01-09 Pedro Alves <palves@redhat.com>
6097
6098 * linux-low.c (linux_attach_fail_reason_string): Move to
6099 nat/linux-ptrace.c, and rename.
6100 (linux_attach_lwp): Update comment.
6101 (attach_proc_task_lwp_callback): New function.
6102 (linux_attach): Adjust to rename and use
6103 linux_proc_attach_tgid_threads.
6104 (linux_attach_fail_reason_string): Delete declaration.
6105
6106 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6107
6108 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6109 * server.c (gdbserver_version): Likewise.
6110
6111 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6112
6113 * remote-utils.c: Include ctype.h.
6114 (input_interrupt): Explicitly handle the case when the char
6115 received is the NUL byte. Improve the printing of non-ASCII
6116 characters.
6117
6118 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6119
6120 * linux-low.c (linux_low_filter_event): Update call to
6121 linux_enable_event_reporting following the addition of
6122 a new parameter to that function.
6123
6124 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6125
6126 PR server/17457
6127 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6128 (AARCH64_FPCR_REGNO): Likewise.
6129 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6130 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6131 (aarch64_store_fpregset): Likewise.
6132
6133 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6134
6135 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6136 Remove FIXME comment about assumption about N.
6137
6138 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6139
6140 * configure.ac: If large-file support is disabled in GDBserver,
6141 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6142 * configure: Regenerate.
6143
6144 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6145
6146 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6147 warning upon ENODATA from ptrace.
6148 * linux-s390-low.c (s390_store_tdb): New.
6149 (s390_regsets): Add regset for NT_S390_TDB.
6150
6151 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6152
6153 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6154 without a fill_function.
6155 * linux-s390-low.c (s390_fill_last_break): Remove.
6156 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6157 (s390_arch_setup): Use regset's size instead of fill_function for
6158 loop end condition.
6159
6160 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6161
6162 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6163 the regset's store function when ptrace returned an error.
6164 * regcache.c (get_thread_regcache): Invalidate register cache
6165 before fetching inferior's registers.
6166
6167 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6168
6169 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6170 while-loop as for-loop.
6171 (regsets_store_inferior_registers): Likewise.
6172
6173 2014-11-28 Yao Qi <yao@codesourcery.com>
6174
6175 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6176 * config.in, configure: Re-generate.
6177 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6178 is defined.
6179
6180 2014-11-21 Yao Qi <yao@codesourcery.com>
6181
6182 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6183 (AC_CHECK_HEADERS): Remove malloc.h.
6184 * configure: Re-generated.
6185 * config.in: Re-generated.
6186 * server.h: Don't include alloca.h and malloc.h.
6187 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6188 Don't include malloc.h.
6189
6190 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6191
6192 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6193 corresponding ERRNO check in same block.
6194
6195 2014-11-12 Pedro Alves <palves@redhat.com>
6196
6197 * server.c (cont_thread): Update comment.
6198 (start_inferior, attach_inferior): No longer clear cont_thread.
6199 (handle_v_cont): No longer set cont_thread.
6200 (captured_main): Clear cont_thread each time a GDB connects.
6201
6202 2014-11-12 Pedro Alves <palves@redhat.com>
6203
6204 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6205 thread, and don't resume all threads if the Hc thread has exited.
6206
6207 2014-11-12 Pedro Alves <palves@redhat.com>
6208
6209 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6210 the process group instead of to a specific LWP.
6211
6212 2014-10-15 Pedro Alves <palves@redhat.com>
6213
6214 PR server/17487
6215 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6216 parameter.
6217 (arm_set_thread_context): Delete.
6218 (the_low_target): Adjust.
6219 * win32-i386-low.c (debug_registers_changed)
6220 (debug_registers_used): Delete.
6221 (update_debug_registers_callback): New function.
6222 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6223 needing to update their debug registers.
6224 (win32_get_current_dr): New function.
6225 (x86_dr_low_get_addr, x86_dr_low_get_control)
6226 (x86_dr_low_get_status): Fetch the debug register from the thread
6227 record's context.
6228 (i386_initial_stuff): Adjust.
6229 (i386_get_thread_context): Remove current_event parameter. Don't
6230 clear debug_registers_changed nor copy DR values to
6231 debug_reg_state.
6232 (i386_set_thread_context): Delete.
6233 (i386_prepare_to_resume): New function.
6234 (i386_thread_added): Mark the thread as needing to update irs
6235 debug registers.
6236 (the_low_target): Remove i386_set_thread_context and install
6237 i386_prepare_to_resume.
6238 * win32-low.c (win32_get_thread_context): Adjust.
6239 (win32_set_thread_context): Use SetThreadContext
6240 directly.
6241 (win32_prepare_to_resume): New function.
6242 (win32_require_context): New function, factored out from ...
6243 (thread_rec): ... this.
6244 (continue_one_thread): Call win32_prepare_to_resume on each thread
6245 we're about to continue.
6246 (win32_resume): Call win32_prepare_to_resume on the event thread.
6247 * win32-low.h (struct win32_thread_info)
6248 <debug_registers_changed>: New field.
6249 (struct win32_target_ops): Change prototype of set_thread_context,
6250 delete set_thread_context and add prepare_to_resume.
6251 (win32_require_context): New declaration.
6252
6253 2014-10-08 Gary Benson <gbenson@redhat.com>
6254
6255 * server.h: Do not include common-exceptions.h.
6256
6257 2014-10-08 Gary Benson <gbenson@redhat.com>
6258
6259 * server.h: Do not include cleanups.h.
6260
6261 2014-09-30 James Hogan <james.hogan@imgtec.com>
6262
6263 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6264 mips64-dsp-linux.c.
6265
6266 2014-09-23 Yao Qi <yao@codesourcery.com>
6267
6268 * linux-low.c (lp_status_maybe_breakpoint): New function.
6269 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6270 (count_events_callback): Likewise.
6271 (select_event_lwp_callback): Likewise.
6272 (cancel_breakpoints_callback): Likewise.
6273
6274 2014-09-19 Don Breazeal <donb@codesourcery.com>
6275
6276 * linux-low.c (handle_extended_wait): Call
6277 linux_ptrace_get_extended_event.
6278 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6279 linux_is_extended_waitstatus.
6280
6281 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6282
6283 * Makefile.in (CPPFLAGS): Define.
6284 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6285 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6286
6287 2014-09-16 Gary Benson <gbenson@redhat.com>
6288
6289 * inferiors.h (current_inferior): Renamed as...
6290 (current_thread): New variable. All uses updated.
6291 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6292 (maybe_move_out_of_jump_pad): Likewise.
6293 (cancel_breakpoint): Likewise.
6294 (linux_low_filter_event): Likewise.
6295 (wait_for_sigstop): Likewise.
6296 (linux_resume_one_lwp): Likewise.
6297 (need_step_over_p): Likewise.
6298 (start_step_over): Likewise.
6299 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6300 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6301 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6302 and save_inferior as saved_thread.
6303 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6304 saved_thread.
6305 (regcache_invalidate_thread): Likewise.
6306 * remote-utils.c (prepare_resume_reply): Likewise.
6307 * thread-db.c (thread_db_get_tls_address): Likewise.
6308 (disable_thread_event_reporting): Likewise.
6309 (remove_thread_event_breakpoints): Likewise.
6310 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6311 as saved_thread.
6312 * target.h (set_desired_inferior): Renamed as...
6313 (set_desired_thread): New declaration. All uses updated.
6314 * server.c (myresume): Updated comment to reference thread instead
6315 of inferior.
6316 (handle_serial_event): Likewise.
6317 (handle_target_event): Likewise.
6318
6319 2014-09-12 Tom Tromey <tromey@redhat.com>
6320 Gary Benson <gbenson@redhat.com>
6321
6322 * regcache.h: Include common-regcache.h.
6323 (regcache_read_pc): Don't declare.
6324 * regcache.c (get_thread_regcache_for_ptid): New function.
6325
6326 2014-09-11 Tom Tromey <tromey@redhat.com>
6327 Gary Benson <gbenson@redhat.com>
6328
6329 * symbol.c: New file.
6330 * Makefile.in (SFILES): Add symbol.c.
6331 (OBS): Add symbol.o.
6332
6333 2014-09-11 Gary Benson <gbenson@redhat.com>
6334
6335 * target.c (target_stop_ptid, target_continue_ptid): New
6336 functions.
6337
6338 2014-09-11 Tom Tromey <tromey@redhat.com>
6339 Gary Benson <gbenson@redhat.com>
6340
6341 * target.h: Include target/target.h.
6342 * target.c (target_read_memory, target_read_uint32)
6343 (target_write_memory): New functions.
6344
6345 2014-09-11 Gary Benson <gbenson@redhat.com>
6346
6347 * server.h (debug_hw_points): Don't declare.
6348 * server.c (debug_hw_points): Don't define. Replace all uses
6349 with show_debug_regs.
6350 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6351 all uses with show_debug_regs.
6352
6353 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6354
6355 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6356 endianness into account.
6357 (ppc_supply_ptrace_register): Likewise.
6358
6359 2014-09-03 James Hogan <james.hogan@imgtec.com>
6360
6361 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6362 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6363
6364 2014-09-03 Gary Benson <gbenson@redhat.com>
6365
6366 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6367 ALL_DEBUG_ADDRESS_REGISTERS.
6368
6369 2014-09-02 Gary Benson <gbenson@redhat.com>
6370
6371 * i386-low.h: Renamed as...
6372 * x86-low.h: New file. All type, function and variable name
6373 prefixes changed from "i386_" to "x86_". All references updated.
6374 * i386-low.c: Renamed as...
6375 * x86-low.c: New file. All type, function and variable name
6376 prefixes changed from "i386_" to "x86_". All references updated.
6377
6378 2014-09-02 Gary Benson <gbenson@redhat.com>
6379
6380 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6381 (x86_linux_new_thread): Likewise.
6382
6383 2014-08-29 Gary Benson <gbenson@redhat.com>
6384
6385 * server.h (setjmp.h): Do not include.
6386 (toplevel): Do not declare.
6387 (common-exceptions.h): Include.
6388 (cleanups.h): Likewise.
6389 * server.c (toplevel): Do not define.
6390 (exit_code): New static global.
6391 (detach_or_kill_for_exit_cleanup): New function.
6392 (main): New function. Original main renamed to...
6393 (captured_main): New function.
6394 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6395
6396 2014-08-29 Gary Benson <gbenson@redhat.com>
6397
6398 * Makefile.in (SFILES): Add common/common-exceptions.c.
6399 (OBS): Add common-exceptions.o.
6400 (common-exceptions.o): New rule.
6401 * utils.c (prepare_to_throw_exception): New function.
6402
6403 2014-08-29 Gary Benson <gbenson@redhat.com>
6404
6405 * config.in: Regenerate.
6406 * configure: Likewise.
6407
6408 2014-08-29 Gary Benson <gbenson@redhat.com>
6409
6410 * Makefile.in (SFILES): Add common/cleanups.c.
6411 (OBS): cleanups.o.
6412 (cleanups.o): New rule.
6413
6414 2014-08-29 Gary Benson <gbenson@redhat.com>
6415
6416 * utils.c (internal_vwarning): New function.
6417
6418 2014-08-28 Gary Benson <gbenson@redhat.com>
6419
6420 * utils.h (fatal): Remove declaration.
6421 * utils.c (fatal): Remove function.
6422
6423 2014-08-28 Gary Benson <gbenson@redhat.com>
6424
6425 * tracepoint.c (gdb_agent_init): Replace fatal with
6426 perror_with_name.
6427 (initialize_tracepoint): Likewise.
6428
6429 2014-08-28 Gary Benson <gbenson@redhat.com>
6430
6431 * remote-utils.c (remote_prepare): Replace fatal with error.
6432
6433 2014-08-28 Gary Benson <gbenson@redhat.com>
6434
6435 * linux-low.c (linux_async): Replace fatal with warning.
6436 Tidy up and return.
6437 (linux_start_non_stop): Return -1 if linux_async failed.
6438
6439 2014-08-28 Gary Benson <gbenson@redhat.com>
6440
6441 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6442 gdb_assert.
6443 (i386_dr_low_get_addr): Remove vague comment.
6444 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6445 gdb_assert.
6446
6447 2014-08-28 Gary Benson <gbenson@redhat.com>
6448
6449 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6450 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6451 internal_error.
6452 (linux_resume_one_lwp): Likewise.
6453 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6454 gdb_assert.
6455 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6456 with internal_error.
6457 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6458 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6459 (find_register_by_name): Replace fatal with internal_error.
6460 (find_regno): Likewise.
6461 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6462 * thread-db.c (thread_db_create_event): Likewise.
6463 (thread_db_load_search): Likewise.
6464 (try_thread_db_load_1): Likewise.
6465 * tracepoint.c (get_jump_space_head): Replace fatal with
6466 internal_error.
6467 (claim_trampoline_space): Likewise.
6468 (have_fast_tracepoint_trampoline_buffer): Likewise.
6469 (cmd_qtstart): Likewise.
6470 (stop_tracing): Likewise.
6471 (fast_tracepoint_collecting): Likewise.
6472 (target_malloc): Likewise.
6473 (download_tracepoint): Likewise.
6474 (download_trace_state_variables): Replace check with gdb_assert.
6475 (upload_fast_traceframes): Replace fatal with internal_error.
6476
6477 2014-08-19 Tom Tromey <tromey@redhat.com>
6478 Gary Benson <gbenson@redhat.com>
6479
6480 * Makefile.in (SFILES): Add common/common-debug.c.
6481 (OBS): Add common-debug.o.
6482 (common-debug.o): New rule.
6483 * debug.h (debug_printf): Don't declare.
6484 * debug.c (debug_printf): Renamed and rewritten as...
6485 (debug_vprintf): New function.
6486
6487 2014-08-19 Gary Benson <gbenson@redhat.com>
6488
6489 * utils.h: Do not include print-utils.h.
6490
6491 2014-08-19 Tom Tromey <tromey@redhat.com>
6492 Gary Benson <gbenson@redhat.com>
6493
6494 * server.h: Add static assertion.
6495 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6496
6497 2014-08-19 Tom Tromey <tromey@redhat.com>
6498 Gary Benson <gbenson@redhat.com>
6499
6500 * Makefile.in (SFILES): Add common/errors.c.
6501 (OBS): Add errors.o.
6502 (IPA_OBS): Add errors-ipa.o.
6503 (errors.o): New rule.
6504 (errors-ipa.o): Likewise.
6505 * utils.h (perror_with_name, error, warning): Don't declare.
6506 * utils.c (warning): Renamed and rewritten as...
6507 (vwarning): New function.
6508 (error): Renamed and rewritten as...
6509 (verror): New function.
6510 (internal_error): Renamed and rewritten as...
6511 (internal_verror): New function.
6512
6513 2014-08-07 Gary Benson <gbenson@redhat.com>
6514
6515 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6516 * configure: Regenerate.
6517 * config.in: Likewise.
6518 * server.h: Do not include errno.h.
6519 * event-loop.c: Likewise.
6520 * hostio-errno.c: Likewise.
6521 * linux-low.c: Likewise.
6522 * remote-utils.c: Likewise.
6523 * spu-low.c: Likewise.
6524 * utils.c: Likewise.
6525 * gdbreplay.c: Unconditionally include errno.h.
6526
6527 2014-08-07 Gary Benson <gbenson@redhat.com>
6528
6529 * server.h: Do not include string.h.
6530 * event-loop.c: Likewise.
6531 * linux-low.c: Likewise.
6532 * regcache.c: Likewise.
6533 * remote-utils.c: Likewise.
6534 * spu-low.c: Likewise.
6535 * utils.c: Likewise.
6536
6537 2014-08-07 Gary Benson <gbenson@redhat.com>
6538
6539 * server.h: Do not include gdb_assert.h.
6540
6541 2014-08-07 Gary Benson <gbenson@redhat.com>
6542
6543 * server.h: Do not include common-utils.h.
6544
6545 2014-08-07 Gary Benson <gbenson@redhat.com>
6546
6547 * server.h: Do not include ptid.h.
6548 * notif.h: Likewise.
6549
6550 2014-08-07 Gary Benson <gbenson@redhat.com>
6551
6552 * server.h: Do not include gdb_locale.h.
6553
6554 2014-08-07 Gary Benson <gbenson@redhat.com>
6555
6556 * server.h: Do not include gdb/signals.h.
6557 * win32-low.c: Likewise.
6558
6559 2014-08-07 Gary Benson <gbenson@redhat.com>
6560
6561 * server.h: Do not include pathmax.h.
6562
6563 2014-08-07 Gary Benson <gbenson@redhat.com>
6564
6565 * server.h: Do not include libiberty.h.
6566 * linux-bfin-low.c: Likewise.
6567
6568 2014-08-07 Gary Benson <gbenson@redhat.com>
6569
6570 * server.h: Do not include ansidecl.h.
6571
6572 2014-08-07 Gary Benson <gbenson@redhat.com>
6573
6574 * linux-x86-low.c: Do not include stddef.h.
6575 * lynx-ppc-low.c: Likewise.
6576 * tracepoint.c: Likewise.
6577
6578 2014-08-07 Gary Benson <gbenson@redhat.com>
6579
6580 * server.h: Do not include stdarg.h.
6581 * nto-low.c: Likewise.
6582
6583 2014-08-07 Gary Benson <gbenson@redhat.com>
6584
6585 * server.h: Do not include stdlib.h.
6586 * inferiors.c: Likewise.
6587 * linux-low.c: Likewise.
6588 * regcache.c: Likewise.
6589 * spu-low.c: Likewise.
6590 * tracepoint.c: Likewise.
6591 * utils.c: Likewise.
6592
6593 2014-08-07 Gary Benson <gbenson@redhat.com>
6594
6595 * server.h: Do not include stdio.h.
6596 * linux-low.c: Likewise.
6597 * remote-utils.c: Likewise.
6598 * spu-low.c: Likewise.
6599 * utils.c: Likewise.
6600 * wincecompat.c: Likewise.
6601
6602 2014-08-06 Gary Benson <gbenson@redhat.com>
6603
6604 * regcache.c (init_register_cache): Move conditionals inside if.
6605
6606 2014-08-06 Gary Benson <gbenson@redhat.com>
6607
6608 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6609
6610 2014-07-31 Gary Benson <gbenson@redhat.com>
6611
6612 * ax.h: Do not include server.h.
6613 * gdbthread.h: Likewise.
6614 * lynx-low.h: Likewise.
6615 * notif.h: Likewise.
6616
6617 2014-07-30 Gary Benson <gbenson@redhat.com>
6618
6619 * server.h: Include common-defs.h.
6620 Do not include config.h or build-gnulib-gdbserver/config.h.
6621
6622 2014-07-30 Gary Benson <gbenson@redhat.com>
6623
6624 * hostio-errno.c: Move server.h to top of includes list.
6625 * inferiors.c: Likewise.
6626 * linux-x86-low.c: Likewise.
6627 * notif.c: Include server.h.
6628
6629 2014-07-24 Tom Tromey <tromey@redhat.com>
6630 Gary Benson <gbenson@redhat.com>
6631
6632 * server.h (CORE_ADDR): Now unsigned.
6633
6634 2014-07-16 Pedro Alves <palves@redhat.com>
6635
6636 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6637
6638 2014-07-15 Pedro Alves <palves@redhat.com>
6639
6640 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6641 copy.
6642
6643 2014-07-11 Pedro Alves <palves@redhat.com>
6644
6645 * linux-low.c (kill_wait_lwp): New function, based on
6646 kill_one_lwp_callback, but use my_waitpid directly.
6647 (kill_one_lwp_callback, linux_kill): Use it.
6648
6649 2014-06-23 Pedro Alves <palves@redhat.com>
6650
6651 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6652 before setting DR0..DR3.
6653
6654 2014-06-20 Gary Benson <gbenson@redhat.com>
6655
6656 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6657 * configure: Regenerated.
6658 * config.in: Likewise.
6659
6660 2014-06-20 Gary Benson <gbenson@redhat.com>
6661
6662 * Makefile.in (SFILES): Update locations for files moved
6663 from common to nat.
6664 (object file files): Reordered.
6665
6666 2014-06-20 Gary Benson <gbenson@redhat.com>
6667
6668 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6669 (i386_dr_low_set_addr): Likewise.
6670 (i386_dr_low_get_addr): Likewise.
6671 (i386_dr_low_can_set_control): Likewise.
6672 (i386_dr_low_set_control): Likewise.
6673 (i386_dr_low_get_control): Likewise.
6674 (i386_dr_low_get_status): Likewise.
6675 (i386_get_debug_register_length): Likewise.
6676 * linux-x86-low.c (i386_dr_low_set_addr):
6677 Changed signature. Made static.
6678 (i386_dr_low_get_addr): Likewise.
6679 (i386_dr_low_set_control): Likewise.
6680 (i386_dr_low_get_control): Likewise.
6681 (i386_dr_low_get_status): Likewise.
6682 (i386_dr_low): New global variable.
6683 * win32-i386-low.c (i386_dr_low_set_addr):
6684 Changed signature. Made static.
6685 (i386_dr_low_get_addr): Likewise.
6686 (i386_dr_low_set_control): Likewise.
6687 (i386_dr_low_get_control): Likewise.
6688 (i386_dr_low_get_status): Likewise.
6689 (i386_dr_low): New global variable.
6690
6691 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6692
6693 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6694 * Makefile.in (AR, AR_FLAGS): Define.
6695 * configure: Regenerate.
6696
6697 2014-06-19 Gary Benson <gbenson@redhat.com>
6698
6699 * Makefile.in (i386-dregs.o): New rule.
6700 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6701 * i386-low.c (target.h): Remove include.
6702 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6703 (DR_CONTROL_SHIFT): Likewise.
6704 (DR_CONTROL_SIZE): Likewise.
6705 (DR_RW_EXECUTE): Likewise.
6706 (DR_RW_WRITE): Likewise.
6707 (DR_RW_READ): Likewise.
6708 (DR_RW_IORW): Likewise.
6709 (DR_LEN_1): Likewise.
6710 (DR_LEN_2): Likewise.
6711 (DR_LEN_4): Likewise.
6712 (DR_LEN_8): Likewise.
6713 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6714 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6715 (DR_ENABLE_SIZE): Likewise.
6716 (DR_LOCAL_SLOWDOWN): Likewise.
6717 (DR_GLOBAL_SLOWDOWN): Likewise.
6718 (DR_CONTROL_RESERVED): Likewise.
6719 (I386_DR_CONTROL_MASK): Likewise.
6720 (I386_DR_VACANT): Likewise.
6721 (I386_DR_LOCAL_ENABLE): Likewise.
6722 (I386_DR_GLOBAL_ENABLE): Likewise.
6723 (I386_DR_DISABLE): Likewise.
6724 (I386_DR_SET_RW_LEN): Likewise.
6725 (I386_DR_GET_RW_LEN): Likewise.
6726 (I386_DR_WATCH_HIT): Likewise.
6727 (i386_wp_op_t): Likewise.
6728 (i386_show_dr): Likewise.
6729 (i386_length_and_rw_bits): Likewise.
6730 (i386_insert_aligned_watchpoint): Likewise.
6731 (i386_remove_aligned_watchpoint): Likewise.
6732 (i386_handle_nonaligned_watchpoint): Likewise.
6733 i386_update_inferior_debug_regs(): Likewise.
6734 (i386_dr_insert_watchpoint): Likewise.
6735 (i386_dr_remove_watchpoint): Likewise.
6736 (i386_dr_region_ok_for_watchpoint): Likewise.
6737 (i386_dr_stopped_data_address): Likewise.
6738 (i386_dr_stopped_by_watchpoint): Likewise.
6739
6740 2014-06-19 Gary Benson <gbenson@redhat.com>
6741
6742 * i386-low.c (i386_dr_show): Renamed to
6743 i386_show_dr and made static. All uses updated.
6744 (i386_dr_length_and_rw_bits): Renamed to
6745 i386_length_and_rw_bits and made static.
6746 All uses updated.
6747 (i386_dr_insert_aligned_watchpoint): Renamed to
6748 i386_insert_aligned_watchpoint and made static.
6749 All uses updated.
6750 (i386_dr_remove_aligned_watchpoint): Renamed to
6751 i386_remove_aligned_watchpoint and made static.
6752 All uses updated.
6753 (i386_dr_update_inferior_debug_regs): Renamed to
6754 i386_update_inferior_debug_regs and made static.
6755 All uses updated.
6756
6757 2014-06-18 Gary Benson <gbenson@redhat.com>
6758
6759 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6760 (i386_dr_low_can_set_control): Likewise.
6761 (i386_get_debug_register_length): Likewise.
6762 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6763 (i386_dr_low_can_set_control): Likewise.
6764 (i386_get_debug_register_length): Likewise.
6765
6766 2014-06-17 Gary Benson <gbenson@redhat.com>
6767
6768 * i386-low.h (i386-dregs.h): New include.
6769 (DR_FIRSTADDR): Now in i386-dregs.h.
6770 (DR_LASTADDR): Likewise.
6771 (DR_NADDR): Likewise.
6772 (DR_STATUS): Likewise.
6773 (DR_CONTROL): Likewise.
6774 (i386_debug_reg_state): Likewise.
6775 (i386_dr_insert_watchpoint): Likewise.
6776 (i386_dr_remove_watchpoint): Likewise.
6777 (i386_dr_region_ok_for_watchpoint): Likewise.
6778 (i386_dr_stopped_data_address): Likewise.
6779 (i386_dr_stopped_by_watchpoint): Likewise.
6780 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6781
6782 2014-06-18 Gary Benson <gbenson@redhat.com>
6783
6784 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6785 i386_dr_insert_watchpoint.
6786 (i386_low_remove_watchpoint): Renamed to
6787 i386_dr_remove_watchpoint.
6788 (i386_low_region_ok_for_watchpoint): Renamed to
6789 i386_dr_region_ok_for_watchpoint.
6790 (i386_low_stopped_data_address): Renamed to
6791 i386_dr_stopped_data_address.
6792 (i386_low_stopped_by_watchpoint): Renamed to
6793 i386_dr_stopped_by_watchpoint.
6794 * i386-low.c (i386_show_dr): Renamed to
6795 i386_dr_show and made nonstatic. All uses updated.
6796 (i386_length_and_rw_bits): Renamed to
6797 i386_dr_length_and_rw_bits and made nonstatic.
6798 All uses updated.
6799 (i386_insert_aligned_watchpoint): Renamed to
6800 i386_dr_insert_aligned_watchpoint and made nonstatic.
6801 All uses updated.
6802 (i386_remove_aligned_watchpoint): Renamed to
6803 i386_dr_remove_aligned_watchpoint and made nonstatic.
6804 All uses updated.
6805 (i386_update_inferior_debug_regs): Renamed to
6806 i386_dr_update_inferior_debug_regs and made nonstatic.
6807 All uses updated.
6808 (i386_low_insert_watchpoint): Renamed to
6809 i386_dr_insert_watchpoint. All uses updated.
6810 (i386_low_remove_watchpoint): Renamed to
6811 i386_dr_remove_watchpoint. All uses updated.
6812 (i386_low_region_ok_for_watchpoint): Renamed to
6813 i386_dr_region_ok_for_watchpoint. All uses updated.
6814 (i386_low_stopped_data_address): Renamed to
6815 i386_dr_stopped_data_address. All uses updated.
6816 (i386_low_stopped_by_watchpoint): Renamed to
6817 i386_dr_stopped_by_watchpoint. All uses updated.
6818
6819 2014-06-18 Gary Benson <gbenson@redhat.com>
6820
6821 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6822 (i386_dr_low_can_set_control): Likewise.
6823 (i386_insert_aligned_watchpoint): New check.
6824
6825 2014-06-18 Gary Benson <gbenson@redhat.com>
6826
6827 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6828 Renamed to state.
6829
6830 2014-06-18 Gary Benson <gbenson@redhat.com>
6831
6832 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6833 instead of fatal and error.
6834 (i386_handle_nonaligned_watchpoint): Likewise.
6835
6836 2014-06-18 Gary Benson <gbenson@redhat.com>
6837
6838 * i386-low.c (i386_get_debug_register_length): New macro.
6839 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6840 (i386_show_dr): Use debug_printf instead of fprintf. Use
6841 phex to format values.
6842
6843 2014-06-18 Gary Benson <gbenson@redhat.com>
6844
6845 * i386-low.h: Comment changes.
6846 * i386-low.c: Likewise.
6847
6848 2014-06-18 Gary Benson <gbenson@redhat.com>
6849
6850 * i386-low.c: Whitespace changes.
6851
6852 2014-06-12 Tom Tromey <tromey@redhat.com>
6853
6854 * utils.c (freeargv): Remove.
6855
6856 2014-06-12 Tom Tromey <tromey@redhat.com>
6857
6858 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6859 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6860 (parse_debug_format_options): Likewise.
6861 (gdbserver_usage): Likewise.
6862 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6863 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6864 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6865 against libiberty.
6866 ($(LIBGNU)): Depend on libiberty.
6867 (all-lib): Recurse into all subdirs.
6868 (install-only): Invoke "install" target in subdirs.
6869 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6870 targets.
6871 * configure: Rebuild.
6872 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6873 for vasprintf, vsnprintf, or gettimeofday.
6874 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6875 srv_tgtobj.
6876
6877 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6878
6879 * development.sh: Delete.
6880 * Makefile.in (config.status): Adjust dependency on development.sh.
6881 * configure.ac: Adjust development.sh source call.
6882 * configure: Regenerate.
6883
6884 2014-06-02 Pedro Alves <palves@redhat.com>
6885
6886 * ax.c (gdb_free_agent_expr): New function.
6887 * ax.h (gdb_free_agent_expr): New declaration.
6888 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6889 list.
6890 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6891 static.
6892 (clear_breakpoint_conditions_and_commands): New function.
6893 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6894 (clear_breakpoint_conditions_and_commands): New declaration.
6895
6896 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6897
6898 * linux-aarch64-low.c (asm/ptrace.h): Include.
6899
6900 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6901
6902 Fix TLS access for -static -pthread.
6903 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6904 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6905 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6906
6907 2014-05-20 Pedro Alves <palves@redhat.com>
6908
6909 * linux-aarch64-low.c (aarch64_insert_point)
6910 (aarch64_remove_point): No longer check whether the type is
6911 supported here. Adjust to new interface.
6912 (the_low_target): Install aarch64_supports_z_point_type as
6913 supports_z_point_type method.
6914 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6915 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6916 instead of a Z packet char. Adjust.
6917 (arm_supports_z_point_type): New function.
6918 (arm_insert_point, arm_remove_point): Adjust to new interface.
6919 (the_low_target): Install arm_supports_z_point_type.
6920 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6921 (cris_insert_point, cris_remove_point): Adjust to new interface.
6922 Don't check whether the type is supported here.
6923 (the_low_target): Install cris_supports_z_point_type.
6924 * linux-low.c (linux_supports_z_point_type): New function.
6925 (linux_insert_point, linux_remove_point): Adjust to new interface.
6926 * linux-low.h (struct linux_target_ops) <insert_point,
6927 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6928 raw_breakpoint pointer parameter.
6929 <supports_z_point_type>: New method.
6930 * linux-mips-low.c (mips_supports_z_point_type): New function.
6931 (mips_insert_point, mips_remove_point): Adjust to new interface.
6932 Use mips_supports_z_point_type.
6933 (the_low_target): Install mips_supports_z_point_type.
6934 * linux-ppc-low.c (the_low_target): Install NULL as
6935 supports_z_point_type method.
6936 * linux-s390-low.c (the_low_target): Install NULL as
6937 supports_z_point_type method.
6938 * linux-sparc-low.c (the_low_target): Install NULL as
6939 supports_z_point_type method.
6940 * linux-x86-low.c (x86_supports_z_point_type): New function.
6941 (x86_insert_point): Adjust to new insert_point interface. Use
6942 insert_memory_breakpoint. Adjust to new
6943 i386_low_insert_watchpoint interface.
6944 (x86_remove_point): Adjust to remove_point interface. Use
6945 remove_memory_breakpoint. Adjust to new
6946 i386_low_remove_watchpoint interface.
6947 (the_low_target): Install x86_supports_z_point_type.
6948 * lynx-low.c (lynx_target_ops): Install NULL as
6949 supports_z_point_type callback.
6950 * nto-low.c (nto_supports_z_point_type): New.
6951 (nto_insert_point, nto_remove_point): Adjust to new interface.
6952 (nto_target_ops): Install nto_supports_z_point_type.
6953 * mem-break.c: Adjust intro comment.
6954 (struct raw_breakpoint) <raw_type, size>: New fields.
6955 <inserted>: Update comment.
6956 <shlib_disabled>: Delete field.
6957 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6958 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6959 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6960 (raw_bkpt_type_to_target_hw_bp_type): New function.
6961 (find_enabled_raw_code_breakpoint_at): New function.
6962 (find_raw_breakpoint_at): New type and size parameters. Use them.
6963 (insert_memory_breakpoint): New function, based off
6964 set_raw_breakpoint_at.
6965 (remove_memory_breakpoint): New function.
6966 (set_raw_breakpoint_at): Reimplement.
6967 (set_breakpoint): New, based on set_breakpoint_at.
6968 (set_breakpoint_at): Reimplement.
6969 (delete_raw_breakpoint): Go through the_target->remove_point
6970 instead of assuming memory breakpoints.
6971 (find_gdb_breakpoint_at): Delete.
6972 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6973 (find_gdb_breakpoint): New function.
6974 (set_gdb_breakpoint_at): Delete.
6975 (z_type_supported): New function.
6976 (set_gdb_breakpoint_1): New function, loosely based off
6977 set_gdb_breakpoint_at.
6978 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6979 (delete_gdb_breakpoint_at): Delete.
6980 (delete_gdb_breakpoint_1): New function, loosely based off
6981 delete_gdb_breakpoint_at.
6982 (delete_gdb_breakpoint): New function.
6983 (clear_gdb_breakpoint_conditions): Rename to ...
6984 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6985 breakpoint.
6986 (add_condition_to_breakpoint): Make static.
6987 (add_breakpoint_condition): Take a struct breakpoint pointer
6988 instead of an address. Adjust.
6989 (gdb_condition_true_at_breakpoint): Rename to ...
6990 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6991 z_type parameter.
6992 (gdb_condition_true_at_breakpoint): Reimplement.
6993 (add_breakpoint_commands): Take a struct breakpoint pointer
6994 instead of an address. Adjust.
6995 (gdb_no_commands_at_breakpoint): Rename to ...
6996 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6997 parameter. Return true if no breakpoint was found. Change debug
6998 output.
6999 (gdb_no_commands_at_breakpoint): Reimplement.
7000 (run_breakpoint_commands): Rename to ...
7001 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7002 and change return type to boolean.
7003 (run_breakpoint_commands): New function.
7004 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7005 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7006 breakpoint. Go through the_target->remove_point instead of
7007 assuming memory breakpoint.
7008 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7009 software and hardware breakpoints.
7010 (reinsert_raw_breakpoint): Go through the_target->insert_point
7011 instead of assuming memory breakpoint.
7012 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7013 software and hardware breakpoints.
7014 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7015 Check both software and hardware breakpoints.
7016 (validate_inserted_breakpoint): Assert the breakpoint is a
7017 software breakpoint. Set the inserted flag to -1 instead of
7018 setting shlib_disabled.
7019 (delete_disabled_breakpoints): Adjust.
7020 (validate_breakpoints): Only validate software breakpoints.
7021 Adjust to inserted flag change.
7022 (check_mem_read, check_mem_write): Skip breakpoint types other
7023 than software breakpoints. Adjust to inserted flag change.
7024 * mem-break.h (enum raw_bkpt_type): New enum.
7025 (raw_breakpoint, struct process_info): Forward declare.
7026 (Z_packet_to_target_hw_bp_type): Delete declaration.
7027 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7028 (set_gdb_breakpoint, delete_gdb_breakpoint)
7029 (clear_breakpoint_conditions): New declarations.
7030 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7031 (breakpoint_inserted_here): Update comment.
7032 (add_breakpoint_condition, add_breakpoint_commands): Replace
7033 address parameter with a breakpoint pointer parameter.
7034 (gdb_breakpoint_here): Update comment.
7035 (delete_gdb_breakpoint_at): Delete.
7036 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7037 * server.c (process_point_options): Take a struct breakpoint
7038 pointer instead of an address. Adjust.
7039 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7040 delete_gdb_breakpoint.
7041 * spu-low.c (spu_target_ops): Install NULL as
7042 supports_z_point_type method.
7043 * target.h: Include mem-break.h.
7044 (struct target_ops) <prepare_to_access_memory>: Update comment.
7045 <supports_z_point_type>: New field.
7046 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7047 instead of a char. Also take a raw breakpoint pointer.
7048 * win32-arm-low.c (the_low_target): Install NULL as
7049 supports_z_point_type.
7050 * win32-i386-low.c (i386_supports_z_point_type): New function.
7051 (i386_insert_point, i386_remove_point): Adjust to new interface.
7052 (the_low_target): Install i386_supports_z_point_type.
7053 * win32-low.c (win32_supports_z_point_type): New function.
7054 (win32_insert_point, win32_remove_point): Adjust to new interface.
7055 (win32_target_ops): Install win32_supports_z_point_type.
7056 * win32-low.h (struct win32_target_ops):
7057 <supports_z_point_type>: New method.
7058 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7059 instead of a char. Also take a raw breakpoint pointer.
7060
7061 2014-05-20 Pedro Alves <palves@redhat.com>
7062
7063 * mem-break.h: Include break-common.h.
7064 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7065 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7066 (Z_packet_to_target_hw_bp_type): New declaration.
7067 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7068 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7069 (Z_PACKET_ACCESS_WP): Delete macros.
7070 (Z_packet_to_hw_type): Delete function.
7071 * i386-low.h: Don't include break-common.h here.
7072 (Z_packet_to_hw_type): Delete declaration.
7073 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7074 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7075 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7076 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7077 * linux-aarch64-low.c: Don't include break-common.h here.
7078 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7079 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7080 (Z_packet_to_target_hw_bp_type): Delete function.
7081 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7082 function.
7083 (mips_insert_point, mips_remove_point): Use
7084 Z_packet_to_target_hw_bp_type.
7085
7086 2014-05-20 Pedro Alves <palves@redhat.com>
7087
7088 * linux-aarch64-low.c: Include break-common.h.
7089 (enum target_point_type): Delete.
7090 (Z_packet_to_point_type): Rename to ...
7091 (Z_packet_to_target_hw_bp_type): ... this, and return a
7092 target_hw_bp_type instead.
7093 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7094 instead of an enum target_point_type.
7095 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7096 breakpoint type.
7097 (aarch64_dr_state_insert_one_point)
7098 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7099 (aarch64_handle_aligned_watchpoint)
7100 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7101 Take an enum target_hw_bp_type instead of an enum
7102 target_point_type.
7103 (aarch64_supports_z_point_type): New function.
7104 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7105 use Z_packet_to_target_hw_bp_type.
7106
7107 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7108
7109 * configure.ac: Only use -Werror by default when DEVELOPMENT
7110 is true.
7111 * configure: Regenerate.
7112
7113 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7114
7115 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7116 * linux-x86-low.c (X86_64_USER_REGS): New.
7117 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7118
7119 2014-04-28 Yao Qi <yao@codesourcery.com>
7120
7121 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7122 name.
7123
7124 2014-04-25 Pedro Alves <palves@redhat.com>
7125
7126 PR server/16255
7127 * linux-low.c (linux_attach_fail_reason_string): New function.
7128 (linux_attach_lwp): Delete.
7129 (linux_attach_lwp_1): Rename to ...
7130 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7131 argument. Remove "initial" parameter. Return int instead of
7132 void. Don't error or warn here.
7133 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7134 failure to attach to the tgid. Call warning when failing to
7135 attach to an lwp.
7136 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7137 argument. Remove "initial" parameter. Return int instead of
7138 void. Don't error or warn here.
7139 (linux_attach_fail_reason_string): New declaration.
7140 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7141 interface change. Use linux_attach_fail_reason_string.
7142
7143 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7144 Walfred Tedeschi <walfred.tedeschi@intel.com>
7145
7146 * Makefile.in: Added rules to handle new files
7147 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7148 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7149 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7150 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7151 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7152 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7153 x32-avx512-linux.o.
7154 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7155 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7156 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7157 i386/x32-avx512.xml.
7158 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7159 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7160 i386/x32-avx512-linux.xml.
7161 * i387-fp.c (num_avx512_k_registers): New constant for number
7162 of K registers.
7163 (num_avx512_zmmh_low_registers): New constant for number of
7164 lower ZMM registers (0-15).
7165 (num_avx512_zmmh_high_registers): New constant for number of
7166 higher ZMM registers (16-31).
7167 (num_avx512_ymmh_registers): New contant for number of higher
7168 YMM registers (ymm16-31 added by avx521 on x86_64).
7169 (num_avx512_xmm_registers): New constant for number of higher
7170 XMM registers (xmm16-31 added by AVX512 on x86_64).
7171 (struct i387_xsave): Add space for AVX512 registers.
7172 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7173 Add code to handle AVX512 registers.
7174 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7175 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7176 prototypei from generated file.
7177 (tdesc_amd64_avx512_linux): Likewise.
7178 (init_registers_x32_avx512_linux): Likewise.
7179 (tdesc_x32_avx512_linux): Likewise.
7180 (init_registers_i386_avx512_linux): Likewise.
7181 (tdesc_i386_avx512_linux): Likewise.
7182 (x86_64_regmap): Add AVX512 registers.
7183 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7184 mask.
7185 (initialize_low_arch): Add code to initialize AVX512 registers.
7186
7187 2014-04-23 Pedro Alves <palves@redhat.com>
7188
7189 * mem-break.c (find_gdb_breakpoint_at): Make static.
7190 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7191
7192 2014-04-23 Pedro Alves <palves@redhat.com>
7193
7194 * i386-low.c: Don't include break-common.h here.
7195 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7196 prototype to take target_hw_bp_type as argument instead of a Z
7197 packet char.
7198 * i386-low.h: Include break-common.h here.
7199 (Z_packet_to_hw_type): Declare.
7200 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7201 prototypes.
7202 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7203 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7204 (x86_remove_point): Convert the packet number to a
7205 target_hw_bp_type before calling i386_low_remove_watchpoint.
7206 * win32-i386-low.c (i386_insert_point): Convert the packet number
7207 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7208 (i386_remove_point): Convert the packet number to a
7209 target_hw_bp_type before calling i386_low_remove_watchpoint.
7210
7211 2014-04-23 Pedro Alves <palves@redhat.com>
7212
7213 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7214
7215 2014-04-10 Pedro Alves <palves@redhat.com>
7216
7217 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7218 Check if the condition or command is NULL before checking if the
7219 breakpoint is known. On success, return true.
7220 * mem-break.h (add_breakpoint_condition): Document return.
7221 (add_breakpoint_commands): Add describing comment.
7222 * server.c (skip_to_semicolon): New function.
7223 (process_point_options): Use it.
7224
7225 2014-04-09 Pedro Alves <palves@redhat.com>
7226
7227 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7228 to lwpid_of.
7229
7230 2014-02-27 Pedro Alves <palves@redhat.com>
7231
7232 PR 12702
7233 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7234 macros.
7235 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7236 output.
7237 (last_thread_of_process_p): Take a PID argument instead of a
7238 thread pointer.
7239 (linux_wait_for_lwp): Delete.
7240 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7241 functions.
7242 (linux_low_filter_event): New function, party factored out from
7243 linux_wait_for_event.
7244 (linux_wait_for_event): Rename to ...
7245 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7246 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7247 sigsuspend. Check for zombie leaders.
7248 (linux_wait_for_event): Reimplement as wrapper around
7249 linux_wait_for_event_filtered.
7250 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7251 a normal or signal exit is seen, it's the whole process exiting.
7252 (wait_for_sigstop): No longer a for_each_inferior callback.
7253 Rewrite on top of linux_wait_for_event_filtered.
7254 (stop_all_lwps): Call wait_for_sigstop directly.
7255 * server.c (resume, handle_target_event): Handle
7256 TARGET_WAITKIND_NO_RESUMED.
7257
7258 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7259
7260 * win32-low.c (psapi_get_dll_name,
7261 * win32_CreateToolhelp32Snapshot): Delete.
7262 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7263 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7264 Delete.
7265 (handle_load_dll): Add function description.
7266 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7267
7268 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7269
7270 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7271 Add comment.
7272 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7273 base address when calling win32_add_one_solib.
7274 (handle_load_dll): Delete local variable load_addr.
7275 Remove 0x1000 offset applied to DLL base address when calling
7276 win32_add_one_solib.
7277 (handle_unload_dll): Add comment.
7278
7279 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7280
7281 * win32-low.c (win32_add_all_dlls): Renames
7282 win32_ensure_ntdll_loaded. Rewrite function documentation.
7283 Adjust implementation to always load all DLLs.
7284 Add 0x1000 offset to DLL base address when calling
7285 win32_add_one_solib.
7286 (child_initialization_done): New static global.
7287 (do_initial_child_stuff): Set child_initialization_done to
7288 zero during child initialization, and 1 after. Replace call
7289 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7290 Add comment.
7291 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7292 (handle_unload_dll): Add function documentation.
7293 (get_child_debug_event): Ignore load and unload DLL events
7294 during child initialization.
7295
7296 2014-02-20 Doug Evans <dje@google.com>
7297
7298 Remove global all_lwps.
7299 * inferiors.h (ptid_of): Move here from linux-low.h.
7300 (pid_of, lwpid_of): Ditto.
7301 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7302 parameter is a struct thread_info * now.
7303 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7304 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7305 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7306 directly.
7307 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7308 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7309 * linux-arm-low.c (update_registers_callback): Update, "entry"
7310 parameter is a struct thread_info * now.
7311 Fetch lwpid from current_inferior directly.
7312 (arm_insert_point): Pass &all_threads to find_inferior instead of
7313 &all_lwps.
7314 (arm_remove_point): Ditto.
7315 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7316 (arm_prepare_to_resume): Fetch pid from thread.
7317 (arm_read_description): Fetch lwpid from current_inferior directly.
7318 * linux-low.c (all_lwps): Delete.
7319 (delete_lwp): Delete call to remove_inferior.
7320 (handle_extended_wait): Fetch lwpid from thread.
7321 (add_lwp): Don't set lwp->entry.id. Remove call to
7322 add_inferior_to_list.
7323 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7324 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7325 (kill_one_lwp_callback): Ditto.
7326 (linux_kill): Don't dereference NULL pointer.
7327 Fetch ptid,lwpid from thread.
7328 (get_detach_signal): Fetch ptid from thread.
7329 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7330 Simplify call to regcache_invalidate_thread.
7331 (delete_lwp_callback): Update, "entry" parameter is a
7332 struct thread_info * now. Fetch pid from thread.
7333 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7334 (status_pending_p_callback): Update, "entry" parameter is a
7335 struct thread_info * now. Fetch ptid from thread.
7336 (find_lwp_pid): Update, "entry" parameter is a
7337 struct thread_info * now.
7338 (linux_wait_for_lwp): Fetch pid from thread.
7339 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7340 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7341 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7342 (dequeue_one_deferred_signal): Ditto.
7343 (cancel_breakpoint): Fetch ptid from current_inferior.
7344 (linux_wait_for_event): Pass &all_threads to find_inferior,
7345 not &all_lwps. Fetch ptid, lwpid from thread.
7346 (count_events_callback): Update, "entry" parameter is a
7347 struct thread_info * now.
7348 (select_singlestep_lwp_callback): Ditto.
7349 (select_event_lwp_callback): Ditto.
7350 (cancel_breakpoints_callback): Ditto.
7351 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7352 not &all_lwps.
7353 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7354 (unsuspend_one_lwp): Update, "entry" parameter is a
7355 struct thread_info * now.
7356 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7357 not &all_lwps.
7358 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7359 Fetch lwpid from thread, not lwp.
7360 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7361 Pass &all_threads to find_inferior, not &all_lwps.
7362 (send_sigstop): Fetch lwpid from thread, not lwp.
7363 (send_sigstop_callback): Update, "entry" parameter is a
7364 struct thread_info * now.
7365 (suspend_and_send_sigstop_callback): Ditto.
7366 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7367 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7368 struct thread_info * now.
7369 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7370 from thread, lwp.
7371 (lwp_running): Update, "entry" parameter is a
7372 struct thread_info * now.
7373 (stop_all_lwps): Fetch ptid from thread.
7374 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7375 (linux_resume_one_lwp): Fetch lwpid from thread.
7376 (linux_set_resume_request): Update, "entry" parameter is a
7377 struct thread_info * now. Fetch pid, lwpid from thread.
7378 (resume_status_pending_p): Update, "entry" parameter is a
7379 struct thread_info * now.
7380 (need_step_over_p): Ditto. Fetch lwpid from thread.
7381 (start_step_over): Fetch lwpid from thread.
7382 (linux_resume_one_thread): Update, "entry" parameter is a
7383 struct thread_info * now. Fetch lwpid from thread.
7384 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7385 (proceed_one_lwp): Update, "entry" parameter is a
7386 struct thread_info * now. Fetch lwpid from thread.
7387 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7388 struct thread_info * now.
7389 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7390 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7391 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7392 directly.
7393 (regsets_store_inferior_registers): Ditto.
7394 (fetch_register, store_register): Ditto.
7395 (linux_read_memory, linux_write_memory): Ditto.
7396 (linux_request_interrupt): Ditto.
7397 (linux_read_auxv): Ditto.
7398 (linux_xfer_siginfo): Ditto.
7399 (linux_qxfer_spu): Ditto.
7400 (linux_qxfer_libraries_svr4): Ditto.
7401 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7402 moved to inferiors.h.
7403 (get_lwp): Delete.
7404 (get_thread_lwp): Update.
7405 (struct lwp_info): Delete member "entry". Simplify comment for
7406 member "thread".
7407 (all_lwps): Delete.
7408 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7409 current_inferior directly.
7410 (update_watch_registers_callback): Update, "entry" parameter is a
7411 struct thread_info * now. Fetch pid from thread.
7412 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7413 (mips_insert_point): Fetch lwpid from current_inferior.
7414 Pass &all_threads to find_inferior, not &all_lwps.
7415 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7416 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7417 directly.
7418 (mips_stopped_data_address): Ditto.
7419 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7420 directly.
7421 * linux-tile-low.c (tile_arch_setup): Ditto.
7422 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7423 (update_debug_registers_callback): Update, "entry" parameter is a
7424 struct thread_info * now. Fetch pid from thread.
7425 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7426 Pass &all_threads to find_inferior, not &all_lwps.
7427 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7428 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7429 Pass &all_threads to find_inferior, not &all_lwps.
7430 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7431 (i386_dr_low_get_status): Ditto.
7432 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7433 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7434 (x86_linux_read_description): Ditto.
7435 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7436
7437 2014-02-20 Doug Evans <dje@google.com>
7438
7439 * inferiors.c (get_first_inferior): Fix buglet.
7440
7441 2014-02-19 Doug Evans <dje@google.com>
7442
7443 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7444 * inferiors.c (add_thread): Change result type to struct thread_info *.
7445 All callers updated.
7446 (add_lwp): Call add_thread here instead of in callers.
7447 All callers updated.
7448 * linux-low.h (get_lwp_thread): Rewrite.
7449 (struct lwp_info): New member "thread".
7450
7451 2014-02-19 Doug Evans <dje@google.com>
7452
7453 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7454 All callers updated.
7455
7456 2014-02-19 Doug Evans <dje@google.com>
7457
7458 * inferiors.c (add_thread): Fix whitespace.
7459
7460 2014-02-19 Doug Evans <dje@google.com>
7461
7462 * dll.c (clear_dlls): Replace accessing list implemention details
7463 with API function.
7464 * gdbthread.h (get_first_thread): Declare.
7465 * inferiors.c (for_each_inferior_with_data): New function.
7466 (get_first_thread): New function.
7467 (find_thread_ptid): Simplify.
7468 (get_first_inferior): New function.
7469 (clear_list): Delete.
7470 (one_inferior_p): New function.
7471 (clear_inferior_list): New function.
7472 (clear_inferiors): Update.
7473 * inferiors.h (for_each_inferior_with_data): Declare.
7474 (clear_inferior_list): Declare.
7475 (one_inferior_p): Declare.
7476 (get_first_inferior): Declare.
7477 * linux-low.c (linux_wait_for_event): Replace accessing list
7478 implemention details with API function.
7479 * server.c (target_running): Ditto.
7480 (accumulate_file_name_length): New function.
7481 (emit_dll_description): New function.
7482 (handle_qxfer_libraries): Replace accessing list implemention
7483 details with API function.
7484 (handle_qxfer_threads_worker): New function.
7485 (handle_qxfer_threads_proper): Replace accessing list implemention
7486 details with API function.
7487 (handle_query): Ditto.
7488 (visit_actioned_threads_callback_ftype): New typedef.
7489 (visit_actioned_threads_data): New struct.
7490 (visit_actioned_threads): Rewrite to be find_inferior callback.
7491 (resume): Call find_inferior.
7492 (handle_status): Replace accessing list implemention
7493 details with API function.
7494 (process_serial_event): Replace accessing list implemention details
7495 with API function.
7496 * target.c (set_desired_inferior): Replace accessing list implemention
7497 details with API function.
7498 * tracepoint.c (same_process_p): New function.
7499 (gdb_agent_about_to_close): Replace accessing list implemention
7500 details with API function.
7501 * win32-low.c (child_delete_thread): Replace accessing list
7502 implemention details with API function.
7503 (match_dll_by_basename): New function.
7504 (dll_is_loaded_by_basename): New function.
7505 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7506 details call to dll_is_loaded_by_basename.
7507
7508 2014-02-19 Doug Evans <dje@google.com>
7509
7510 * dll.h (struct dll_info): Add comment.
7511 * gdbthread.h (struct thread_info): Add comment.
7512 (current_ptid): Simplify.
7513 * inferiors.c (add_process): Update.
7514 (remove_process): Update.
7515 * inferiors.h (struct process_info): Rename member "head" to "entry".
7516 * linux-low.c (delete_lwp): Update.
7517 (add_lwp): Update.
7518 (last_thread_of_process_p): Update.
7519 (kill_one_lwp_callback, linux_kill): Update.
7520 (status_pending_p_callback): Update.
7521 (wait_for_sigstop): Update. Simplify read of ptid.
7522 (start_step_over): Update.
7523 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7524 (get_lwp_thread): Update.
7525 (struct lwp_info): Rename member "head" to "entry".
7526 * regcache.h (inferior_list_entry): Delete.
7527 * server.c (kill_inferior_callback): Update.
7528 (detach_or_kill_inferior_callback): Update.
7529 (print_started_pid): Update.
7530 (print_attached_pid): Update.
7531 (process_serial_event): Simplify read of ptid.
7532 * thread-db.c (thread_db_create_event): Update.
7533 (thread_db_get_tls_address): Update.
7534 * win32-low.c (current_inferior_ptid): Simplify.
7535
7536 2014-02-19 Tom Tromey <tromey@redhat.com>
7537
7538 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7539 argument.
7540 (target_supports_btrace): Update.
7541
7542 2014-02-14 Yao Qi <yao@codesourcery.com>
7543
7544 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7545 (rsp-low-ipa.o): New target.
7546
7547 2014-02-12 Tom Tromey <tromey@redhat.com>
7548
7549 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7550 convert_ascii_to_int.
7551 * regcache.c (registers_to_string): Likewise.
7552 * remote-utils.c (decode_M_packet): Likewise.
7553 * server.c (process_serial_event): Likewise.
7554
7555 2014-02-12 Tom Tromey <tromey@redhat.com>
7556
7557 * server.c (handle_query, handle_v_run): Use hex2bin, not
7558 unhexify.
7559 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7560
7561 2014-02-12 Tom Tromey <tromey@redhat.com>
7562
7563 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7564 convert_int_to_ascii.
7565 * regcache.c (registers_to_string, collect_register_as_string):
7566 Likewise.
7567 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7568 Likewise.
7569 * server.c (process_serial_event): Likewise.
7570 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7571 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7572
7573 2014-02-12 Tom Tromey <tromey@redhat.com>
7574
7575 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7576 bin2hex, not hexify.
7577 * tracepoint.c (cmd_qtstatus): Likewise.
7578
7579 2014-02-12 Tom Tromey <tromey@redhat.com>
7580
7581 * remote-utils.c (monitor_output): Pass explicit length to
7582 hexify.
7583
7584 2014-02-12 Tom Tromey <tromey@redhat.com>
7585
7586 * tracepoint.c: Include rsp-low.h.
7587 * server.c: Include rsp-low.h.
7588 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7589 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7590 declare.
7591 * remote-utils.c: Include rsp-low.h.
7592 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7593 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7594 (convert_int_to_ascii, convert_ascii_to_int): Move to
7595 common/rsp-low.c.
7596 * regcache.c: Include rsp-low.h.
7597 * ax.c: Include rsp-low.h.
7598 * Makefile.in (SFILES): Add common/rsp-low.c.
7599 (OBS): Add rsp-low.o.
7600 (rsp-low.o): New target.
7601
7602 2014-02-12 Tom Tromey <tromey@redhat.com>
7603
7604 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7605 Include print-utils.h.
7606 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7607 (plongest, thirty_two, phex_nz): Remove.
7608 * Makefile.in (SFILES): Add common/print-utils.c.
7609 (OBS): Add print-utils.o.
7610 (print-utils-ipa.o): New target.
7611 (print-utils.o): New target.
7612 (IPA_OBJS): Add print-utils-ipa.o.
7613
7614 2014-02-06 Tom Tromey <tromey@redhat.com>
7615
7616 * Makefile.in (SFILES): Fix indentation.
7617
7618 2014-02-05 Doug Evans <dje@google.com>
7619
7620 * linux-low.c (linux_wait_for_event): Improve comment.
7621 (linux_wait_1): Keep current_inferior in sync with event_child.
7622
7623 2014-01-22 Doug Evans <dje@google.com>
7624
7625 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7626
7627 2014-01-22 Doug Evans <dje@google.com>
7628
7629 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7630 * configure: Regenerate.
7631 * config.in: Regenerate.
7632 * Makefile.in (SFILES): Add debug.c.
7633 (OBS): Add debug.o.
7634 * debug.c: New file.
7635 * debug.h: New file.
7636 * linux-aarch64-low.c (*): Update all debugging printfs to use
7637 debug_printf instead of fprintf.
7638 * linux-arm-low.c (*): Ditto.
7639 * linux-cris-low.c (*): Ditto.
7640 * linux-crisv32-low.c (*): Ditto.
7641 * linux-m32r-low.c (*): Ditto.
7642 * linux-sparc-low.c (*): Ditto.
7643 * linux-x86.c (*): Ditto.
7644 * linux-low.c (*): Ditto.
7645 (linux_wait_1): Add calls to debug_enter, debug_exit.
7646 (linux_wait): Remove redundant debugging printf.
7647 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7648 (linux_resume, unstop_all_lwps): Ditto.
7649 * mem-break.c (*): Update all debugging printfs to use
7650 debug_printf instead of fprintf.
7651 * remote-utils.c (*): Ditto.
7652 * thread-db.c (*): Ditto.
7653 * server.c #include <ctype.h>, "gdb_vecs.h".
7654 (debug_threads): Moved to debug.c.
7655 (*): Update all debugging printfs to use debug_printf instead of
7656 fprintf.
7657 (start_inferior): Replace call to fflush with call to debug_flush.
7658 (monitor_show_help): Mention set debug-format.
7659 (parse_debug_format_options): New function.
7660 (handle_monitor_command): Handle "monitor set debug-format".
7661 (gdbserver_usage): Mention --debug-format.
7662 (main): Parse --debug-format.
7663 * server.h (debug_threads): Declaration moved to debug.h.
7664 #include "debug.h".
7665 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7666 trace_debug_1 that uses debug_printf.
7667 (tracepoint_look_up_symbols): Update all debugging printfs to use
7668 debug_printf instead of fprintf.
7669
7670 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7671
7672 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7673 sys/ptrace.h.
7674
7675 2014-01-17 Pedro Alves <palves@redhat.com>
7676
7677 PR build/16445
7678 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7679 defined after including gdb_proc_service.h.
7680
7681 2014-01-16 Doug Evans <dje@google.com>
7682
7683 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7684 (match_dll): Use it.
7685
7686 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7687
7688 * target.h (target_ops) <read_btrace>: Change parameters and
7689 return type to allow error reporting.
7690 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7691 trace reading errors on.
7692 * linux-low.c (linux_low_read_btrace): Pass trace reading
7693 errors on.
7694 (linux_low_disable_btrace): New.
7695
7696 2014-01-15 Doug Evans <dje@google.com>
7697
7698 * inferiors.c (thread_id_to_gdb_id): Delete.
7699 * inferiors.h (thread_id_to_gdb_id): Delete.
7700
7701 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7702
7703 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7704 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7705 versions.
7706
7707 2014-01-08 Pedro Alves <palves@redhat.com>
7708
7709 * server.c (handle_status): Don't discard previous queued stop
7710 replies or thread's pending status here.
7711 (main) <disconnection>: Do it here instead.
7712
7713 2014-01-08 Pedro Alves <palves@redhat.com>
7714
7715 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7716 * server.c (visit_actioned_threads, handle_pending_status): New
7717 function.
7718 (handle_v_cont): Factor out parts to ...
7719 (resume): ... this new function. If in all-stop, and a thread
7720 being resumed has a pending status, report it without actually
7721 resuming.
7722 (myresume): Adjust to use the new 'resume' function.
7723 (clear_pending_status_callback, set_pending_status_callback)
7724 (find_status_pending_thread_callback): New functions.
7725 (handle_status): Handle the case of multiple threads having
7726 interesting statuses to report. Report threads' real last signal
7727 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7728 with an interesting thread to report the status for, instead of
7729 always reporting the status of the first thread.
7730
7731 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7732
7733 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7734 * gdbreplay.c (gdbreplay_version): Likewise.
7735
7736 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7737
7738 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7739 iov.iov_len with the real length in use.
7740
7741 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7742
7743 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7744 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7745 for all targets that use win32-low.c.
7746 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7747 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7748
7749 2013-12-13 Pedro Alves <palves@redhat.com>
7750
7751 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7752 if equal to TARGET_WAITKIND_LOADED.
7753 * win32-low.c (cached_status): New static global.
7754 (win32_wait): Add declaration.
7755 (do_initial_child_stuff): Flush all initial pending debug events
7756 up to the initial breakpoint.
7757 (win32_wait): If CACHED_STATUS was set, return that instead
7758 of doing a real wait. Remove the code resuming the execution
7759 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7760 during the initial phase. Also remove the code changing
7761 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7762 TARGET_WAITKIND_STOPPED.
7763
7764 2013-12-11 Yao Qi <yao@codesourcery.com>
7765
7766 * notif.c (handle_notif_ack): Return 0 if no notification
7767 matches.
7768
7769 2013-11-20 Doug Evans <dje@google.com>
7770
7771 * linux-low.c (linux_set_resume_request): Fix comment.
7772
7773 2013-11-20 Doug Evans <dje@google.com>
7774
7775 * linux-low.c (resume_status_pending_p): Tweak comment.
7776
7777 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7778
7779 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7780 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7781 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7782 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7783 (srv_amd64_regobj): Add amd64-mpx.o.
7784 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7785 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7786 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7787 * i387-fp.c (num_pl_bnd_register) Added constant.
7788 (num_pl_bnd_cfg_registers) Added constant.
7789 (struct i387_xsave) Added reserved area and MPX fields.
7790 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7791 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7792 function.
7793 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7794 (init_registers_amd64_mpx_linux): Declare new function.
7795 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7796 (x86_64_regmap): Add MPX registers.
7797 (x86_linux_read_description): Add MPX case.
7798 (initialize_low_arch): Initialize MPX targets.
7799
7800 2013-11-18 Tom Tromey <tromey@redhat.com>
7801
7802 * configure: Rebuild.
7803 * configure.ac: Don't check for stdlib.h.
7804 * gdbreplay.c: Unconditionally include stdlib.h.
7805
7806 2013-11-18 Tom Tromey <tromey@redhat.com>
7807
7808 * config.in: Rebuild.
7809 * configure: Rebuild.
7810 * configure.ac: Don't use AC_HEADER_DIRENT.
7811
7812 2013-11-18 Tom Tromey <tromey@redhat.com>
7813
7814 * server.h: Don't check HAVE_STRING_H.
7815 * gdbreplay.c: Don't check HAVE_STRING_H.
7816 * configure: Rebuild.
7817
7818 2013-11-18 Tom Tromey <tromey@redhat.com>
7819
7820 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7821 LIBGNU.
7822
7823 2013-11-08 Tom Tromey <tromey@redhat.com>
7824
7825 * configure, config.in: Rebuild.
7826 * configure.ac: Remove unused configury.
7827
7828 2013-11-08 Tom Tromey <tromey@redhat.com>
7829
7830 * acinclude.m4: Include common.m4, codeset.m4.
7831 * configure, config.in: Rebuild.
7832 * configure.ac: Use GDB_AC_COMMON.
7833
7834 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7835
7836 * linux-s390-low.c (HWCAP_S390_TE): New define.
7837 (s390_arch_setup): Consider the TE field in the HWCAP for
7838 determining 'have_regset_tdb'.
7839
7840 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7841
7842 PR gdb/16014
7843 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7844 call to sizeof.
7845
7846 2013-10-02 Pedro Alves <palves@redhat.com>
7847
7848 * server.c (process_serial_event): Don't output "GDBserver
7849 exiting" if GDB is connected through stdio.
7850 * target.c (mywait): Likewise, be silent if GDB is connected
7851 through stdio.
7852
7853 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7854
7855 * lynx-low.c (lynx_add_threads_after_attach): New function.
7856 (lynx_attach): Remove call to add_thread. Add call to
7857 lynx_add_threads_after_attach instead.
7858
7859 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7860
7861 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7862 * config.in, configure: Regenerated.
7863
7864 2013-09-18 Yao Qi <yao@codesourcery.com>
7865
7866 PR server/15959
7867 * server.c (start_inferior): Clear 'resume_info'.
7868
7869 2013-09-16 Jiong Wang <jiwang@tilera.com>
7870
7871 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7872 for each register.
7873
7874 2013-09-16 Jiong Wang <jiwang@tilera.com>
7875
7876 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7877 linux-tile-low.o to srv_tgtobj.
7878
7879 2013-09-16 Will Newton <will.newton@linaro.org>
7880
7881 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7882 out regs.
7883
7884 2013-09-06 Pedro Alves <palves@redhat.com>
7885
7886 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7887 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7888 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7889 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7890 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7891 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7892
7893 2013-09-06 Pedro Alves <palves@redhat.com>
7894
7895 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7896 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7897
7898 2013-09-06 Pedro Alves <palves@redhat.com>
7899
7900 * linux-amd64-ipa.c: Include tracepoint.h.
7901 * linux-i386-ipa.c: Include tracepoint.h.
7902
7903 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7904
7905 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7906 (ps_get_thread_area): New function.
7907
7908 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7909
7910 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7911 (initialize_low_arch): Call init_registers_crisv32 rather than
7912 init_register_crisv32.
7913
7914 2013-09-05 Pedro Alves <palves@redhat.com>
7915
7916 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7917 to ...
7918 * hostio.h: ... this new file.
7919 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7920 win32-low.c: Include hostio.h.
7921
7922 2013-09-05 Pedro Alves <palves@redhat.com>
7923
7924 * server.h (gdb_client_data, handler_func, callback_handler_func)
7925 (delete_file_handler, add_file_handler, append_callback_event)
7926 (delete_callback_event, start_event_loop, initialize_event_loop):
7927 Move to event-loop.h and include it.
7928 * event-loop.h: New file.
7929
7930 2013-09-05 Pedro Alves <palves@redhat.com>
7931
7932 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7933 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7934 (loaded_dll, unloaded_dll): Move to ...
7935 * dll.h: ... this new file.
7936 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7937
7938 2013-09-05 Pedro Alves <palves@redhat.com>
7939
7940 * server.h (current_process, get_thread_process, all_processes)
7941 (add_inferior_to_list, for_each_inferior, current_inferior)
7942 (remove_inferior, add_process, remove_process, find_process_pid)
7943 (have_started_inferiors_p, have_attached_inferiors_p)
7944 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7945 (clear_inferiors, find_inferior, find_inferior_id)
7946 (inferior_target_data, set_inferior_target_data)
7947 (inferior_regcache_data, set_inferior_regcache_data): Move to
7948 inferiors.h, and include it.
7949 * inferiors.h: New file.
7950
7951 2013-09-05 Pedro Alves <palves@redhat.com>
7952
7953 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7954 Move ...
7955 * ax.h: ... here.
7956
7957 2013-09-05 Pedro Alves <palves@redhat.com>
7958
7959 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7960 tracepoint.h.
7961 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7962 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7963 (handle_tracepoint_general_set, handle_tracepoint_query)
7964 (tracepoint_finished_step, tracepoint_was_hit)
7965 (release_while_stepping_state_list, current_traceframe)
7966 (in_readonly_region, traceframe_read_mem)
7967 (fetch_traceframe_registers, traceframe_read_sdata)
7968 (traceframe_read_info, struct fast_tpoint_collect_status)
7969 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7970 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7971 (supply_fast_tracepoint_registers)
7972 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7973 (ipa_tdesc, claim_trampoline_space)
7974 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7975 (agent_mem_read, agent_get_trace_state_variable_value)
7976 (agent_set_trace_state_variable_value, agent_tsv_read)
7977 (agent_mem_read_string, get_raw_reg_func_addr)
7978 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7979 * tracepoint.h: ... this new file.
7980
7981 2013-09-05 Pedro Alves <palves@redhat.com>
7982
7983 * server.h (perror_with_name, error, fatal, warning, paddress)
7984 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7985 include it.
7986 * utils.h: New file.
7987
7988 2013-09-05 Pedro Alves <palves@redhat.com>
7989
7990 * server.h (remote_debug, noack_mode, transport_is_reliable)
7991 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7992 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7993 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7994 (write_enn, initialize_async_io, enable_async_io)
7995 (disable_async_io, check_remote_input_interrupt_request)
7996 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7997 (dead_thread_notify, prepare_resume_reply)
7998 (decode_address_to_semicolon, decode_address, decode_m_packet)
7999 (decode_M_packet, decode_X_packet, decode_xfer_write)
8000 (decode_search_memory_packet, unhexify, hexify)
8001 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8002 (look_up_one_symbol, relocate_instruction)
8003 (monitor_output): Move to remote-utils.h, and include it.
8004 * remote-utils.h: New file.
8005
8006 2013-09-05 Pedro Alves <palves@redhat.com>
8007
8008 * server.h (_): Delete.
8009
8010 2013-09-02 Pedro Alves <palves@redhat.com>
8011
8012 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8013 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8014 allocated.
8015 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8016
8017 2013-09-02 Pierre Muller <muller@sourceware.org>
8018
8019 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8020 or WriteProcessMemory complete successfully and handle
8021 ERROR_PARTIAL_COPY error.
8022
8023 2013-09-02 Pedro Alves <palves@redhat.com>
8024
8025 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8026 error instead of EIO.
8027
8028 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8029
8030 PR server/15604
8031 * linux-low.c: Include filestuff.h.
8032 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8033 * lynx-low.c: Include filestuff.h.
8034 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8035 * server.c: Include filestuff.h.
8036 (main): Call notice_open_fds.
8037 * spu-low.c: Include filestuff.h.
8038 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8039
8040 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8041
8042 * Makefile.in: Explain why ../target and ../nat are not
8043 listed as include file search paths.
8044 (linux-waitpid.o): New object file rule.
8045 * configure.srv (srv_native_linux_obj): New variable.
8046 Replace all occurrences of linux native object files with
8047 $srv_native_linux_obj.
8048 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8049 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8050 (linux_enable_event_reporting): Remove declaration.
8051 (my_waitpid): Moved to common/linux-waitpid.c.
8052 (linux_wait_for_event): Pass ptid when calling
8053 linux_enable_event_reporting.
8054 (linux_supports_tracefork_flag): Remove.
8055 (linux_enable_event_reporting): Likewise.
8056 (linux_tracefork_grandchild): Remove.
8057 (STACK_SIZE): Moved to common/linux-ptrace.c.
8058 (linux_tracefork_child): Remove.
8059 (linux_test_for_tracefork): Remove.
8060 (linux_look_up_symbols): Call linux_supports_traceclone.
8061 (initialize_low): Remove call to linux_test_for_tracefork.
8062 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8063 common/linux-ptrace.h.
8064 (PTRACE_TYPE_ARG4): Likewise.
8065 Include linux-ptrace.h.
8066
8067 2013-08-21 Pedro Alves <palves@redhat.com>
8068
8069 * config.in: Renegerate.
8070
8071 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8072
8073 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8074 (SFILES): Remove $(srcdir)/common/target-common.c and
8075 add $(srcdir)/target/waitstatus.c.
8076 (OBS): Remove target-common.o and add waitstatus.o.
8077 (server_h): Remove $(srcdir)/../common/target-common.h and
8078 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8079 and $(srcdir)/../target/waitstatus.h.
8080 (target-common.o): Remove.
8081 (waitstatus.o): New target object file.
8082 * target.h: Do not include target-common.h and
8083 include target/resume.h, target/wait.h and
8084 target/waitstatus.h.
8085
8086 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8087
8088 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8089 to PTRACE_TYPE_ARG3.
8090 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8091 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8092 PTRACE_TYPE_ARG4.
8093 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8094 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8095
8096 2013-07-27 Jie Zhang <jie@codesourcery.com>
8097 Daniel Jacobowitz <dan@codesourcery.com>
8098 Yao Qi <yao@codesourcery.com>
8099
8100 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8101 (mips-linux-watch.o): New rule.
8102 (mips_linux_watch_h): New variable.
8103 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8104 srv_tgtobj.
8105 * linux-mips-low.c: Include mips-linux-watch.h.
8106 (struct arch_process_info, struct arch_lwp_info): New.
8107 (update_watch_registers_callback): New function.
8108 (mips_linux_new_process, mips_linux_new_thread) New functions.
8109 (mips_linux_prepare_to_resume, mips_insert_point): New
8110 functions.
8111 (mips_remove_point, mips_stopped_by_watchpoint): New
8112 functions.
8113 (rsp_bp_type_to_target_hw_bp_type): New function.
8114 (mips_stopped_data_address): New function.
8115 (the_low_target): Add watchpoint support functions.
8116
8117 2013-07-27 Yao Qi <yao@codesourcery.com>
8118
8119 * i386-low.c: Include break-common.h.
8120 (enum target_hw_bp_type): Remove.
8121
8122 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8123
8124 * Makefile.in (SFILES): /common/target-common.c.
8125 (OBS): Add target-common.o.
8126 (server_h): Add $(srcdir)/../common/target-common.h.
8127 (target-common.o): New target.
8128 * server.c (queue_stop_reply_callback): Free
8129 status string after use.
8130 * target.c (target_waitstatus_to_string): Remove.
8131 * target.h: Include target-common.h.
8132 (resume_kind): Likewise.
8133 (target_waitkind): Likewise.
8134 (target_waitstatus): Likewise.
8135 (TARGET_WNOHANG): Likewise.
8136
8137 2013-07-04 Yao Qi <yao@codesourcery.com>
8138
8139 * Makefile.in (host_alias): Use @host_noncanonical@.
8140 (target_alias): Use @target_noncanonical@.
8141 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8142 ACX_NONCANONICAL_HOST.
8143 * configure: Regenerated.
8144
8145 Revert:
8146 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8147
8148 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8149 * configure: Rebuild.
8150 * Makefile.in (version_host, version_target): Get from configure.
8151 (version.c): Use $(version_host) and $(version_target).
8152
8153 2013-07-03 Pedro Alves <palves@redhat.com>
8154
8155 * Makefile.in (config.status): Depend on development.sh.
8156 * acinclude.m4: Include libmcheck.m4.
8157 * configure: Regenerate.
8158
8159 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8160
8161 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8162 attribute inside the parentheses.
8163 (winapi_DebugSetProcessKillOnExit): Ditto.
8164 (winapi_DebugBreakProcess): Ditto.
8165 (winapi_GenerateConsoleCtrlEvent): Ditto.
8166
8167 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8168
8169 * notif.h (notif_event): Add a dummy member to avoid compiler
8170 errors.
8171
8172 2013-07-01 Pedro Alves <palves@redhat.com>
8173
8174 * hostio.c (HOSTIO_PATH_MAX): Define.
8175 (require_filename, handle_open, handle_unlink, handle_readlink):
8176 Use it.
8177
8178 2013-07-01 Pedro Alves <palves@redhat.com>
8179
8180 * server.h: Include "pathmax.h".
8181 * linux-low.c: Don't include sys/param.h.
8182 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8183 MAXPATHLEN.
8184 * win32-low.c: Don't include sys/param.h.
8185 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8186
8187 2013-07-01 Pedro Alves <palves@redhat.com>
8188
8189 * event-loop.c: Don't check HAVE_UNISTD_H before including
8190 <unistd.h>.
8191 * gdbreplay.c: Likewise.
8192 * remote-utils.c: Likewise.
8193 * server.c: Likewise.
8194 * configure.ac: Don't check for unistd.h.
8195 * configure: Regenerate.
8196
8197 2013-06-28 Tom Tromey <tromey@redhat.com>
8198
8199 * Makefile.in (version.c): Use version.in, not
8200 common/version.in.
8201
8202 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8203
8204 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8205 * configure: Rebuild.
8206 * Makefile.in (version_host, version_target): Get from configure.
8207 (version.c): Use $(version_host) and $(version_target).
8208
8209 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8210
8211 Fix trace-status to output user name without trailing colon.
8212 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8213
8214 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8215
8216 Fix trace-status to output proper start-time and stop-time.
8217 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8218 output start time and stop time in hex as gdb expects.
8219
8220 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8221
8222 * tracepoint.c (build_traceframe_info_xml): Output trace state
8223 variables present in the trace buffer.
8224
8225 2013-06-24 Tom Tromey <tromey@redhat.com>
8226
8227 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8228 create-version.sh.
8229 (version.o): Remove.
8230 * gdbreplay.c: Include version.h.
8231 (version, host_name): Don't declare.
8232 * server.h: Include version.h.
8233 (version, host_name): Don't declare.
8234
8235 2013-06-12 Pedro Alves <palves@redhat.com>
8236
8237 * linux-x86-low.c (linux_is_elf64): Delete global.
8238 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8239 with local linux_pid_exe_is_elf_64_file use.
8240
8241 2013-06-11 Pedro Alves <palves@redhat.com>
8242
8243 * linux-low.c (regset_disabled, disable_regset): New functions.
8244 (regsets_fetch_inferior_registers)
8245 (regsets_store_inferior_registers): Use them.
8246 (initialize_regsets_info); Don't allocate the disabled_regsets
8247 array here.
8248 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8249 comment.
8250
8251 2013-06-11 Pedro Alves <palves@redhat.com>
8252
8253 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8254 xmalloc.
8255
8256 2013-06-11 Pedro Alves <palves@redhat.com>
8257
8258 * linux-x86-low.c (initialize_low_arch): Call
8259 init_registers_x32_avx_linux.
8260
8261 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8262
8263 Fix compatibility with Android Bionic.
8264 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8265 it is not empty.
8266
8267 2013-06-07 Pedro Alves <palves@redhat.com>
8268
8269 PR server/14823
8270 * Makefile.in (OBS): Add tdesc.o.
8271 (IPA_OBJS): Add tdesc-ipa.o.
8272 (tdesc-ipa.o): New rule.
8273 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8274 interface.
8275 * linux-low.c (new_inferior): Delete.
8276 (disabled_regsets, num_regsets): Delete.
8277 (linux_add_process): Adjust to set the new per-process
8278 new_inferior flag.
8279 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8280 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8281 was a stop. When calling arch_setup, switch the current inferior
8282 to the thread that got an event.
8283 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8284 (regsets_fetch_inferior_registers)
8285 (regsets_store_inferior_registers): New regsets_info parameter.
8286 Adjust to use it.
8287 (linux_register_in_regsets): New regs_info parameter. Adjust to
8288 use it.
8289 (register_addr, fetch_register, store_register): New usrregs_info
8290 parameter. Adjust to use it.
8291 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8292 parameter regs_info. Adjust to use it.
8293 (linux_fetch_registers): Get the current inferior's regs_info, and
8294 adjust to use it.
8295 (linux_store_registers): Ditto.
8296 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8297 (initialize_low): Don't initialize the target_regsets here. Call
8298 initialize_low_arch.
8299 * linux-low.h (target_regsets): Delete declaration.
8300 (struct regsets_info): New.
8301 (struct usrregs_info): New.
8302 (struct regs_info): New.
8303 (struct process_info_private) <new_inferior>: New field.
8304 (struct linux_target_ops): Delete the num_regs, regmap, and
8305 regset_bitmap fields. New field regs_info.
8306 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8307 * i387-fp.c (num_xmm_registers): Delete.
8308 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8309 calls to new interface.
8310 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8311 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8312 Infer the number of xmm registers from the regcache's target
8313 description.
8314 * i387-fp.h (num_xmm_registers): Delete.
8315 * inferiors.c (add_thread): Don't install the thread's regcache
8316 here.
8317 * proc-service.c (gregset_info): Fetch the current inferior's
8318 regs_info. Adjust to use it.
8319 * regcache.c: Include tdesc.h.
8320 (register_bytes, reg_defs, num_registers)
8321 (gdbserver_expedite_regs): Delete.
8322 (get_thread_regcache): If the thread doesn't have a regcache yet,
8323 create one, instead of aborting gdbserver.
8324 (regcache_invalidate_one): Rename to ...
8325 (regcache_invalidate_thread): ... this.
8326 (regcache_invalidate_one): New.
8327 (regcache_invalidate): Only invalidate registers of the current
8328 process.
8329 (init_register_cache): Add target_desc parameter, and use it.
8330 (new_register_cache): Ditto. Assert the target description has a
8331 non zero registers_size.
8332 (regcache_cpy): Add assertions. Adjust.
8333 (realloc_register_cache, set_register_cache): Delete.
8334 (registers_to_string, registers_from_string): Adjust.
8335 (find_register_by_name, find_regno, find_register_by_number)
8336 (register_cache_size): Add target_desc parameter, and use it.
8337 (free_register_cache_thread, free_register_cache_thread_one)
8338 (regcache_release, register_cache_size): New.
8339 (register_size): Add target_desc parameter, and use it.
8340 (register_data, supply_register, supply_register_zeroed)
8341 (supply_regblock, supply_register_by_name, collect_register)
8342 (collect_register_as_string, collect_register_by_name): Adjust.
8343 * regcache.h (struct target_desc): Forward declare.
8344 (struct regcache) <tdesc>: New field.
8345 (init_register_cache, new_register_cache): Add target_desc
8346 parameter.
8347 (regcache_invalidate_thread): Declare.
8348 (regcache_invalidate_one): Delete declaration.
8349 (regcache_release): Declare.
8350 (find_register_by_number, register_cache_size, register_size)
8351 (find_regno): Add target_desc parameter.
8352 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8353 declarations.
8354 * remote-utils.c: Include tdesc.h.
8355 (outreg, prepare_resume_reply): Adjust.
8356 * server.c: Include tdesc.h.
8357 (gdbserver_xmltarget): Delete declaration.
8358 (get_features_xml, process_serial_event): Adjust.
8359 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8360 declare.
8361 (struct process_info) <tdesc>: New field.
8362 (ipa_tdesc): Declare.
8363 * tdesc.c: New file.
8364 * tdesc.h: New file.
8365 * tracepoint.c: Include tdesc.h.
8366 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8367 (get_context_regcache): Adjust to pass ipa_tdesc down.
8368 (do_action_at_tracepoint): Adjust to get the register cache size
8369 from the context regcache's description.
8370 (traceframe_walk_blocks): Adjust to get the register cache size
8371 from the current trace frame's description.
8372 (traceframe_get_pc): Adjust to get current trace frame's
8373 description and pass it down.
8374 (gdb_collect): Adjust to get the register cache size from the
8375 IPA's description.
8376 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8377 (gdbserver_xmltarget): Delete.
8378 (initialize_low_tracepoint): Set the ipa's target description.
8379 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8380 (initialize_low_tracepoint): Set the ipa's target description.
8381 * linux-x86-low.c: Include tdesc.h.
8382 [__x86_64__] (is_64bit_tdesc): New.
8383 (ps_get_thread_area, x86_get_thread_area): Use it.
8384 (i386_cannot_store_register): Rename to ...
8385 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8386 (i386_cannot_fetch_register): Rename to ...
8387 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8388 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8389 to new interface.
8390 (target_regsets): Rename to ...
8391 (x86_regsets): ... this.
8392 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8393 interface.
8394 (x86_siginfo_fixup): Use is_64bit_tdesc.
8395 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8396 (tdesc_x32_avx_linux, tdesc_x32_linux)
8397 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8398 Declare.
8399 (x86_linux_update_xmltarget): Delete.
8400 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8401 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8402 (AMD64_LINUX_USER64_CS): New.
8403 (x86_linux_read_description): New, based on
8404 x86_linux_update_xmltarget.
8405 (same_process_callback): New.
8406 (x86_arch_setup_process_callback): New.
8407 (x86_linux_update_xmltarget): New.
8408 (x86_regsets_info): New.
8409 (amd64_linux_regs_info): New.
8410 (i386_linux_usrregs_info): New.
8411 (i386_linux_regs_info): New.
8412 (x86_linux_regs_info): New.
8413 (x86_arch_setup): Reimplement.
8414 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8415 (x86_emit_ops): Ditto.
8416 (the_low_target): Adjust. Install x86_linux_regs_info,
8417 x86_cannot_fetch_register, and x86_cannot_store_register.
8418 (initialize_low_arch): New.
8419 * linux-ia64-low.c (tdesc_ia64): Declare.
8420 (ia64_fetch_register): Adjust.
8421 (ia64_usrregs_info, regs_info): New globals.
8422 (ia64_regs_info): New function.
8423 (the_low_target): Adjust.
8424 (initialize_low_arch): New function.
8425 * linux-sparc-low.c (tdesc_sparc64): Declare.
8426 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8427 Adjust.
8428 (sparc_arch_setup): New function.
8429 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8430 (the_low_target): Adjust.
8431 (initialize_low_arch): New function.
8432 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8433 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8434 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8435 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8436 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8437 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8438 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8439 (tdesc_powerpc_isa205_vsx64l): Declare.
8440 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8441 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8442 (ppc_set_pc, ppc_get_hwcap): Adjust.
8443 (ppc_usrregs_info): Forward declare.
8444 (!__powerpc64__) ppc_regmap_adjusted: New global.
8445 (ppc_arch_setup): Adjust to the current process'es target
8446 description.
8447 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8448 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8449 (ppc_store_evrregset): Adjust.
8450 (target_regsets): Rename to ...
8451 (ppc_regsets): ... this, and make static.
8452 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8453 (ppc_regs_info): New function.
8454 (the_low_target): Adjust.
8455 (initialize_low_arch): New function.
8456 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8457 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8458 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8459 (tdesc_s390x_linux64v2): Declare.
8460 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8461 (s390_fill_gregset, s390_store_last_break): Adjust.
8462 (target_regsets): Rename to ...
8463 (s390_regsets): ... this, and make static.
8464 (s390_get_pc, s390_set_pc): Adjust.
8465 (s390_get_hwcap): New target_desc parameter, and use it.
8466 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8467 (s390_arch_setup): Adjust to set the current process'es target
8468 description. Don't adjust the regmap.
8469 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8470 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8471 (regs_info_3264): New globals.
8472 (s390_regs_info): New function.
8473 (the_low_target): Adjust.
8474 (initialize_low_arch): New function.
8475 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8476 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8477 [__mips64] (init_registers_mips_linux)
8478 (init_registers_mips_dsp_linux): Delete defines.
8479 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8480 (have_dsp): New global.
8481 (mips_read_description): New, based on mips_arch_setup.
8482 (mips_arch_setup): Reimplement.
8483 (get_usrregs_info): New function.
8484 (mips_cannot_fetch_register, mips_cannot_store_register)
8485 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8486 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8487 (target_regsets): Rename to ...
8488 (mips_regsets): ... this, and make static.
8489 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8490 (dsp_regs_info, regs_info): New globals.
8491 (mips_regs_info): New function.
8492 (the_low_target): Adjust.
8493 (initialize_low_arch): New function.
8494 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8495 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8496 Declare.
8497 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8498 (arm_read_description): New, with bits factored from
8499 arm_arch_setup.
8500 (arm_arch_setup): Reimplement.
8501 (target_regsets): Rename to ...
8502 (arm_regsets): ... this, and make static.
8503 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8504 (arm_regs_info): New function.
8505 (the_low_target): Adjust.
8506 (initialize_low_arch): New function.
8507 * linux-m68k-low.c (tdesc_m68k): Declare.
8508 (target_regsets): Rename to ...
8509 (m68k_regsets): ... this, and make static.
8510 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8511 (m68k_regs_info): New function.
8512 (m68k_arch_setup): New function.
8513 (the_low_target): Adjust.
8514 (initialize_low_arch): New function.
8515 * linux-sh-low.c (tdesc_sharch): Declare.
8516 (target_regsets): Rename to ...
8517 (sh_regsets): ... this, and make static.
8518 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8519 (sh_regs_info, sh_arch_setup): New functions.
8520 (the_low_target): Adjust.
8521 (initialize_low_arch): New function.
8522 * linux-bfin-low.c (tdesc_bfin): Declare.
8523 (bfin_arch_setup): New function.
8524 (bfin_usrregs_info, regs_info): New globals.
8525 (bfin_regs_info): New function.
8526 (the_low_target): Adjust.
8527 (initialize_low_arch): New function.
8528 * linux-cris-low.c (tdesc_cris): Declare.
8529 (cris_arch_setup): New function.
8530 (cris_usrregs_info, regs_info): New globals.
8531 (cris_regs_info): New function.
8532 (the_low_target): Adjust.
8533 (initialize_low_arch): New function.
8534 * linux-cris-low.c (tdesc_crisv32): Declare.
8535 (cris_arch_setup): New function.
8536 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8537 (cris_regs_info): New function.
8538 (the_low_target): Adjust.
8539 (initialize_low_arch): New function.
8540 * linux-m32r-low.c (tdesc_m32r): Declare.
8541 (m32r_arch_setup): New function.
8542 (m32r_usrregs_info, regs_info): New globals.
8543 (m32r_regs_info): Adjust.
8544 (initialize_low_arch): New function.
8545 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8546 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8547 (tic6x_usrregs_info): Forward declare.
8548 (tic6x_read_description): New function, based on ...
8549 (tic6x_arch_setup): ... this. Reimplement.
8550 (target_regsets): Rename to ...
8551 (tic6x_regsets): ... this, and make static.
8552 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8553 (tic6x_regs_info): New function.
8554 (the_low_target): Adjust.
8555 (initialize_low_arch): New function.
8556 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8557 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8558 (target_regsets): Rename to ...
8559 (xtensa_regsets): ... this, and make static.
8560 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8561 globals.
8562 (xtensa_arch_setup, xtensa_regs_info): New functions.
8563 (the_low_target): Adjust.
8564 (initialize_low_arch): New function.
8565 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8566 (nios2_arch_setup): Set the current process'es tdesc.
8567 (target_regsets): Rename to ...
8568 (nios2_regsets): ... this.
8569 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8570 (nios2_regs_info): New function.
8571 (the_low_target): Adjust.
8572 (initialize_low_arch): New function.
8573 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8574 (aarch64_arch_setup): Set the current process'es tdesc.
8575 (target_regsets): Rename to ...
8576 (aarch64_regsets): ... this.
8577 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8578 (aarch64_regs_info): New function.
8579 (the_low_target): Adjust.
8580 (initialize_low_arch): New function.
8581 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8582 globals.
8583 (target_regsets): Rename to ...
8584 (tile_regsets): ... this.
8585 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8586 (tile_regs_info): New function.
8587 (tile_arch_setup): Set the current process'es tdesc.
8588 (the_low_target): Adjust.
8589 (initialize_low_arch): New function.
8590 * spu-low.c (tdesc_spu): Declare.
8591 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8592 * win32-arm-low.c (tdesc_arm): Declare.
8593 (arm_arch_setup): New function.
8594 (the_low_target): Install arm_arch_setup instead of
8595 init_registers_arm.
8596 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8597 (init_windows_x86): Rename to ...
8598 (i386_arch_setup): ... this. Set `win32_tdesc'.
8599 (the_low_target): Adjust.
8600 * win32-low.c (win32_tdesc): New global.
8601 (child_add_thread): Don't create the thread cache here.
8602 (do_initial_child_stuff): Set the new process'es tdesc.
8603 * win32-low.h (struct target_desc): Forward declare.
8604 (win32_tdesc): Declare.
8605 * lynx-i386-low.c (tdesc_i386): Declare global.
8606 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8607 * lynx-low.c (lynx_tdesc): New global.
8608 (lynx_add_process): Set the new process'es tdesc.
8609 * lynx-low.h (struct target_desc): Forward declare.
8610 (lynx_tdesc): Declare global.
8611 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8612 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8613 * nto-low.c (nto_tdesc): New global.
8614 (do_attach): Set the new process'es tdesc.
8615 * nto-low.h (struct target_desc): Forward declare.
8616 (nto_tdesc): Declare.
8617 * nto-x86-low.c (tdesc_i386): Declare.
8618 (nto_x86_arch_setup): Set `nto_tdesc'.
8619
8620 2013-06-04 Gary Benson <gbenson@redhat.com>
8621
8622 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8623 to qSupported response when appropriate.
8624 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8625 with nonzero-length annex.
8626 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8627 arguments supplied in annex.
8628
8629 2013-05-31 Doug Evans <dje@google.com>
8630
8631 PR server/15594
8632 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8633 64 bits in 64-cross-32 environment.
8634
8635 2013-05-28 Pedro Alves <palves@redhat.com>
8636
8637 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8638 (aarch64-without-fpu.c): Delete rule.
8639 * configure.srv (aarch64*-*-linux*): Remove references to
8640 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8641 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8642 declaration.
8643
8644 2013-05-24 Pedro Alves <palves@redhat.com>
8645
8646 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8647 instead of strchr/decode_address. Error if the range isn't split
8648 with a ','. Don't assume there's be a ':' in the action.
8649
8650 2013-05-23 Yao Qi <yao@codesourcery.com>
8651 Pedro Alves <palves@redhat.com>
8652
8653 * linux-low.c (lwp_in_step_range): New function.
8654 (linux_wait_1): If the thread was range stepping and stopped
8655 outside the stepping range, report the stop to GDB. Otherwise,
8656 continue stepping. Add range stepping debug output.
8657 (linux_set_resume_request): Copy the step range from the resume
8658 request to the lwp.
8659 (linux_supports_range_stepping): New.
8660 (linux_target_ops) <supports_range_stepping>: Set to
8661 linux_supports_range_stepping.
8662 * linux-low.h (struct linux_target_ops)
8663 <supports_range_stepping>: New field.
8664 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8665 * linux-x86-low.c (x86_supports_range_stepping): New.
8666 (the_low_target) <supports_range_stepping>: Set to
8667 x86_supports_range_stepping.
8668 * server.c (handle_v_cont): Handle 'r' action.
8669 (handle_v_requests): Append ";r" if the target supports range
8670 stepping.
8671 * target.h (struct thread_resume) <step_range_start,
8672 step_range_end>: New fields.
8673 (struct target_ops) <supports_range_stepping>:
8674 New field.
8675 (target_supports_range_stepping): New macro.
8676
8677 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8678
8679 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8680 confusion in comment.
8681
8682 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8683
8684 * lynx-low.c (struct process_info_private): New type.
8685 (lynx_add_process): New function.
8686 (lynx_create_inferior, lynx_attach): Replace calls to
8687 add_process by calls to lynx_add_process.
8688 (lynx_resume): If PTID is null, then try using
8689 current_process()->private->last_wait_event_ptid.
8690 Add comments.
8691 (lynx_clear_inferiors): Delete. The contents of that function
8692 has been inlined in lynx_mourn;
8693 (lynx_wait_1): Save the ptid in the process's private data.
8694 (lynx_mourn): Free the process' private data. Replace call
8695 to lynx_clear_inferiors by call to clear_inferiors.
8696
8697 2013-05-17 Yao Qi <yao@codesourcery.com>
8698
8699 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8700 the right place.
8701
8702 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8703
8704 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8705 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8706 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8707 PT_TEXT_END_ADDR guards. Update comments.
8708 (linux_target_op) <read_offsets>: Conditionally define to
8709 linux_read_offsets if the target is UCLIBC and if it defines
8710 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8711
8712 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8713 Andrew Jenner <andrew@codesourcery.com>
8714
8715 * Makefile.in (SFILES): Add linux-nios2-low.c.
8716 (clean): Add action to delete nios2-linux.c.
8717 (nios2-linux.c): New rule.
8718 * configure.srv: Add nios2*-*-linux*.
8719 * linux-nios2-low.c: New.
8720
8721 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8722
8723 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8724
8725 2013-04-25 Hui Zhu <hui@codesourcery.com>
8726
8727 PR gdb/15186
8728 * ax.c (ax_printf): Add fflush.
8729
8730 2013-04-22 Tom Tromey <tromey@redhat.com>
8731
8732 * Makefile.in (SFILES): Add filestuff.c.
8733 (OBS): Add filestuff.o.
8734 (filestuff.o): New target.
8735 * config.in, configure: Rebuild.
8736 * configure.ac: Check for fdwalk, pipe2.
8737
8738 2013-04-17 Pedro Alves <palves@redhat.com>
8739
8740 * configure.ac (USE_THREAD_DB): Delete variable.
8741 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8742 Don't AC_SUBST USE_THREAD_DB.
8743 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8744 * config.in, configure: Regenerate.
8745
8746 2013-04-16 Pedro Alves <palves@redhat.com>
8747
8748 * linux-low.h (struct lwp_info) <thread_known>: Move under
8749 the USE_THREAD_DB #ifdef.
8750
8751 2013-04-16 Pedro Alves <palves@redhat.com>
8752
8753 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8754 (linux-low.o): Delete rule.
8755 * linux-low.h: Always include "gdb_thread_db.h" instead of
8756 conditionally including thread_db.h.
8757 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8758 HAVE_THREAD_DB_H.
8759
8760 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8761
8762 * Makefile.in (install-only): Fix make install regression.
8763
8764 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8765
8766 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8767 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8768 installation.
8769 * gdbserver.1: Remove.
8770
8771 2013-03-22 Pedro Alves <palves@redhat.com>
8772
8773 * linux-low.c (handle_extended_wait): Don't call
8774 linux_enable_event_reporting.
8775
8776 2013-03-15 Tony Theodore <tonyt@logyst.com>
8777
8778 PR build/9098:
8779 * Makefile.in (SHELL): Use @SHELL@.
8780
8781 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8782
8783 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8784 compiler warning.
8785
8786 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8787
8788 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8789 Remove extraneous NULL element.
8790
8791 2013-03-13 Yao Qi <yao@codesourcery.com>
8792
8793 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8794 'V' block in trace frame.
8795
8796 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8797
8798 * target.h (struct target_ops): Add btrace ops.
8799 (target_supports_btrace): New macro.
8800 (target_enable_btrace): New macro.
8801 (target_disable_btrace): New macro.
8802 (target_read_btrace): New macro.
8803 * gdbthread.h (struct thread_info): Add btrace field.
8804 * server.c: Include btrace-common.h.
8805 (handle_btrace_general_set): New function.
8806 (handle_btrace_enable): New function.
8807 (handle_btrace_disable): New function.
8808 (handle_general_set): Call handle_btrace_general_set.
8809 (handle_qxfer_btrace): New function.
8810 (struct qxfer qxfer_packets[]): Add btrace entry.
8811 * inferiors.c (remove_thread): Disable btrace.
8812 * linux-low: Include linux-btrace.h.
8813 (linux_low_enable_btrace): New function.
8814 (linux_low_read_btrace): New function.
8815 (linux_target_ops): Add btrace ops.
8816 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8817 Add srv_linux_btrace=yes.
8818 (x86_64-*-linux*): Add linux-btrace.o.
8819 Add srv_linux_btrace=yes.
8820 * configure.ac: Define HAVE_LINUX_BTRACE.
8821 * config.in: Regenerated.
8822 * configure: Regenerated.
8823
8824 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8825
8826 * server.c (handle_qxfer): Preserve error message if -3 is
8827 returned.
8828 (qxfer): Document the -3 return value.
8829
8830 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8831
8832 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8833 (linux_btrace_h): New variable.
8834 (linux-btrace.o): New rule.
8835
8836 2013-03-08 Stan Shebs <stan@codesourcery.com>
8837 Hafiz Abid Qadeer <abidh@codesourcery.com>
8838
8839 * tracepoint.c (trace_buffer_size): New global.
8840 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8841 (init_trace_buffer): Change to one-argument function. Allocate
8842 trace buffer memory.
8843 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8844 handle QTBuffer:size packet.
8845 (cmd_bigqtbuffer_size): New function.
8846 (initialize_tracepoint): Call init_trace_buffer with
8847 DEFAULT_TRACE_BUFFER_SIZE.
8848 * server.c (handle_query): Add QTBuffer:size in the
8849 supported packets.
8850
8851 2013-03-07 Yao Qi <yao@codesourcery.com>
8852
8853 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8854 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8855 of -1.
8856 (cmd_qtsp): Adjust condition. Do post increment.
8857 Set cur_action and cur_step_action back to 0.
8858
8859 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8860
8861 PR server/15236
8862 * linux-low.c (linux_write_memory): Return early success if LEN is
8863 zero.
8864
8865 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8866
8867 * configure.srv: Add x86_64-*-cygwin* as target.
8868
8869 2013-02-28 Tom Tromey <tromey@redhat.com>
8870
8871 * configure.ac: Invoke AC_SYS_LARGEFILE.
8872 * configure, config.in: Rebuild.
8873
8874 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8875
8876 * win32-low.c: Throughout, fix format strings and casts of
8877 printf-like functions to avoid type related warnings on all
8878 platforms.
8879 (get_child_debug_event): Print dwDebugEventCode as hex since
8880 that's how it's usually documented.
8881
8882 2013-02-28 Yao Qi <yao@codesourcery.com>
8883
8884 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8885 pulongest.
8886
8887 2013-02-27 Jiong Wang <jiwang@tilera.com>
8888
8889 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8890 (reg-tilegx32.c): New rule.
8891 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8892 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8893 different register info initializer according to elf class.
8894 (init_registers_tilgx32): New function. The tilegx32 register info
8895 initializer.
8896 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8897 (tile_store_gregset): Likewise.
8898
8899 2013-02-27 Yao Qi <yao@codesourcery.com>
8900
8901 * server.c (process_point_options): Print debug message when
8902 debug_threads is true.
8903
8904 2013-02-26 Yao Qi <yao@codesourcery.com>
8905
8906 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8907
8908 2013-02-19 Pedro Alves <palves@redhat.com>
8909 Kai Tietz <ktietz@redhat.com>
8910
8911 PR gdb/15161
8912
8913 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8914 instead of strtoul to extract address from packet.
8915 (process_serial_event) <'z'>: Likewise.
8916
8917 2013-02-18 Yao Qi <yao@codesourcery.com>
8918
8919 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8920
8921 2013-02-14 Pedro Alves <palves@redhat.com>
8922
8923 Plug memory leak.
8924
8925 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8926 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8927
8928 2013-02-14 Pedro Alves <palves@redhat.com>
8929
8930 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8931
8932 2013-02-14 Pedro Alves <palves@redhat.com>
8933
8934 * tracepoint.c (save_string): Delete.
8935 (add_tracepoint_action): Use savestring instead of save_string.
8936
8937 2013-02-12 Pedro Alves <palves@redhat.com>
8938
8939 * linux-xtensa-low.c: Ditto.
8940 * xtensa-xtregs.c: Ditto.
8941
8942 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8943
8944 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8945 thread_db.
8946
8947 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8948
8949 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8950 aarch64_num_wp_regs and aarch64_num_bp_regs to
8951 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8952
8953 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8954
8955 * linux-aarch64-low.c (ps_get_thread_area): Replace
8956 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8957
8958 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8959 Marcus Shawcroft <marcus.shawcroft@arm.com>
8960 Nigel Stephens <nigel.stephens@arm.com>
8961 Yufeng Zhang <yufeng.zhang@arm.com>
8962
8963 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8964 (aarch64.c, aarch64-without-fpu.c): New targets.
8965 * configure.srv (aarch64*-*-linux*): New.
8966 * linux-aarch64-low.c: New file.
8967
8968 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8969
8970 * linux-low.c (handle_extended_wait, linux_create_inferior)
8971 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8972 (dequeue_one_deferred_signal, linux_resume_one_thread)
8973 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8974 (linux_tracefork_grandchild, linux_test_for_tracefork)
8975 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8976 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8977 where the argument is 0.
8978
8979 2013-01-25 Yao Qi <yao@codesourcery.com>
8980
8981 * event-loop.c: Include "queue.h".
8982 (gdb_event_p): New typedef.
8983 (struct gdb_event) <next_event>: Remove.
8984 (event_queue): Change to QUEUE(gdb_event_p).
8985 (async_queue_event): Remove.
8986 (gdb_event_xfree): New.
8987 (initialize_event_loop): New.
8988 (process_event): Use API from QUEUE.
8989 (wait_for_event): Likewise.
8990 * server.c (main): Call initialize_event_loop.
8991 * server.h (initialize_event_loop): Declare.
8992
8993 2013-01-18 Yao Qi <yao@codesourcery.com>
8994
8995 * ax.h (struct eval_agent_expr_context): New.
8996 (gdb_eval_agent_expr): Update declaration.
8997 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8998 TFRAME. Add new argument CTX.
8999 * server.h (struct eval_agent_expr_context): Declare.
9000 (agent_mem_read, agent_tsv_read): Update declaration.
9001 (agent_mem_read_string): Likewise.
9002 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9003 (add_traceframe_block): Add new argument TPOINT.
9004 Increase TPOINT->traceframe_usage.
9005 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9006 eval_tracepoint_agent_expr.
9007 (condition_true_at_tracepoint): Likewise.
9008 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9009 (agent_mem_read_string, agent_tsv_read): Likewise.
9010
9011 2013-01-16 Yao Qi <yao@codesourcery.com>
9012
9013 * linux-low.c (linux_resume_one_lwp): Don't check
9014 'lwp->bp_reinsert != 0'.
9015
9016 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9017 Pedro Alves <palves@redhat.com>
9018
9019 * lynx-low.c (ptrace_request_to_str): Define a temporary
9020 macro and use it to simplify this function's implementation.
9021
9022 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9023
9024 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9025 sets errno.
9026
9027 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9028
9029 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9030
9031 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9032
9033 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9034
9035 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9036
9037 * lynx-low.c (lynx_resume): Use the resume_info parameter
9038 to determine the ptid for the lynx_ptrace call, unless
9039 it is equal to minus_one_ptid, in which case we use the
9040 ptid of the current_inferior.
9041 (lynx_wait_1): After having received a thread create/exit
9042 event, resume the inferior's execution using the signaling
9043 thread's ptid, rather than the old ptid.
9044
9045 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9046
9047 * lynx-low.c (lynx_resume): Delete variable ret.
9048
9049 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9050
9051 * gdbreplay.c (gdbreplay_version): Update copyright year.
9052 * server.c (gdbserver_version): Likewise.
9053
9054 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9055
9056 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9057 new thread.
9058
9059 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9060
9061 * lynx-low.c (ptrace_request_to_str): Add handling for
9062 PTRACE_GETTRACESIG.
9063
9064 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9065
9066 * lynx-low.c (lynx_attach): Delete variable new_process.
9067
9068 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9069
9070 * lynx-low.c (lynx_create_inferior): Delete variable
9071 new_process.
9072
9073 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9074
9075 * lynx-low.c (ptrace_request_to_str): Do not handle
9076 PTRACE_GETTHREADLIST if this macro does not exist.
9077
9078 2012-12-15 Yao Qi <yao@codesourcery.com>
9079
9080 * Makefile.in (OBS): Add notif.o.
9081 * notif.c, notif.h: New.
9082 * server.c: Include "notif.h".
9083 (struct vstop_notif) <next>: Remove.
9084 <base>: New field.
9085 (queue_stop_reply): Update.
9086 (push_event, send_next_stop_reply): Remove.
9087 (discard_queued_stop_replies): Update.
9088 (notif_stop): New variable.
9089 (handle_v_stopped): Remove.
9090 (handle_v_requests): Don't call handle_v_stopped. Call
9091 handle_ack_notif instead.
9092 (queue_stop_reply_callback): Call notif_event_enque instead
9093 of queue_stop_reply.
9094 (handle_status): Don't call send_next_stop_reply, call
9095 notif_write_event instead.
9096 (kill_inferior_callback): Likewise.
9097 (detach_or_kill_inferior_callback): Likewise.
9098 (main): Call initialize_notif.
9099 (process_serial_event): Call QUEUE_is_empty.
9100 (handle_target_event): Call notif_push instead of push event.
9101 * server.h (push_event): Remove declaration.
9102
9103 2012-12-10 Tom Tromey <tromey@redhat.com>
9104
9105 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9106 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9107 macros.
9108 (.c.o): Rewrite.
9109 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9110 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9111 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9112 (amd64-linux-ipa.o, ax.o): Rewrite.
9113 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9114 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9115 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9116 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9117 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9118 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9119 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9120 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9121 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9122 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9123 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9124 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9125 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9126 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9127 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9128 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9129 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9130 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9131 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9132 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9133 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9134 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9135 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9136 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9137 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9138 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9139 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9140 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9141 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9142 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9143 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9144 (reg-tilegx.o): Remove.
9145 (all_object_files): New macro.
9146 Include .deps files.
9147 * aclocal.m4, configure: Rebuild.
9148 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9149 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9150 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9151
9152 2012-12-05 Tom Tromey <tromey@redhat.com>
9153
9154 PR gdb/14917:
9155 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9156
9157 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9158
9159 * configure.ac: Check for linux/perf_event.h.
9160 * config.in: Regenerated.
9161 * configure: Regenerated.
9162
9163 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9164
9165 * hostio.c (handle_readlink): Decrease buffer size
9166 parameter passed to readlink by one byte.
9167
9168 2012-11-26 Yao Qi <yao@codesourcery.com>
9169
9170 * configure.ac (build_warnings): Append '-Wempty-body'.
9171 * configure: Regenerated.
9172 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9173 body.
9174
9175 2012-11-15 Pierre Muller <muller@sourceware.org>
9176
9177 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9178 * config.in: Regenerate.
9179 * configure: Regenerate.
9180 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9181 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9182 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9183 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9184 header.
9185 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9186 instead of <sys/wait.h> header.
9187 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9188
9189 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9190
9191 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9192 (various make rules): Remove -DGDBSERVER
9193
9194 2012-11-09 Yao Qi <yao@codesourcery.com>
9195
9196 * spu-low.c (current_ptid): Move it to ..
9197 * gdbthread.h: ... here. New.
9198 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9199 * server.c (myresume, process_serial_event): Likewise.
9200 * thread-db.c (thread_db_find_new_threads): Likewise.
9201 * tracepoint.c (run_inferior_command): Likewise.
9202
9203 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9204
9205 * server.c (handle_search_memory_1): Include access length in
9206 warning message.
9207
9208 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9209
9210 * linux-crisv32-low.c: Fix compile errors.
9211
9212 2012-09-04 Yao Qi <yao@codesourcery.com>
9213
9214 * tracepoint.c (cmd_qtsv): Adjust debug message.
9215 Don't check CUR_TPOINT.
9216
9217 2012-08-28 Yao Qi <yao@codesourcery.com>
9218
9219 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9220 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9221 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9222 Remove declarations of xmalloc, xreallloc, xstrdup and
9223 freeargv.
9224 * Makefile.in (libiberty_h): New.
9225 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9226 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9227
9228 2012-08-23 Yao Qi <yao@codesourcery.com>
9229
9230 * server.h: Remove declaration of 'xsnprintf'.
9231
9232 2012-08-22 Keith Seitz <keiths@redhat.com>
9233
9234 * server.h: Include build-gnulib-gbserver/config.h.
9235 * gdbreplay.c: Likewise.
9236
9237 2012-08-08 Doug Evans <dje@google.com>
9238
9239 * Makefile.in (SFILES): Add gdb_vecs.c.
9240 (OBS): Add gdb_vecs.o.
9241 (gdb_vecs_h, host_defs_h): New variables.
9242 (thread-db.o): Add $(gdb_vecs_h) dependency.
9243 (gdb_vecs.o): New rule.
9244 * thread-db.c: #include "gdb_vecs.h".
9245 (thread_db_load_search): Use a vector to iterate over path elements.
9246 Handle text appearing after "$pdir".
9247
9248 * configure.ac: Add check for strstr.
9249 * config.in: Regenerate.
9250 * configure: Regenerate.
9251
9252 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9253
9254 * hostio.c (handle_pread): If pread fails, fall back to attempting
9255 lseek/read.
9256 (handle_pwrite): Likewise for pwrite.
9257
9258 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9259
9260 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9261 between unsupported TYPE and unimplementable ADDR/LEN combination.
9262 (arm_insert_point): Act on new return value.
9263
9264 2012-07-31 Pedro Alves <palves@redhat.com>
9265
9266 * server.c (process_point_options): Only skip tokens if we find
9267 one that is unrecognized. Don't treat 'X' specially while
9268 skipping unrecognized tokens.
9269
9270 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9271
9272 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9273 to 4-byte-align HW breakpoint addresses for Thumb.
9274
9275 2012-07-27 Yao Qi <yao@codesourcery.com>
9276
9277 PR remote/14161.
9278
9279 * server.h: Declare gdb_agent_about_to_close.
9280 * target.c (kill_inferior): Include "agent.h".
9281 New. Send command 'kill'.
9282 * target.h (kill_inferior): Removed macro.
9283 * tracepoint.c (gdb_agent_about_to_close): New.
9284 (gdb_agent_helper_thread): Handle command 'close'.
9285 Wait endlessly until the inferior stops.
9286 Install gdb_agent_remove_socket to atexit hook.
9287 (agent_socket_name): New static variable.
9288 (gdb_agent_socket_init): Replace local variable 'name' with
9289 'agent_socket_name'.
9290 (gdb_agent_remove_socket): New.
9291
9292 2012-07-27 Yao Qi <yao@codesourcery.com>
9293
9294 * server.c (process_point_options): Stop at 'X' when parsing.
9295
9296 2012-07-19 Michael Eager <eager@eagercon.com>
9297
9298 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9299 to hw_execute.
9300 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9301 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9302 hardware breakpoint.
9303
9304 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9305
9306 * gdbserver/linux-low.c (initialize_low): Call
9307 linux_ptrace_init_warnings.
9308
9309 2012-07-02 Doug Evans <dje@google.com>
9310
9311 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9312 pointer to int.
9313
9314 2012-07-02 Stan Shebs <stan@codesourcery.com>
9315
9316 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9317 (ax.o): Add it to build rule.
9318 (ax-ipa.o): Ditto.
9319 (OBS): Add format.o.
9320 (IPA_OBS): Add format.o.
9321 * server.c (handle_query): Claim support for breakpoint commands.
9322 (process_point_options): Add command case.
9323 (process_serial_event): Leave running if there are printfs in
9324 effect.
9325 * mem-break.h (any_persistent_commands): Declare.
9326 (add_breakpoint_commands): Declare.
9327 (gdb_no_commands_at_breakpoint): Declare.
9328 (run_breakpoint_commands): Declare.
9329 * mem-break.c (struct point_command_list): New struct.
9330 (struct breakpoint): New field command_list.
9331 (any_persistent_commands): New function.
9332 (add_commands_to_breakpoint): New function.
9333 (add_breakpoint_commands): New function.
9334 (gdb_no_commands_at_breakpoint): New function.
9335 (run_breakpoint_commands): New function.
9336 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9337 locally.
9338 * ax.c: Include format.h.
9339 (ax_printf): New function.
9340 (gdb_eval_agent_expr): Add printf opcode.
9341
9342 2012-06-13 Yao Qi <yao@codesourcery.com>
9343
9344 * server.c (start_inferior): Remove duplicated writes to fields
9345 'last_resume_kind' and 'last_status' of 'current_inferior'.
9346
9347 2012-06-12 Yao Qi <yao@codesourcery.com>
9348 Pedro Alves <palves@redhat.com>
9349
9350 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9351 comment.
9352 * server.c (handle_v_cont): Extend comment.
9353
9354 2012-06-11 Yao Qi <yao@codesourcery.com>
9355
9356 * linux-low.c (linux_attach): Add 'static'.
9357
9358 2012-06-06 Yao Qi <yao@codesourcery.com>
9359
9360 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9361
9362 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9363
9364 Fix gcc -flto compilation warning.
9365 * server.c (main): Make variable multi_mode and attach volatile.
9366
9367 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9368
9369 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9370 if the platform doesn't know about it.
9371
9372 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9373
9374 * Makefile.in (SFILES): Add linux-tile-low.c.
9375 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9376 * configure.srv: Handle tilegx-*-linux*.
9377 * linux-tile-low.c: New file.
9378
9379 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9380
9381 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9382
9383 2012-05-24 Pedro Alves <palves@redhat.com>
9384
9385 PR gdb/7205
9386
9387 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9388
9389 2012-05-24 Pedro Alves <palves@redhat.com>
9390
9391 PR gdb/7205
9392
9393 Replace target_signal with gdb_signal throughout.
9394
9395 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9396
9397 * linux-low.c (linux_store_registers): Avoid the copying sequence
9398 when no data has been retrieved by ptrace.
9399
9400 2012-05-22 Will Deacon <will.deacon@arm.com>
9401
9402 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9403 Include asm/ptrace.h.
9404 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9405 already defined.
9406
9407 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9408
9409 * linux-low.c (linux_store_registers): Don't re-retrieve data
9410 with ptrace that has already been obtained from /proc. Always
9411 copy any data retrieved with ptrace to the buffer supplied.
9412
9413 2012-05-11 Yao Qi <yao@codesourcery.com>
9414 Pedro Alves <palves@redhat.com>
9415
9416 * linux-low.c (enum stopping_threads_kind): New.
9417 (stopping_threads): Change type to `enum stopping_threads_kind'.
9418 (handle_extended_wait): If stopping and suspending threads, leave
9419 the new_lwp suspended too.
9420 (linux_wait_for_event): Adjust.
9421 (stop_all_lwps): Set `stopping_threads' to
9422 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9423 whether we're suspending threads or just stopping them. Assert no
9424 recursion happens.
9425
9426 2012-04-29 Yao Qi <yao@codesourcery.com>
9427
9428 * server.h: Move some code to ...
9429 * gdbthread.h: ... here. New.
9430 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9431 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9432 (nto-low.o, win32-low.o): Likewise.
9433 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9434 * regcache.c, remote-utils.c, server.c: Likewise.
9435 * target.c, tracepoint.c, win32-low.c: Likewise.
9436
9437 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9438
9439 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9440 (PTRACE_ARG4_TYPE): Likewise.
9441 (PTRACE_XFER_TYPE): Likewise.
9442 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9443 ptrace to PTRACE_ARG3_TYPE.
9444 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9445 (PTRACE_ARG4_TYPE): Likewise.
9446 (PTRACE_XFER_TYPE): Likewise.
9447 (linux_detach_one_lwp): Cast fourth argument of
9448 ptrace to long then PTRACE_ARG4_TYPE.
9449 (regsets_fetch_inferior_registers): Cast third argument of
9450 ptrace to long then PTRACE_ARG3_TYPE.
9451 (regsets_store_inferior_registers): Likewise.
9452
9453 2012-04-20 Pedro Alves <palves@redhat.com>
9454
9455 * configure: Regenerate.
9456
9457 2012-04-19 Pedro Alves <palves@redhat.com>
9458
9459 * Makefile.in (GNULIB_BUILDDIR): New.
9460 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9461 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9462 (all, install-only, uninstall, clean-info, all-lib, clean): No
9463 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9464 (maintainer-clean realclean distclean): Use subdir_do.
9465 (subdir_do): New.
9466 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9467 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9468 * acinclude.m4: Include acx_configure_dir.m4.
9469 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9470 calls. Call AC_PROG_RANLIB. Configure gnulib using
9471 ACX_CONFIGURE_DIR.
9472 (GNULIB): New.
9473 (GNULIB_STDINT_H): Adjust.
9474 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9475 * gdbreplay.c: Include build-gnulib/config.h.
9476 * server.h: Likewise.
9477 * aclocal.m4: Regenerate.
9478 * config.in: Regenerate.
9479 * configure: Regenerate.
9480
9481 2012-04-19 Pedro Alves <palves@redhat.com>
9482
9483 * Makefile.in (LIBGNU, INCGNU): Adjust.
9484 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9485 (all, install-only, uninstall, clean-info, all-lib, clean)
9486 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9487 * configure.ac: Adjust AC_OUTPUT output.
9488 * aclocal.m4: Regenerate.
9489 * configure: Regenerate.
9490
9491 2012-04-19 Pedro Alves <palves@redhat.com>
9492
9493 * Makefile.in (generated_files): New.
9494 (server_h): Remove the explicit dependency on config.h, and depend
9495 on $generated_files.
9496
9497 2012-04-19 Pedro Alves <palves@redhat.com>
9498
9499 * Makefile.in (INCGNU): Add -Ignulib.
9500
9501 2012-04-19 Pedro Alves <palves@redhat.com>
9502
9503 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9504 (INCGNU): ... this, and spell out -I here.
9505 (GNULIB_LIB): Rename to ...
9506 (LIBGNU): ... this.
9507 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9508
9509 2012-04-19 Pedro Alves <palves@redhat.com>
9510
9511 * config.in: Regenerate.
9512
9513 2012-04-19 Pedro Alves <palves@redhat.com>
9514
9515 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9516 * server.h (memmem): Remove declaration.
9517 * config.in: Regenerate.
9518 * configure: Regenerate.
9519
9520 2012-04-19 Yao Qi <yao@codesourcery.com>
9521
9522 * Makefile.in (SFILES): Add common/vec.c.
9523 (OBS): Add vec.o.
9524 (vec.o): New rule.
9525
9526 2012-04-19 Yao Qi <yao@codesourcery.com>
9527
9528 * remote-utils.c (prepare_resume_reply): Replace with macro
9529 target_core_of_thread.
9530 * server.c (handle_qxfer_threads_proper): Likewise.
9531 * target.h (traget_core_of_thread): New macro.
9532
9533 2012-04-18 Pedro Alves <palves@redhat.com>
9534
9535 * aclocal.m4: Regenerate.
9536 * configure: Regenerate.
9537
9538 2012-04-16 Yao Qi <yao@codesourcery.com>
9539
9540 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9541 duplicated on address.
9542
9543 2012-04-16 Yao Qi <yao@codesourcery.com>
9544
9545 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9546 (struct tracepoint_action_ops) <send>: New field.
9547 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9548 (agent_expr_send, x_tracepoint_action_send): New.
9549 (l_tracepoint_action_send): New.
9550 (cmd_qtdp): Download and install tracepoint
9551 according to `use_agent'.
9552 (run_inferior_command): Add one more parameter `len'.
9553 Update callers.
9554 (tracepoint_send_agent): New.
9555 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9556
9557 2012-04-16 Yao Qi <yao@codesourcery.com>
9558
9559 * tracepoint.c (download_tracepoints): Moved to ...
9560 (cmd_qtstart): ... here.
9561
9562 2012-04-14 Yao Qi <yao@codesourcery.com>
9563
9564 * tracepoint.c: Include inttypes.h.
9565 (struct collect_memory_action): Use sized types.
9566 (struct tracepoint): Likewise.
9567 (cmd_qtdp, stop_tracing): Update print specifiers.
9568 (cmd_qtp, response_tracepoint): Likewise.
9569 (collect_data_at_tracepoint): Likewise.
9570 (collect_data_at_step): Likewise.
9571
9572 2012-04-14 Yao Qi <yao@codesourcery.com>
9573
9574 Import gnulib module inttypes.
9575 * aclocal.m4, config.in, configure: Regenerated.
9576
9577 2012-04-14 Yao Qi <yao@codesourcery.com>
9578
9579 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9580 Makefile and config.status at last.
9581
9582 2012-04-13 Yao Qi <yao@codesourcery.com>
9583
9584 * tracepoint.c: Include stdint.h unconditionally.
9585
9586 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9587
9588 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9589 on BFD_HAVE_SYS_PROCFS_TYPE.
9590 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9591 * configure: Regenerate.
9592 * config.in: Likewise.
9593
9594 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9595
9596 * Makefile.in (clean): Also remove x32.c x32-linux.c
9597 x32-avx.c x32-avx-linux.c.
9598 (x32.o): New target.
9599 (x32.c): Likewise.
9600 (x32-linux.o): Likewise.
9601 (x32-linux.c): Likewise.
9602 (x32-avx.o): Likewise.
9603 (x32-avx.c): Likewise.
9604 (x32-avx-linux.o): Likewise.
9605 (x32-avx-linux.c): Likewise.
9606
9607 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9608 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9609 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9610 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9611 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9612 i386/x32-avx-linux.xml.
9613
9614 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9615 (init_registers_x32_avx_linux): Likwise.
9616 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9617 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9618
9619 2012-04-13 Pedro Alves <palves@redhat.com>
9620
9621 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9622 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9623 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9624 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9625 the sub-make.
9626
9627 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9628
9629 * linux-x86-low.c (compat_x32_clock_t): New.
9630 (compat_x32_siginfo_t): Likewise.
9631 (compat_x32_siginfo_from_siginfo): Likewise.
9632 (siginfo_from_compat_x32_siginfo): Likewise.
9633 (linux_is_elf64): Likewise.
9634 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9635 and siginfo_from_compat_x32_siginfo for x32.
9636 (x86_arch_setup): Set linux_is_elf64.
9637
9638 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9639
9640 PR gdb/13969
9641 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9642 e_machine field.
9643 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9644 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9645 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9646 compatible with process.
9647
9648 2012-04-12 Yao Qi <yao@codesourcery.com>
9649
9650 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9651 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9652 (install-only, install-info, clean): Handle sub dir gnulib.
9653 (all-lib, am--refresh): New targets.
9654 (memmem.o): Remove target.
9655 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9656 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9657 (AC_REPLACE_FUNCS): Remove memmem.
9658 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9659 (AC_OUTPUT): Generate Makefile in gnulib/.
9660 * aclocal.m4, config.in, configure: Regenerated.
9661
9662 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9663
9664 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9665
9666 2012-04-05 Pedro Alves <palves@redhat.com>
9667
9668 -Werror=strict-aliasing
9669
9670 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9671 pointer.
9672
9673 2012-04-04 Pedro Alves <palves@redhat.com>
9674
9675 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9676 (sparc_store_gregset_from_stack, sparc_store_gregset)
9677 (sparc_breakpoint_at): Fix formatting.
9678
9679 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9680
9681 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9682 are available.
9683 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9684 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9685 * config.in: Regenerate.
9686 * configure: Likewise.
9687
9688 2012-03-29 Pedro Alves <palves@redhat.com>
9689
9690 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9691 Correct ptrace arguments.
9692
9693 2012-03-28 Pedro Alves <palves@redhat.com>
9694
9695 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9696 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9697 (IA64_FR1_REGNUM): New defines.
9698 (ia64_fetch_register): New.
9699 (the_low_target): Install it.
9700 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9701 field.
9702 * linux-low.c (linux_fetch_registers): Try the
9703 the_low_target.fetch_register hook first.
9704
9705 * linux-arm-low.c (the_low_target): Adjust.
9706 * linux-bfin-low.c (the_low_target): Adjust.
9707 * linux-cris-low.c (the_low_target): Adjust.
9708 * linux-crisv32-low.c (the_low_target): Adjust.
9709 * linux-m32r-low.c (the_low_target): Adjust.
9710 * linux-m68k-low.c (the_low_target): Adjust.
9711 * linux-mips-low.c (the_low_target): Adjust.
9712 * linux-ppc-low.c (the_low_target): Adjust.
9713 * linux-s390-low.c (the_low_target): Adjust.
9714 * linux-sh-low.c (the_low_target): Adjust.
9715 * linux-sparc-low.c (the_low_target): Adjust.
9716 * linux-tic6x-low.c (the_low_target): Adjust.
9717 * linux-x86-low.c (the_low_target): Adjust.
9718 * linux-xtensa-low.c (the_low_target): Adjust.
9719
9720 2012-03-26 Pedro Alves <palves@redhat.com>
9721
9722 * server.c (handle_qxfer_libraries): Don't bail early if
9723 the_target->qxfer_libraries_svr4 is not NULL.
9724
9725 2012-03-26 Pedro Alves <palves@redhat.com>
9726
9727 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9728
9729 2012-03-23 Pedro Alves <palves@redhat.com>
9730
9731 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9732 "library-list-svr4" element's start tag when the the DSO list is
9733 empty.
9734
9735 2012-03-23 Pedro Alves <palves@redhat.com>
9736
9737 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9738 a variable whose type size is the same as the inferior's pointer
9739 size.
9740
9741 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9742
9743 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9744 struct siginfo.
9745 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9746 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9747 * linux-low.h: Include <signal.h>.
9748 (struct siginfo): Remove forward declaration.
9749 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9750 struct siginfo.
9751
9752 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9753
9754 * .gitignore: Ignore more files.
9755
9756 2012-03-19 Pedro Alves <palves@redhat.com>
9757 Jan Kratochvil <jan.kratochvil@redhat.com>
9758
9759 * server.c (cont_thread, general_thread): Add describing comments.
9760 (start_inferior): Clear `cont_thread'.
9761 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9762 of a process.
9763
9764 2012-03-15 Yao Qi <yao@codesourcery.com>
9765
9766 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9767 handling to ...
9768 (cmd_qtdp): ... here.
9769
9770 2012-03-15 Yao Qi <yao@codesourcery.com>
9771
9772 * tracepoint.c (struct tracepoint_action_ops): New.
9773 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9774 (m_tracepoint_action_download): New.
9775 (r_tracepoint_action_download): New.
9776 (x_tracepoint_action_download): New.
9777 (l_tracepoint_action_download): New.
9778 (add_tracepoint_action): Install `action->ops' according type.
9779 (download_tracepoint_1): Move code `download' function pointer
9780 of various tracepoint_action_ops.
9781
9782 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9783
9784 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9785 linux_ptrace_attach_warnings.
9786
9787 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9788
9789 * Makefile.in (linux-ptrace.o): New.
9790 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9791 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9792 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9793 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9794 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9795 of these targets.
9796 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9797
9798 2012-03-08 Yao Qi <yao@codesourcery.com>
9799 Pedro Alves <palves@redhat.com>
9800
9801 Fix PR server/13392.
9802 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9803 offset of JMP insn.
9804 * tracepoint.c (remove_tracepoint): New.
9805 (cmd_qtdp): Call remove_tracepoint when failed to install.
9806
9807 2012-03-07 Pedro Alves <palves@redhat.com>
9808
9809 * linux-low.c (get_detach_signal): New.
9810 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9811 Pass on pending signals to PTRACE_DETACH. Check the result of the
9812 ptrace call.
9813 * server.c (program_signals, program_signals_p): New.
9814 (handle_general_set): Handle QProgramSignals.
9815 * server.h (program_signals, program_signals_p): Declare.
9816
9817 2012-03-05 Pedro Alves <palves@redhat.com>
9818 Jan Kratochvil <jan.kratochvil@redhat.com>
9819
9820 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9821 New comment why.
9822
9823 2012-03-03 Yao Qi <yao@codesourcery.com>
9824
9825 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9826 agent_look_up_symbols.
9827
9828 2012-03-03 Yao Qi <yao@codesourcery.com>
9829
9830 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9831 (linux-x86-low.o): Likewise.
9832 * server.h: Remove in_process_agent_loaded.
9833 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9834 common/agent.c.
9835 Update callers.
9836
9837 2012-03-03 Yao Qi <yao@codesourcery.com>
9838
9839 * tracepoint.c (gdb_agent_capability): New global.
9840 (in_process_agent_loaded_ust): Renamed to
9841 `in_process_agent_supports_ust'.
9842 Update callers.
9843 (in_process_agent_supports_ust): Call agent_capability_check.
9844 (clear_installed_tracepoints): Assert that agent supports
9845 agent.
9846
9847 2012-03-03 Yao Qi <yao@codesourcery.com>
9848
9849 * linux-low.c (linux_supports_agent): New.
9850 (linux_target_ops): Initialize field `supports_agent' with
9851 linux_supports_agent.
9852 * target.h (struct target_ops) <supports_agent>: New.
9853 (target_supports_agent): New macro.
9854 * server.c (handle_general_set): Handle packet 'QAgent'.
9855 (handle_query): Send `QAgent+'.
9856 * Makefile.in (server.o): Depends on agent.h.
9857
9858 2012-03-03 Yao Qi <yao@codesourcery.com>
9859
9860 * Makefile.in (OBS): Add agent.o.
9861 Add new rule for agent.o.
9862 Track dependence of tracepoint.c on agent.h.
9863 * tracepoint.c (run_inferior_command_1):
9864 (run_inferior_command): Call agent_run_command.
9865 (gdb_ust_connect_sync_socket): Deleted. Move it to
9866 common/agent.c.
9867 (resume_thread, stop_thread): Likewise.
9868 (gdb_ust_socket_init): Renamed to ...
9869 (gdb_agent_socket_init): ... New.
9870 (gdb_ust_thread): Renamed to ...
9871 (gdb_agent_helper_thread): ... New.
9872 (gdb_ust_init): Move some code to ...
9873 (gdb_agent_init): ... here. New.
9874 [HAVE_UST]: Call gdb_ust_init.
9875 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9876 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9877 * config.in, configure: Regenerated.
9878
9879 2012-03-02 Pedro Alves <palves@redhat.com>
9880
9881 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9882 * linux-low.c (struct simple_pid_list): New.
9883 (stopped_pids): New a struct simple_pid_list pointer.
9884 (add_to_pid_list, pull_pid_from_list): New.
9885 (handle_extended_wait): Don't assume the first signal new children
9886 report is SIGSTOP. Adjust call to pull_pid_from_list.
9887 (linux_wait_for_lwp): Adjust.
9888
9889 2012-03-02 Yao Qi <yao@codesourcery.com>
9890
9891 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9892 debug log.
9893
9894 2012-03-02 Yao Qi <yao@codesourcery.com>
9895
9896 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9897 `stop_pc' and `tpoint'. Update caller.
9898
9899 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9900
9901 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9902 * linux-low.c (use_linux_regsets): New macro.
9903 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9904 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9905 (linux_register_in_regsets): New function.
9906 (usr_fetch_inferior_registers): Skip registers covered by
9907 regsets.
9908 (usr_store_inferior_registers): Likewise.
9909 (usr_fetch_inferior_registers): New macro.
9910 (usr_store_inferior_registers): Likewise.
9911 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9912 (linux_store_registers): Likewise.
9913 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9914 prototype.
9915 (init_registers_mips64_dsp_linux): Likewise.
9916 (init_registers_mips_linux): New macro.
9917 (init_registers_mips_dsp_linux): Likewise.
9918 (mips_dsp_num_regs): Likewise.
9919 (DSP_BASE, DSP_CONTROL): New fallback macros.
9920 (mips_base_regs): New macro.
9921 (mips_regmap): Use it. Fix the size.
9922 (mips_dsp_regmap): New variable.
9923 (mips_dsp_regset_bitmap): Likewise.
9924 (mips_arch_setup): New function.
9925 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9926 than mips_regmap.
9927 (mips_cannot_store_register): Likewise.
9928 (the_low_target): Update .arch_setup, .num_regs and .regmap
9929 initializers. Add .regset_bitmap initializer.
9930 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9931 initializer.
9932 * linux-bfin-low.c (the_low_target): Likewise.
9933 * linux-cris-low.c (the_low_target): Likewise.
9934 * linux-crisv32-low.c (the_low_target): Likewise.
9935 * linux-ia64-low.c (the_low_target): Likewise.
9936 * linux-m32r-low.c (the_low_target): Likewise.
9937 * linux-m68k-low.c (the_low_target): Likewise.
9938 * linux-ppc-low.c (the_low_target): Likewise.
9939 * linux-s390-low.c (the_low_target): Likewise.
9940 * linux-sh-low.c (the_low_target): Likewise.
9941 * linux-sparc-low.c (the_low_target): Likewise.
9942 * linux-tic6x-low.c (the_low_target): Likewise.
9943 * linux-x86-low.c (the_low_target): Likewise.
9944 * linux-xtensa-low.c (the_low_target): Likewise.
9945 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9946 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9947 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9948 srv_xmlfiles.
9949 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9950 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9951
9952 2012-02-29 Yao Qi <yao@codesourcery.com>
9953 Pedro Alves <palves@redhat.com>
9954
9955 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9956 `step_over_finished' is true.
9957
9958 2012-02-27 Pedro Alves <palves@redhat.com>
9959
9960 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9961 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9962
9963 2012-02-27 Pedro Alves <palves@redhat.com>
9964
9965 PR server/9684
9966 * linux-low.c (pid_is_stopped): New.
9967 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9968
9969 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9970
9971 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9972 of conditions.
9973
9974 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9975
9976 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9977
9978 2012-02-24 Luis Machado <lgustavo@codesourcery>
9979
9980 * server.c (handle_query): Advertise support for target-side
9981 breakpoint condition evaluation.
9982 (process_point_options): New function.
9983 (process_serial_event): When inserting a breakpoint, check for
9984 a target-side condition that should be evaluated.
9985
9986 * mem-break.c: Include regcache.h and ax.h.
9987 (point_cond_list_t): New data structure.
9988 (breakpoint) <cond_list>: New field.
9989 (find_gdb_breakpoint_at): Make non-static.
9990 (delete_gdb_breakpoint_at): Clear any target-side
9991 conditions.
9992 (clear_gdb_breakpoint_conditions): New function.
9993 (add_condition_to_breakpoint): Likewise.
9994 (add_breakpoint_condition): Likewise.
9995 (gdb_condition_true_at_breakpoint): Likewise.
9996 (gdb_breakpoint_here): Return result directly instead
9997 of going through a local variable.
9998
9999 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10000 (clear_gdb_breakpoint_conditions): Likewise.
10001 (add_breakpoint_condition): Likewise.
10002 (gdb_condition_true_at_breakpoint): Likewise.
10003
10004 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10005 (need_step_over_p): Take target-side breakpoint condition into
10006 consideration.
10007
10008 2012-02-24 Luis Machado <lgustavo@codesourcery>
10009
10010 * server.h: Include tracepoint.h.
10011 (agent_mem_read, agent_get_trace_state_variable_value,
10012 agent_set_trace_state_variable_value,
10013 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10014 get_set_tsv_func_addr): New prototypes.
10015
10016 * ax.h: New include file.
10017 * ax.c: New source file.
10018
10019 * tracepoint.c: Include ax.h.
10020 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10021 agent_expr, eval_result_type): Move to ax.h.
10022 (parse_agent_expr): Rename to ...
10023 (gdb_parse_agent_expr): ... this, make it non-static and move
10024 to ax.h.
10025 (unparse_agent_expr) Rename to ...
10026 (gdb_unparse_agent_expr): ... this, make it non-static and move
10027 to ax.h.
10028 (eval_agent_expr): Rename to ...
10029 (eval_tracepoint_agent_expr): ... this.
10030 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10031 forward declarations.
10032 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10033 (agent_get_trace_state_variable_value): New function.
10034 (agent_set_trace_state_variable_value): New function.
10035 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10036 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10037 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10038 (condition_true_at_tracepoint): Likewise.
10039 (parse_agent_expr): Rename to ...
10040 (gdb_parse_agent_expr): ... this and move to ax.c.
10041 (unparse_agent_expr): Rename to ...
10042 (gdb_unparse_agent_expr): ... this and move to ax.c.
10043 (gdb_agent_op_name): Move to ax.c.
10044 (eval_agent_expr): Rename to ...
10045 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10046 and move to ax.c.
10047 (eval_tracepoint_agent_expr): New function.
10048 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10049 non-static.
10050 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10051 ax.c.
10052 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10053 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10054 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10055 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10056 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10057 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10058 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10059 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10060 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10061 (compile_bytecodes): Remove forward declaration.
10062 (is_goto_target): Move to ax.c.
10063 (compile_bytecodes): Move to ax.c and call
10064 agent_get_trace_state_variable_value (...) and
10065 agent_set_trace_state_variable_value (...).
10066
10067 * Makefile.in: Update ax.c and IPA dependencies.
10068
10069 2012-02-24 Pedro Alves <palves@redhat.com>
10070
10071 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10072 (cmd_bigqtbuffer_circular): ... this. Only handle
10073 'QTBuffer:circular:'.
10074 (handle_tracepoint_general_set): Adjust.
10075
10076 2012-02-16 Yao Qi <yao@codesourcery.com>
10077
10078 * inferiors.c: Move code to ...
10079 * dll.c: .... here. New.
10080 * server.h: Declare clear_dlls.
10081 * Makefile.in (SFILES): Add dll.c.
10082 (OBS): Add dll.o
10083 (dll.o): New rule.
10084
10085 2012-02-11 Yao Qi <yao@codesourcery.com>
10086
10087 * server.c: (handle_monitor_command): Add a new parameter
10088 `own_buf'.
10089 (handle_query): Update caller.
10090
10091 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10092
10093 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10094 * configure, config.in: Regenerate.
10095 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10096 is not defined.
10097
10098 2012-02-02 Pedro Alves <palves@redhat.com>
10099
10100 Try SIGKILL first, then PTRACE_KILL.
10101 * linux-low.c (linux_kill_one_lwp): New.
10102 (linux_kill_one_lwp): Rename to ...
10103 (kill_one_lwp_callback): ... this. Use the new
10104 linux_kill_one_lwp.
10105
10106 2012-02-02 Pedro Alves <palves@redhat.com>
10107
10108 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10109 inferior.
10110
10111 2012-01-27 Pedro Alves <palves@redhat.com>
10112
10113 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10114 (elf_64_file_p): Make static.
10115 (linux_pid_exe_is_elf_64_file): New.
10116 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10117 Delete declarations.
10118 (linux_pid_exe_is_elf_64_file): Declare.
10119 * linux-x86-low.c (x86_arch_setup): Use
10120 linux_pid_exe_is_elf_64_file.
10121
10122 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10123
10124 * linux-low.c (linux_wait_for_event_1): Rename to ...
10125 (linux_wait_for_event): ... here and merge it with former
10126 linux_wait_for_event - new variable wait_ptid, use it.
10127 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10128
10129 2012-01-23 Pedro Alves <palves@redhat.com>
10130
10131 * server.c (main): Avoid yet another case of infinite loop while
10132 detaching/killing after a longjmp.
10133
10134 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10135
10136 Code cleanup.
10137 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10138
10139 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10140
10141 * hostio.c (handle_readlink): New function.
10142 (handle_vFile): Call it to handle "vFile:readlink" packets.
10143
10144 2012-01-20 Pedro Alves <palves@redhat.com>
10145 Ulrich Weigand <ulrich.weigand@linaro.org>
10146
10147 * server.c (handle_v_requests): Only support vAttach and vRun to
10148 start multiple processes when in extended protocol mode.
10149
10150 2012-01-17 Pedro Alves <palves@redhat.com>
10151
10152 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10153 memalign plus mprotect to allocate the scratch buffer.
10154
10155 2012-01-13 Pedro Alves <palves@redhat.com>
10156
10157 * server.c (attach_inferior): Clear `cont_thread'.
10158
10159 2012-01-13 Pedro Alves <palves@redhat.com>
10160
10161 * server.c (main): Avoid infinite loop while detaching/killing
10162 after a longjmp.
10163
10164 2012-01-09 Doug Evans <dje@google.com>
10165
10166 * server.c (start_inferior): Set last_ptid in --wrapper case.
10167
10168 2012-01-06 Yao Qi <yao@codesourcery.com>
10169
10170 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10171 defined.
10172 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10173
10174 2012-01-04 Yao Qi <yao@codesourcery.com>
10175
10176 * tracepoint.c (cmd_qtdp): Print debug message
10177 for static tracepoint.
10178
10179 2012-01-04 Yao Qi <yao@codesourcery.com>
10180
10181 * tracepoint.c (trace_vdebug): Differentiate debug message
10182 between gdbserver and IPA.
10183
10184 2012-01-03 Yao Qi <yao@codesourcery.com>
10185
10186 * tracepoint.c (tracepoint_was_hit): Don't collect for
10187 static tracepoint.
10188
10189 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10190
10191 * terminal.h: Reformat copyright header.
10192
10193 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10194
10195 * server.c (gdbserver_version): Update copyright year.
10196 * gdbreplay.c (gdbreplay_version): Likewise.
10197
10198 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10199
10200 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10201
10202 Revert:
10203 2011-12-18 Hui Zhu <teawater@gmail.com>
10204 * linux-low.c (linux_create_inferior): Save return value to ret.
10205
10206 2011-12-18 Hui Zhu <teawater@gmail.com>
10207
10208 * linux-low.c (linux_create_inferior): Save return value to ret.
10209
10210 2011-12-16 Doug Evans <dje@google.com>
10211
10212 * linux-low.c (linux_create_inferior): If stdio connection,
10213 redirect stdin from /dev/null, stdout to stderr.
10214 * remote-utils.c (remote_is_stdio): New static global.
10215 (remote_connection_is_stdio): New function.
10216 (remote_prepare): Handle stdio connection.
10217 (remote_open): Ditto.
10218 (remote_close): Don't close stdin for stdio connections.
10219 (read_prim,write_prim): New functions. Replace all calls to
10220 read/write to these.
10221 * server.c (main): Watch for "-" argument. Move call to
10222 remote_prepare before start_inferior.
10223 * server.h (STDIO_CONNECTION_NAME): New macro.
10224 (remote_connection_is_stdio): Declare.
10225
10226 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10227 in debugging output.
10228
10229 2011-12-15 Yao Qi <yao@codesourcery.com>
10230
10231 * tracepoint.c: Include sys/syscall.h.
10232 (gdb_ust_thread): Remove preprocessor conditional.
10233
10234 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10235
10236 * linux-low.c (linux_detach_one_lwp): Call
10237 the_low_target.prepare_to_resume before detaching.
10238
10239 2011-12-14 Yao Qi <yao@codesourcery.com>
10240
10241 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10242 of write.
10243
10244 2011-12-14 Yao Qi <yao@codesourcery.com>
10245
10246 * i386-low.c (i386_low_stopped_data_address): Initialize local
10247 variable `control'.
10248
10249 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10250
10251 PR remote/13492
10252
10253 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10254 DR_CONTROL unless necessary. Extend comments.
10255 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10256 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10257
10258 2011-12-13 Yao Qi <yao@codesourcery.com>
10259
10260 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10261 macros.
10262 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10263
10264 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10265
10266 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10267 Print new debug message for such case.
10268
10269 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10270
10271 Fix overlapping memcpy.
10272 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10273 the read_inferior_memory transfer.
10274 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10275 write_inferior_memory transfer.
10276 (set_fast_tracepoint_jump): New variable buf. Use it for the
10277 read_inferior_memory and write_inferior_memory transfers.
10278 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10279 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10280 Use it for the write_inferior_memory transfer.
10281 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10282 buffers.
10283
10284 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10285
10286 * linux-low.c (fetch_register, store_register): Make code
10287 consistent, fix formatting.
10288
10289 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10290
10291 * linux-low.c (usr_store_inferior_registers): Factor out code
10292 to handle individual registers into...
10293 (store_register): ... this new function.
10294
10295 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10296
10297 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10298 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10299 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10300 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10301 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10302 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10303 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10304 (srv_xmlfiles): Add new XML files.
10305
10306 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10307 and <sys/uio.h>.
10308 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10309 (init_registers_s390_linux32v1): Add prototype.
10310 (init_registers_s390_linux32v2): Likewise.
10311 (init_registers_s390_linux64v1): Likewise.
10312 (init_registers_s390_linux64v2): Likewise.
10313 (init_registers_s390x_linux64v1): Likewise.
10314 (init_registers_s390x_linux64v2): Likewise.
10315 (s390_num_regs): Increment to 52.
10316 (s390_regmap): Add orig_r2 register.
10317 (s390_num_regs_3264): Increment to 68.
10318 (s390_regmap_3264): Add orig_r2 register.
10319 (s390_collect_ptrace_register): Handle orig_r2 register.
10320 (s390_supply_ptrace_register): Likewise.
10321 (s390_fill_last_break): New function.
10322 (s390_store_last_break): Likewise.
10323 (s390_fill_system_call): New function.
10324 (s390_store_system_call): Likewise.
10325 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10326 register sets.
10327 (s390_check_regset): New function.
10328 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10329 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10330 Update target_regsets for available register sets.
10331
10332 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10333 Jan Kratochvil <jan.kratochvil@redhat.com>
10334
10335 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10336 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10337 New.
10338 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10339 * linux-low.h (struct process_info_private): New member r_debug.
10340 * server.c (handle_qxfer_libraries): Call
10341 the_target->qxfer_libraries_svr4.
10342 (handle_qxfer_libraries_svr4): New function.
10343 (qxfer_packets): New entry "libraries-svr4".
10344 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10345 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10346 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10347 PACKET_qXfer_libraries_svr4.
10348
10349 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10350
10351 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10352 PSW address/mask between 8-byte and 16-byte formats.
10353 (s390_supply_ptrace_register): Likewise.
10354 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10355 basic addressing mode bit.
10356
10357 2011-11-24 Stan Shebs <stan@codesourcery.com>
10358
10359 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10360
10361 2011-11-17 Stan Shebs <stan@codesourcery.com>
10362
10363 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10364 (tracing_start_time): New global.
10365 (tracing_stop_time): New global.
10366 (tracing_user_name): New global.
10367 (tracing_notes): New global.
10368 (tracing_stop_note): New global.
10369 (cmd_qtstart): Set traceframe_usage, start_time.
10370 (stop_tracing): Set stop_time.
10371 (cmd_qtstatus): Report additional status.
10372 (cmd_qtp): New function.
10373 (handle_tracepoint_query): Call it.
10374 (cmd_qtnotes): New function.
10375 (handle_tracepoint_general_set): Call it.
10376 (get_timestamp): Rename from tsv_get_timestamp.
10377
10378 2011-11-14 Stan Shebs <stan@codesourcery.com>
10379 Kwok Cheung Yeung <kcy@codesourcery.com>
10380
10381 * linux-x86-low.c (small_jump_insn): New.
10382 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10383 trampoline and error message, build a trampoline and issue a small
10384 jump instruction to it.
10385 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10386 trampoline and error message.
10387 (x86_get_min_fast_tracepoint_insn_len): New.
10388 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10389 * linux-low.h (struct linux_target_ops): Add arguments to
10390 install_fast_tracepoint_jump_pad operation, add new operation.
10391 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10392 arguments.
10393 (linux_get_min_fast_tracepoint_insn_len): New function.
10394 (linux_target_op): Add new operation.
10395 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10396 (gdb_trampoline_buffer_end): Ditto.
10397 (gdb_trampoline_buffer_error): Ditto.
10398 (struct ipa_sym_addresses): Add fields for new IPA variables.
10399 (symbol_list): Add entries for new IPA variables.
10400 (struct tracepoint): Add fields to hold the address range of the
10401 trampoline used by the tracepoint.
10402 (trampoline_buffer_head): New static variable.
10403 (trampoline_buffer_tail): Ditto.
10404 (claim_trampoline_space): New function.
10405 (have_fast_tracepoint_trampoline_buffer): New function.
10406 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10407 structure.
10408 (install_fast_tracepoint): Ditto, also add error buffer argument.
10409 (cmd_qtminftpilen): New function.
10410 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10411 (fast_tracepoint_from_trampoline_address): New function.
10412 (fast_tracepoint_collecting): Handle trampoline as part of jump
10413 pad space.
10414 (set_trampoline_buffer_space): New function.
10415 (initialize_tracepoint): Initialize new IPA variables.
10416 * target.h (struct target_ops): Add arguments to
10417 install_fast_tracepoint_jump_pad operation, add new
10418 get_min_fast_tracepoint_insn_len operation.
10419 (target_get_min_fast_tracepoint_insn_len): New.
10420 (install_fast_tracepoint_jump_pad): Add arguments.
10421 * server.h (IPA_BUFSIZ): Define.
10422 * linux-i386-ipa.c: Include extra header files.
10423 (initialize_fast_tracepoint_trampoline_buffer): New function.
10424 (initialize_low_tracepoint): Call it.
10425 * server.h (set_trampoline_buffer_space): Declare.
10426 (claim_trampoline_space): Ditto.
10427 (have_fast_tracepoint_trampoline_buffer): Ditto.
10428
10429 2011-11-14 Yao Qi <yao@codesourcery.com>
10430
10431 * server.c (handle_query): Handle InstallInTrace for qSupported.
10432 * tracepoint.c (add_tracepoint): Sort list.
10433 (install_tracepoint, download_tracepoint): New.
10434 (cmd_qtdp): Call them to install and download tracepoints.
10435 (sort_tracepoints): Removed.
10436 (cmd_qtstart): Update.
10437
10438 2011-11-14 Yao Qi <yao@codesourcery.com>
10439
10440 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10441 * mem-break.h: Declare.
10442 * tracepoint.c (cmd_qtstart): Move some code to ...
10443 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10444 New.
10445 (download_tracepoints): Move some code to ...
10446 (download_tracepoint_1): ... here. New.
10447
10448 2011-11-08 Yao Qi <yao@codesourcery.com>
10449
10450 * remote-utils.c (relocate_instruction): A comment fix.
10451
10452 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10453
10454 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10455 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10456 dr_status_mirror and dr_control_mirror from debug_reg_state.
10457 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10458 (i386_initial_stuff): Remove use of deleted globals.
10459 (i386_get_thread_context, i386_set_thread_context,
10460 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10461 from debug_reg_state.
10462
10463 2011-11-05 Yao Qi <yao@codesourcery.com>
10464
10465 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10466 address as TPOINT's.
10467
10468 2011-11-02 Stan Shebs <stan@codesourcery.com>
10469
10470 * tracepoint.c (agent_mem_read_string): New function.
10471 (eval_agent_expr): Call it for tracenz.
10472 * server.c (handle_query): Report support for tracenz.
10473
10474 2011-11-02 Yao Qi <yao@codesourcery.com>
10475
10476 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10477
10478 2011-11-02 Yao Qi <yao@codesourcery.com>
10479
10480 * target.h: Fix a typo in comment.
10481
10482 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10483
10484 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10485 clobber the breakpoints' shadows with fast tracepoint jumps.
10486 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10487 * target.c (write_inferior_memory): Also pass MYADDR down to
10488 check_mem_write.
10489
10490 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10491
10492 * configure.ac: Check support for personality routine.
10493 * configure: Regenerate.
10494 * config.in: Likewise.
10495 * linux-low.c: Include <sys/personality.h>.
10496 Define ADDR_NO_RANDOMIZE if necessary.
10497 (linux_create_inferior): Disable address space randomization when
10498 forking inferior, if requested.
10499 (linux_supports_disable_randomization): New function.
10500 (linux_target_ops): Install it.
10501 * server.h (disable_randomization): Declare.
10502 * server.c (disable_randomization): New global variable.
10503 (handle_general_set): Handle QDisableRandomization.
10504 (handle_query): Likewise for qSupported.
10505 (main): Support --disable-randomization and --no-disable-randomization
10506 command line arguments.
10507 * target.h (struct target_ops): Add supports_disable_randomization.
10508 (target_supports_disable_randomization): New macro.
10509
10510 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10511
10512 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10513 ifdef check.
10514 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10515 [!PT_GETDSBT] (target_loadmap): New definition.
10516 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10517 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10518 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10519 and PT_GETDSBT to LINUX_LOADMAP.
10520 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10521 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10522
10523 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10524
10525 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10526 (arm_linux_hwbp_cap): New static variable.
10527 (arm_linux_get_hwbp_cap): Replace by ...
10528 (arm_linux_init_hwbp_cap): ... this new function.
10529 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10530 (arm_linux_get_hw_watchpoint_count): Likewise.
10531 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10532 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10533 (arm_prepare_to_resume): Use perror_with_name instead of error.
10534
10535 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10536
10537 * linux-arm-low.c: Include <signal.h>.
10538 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10539 (struct arm_linux_hwbp_cap): New data type.
10540 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10541 (struct arm_linux_hw_breakpoint): New data type.
10542 (MAX_BPTS, MAX_WPTS): Define.
10543 (struct arch_process_info, struct arch_lwp_info): New data types.
10544 (arm_linux_get_hwbp_cap): New function.
10545 (arm_linux_get_hw_breakpoint_count): Likewise.
10546 (arm_linux_get_hw_watchpoint_count): Likewise.
10547 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10548 (arm_hwbp_control_initialize): Likewise.
10549 (arm_hwbp_control_is_enabled): Likewise.
10550 (arm_hwbp_control_is_initialized): Likewise.
10551 (arm_hwbp_control_disable): Likewise.
10552 (arm_linux_hw_breakpoint_equal): Likewise.
10553 (arm_linux_hw_point_initialize): Likewise.
10554 (struct update_registers_data): New data structure.
10555 (update_registers_callback: New function.
10556 (arm_insert_point): Likewise.
10557 (arm_remove_point): Likewise.
10558 (arm_stopped_by_watchpoint): Likewise.
10559 (arm_stopped_data_address): Likewise.
10560 (arm_new_process): Likewise.
10561 (arm_new_thread): Likewise.
10562 (arm_prepare_to_resume): Likewise.
10563 (the_low_target): Register arm_insert_point, arm_remove_point,
10564 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10565 arm_new_thread, and arm_prepare_to_resume.
10566
10567 2011-09-15 Stan Shebs <stan@codesourcery.com>
10568
10569 * server.h (struct emit_ops): Add compare-goto fields.
10570 * tracepoint.c (gdb_agent_op_sizes): New table.
10571 (emit_eq_goto): New function.
10572 (emit_ne_goto): New function.
10573 (emit_lt_goto): New function.
10574 (emit_le_goto): New function.
10575 (emit_gt_goto): New function.
10576 (emit_ge_goto): New function.
10577 (is_goto_target): New function.
10578 (compile_bytecodes): Recognize special cases of compare-goto
10579 combinations and call specialized emitters for them.
10580 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10581 (amd64_emit_ne_goto): New function.
10582 (amd64_emit_lt_goto): New function.
10583 (amd64_emit_le_goto): New function.
10584 (amd64_emit_gt_goto): New function.
10585 (amd64_emit_ge_goto): New function.
10586 (amd64_emit_ops): Add the new functions.
10587 (i386_emit_eq_goto): New function.
10588 (i386_emit_ne_goto): New function.
10589 (i386_emit_lt_goto): New function.
10590 (i386_emit_le_goto): New function.
10591 (i386_emit_gt_goto): New function.
10592 (i386_emit_ge_goto): New function.
10593 (i386_emit_ops): Add the new functions.
10594
10595 2011-09-08 Stan Shebs <stan@codesourcery.com>
10596
10597 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10598 (i386_emit_epilogue): Restore %ebx.
10599
10600 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10601
10602 * server.c (step_thread): Remove definition.
10603 (process_serial_event): Don't handle Hs.
10604 * server.h (step_thread): Remove declaration.
10605 * target.c (set_desired_inferior): Remove use of step_thread.
10606
10607 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10608
10609 * linux-low.c: Include linux-procfs.h.
10610 (linux_attach_lwp_1): Update comments.
10611 (linux_attach): Scan for existing threads when attaching to a
10612 process that is the tgid.
10613 * Makefile.in: Update dependencies.
10614
10615 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10616
10617 * configure.srv: Add linux-procfs.o dependencies.
10618
10619 2011-08-14 Yao Qi <yao@codesourcery.com>
10620
10621 * target.h (struct target_ops): Fix indent.
10622 * win32-low.c (win32_target_ops): Fix comment.
10623
10624 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10625 Yao Qi <yao@codesourcery.com>
10626
10627 * Makefile.in (clean): Remove tic6x-*.c files.
10628 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10629 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10630 (tic6x-c64xp-linux.c): Likewise.
10631 * configure.srv: Add support for tic6x-*-uclinux.
10632 * linux-tic6x-low.c: New.
10633 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10634
10635 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10636 Yao Qi <yao@codesourcery.com>
10637
10638 * target.h (struct target_ops): Add read_loadmap.
10639 * linux-low.c (struct target_loadseg): New type.
10640 (struct target_loadmap): New type.
10641 (linux_read_loadmap): New function.
10642 (linux_target_ops): Add linux_read_loadmap.
10643 * server.c (handle_query): Support qXfer:fdpic:read packet.
10644 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10645 to NULL.
10646
10647 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10648
10649 * win32-low.c: Include <stdint.h>.
10650
10651 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10652
10653 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10654 to the inferior here.
10655 (i386_remove_aligned_watchpoint): Ditto.
10656 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10657 fit part of the watchpoint in the debug registers.
10658 (i386_update_inferior_debug_regs): New.
10659 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10660 registers, and only update the inferior on success.
10661 (i386_low_remove_watchpoint): Ditto.
10662
10663 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10664
10665 * linux-low.c (compare_ints, unique, list_threads, show_process,
10666 linux_core_of_thread): Delete.
10667 (linux_target_ops): Change linux_core_of_thread to
10668 linux_common_core_of_thread.
10669 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10670 * utils.c (malloc_failure): Change type of argument.
10671 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10672 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10673 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10674 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10675 (IPA_OBJS): Add common-utils-ipa.o.
10676 (ptid_h, linux_osdata_h): New macros.
10677 (server_h): Add common/common-utils.h, common/xml-utils.h,
10678 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10679 common/ptid.h.
10680 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10681 ptid.o, buffer.o): New rules.
10682 (linux-low.o): Add common/linux-osdata.h as a dependency.
10683 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10684 * configure.ac: Add AC_HEADER_DIRENT check.
10685 * config.in: Regenerate.
10686 * configure: Regenerate.
10687 * remote-utils.c (xml_escape_text): Delete.
10688 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10689 buffer_xml_printf): Move to common/buffer.c.
10690 * server.c (main): Remove call to initialize_inferiors.
10691 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10692 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10693 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10694 internal_error, gdb_assert, gdb_assert_fail): Delete.
10695 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10696 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10697 common/buffer.h.
10698 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10699 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10700 initialize_inferiors): Delete.
10701
10702 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10703
10704 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10705 symbol error.
10706
10707 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10708
10709 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10710 assertion.
10711 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10712
10713 2011-05-26 Yao Qi <yao@codesourcery.com>
10714
10715 * Makefile.in (thread-db.o): Track dependence to
10716 common/gdb_thread_db.h.
10717 * thread-db.c: include gdb_thread_db.h from right place.
10718
10719 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10720
10721 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10722 __FILE__ and __LINE__ to internal_error.
10723
10724 2011-05-13 Doug Evans <dje@google.com>
10725
10726 * thread-db.c (try_thread_db_load_from_sdir): New function.
10727 (try_thread_db_load_from_dir): New function.
10728 (thread_db_load_search): Handle $sdir, ignore $pdir.
10729 Remove trying of system directories if search of
10730 libthread-db-search-path fails, that is now done via $sdir.
10731
10732 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10733
10734 * server.c (handle_query): Add EnableDisableTracepoints to the list
10735 of supported features.
10736 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10737 tracepoints.
10738 (cmd_qtenable_disable): New.
10739 (cmd_qtstart): Install tracepoints even if disabled.
10740 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10741 receiving a QTEnable or QTDisable packet.
10742 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10743 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10744 tracepoints.
10745 (gdb_probe): Skip data collection if static tracepoint is disabled.
10746
10747 2011-05-10 Doug Evans <dje@google.com>
10748
10749 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10750
10751 2011-05-04 Doug Evans <dje@google.com>
10752
10753 * linux-low.c (linux_join): Skip process lookup.
10754 * spu-low.c (spu_join): Ditto.
10755 * server.c (join_inferiors_callback): Delete.
10756 (process_serial_event): For 'D' packet (detach) call join_inferior
10757 directly.
10758
10759 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10760
10761 * README: Don't mention xscale*-*-linux*.
10762 * configure.srv (xscale*-*-linux*): Don't handle target.
10763
10764 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10765
10766 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10767 casting pointers.
10768 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10769 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10770 (i386_emit_void_call_2): Likewise.
10771
10772 2011-04-26 Yao Qi <yao@codesourcery.com>
10773
10774 * linux-low.c: Move common macros to linux-ptrace.h.
10775 Include linux-ptrace.h.
10776 * Makefile.in (linux_ptrace_h): New.
10777 (linux-low.o): Depends on linux-ptrace.h.
10778
10779 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10780
10781 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10782 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10783 (remote_prepare): New function with most of the TCP code from ...
10784 (remote_open): ... here. Detect PORT here unconditionally. Move also
10785 setting transport_is_reliable.
10786 * server.c (run_once): New variable.
10787 (gdbserver_usage): Document it.
10788 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10789 the first run if RUN_ONCE.
10790 * server.h (run_once, remote_prepare): New declarations.
10791
10792 2011-04-19 Tom Tromey <tromey@redhat.com>
10793
10794 * win32-low.c (handle_load_dll): Remove duplicate "the".
10795
10796 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10797
10798 Remove support for old Cygwin 1.5 versions.
10799 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10800 function to avoid warning.
10801 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10802 warning.
10803
10804 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10805
10806 * gdbserver/server.h (Macro _): Define it if not available.
10807
10808 2011-03-14 Michael Snyder <msnyder@vmware.com>
10809
10810 * hostio.c (handle_close): Remove unnecessary null test.
10811
10812 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10813
10814 * Makefile.in (maintainer-clean realclean distclean): Remove
10815 "make ... subdir_do" command.
10816
10817 2011-03-10 Michael Snyder <msnyder@vmware.com>
10818
10819 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10820
10821 * server.c (handle_v_run): Free alloced buffer on early return.
10822
10823 2011-03-09 Yao Qi <yao@codesourcery.com>
10824
10825 Revert:
10826 2011-03-04 Yao Qi <yao@codesourcery.com>
10827
10828 * Makefile.in: Remove GNU make feature --directory.
10829
10830 2011-03-05 Yao Qi <yao@codesourcery.com>
10831
10832 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10833 (subdir_do): New make target. Copied from gdb/Makefile.
10834 (maintainer-clean, realclean, distclean, clean): Call corresponding
10835 make targets in common/Makefile.
10836
10837 2011-02-11 Yao Qi <yao@codesourcery.com>
10838
10839 * configure.ac: Call AC_PROG_RANLIB.
10840 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10841 * configure: Regenerate.
10842
10843 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10844
10845 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10846
10847 2011-03-06 Yao Qi <yao@codesourcery.com>
10848
10849 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10850
10851 2011-03-05 Yao Qi <yao@codesourcery.com>
10852
10853 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10854 (subdir_do): New make target. Copied from gdb/Makefile.
10855 (maintainer-clean, realclean, distclean, clean): Call corresponding
10856 make targets in common/Makefile.
10857
10858 2011-03-04 Yao Qi <yao@codesourcery.com>
10859
10860 * Makefile.in: Remove GNU make feature --directory.
10861
10862 2011-03-04 Michael Snyder <msnyder@vmware.com>
10863
10864 * server.c (queue_stop_reply): Call xmalloc not malloc.
10865
10866 2011-03-02 Michael Snyder <msnyder@vmware.com>
10867
10868 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10869
10870 2011-02-28 Michael Snyder <msnyder@vmware.com>
10871
10872 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10873 (cmd_qtframe): Ditto.
10874 (cmd_qtbuffer): Ditto.
10875 (cmd_bigqtbuffer): Ditto.
10876
10877 * utils.c (decimal2str): Initialize 'width' to nine, then
10878 don't mess with it.
10879
10880 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10881
10882 * hostio.c (require_data): Free *data, not data.
10883
10884 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10885
10886 * hostio.c (require_data): Use free, not xfree.
10887
10888 2011-02-27 Michael Snyder <msnyder@vmware.com>
10889
10890 * server.c (handle_query): Discard unused value.
10891
10892 * hostio.c (require_data): Free malloc memory before returning
10893 error.
10894
10895 2011-02-26 Michael Snyder <msnyder@vmware.com>
10896
10897 * linux-low.c (list_threads): Call closedir for dirent.
10898
10899 2011-02-27 Michael Snyder <msnyder@vmware.com>
10900
10901 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10902 a case statement falls through.
10903
10904 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10905
10906 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10907 in comparison.
10908
10909 2011-02-26 Michael Snyder <msnyder@vmware.com>
10910
10911 * utils.c (decimal2str): Eliminate dead code and dead param.
10912 (pulongest): Drop dead param from call to decimal2str.
10913 (plongest): Ditto.
10914
10915 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10916
10917 Revert the following patch (not approved yet):
10918 2011-02-21 Hui Zhu <teawater@gmail.com>
10919 * tracepoint.c (tp_printf): New function.
10920 (eval_agent_expr): Handle gdb_agent_op_printf.
10921
10922 2011-02-21 Hui Zhu <teawater@gmail.com>
10923
10924 * tracepoint.c (tp_printf): New function.
10925 (eval_agent_expr): Handle gdb_agent_op_printf.
10926
10927 2011-02-18 Tom Tromey <tromey@redhat.com>
10928
10929 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10930 (tracepoint.o): Likewise.
10931 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10932 (gdb_agent_op_names): Likewise.
10933
10934 2011-02-18 Tom Tromey <tromey@redhat.com>
10935
10936 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10937 gdb_agent_op_rot>: New constants.
10938 (gdb_agent_op_names): Add pick and roll.
10939 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10940 cases.
10941
10942 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10943
10944 * aclocal.m4: Regenerated with aclocal-1.11.1.
10945
10946 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10947
10948 * server.c (handle_qxfer_traceframe_info): New.
10949 (qxfer_packets): Register "traceframe-info".
10950 (handle_query): Report support for qXfer:traceframe-info:read+.
10951 * tracepoint.c (match_blocktype): New.
10952 (traceframe_find_block_type): Rename to ...
10953 (traceframe_walk_blocks): ... this. Add callback filter argument,
10954 and use it.
10955 (traceframe_find_block_type): New, reimplemented on top of
10956 traceframe_walk_blocks.
10957 (build_traceframe_info_xml): New.
10958 (traceframe_read_info): New.
10959 * server.h (traceframe_read_info): Declare.
10960
10961 2011-02-11 Yao Qi <yao@codesourcery.com>
10962
10963 * configure.ac: Call AC_PROG_RANLIB.
10964 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10965 * configure: Regenerate.
10966
10967 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10968
10969 * server.c (gdb_read_memory): Change return semantics to allow
10970 partial transfers.
10971 (handle_search_memory_1): Adjust.
10972 (process_serial_event) <'m' packet>: Handle partial transfers.
10973 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10974
10975 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10976
10977 * regcache.c (init_register_cache): Initialize
10978 regcache->register_status.
10979 (free_register_cache): Release regcache->register_status.
10980 (regcache_cpy): Copy register_status.
10981 (registers_to_string): Print 'x's for unavailable registers.
10982 (supply_register): Mark the register's status valid or
10983 unavailable, depending on whether a buffer was passed in or not.
10984 (supply_register_zeroed): New.
10985 (supply_regblock): Mark the registers' status valid or
10986 unavailable, depending on whether a buffer was passed in or not.
10987 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10988 (struct regcache): New `register_status' field.
10989 (supply_register_zeroed): Declare.
10990 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10991 supply_register_zeroed, rather than passing a NULL buffer to
10992 supply_register.
10993 * tracepoint.c (fetch_traceframe_registers): Update comment.
10994
10995 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10996
10997 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10998 buffer explicit.
10999
11000 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11001
11002 * server.h (decode_xfer_write): Change prototype.
11003 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11004 and don't extract the annex here.
11005 * server.c (decode_xfer_read): Remove `annex' parameter,
11006 and don't extract the annex here.
11007 (decode_xfer): New.
11008 (struct qxfer): New.
11009 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11010 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11011 (handle_qxfer_statictrace): New functions, abstracted out from
11012 handle_query, and made to use the struct qxfer interface.
11013 (handle_threads_qxfer_proper): Rename to ...
11014 (handle_qxfer_threads_proper): ... this.
11015 (handle_threads_qxfer): Rename to ...
11016 (handle_qxfer_threads): ... this. Adjust.
11017 (qxfer_packets): New array.
11018 (handle_qxfer): New function.
11019 (handle_query): Use handle_qxfer.
11020
11021 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11022
11023 * gdbreplay.c: Shorten lines of >= 80 columns.
11024 * linux-low.c: Ditto.
11025 * linux-ppc-low.c: Ditto.
11026 * linux-s390-low.c: Ditto.
11027 * linux-sparc-low.c: Ditto.
11028 * linux-x86-low.c: Ditto.
11029 * linux-xtensa-low.c: Ditto.
11030 * mem-break.c: Ditto.
11031 * nto-low.c: Ditto.
11032 * regcache.h: Ditto.
11033 * remote-utils.c: Ditto.
11034 * server.c: Ditto.
11035 * server.h: Ditto.
11036 * thread-db.c: Ditto.
11037 * tracepoint.c: Ditto.
11038 * utils.c: Ditto.
11039 * win32-low.h: Ditto.
11040
11041 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11042
11043 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11044 update.
11045
11046 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11047
11048 * server.c (gdbserver_version): Update copyright year in version
11049 output.
11050 * gdbreplay.c (gdbreplay_version): Ditto.
11051
11052 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11053
11054 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11055 * linux-bfin-low.c: New file.
11056 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11057 PT_DATA_ADDR for BFIN targets.
11058 * Makefile.in (SFILES): Add linux-bfin-low.c.
11059 (clean): Remove reg-bfin.c.
11060 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11061 * README: Mention supported Blackfin targets.
11062
11063 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11064
11065 * .gitignore: New file.
11066
11067 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11068
11069 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11070
11071 2010-10-22 Jie Zhang <jie@codesourcery.com>
11072
11073 * Makefile.in: Add FLAGS_TO_PASS variable.
11074 (install): Remove dependency of install-only and recursively
11075 invoke make for install-only.
11076
11077 2010-10-04 Doug Evans <dje@google.com>
11078
11079 * Makefile.in (uninstall): Use $(DESTDIR).
11080
11081 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11082
11083 PR gdb/11842
11084
11085 * linux-x86-low.c (compat_siginfo_from_siginfo)
11086 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11087 si_code is < 0. Check for si_code == SI_TIMER before checking for
11088 si_code < 0.
11089
11090 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11091
11092 * lynx-i386-low.c: New file.
11093 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11094
11095 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11096
11097 * lynx-low.c (ptrace_request_to_str): Remove handling for
11098 request values that have been removed in LynxOS 5.x.
11099
11100 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11101
11102 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11103 <ptrace.h>
11104
11105 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11106
11107 * configure.ac: Add --enable-inprocess-agent option.
11108 * configure: Rebuilt.
11109
11110 2010-09-06 Yao Qi <yao@codesourcery.com>
11111
11112 * linux-low.c (linux_kill): Remove unused variable.
11113 (linux_stabilize_threads): Likewise.
11114 * server.c (start_inferior): Likewise.
11115 (queue_stop_reply_callback): Likewise.
11116 * tracepoint.c (do_action_at_tracepoint): Likewise.
11117
11118 2010-09-06 Yao Qi <yao@codesourcery.com>
11119
11120 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11121 on return.
11122
11123 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11124
11125 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11126
11127 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11128
11129 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11130 "$(IPA_DEPFILES)".
11131
11132 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11133
11134 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11135 gdbserver/lynx-ppc-low.c: New files.
11136 * Makefile.in (lynx_low_h): New variable.
11137 (lynx-low.o, lynx-ppc-low.o): New rules.
11138 * configure.ac: On LynxOS, link with -lnetinet.
11139 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11140 * configure: regenerate.
11141
11142 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11143
11144 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11145 * configure.ac: Add check for vasprintf and vsnprintf.
11146 * configure, config.in: Regenerate.
11147 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11148
11149 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11150
11151 * gdbreplay.c: Move include of alloca.h up, next to include of
11152 malloc.h.
11153 * server.h: Add include of malloc.h.
11154 * mem-break.c: Remove include of malloc.h.
11155 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11156
11157 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11158
11159 * Makefile.in (memmem.o): Build with -Wno-error.
11160
11161 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11162
11163 * utils.c (xsnprintf): Make non-static.
11164 * server.h: Add xsnprintf declaration.
11165 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11166 replace calls to snprintf by calls to xsnprintf throughout.
11167
11168 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11169
11170 * configure.ac: Add configure check for alloca.
11171 * configure, config.in: Regenerate.
11172 * server.h: Include alloca.h if it exists.
11173 * gdbreplay.c: Include alloca.h if it exists.
11174
11175 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11176
11177 * linux-low.c (__SIGRTMIN): Define if not already defined.
11178 (linux_create_inferior): Check for __ANDROID__ rather than
11179 __SIGRTMIN.
11180 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11181 are already deferred.
11182 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11183 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11184 stopped and already has a pending signal to report.
11185 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11186 a pending signal to report or is moving out of a jump pad.
11187 (linux_init_signals): Check for __ANDROID__ rather than
11188 __SIGRTMIN.
11189
11190 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11191
11192 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11193 debug_threads check. Avoid a linear search when not doing debug
11194 output.
11195
11196 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11197
11198 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11199 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11200 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11201 (process_event): Change local fd's type to gdb_fildes_t.
11202 (create_file_handler): Adjust prototype.
11203 (delete_file_handler): Adjust prototype.
11204 (handle_file_event): Adjust prototype. Use pfildes.
11205 (create_file_event): Adjsut prototype.
11206 * remote-utils.c (remote_desc, listen_desc): Change type to
11207 gdb_fildes_t.
11208 * server.h: New gdb_fildes_t typedef.
11209 [USE_WIN32API]: Include winsock2.h.
11210 (delete_file_handler, add_file_handler): Adjust prototypes.
11211 (pfildes): Declare.
11212 * utils.c (pfildes): New.
11213
11214 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11215
11216 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11217 * configure: Regenerate.
11218
11219 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11220
11221 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11222 (linux_done_accessing_memory): ... this.
11223 (linux_target_ops): Adjust.
11224 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11225 * nto-low.c (nto_target_ops): Adjust comment.
11226 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11227 * spu-low.c (spu_target_ops): Adjust comment.
11228 * target.h (target_ops): Rename unprepare_to_access_memory field
11229 to done_accessing_memory.
11230 (unprepare_to_access_memory): Rename to ...
11231 (done_accessing_memory): ... this.
11232
11233 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11234
11235 * linux-low.c (linux_prepare_to_access_memory): New.
11236 (linux_unprepare_to_access_memory): New.
11237 (linux_target_ops): Install them.
11238 * server.c (read_memory): Rename to ...
11239 (gdb_read_memory): ... this. Use
11240 prepare_to_access_memory/prepare_to_access_memory.
11241 (write_memory): Rename to ...
11242 (gdb_write_memory): ... this. Use
11243 prepare_to_access_memory/prepare_to_access_memory.
11244 (handle_search_memory_1): Adjust.
11245 (process_serial_event): Adjust.
11246 * target.h (struct target_ops): New fields
11247 prepare_to_access_memory and unprepare_to_access_memory.
11248 (prepare_to_access_memory, unprepare_to_access_memory): New.
11249 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11250 prepare_to_access_memory/prepare_to_access_memory.
11251 * nto-low.c (nto_target_ops): Adjust.
11252 * spu-low.c (spu_target_ops): Adjust.
11253 * win32-low.c (win32_target_ops): Adjust.
11254
11255 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11256
11257 * Makefile.in (WARN_CFLAGS): Get it from configure.
11258 (WERROR_CFLAGS): New.
11259 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11260 * configure.ac: Introduce --enable-werror, which adds -Werror to
11261 the compiler command line. Enabled by default. Disable with
11262 --disable-werror. Add -Wdeclaration-after-statement
11263 Wpointer-arith and -Wformat-nonliteral to warning flags.
11264 * configure: Regenerate.
11265
11266 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11267
11268 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11269
11270 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11271
11272 * gdbreplay.c (remote_error): New.
11273 (gdbchar): New.
11274 (expect): Use gdbchar. Check for error reading from GDB.
11275 Clarify sync error output.
11276 (play): Check for errors writing to GDB.
11277 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11278 * remote-utils.c (getpkt): Check for errors writing to the remote
11279 descriptor.
11280
11281 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11282
11283 * linux-low.c (linux_wait_1): Move non-debugging code out of
11284 `debug_threads' control.
11285
11286 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11287
11288 * linux-low.c (linux_wait_1): Don't set last_status here.
11289 * server.c (push_event, queue_stop_reply_callback): Assert we're
11290 not pushing a TARGET_WAITKIND_IGNORE event.
11291 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11292 (myresume, handle_target_event): Set the thread's last_resume_kind
11293 and last_status from the target returned status.
11294
11295 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11296
11297 PR threads/10729
11298
11299 * linux-x86-low.c (update_debug_registers_callback): New.
11300 (i386_dr_low_set_addr): Use it.
11301 (i386_dr_low_get_addr): New.
11302 (i386_dr_low_set_control): Use update_debug_registers_callback.
11303 (i386_dr_low_get_control): New.
11304 (i386_dr_low_get_status): Adjust.
11305 * linux-low.c (linux_stop_lwp): New.
11306 * linux-low.h (linux_stop_lwp): Declare.
11307
11308 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11309 argument instead of a i386_debug_reg_state.
11310 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11311 a i386_debug_reg_state.
11312 (i386_insert_aligned_watchpoint): Adjust.
11313 (i386_remove_aligned_watchpoint): Adjust.
11314 (i386_low_stopped_data_address): Read the debug registers from the
11315 inferior instead of from the mirrors.
11316 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11317 (i386_dr_low_get_addr): Declare.
11318 (i386_dr_low_get_control): Declare.
11319 (i386_dr_low_get_status): Change prototype.
11320
11321 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11322 (i386_dr_low_get_addr): New.
11323 (i386_dr_low_get_control): New.
11324 (i386_dr_low_get_status): Adjust prototype. Return
11325 dr_status_mirror.
11326 (i386_initial_stuff): Clear dr_status_mirror and
11327 dr_control_mirror.
11328 (i386_get_thread_context): Adjust.
11329 (i386_set_thread_context): Adjust.
11330 (i386_thread_added): Adjust.
11331
11332 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11333
11334 * linux-low.h (linux_thread_area): Delete declaration.
11335
11336 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11337
11338 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11339 after its termination.
11340
11341 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11342
11343 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11344 (gdb_wants_all_stopped): Delete.
11345 (linux_wait_1): Don't call them.
11346 * server.c (handle_v_cont): Tag all threads as want-stopped.
11347 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11348 stopped as "client-wants-stopped".
11349
11350 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11351
11352 * Makefile.in (signals_h): New.
11353 (server_h): Depend on it.
11354 (server.o): Don't depend on $(signals_def).
11355 (signals.o): Depend on $(signals_def).
11356
11357 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11358
11359 * Makefile.in (signals_def): New.
11360 (server_h): Append include/gdb/signals.h and signals_def.
11361 (server.o): Append signals_def.
11362
11363 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11364
11365 * server.c (handle_target_event): Use target_signal_to_host for
11366 resume_info.sig initialization.
11367 * target.h (struct thread_resume) <sig>: New comment.
11368
11369 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11370
11371 * server.c (handle_query): strcpy() the returned string from paddress()
11372 instead of sprintf().
11373 * utils.c (paddress): Return phex_nz().
11374
11375 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11376
11377 * server.c (handle_v_cont): Call mourn_inferior if process
11378 just exited.
11379 (myresume): Likewise.
11380
11381 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11382
11383 Static tracepoints, and integration with UST.
11384
11385 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11386 * mem-break.c (uninsert_all_breakpoints)
11387 (reinsert_all_breakpoints): New.
11388 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11389 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11390 (gdb_agent_ust_loaded, helper_thread_id)
11391 (gdb_agent_helper_thread_id): New macros.
11392 (struct ipa_sym_addresses): Add addr_ust_loaded,
11393 addr_helper_thread_id, addr_cmd_buf.
11394 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11395 (in_process_agent_loaded_ust): New.
11396 (write_e_ust_not_loaded): New.
11397 (maybe_write_ipa_ust_not_loaded): New.
11398 (struct collect_static_trace_data_action): New.
11399 (enum tracepoint_type) <static_tracepoint>: New.
11400 (struct tracepoint) <handle>: Mention static tracepoints.
11401 (struct static_tracepoint_ctx): New.
11402 (CMD_BUF_SIZE): New.
11403 (add_tracepoint_action): Handle static tracepoint actions.
11404 (unprobe_marker_at): New.
11405 (clear_installed_tracepoints): Handle static tracepoints.
11406 (cmd_qtdp): Handle static tracepoints.
11407 (probe_marker_at): New.
11408 (cmd_qtstart): Handle static tracepoints.
11409 (response_tracepoint): Handle static tracepoints.
11410 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11411 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11412 (get_context_regcache): Handle static tracepoints.
11413 (do_action_at_tracepoint): Handle static tracepoint actions.
11414 (traceframe_find_block_type): Handle static trace data blocks.
11415 (traceframe_read_sdata): New.
11416 (download_tracepoints): Download static tracepoint actions.
11417 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11418 (GDB_PROBE_NAME): New.
11419 (ust_ops): New.
11420 (GET_UST_SYM): New.
11421 (USTF): New.
11422 (dlsym_ust): New.
11423 (ust_marker_to_static_tracepoint): New.
11424 (gdb_probe): New.
11425 (collect_ust_data_at_tracepoint): New.
11426 (gdb_ust_probe): New.
11427 (UNIX_PATH_MAX, SOCK_DIR): New.
11428 (gdb_ust_connect_sync_socket): New.
11429 (resume_thread, stop_thread): New.
11430 (run_inferior_command): New.
11431 (init_named_socket): New.
11432 (gdb_ust_socket_init): New.
11433 (cstr_to_hexstr): New.
11434 (next_st): New.
11435 (first_marker, next_marker): New.
11436 (response_ust_marker): New.
11437 (cmd_qtfstm, cmd_qtsstm): New.
11438 (unprobe_marker_at, probe_marker_at): New.
11439 (cmd_qtstmat, gdb_ust_thread): New.
11440 (gdb_ust_init): New.
11441 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11442 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11443 (ST_REGENTRY): New.
11444 (x86_64_st_collect_regmap): New.
11445 (X86_64_NUM_ST_COLLECT_GREGS): New.
11446 (AMD64_RIP_REGNUM): New.
11447 (supply_static_tracepoint_registers): New.
11448 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11449 (ST_REGENTRY): New.
11450 (i386_st_collect_regmap): New.
11451 (i386_NUM_ST_COLLECT_GREGS): New.
11452 (supply_static_tracepoint_registers): New.
11453 * server.c (handle_query): Handle qXfer:statictrace:read.
11454 <qSupported>: Report support for StaticTracepoints, and
11455 qXfer:statictrace:read features.
11456 * server.h (traceframe_read_sdata)
11457 (supply_static_tracepoint_registers): Declare.
11458 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11459 (unpack_varlen_hex): Include in IPA build.
11460 * Makefile.in (ustlibs, ustinc): New.
11461 (IPA_OBJS): Add remote-utils-ipa.o.
11462 ($(IPA_LIB)): Link -ldl and -lpthread.
11463 (UST_CFLAGS): New.
11464 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11465 * config.in, configure: Regenerate.
11466
11467 2010-06-20 Ian Lance Taylor <iant@google.com>
11468 Pedro Alves <pedro@codesourcery.com>
11469
11470 * linux-x86-low.c (always_true): Delete.
11471 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11472 trying to fool the compiler with always_true.
11473
11474 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11475
11476 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11477 conditions in gdbserver.
11478
11479 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11480
11481 * spu-low.c (spu_read_memory): Wrap around local store limit.
11482 (spu_write_memory): Likewise.
11483
11484 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11485
11486 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11487 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11488 LONGEST uses.
11489 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11490 uses.
11491 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11492 uses with LONGEST uses.
11493
11494 2010-06-14 Stan Shebs <stan@codesourcery.com>
11495 Pedro Alves <pedro@codesourcery.com>
11496
11497 Bytecode compiler.
11498
11499 * linux-x86-low.c: Include limits.h.
11500 (add_insns): New.
11501 (always_true): New.
11502 (EMIT_ASM): New.
11503 (EMIT_ASM32): New.
11504 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11505 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11506 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11507 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11508 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11509 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11510 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11511 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11512 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11513 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11514 (amd64_emit_void_call_2): New.
11515 (amd64_emit_ops): New.
11516 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11517 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11518 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11519 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11520 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11521 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11522 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11523 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11524 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11525 (i386_emit_stack_adjust, i386_emit_int_call_1)
11526 (i386_emit_void_call_2): New.
11527 (i386_emit_ops): New.
11528 (x86_emit_ops): New.
11529 (the_low_target): Install x86_emit_ops.
11530 * server.h (struct emit_ops): New.
11531 (get_raw_reg_func_addr): Declare.
11532 (current_insn_ptr, emit_error): Declare.
11533 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11534 (set_trace_state_variable_value): New defines.
11535 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11536 addr_get_trace_state_variable_value and
11537 addr_set_trace_state_variable_value.
11538 (symbol_list): New fields for get_raw_reg,
11539 get_trace_state_variable_value and set_trace_state_variable_value.
11540 (condfn): New typedef.
11541 (struct tracepoint): New field `compiled_cond'.
11542 (do_action_at_tracepoint): Clear compiled_cond.
11543 (get_trace_state_variable_value, set_trace_state_variable_value):
11544 Export in the IPA.
11545 (condition_true_at_tracepoint): If there's a compiled condition,
11546 run that.
11547 (current_insn_ptr, emit_error): New globals.
11548 (struct bytecode_address): New.
11549 (get_raw_reg_func_addr): New.
11550 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11551 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11552 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11553 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11554 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11555 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11556 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11557 (compile_tracepoint_condition, compile_bytecodes): New.
11558 * target.h (emit_ops): Forward declare.
11559 (struct target_ops): New field emit_ops.
11560 (target_emit_ops): New.
11561 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11562 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11563 * linux-low.c (linux_emit_ops): New.
11564 (linux_target_ops): Install it.
11565 * linux-low.h (struct linux_target_ops): New field emit_ops.
11566
11567 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11568
11569 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11570 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11571
11572 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11573 Stan Shebs <stan@codesourcery.com>
11574
11575 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11576 (all): Depend on $(extra_libraries).
11577 (install-only): Install the IPA.
11578 (IPA_OBJS, IPA_LIB): New.
11579 (clean): Remove the IPA lib.
11580 (IPAGENT_CFLAGS): New.
11581 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11582 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11583 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11584 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11585 * configure.ac: Check for atomic builtins support in the compiler.
11586 (IPA_DEPFILES, extra_libraries): Define.
11587 * configure.srv (ipa_obj): Add description.
11588 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11589 (i[34567]86-*-linux*): Set ipa_obj.
11590 (x86_64-*-linux*): Set ipa_obj.
11591 * linux-low.c (stabilizing_threads): New.
11592 (supports_fast_tracepoints): New.
11593 (linux_detach): Stabilize threads before detaching.
11594 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11595 the lwp is either not stabilizing, or is moving out of a jump pad.
11596 (linux_fast_tracepoint_collecting): New.
11597 (maybe_move_out_of_jump_pad): New.
11598 (enqueue_one_deferred_signal): New.
11599 (dequeue_one_deferred_signal): New.
11600 (linux_wait_for_event_1): If moving out of a jump pad, defer
11601 pending signals to later.
11602 (linux_stabilize_threads): New.
11603 (linux_wait_1): Check if threads need moving out of jump pads, and
11604 do it if so.
11605 (stuck_in_jump_pad_callback): New.
11606 (move_out_of_jump_pad_callback): New.
11607 (lwp_running): New.
11608 (linux_resume_one_lwp): Handle moving out of jump pads.
11609 (linux_set_resume_request): Dequeue deferred signals.
11610 (need_step_over_p): Also step over fast tracepoint jumps.
11611 (start_step_over): Also uninsert fast tracepoint jumps.
11612 (finish_step_over): Also reinsert fast tracepoint jumps.
11613 (linux_install_fast_tracepoint_jump): New.
11614 (linux_target_ops): Install linux_stabilize_threads and
11615 linux_install_fast_tracepoint_jump_pad.
11616 * linux-low.h (linux_target_ops) <get_thread_area,
11617 install_fast_tracepoint_jump_pad>: New fields.
11618 (struct lwp_info) <collecting_fast_tracepoint,
11619 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11620 (linux_get_thread_area): Declare.
11621 * linux-x86-low.c (jump_insn): New.
11622 (x86_get_thread_area): New.
11623 (append_insns): New.
11624 (push_opcode): New.
11625 (amd64_install_fast_tracepoint_jump_pad): New.
11626 (i386_install_fast_tracepoint_jump_pad): New.
11627 (x86_install_fast_tracepoint_jump_pad): New.
11628 (the_low_target): Install x86_get_thread_area and
11629 x86_install_fast_tracepoint_jump_pad.
11630 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11631 (struct fast_tracepoint_jump): New.
11632 (fast_tracepoint_jump_insn): New.
11633 (fast_tracepoint_jump_shadow): New.
11634 (find_fast_tracepoint_jump_at): New.
11635 (fast_tracepoint_jump_here): New.
11636 (delete_fast_tracepoint_jump): New.
11637 (set_fast_tracepoint_jump): New.
11638 (uninsert_fast_tracepoint_jumps_at): New.
11639 (reinsert_fast_tracepoint_jumps_at): New.
11640 (set_breakpoint_at): Use write_inferior_memory.
11641 (uninsert_raw_breakpoint): Use write_inferior_memory.
11642 (check_mem_read): Mask out fast tracepoint jumps.
11643 (check_mem_write): Mask out fast tracepoint jumps.
11644 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11645 (set_fast_tracepoint_jump): Declare.
11646 (delete_fast_tracepoint_jump)
11647 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11648 (reinsert_fast_tracepoint_jumps_at): Declare.
11649 * regcache.c: Don't compile many functions when building the
11650 in-process agent library.
11651 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11652 the register buffer in the heap.
11653 (free_register_cache): If the register buffer isn't owned by the
11654 regcache, don't free it.
11655 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11656 pre-existing register caches.
11657 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11658 type.
11659 (convert_ascii_to_int): : Constify `from' parameter type.
11660 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11661 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11662 the needed buffer in-place.
11663 (relocate_instruction): New.
11664 * server.c (handle_query) <qSymbols>: If the target supports
11665 tracepoints, give it a chance of looking up symbols. Report
11666 support for fast tracepoints.
11667 (handle_status): Stabilize threads.
11668 (process_serial_event): Adjust.
11669 * server.h (struct fast_tracepoint_jump): Forward declare.
11670 (struct process_info) <fast_tracepoint_jumps>: New field.
11671 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11672 (decode_X_packet, decode_M_packet): Adjust.
11673 (relocate_instruction): Declare.
11674 (in_process_agent_loaded): Declare.
11675 (tracepoint_look_up_symbols): Declare.
11676 (struct fast_tpoint_collect_status): Declare.
11677 (fast_tracepoint_collecting): Declare.
11678 (force_unlock_trace_buffer): Declare.
11679 (handle_tracepoint_bkpts): Declare.
11680 (initialize_low_tracepoint)
11681 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11682 * target.h (struct target_ops) <stabilize_threads,
11683 install_fast_tracepoint_jump_pad>: New fields.
11684 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11685 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11686 [HAVE_STDINT_H]: Include stdint.h.
11687 (trace_debug_1): Rename to ...
11688 (trace_vdebug): ... this.
11689 (trace_debug): Rename to ...
11690 (trace_debug_1): ... this. Add `level' parameter.
11691 (trace_debug): New.
11692 (ATTR_USED, ATTR_NOINLINE): New.
11693 (IP_AGENT_EXPORT): New.
11694 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11695 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11696 (about_to_request_buffer_space, trace_buffer_is_full)
11697 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11698 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11699 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11700 (traceframe_write_count, traceframes_created)
11701 (trace_state_variables)
11702 New renaming defines.
11703 (struct ipa_sym_addresses): New.
11704 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11705 (symbol_list): New.
11706 (ipa_sym_addrs): New.
11707 (all_tracepoint_symbols_looked_up): New.
11708 (in_process_agent_loaded): New.
11709 (write_e_ipa_not_loaded): New.
11710 (maybe_write_ipa_not_loaded): New.
11711 (tracepoint_look_up_symbols): New.
11712 (debug_threads) [IN_PROCESS_AGENT]: New.
11713 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11714 (UNKNOWN_SIDE_EFFECTS): New.
11715 (stop_tracing): New.
11716 (flush_trace_buffer): New.
11717 (stop_tracing_bkpt): New.
11718 (flush_trace_buffer_bkpt): New.
11719 (read_inferior_integer): New.
11720 (read_inferior_uinteger): New.
11721 (read_inferior_data_pointer): New.
11722 (write_inferior_data_pointer): New.
11723 (write_inferior_integer): New.
11724 (write_inferior_uinteger): New.
11725 (struct collect_static_trace_data_action): Delete.
11726 (enum tracepoint_type): New.
11727 (struct tracepoint) <type>: New field `type'.
11728 <actions_str, step_actions, step_actions_str>: Only include in
11729 GDBserver.
11730 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11731 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11732 (tracepoints): Use IP_AGENT_EXPORT.
11733 (last_tracepoint): Don't include in the IPA.
11734 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11735 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11736 (alloced_trace_state_variables): New.
11737 (trace_state_variables): Use IP_AGENT_EXPORT.
11738 (traceframe_t): Delete unused variable.
11739 (circular_trace_buffer): Don't include in the IPA.
11740 (trace_buffer_start): Delete.
11741 (struct trace_buffer_control): New.
11742 (trace_buffer_free): Delete.
11743 (struct ipa_trace_buffer_control): New.
11744 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11745 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11746 New.
11747 (trace_buffer_ctrl): New.
11748 (TRACE_BUFFER_CTRL_CURR): New.
11749 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11750 Reimplement as macros.
11751 (trace_buffer_wrap): Delete.
11752 (traceframe_write_count, traceframe_read_count)
11753 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11754 (struct tracepoint_hit_ctx) <type>: New field.
11755 (struct fast_tracepoint_ctx): New.
11756 (memory_barrier): New.
11757 (cmpxchg): New.
11758 (record_tracepoint_error): Update atomically in the IPA.
11759 (clear_inferior_trace_buffer): New.
11760 (about_to_request_buffer_space): New.
11761 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11762 updating the same buffer.
11763 (add_tracepoint): Default the tracepoint's type to trap
11764 tracepoint, and orig_size to -1.
11765 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11766 internal variables.
11767 (create_trace_state_variable): New parameter `gdb'. Handle it.
11768 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11769 (cmd_qtdp): Handle fast tracepoints.
11770 (cmd_qtdv): Adjust.
11771 (max_jump_pad_size): New.
11772 (gdb_jump_pad_head): New.
11773 (get_jump_space_head): New.
11774 (claim_jump_space): New.
11775 (sort_tracepoints): New.
11776 (MAX_JUMP_SIZE): New.
11777 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11778 IPA.
11779 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11780 support. Upload fast traceframes, and delete internal IPA
11781 breakpoints.
11782 (stop_tracing_handler): New.
11783 (flush_trace_buffer_handler): New.
11784 (cmd_qtstop): Upload fast tracepoints.
11785 (response_tracepoint): Handle fast tracepoints.
11786 (tracepoint_finished_step): Upload fast traceframes. Set the
11787 tracepoint hit context's tracepoint type.
11788 (handle_tracepoint_bkpts): New.
11789 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11790 type. Add comment about fast tracepoints.
11791 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11792 non-existing action_str field.
11793 (get_context_regcache): Handle fast tracepoints.
11794 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11795 to the regcache.
11796 (fast_tracepoint_from_jump_pad_address): New.
11797 (fast_tracepoint_from_ipa_tpoint_address): New.
11798 (collecting_t): New.
11799 (force_unlock_trace_buffer): New.
11800 (fast_tracepoint_collecting): New.
11801 (collecting): New.
11802 (gdb_collect): New.
11803 (write_inferior_data_ptr): New.
11804 (target_tp_heap): New.
11805 (target_malloc): New.
11806 (download_agent_expr): New.
11807 (UALIGN): New.
11808 (download_tracepoints): New.
11809 (download_trace_state_variables): New.
11810 (upload_fast_traceframes): New.
11811 (IPA_FIRST_TRACEFRAME): New.
11812 (IPA_NEXT_TRACEFRAME_1): New.
11813 (IPA_NEXT_TRACEFRAME): New.
11814 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11815 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11816 (gdb_jump_pad_buffer_end): New.
11817 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11818 (initialize_tracepoint): Adjust.
11819 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11820 buffer. Initialize the low module.
11821 * utils.c (PREFIX, TOOLNAME): New.
11822 (malloc_failure): Use PREFIX.
11823 (error): In the IPA, an error causes an exit.
11824 (fatal, warning): Use PREFIX.
11825 (internal_error): Use TOOLNAME.
11826 (NUMCELLS): Increase to 10.
11827 * configure, config.in: Regenerate.
11828
11829 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11830
11831 * server.c (handle_query) <qSupported>: Do two passes over the
11832 qSupported string to avoid nesting strtok.
11833
11834 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11835
11836 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11837 (CDEPS): New.
11838 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11839 -Wl,--dynamic-list.
11840 * configure: Regenerate.
11841 * proc-service.list: New.
11842
11843 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11844
11845 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11846 New comment.
11847
11848 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11849
11850 * gdbreplay.c (remote_open): Check error return from socket() call by
11851 its equality to -1 not by it being negative.
11852 * remote-utils.c (remote_open): Likewise.
11853
11854 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11855
11856 * config.h: Regenerate.
11857
11858 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11859
11860 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11861 doesn't provide PTRACE_GET_THREAD_AREA.
11862
11863 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11864
11865 * linux-m68k-low.c: Include <asm/ptrace.h>
11866 (ps_get_thread_area): Implement.
11867
11868 2010-05-03 Doug Evans <dje@google.com>
11869
11870 * event-loop.c (struct callback_event): New struct.
11871 (callback_list): New global.
11872 (append_callback_event, delete_callback_event): New functions.
11873 (process_callback): New function.
11874 (start_event_loop): Call it.
11875 * remote-utils.c (NOT_SCHEDULED): Define.
11876 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11877 moved out of readchar.
11878 (readchar): Rewrite. Call reschedule before returning.
11879 (reset_readchar): New function.
11880 (remote_close): Call it.
11881 (process_remaining, reschedule): New functions.
11882 * server.h (callback_handler_func): New typedef.
11883 (append_callback_event, delete_callback_event): Declare.
11884
11885 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11886
11887 * proc-service.c (ps_pglobal_lookup): Use
11888 thread_db_look_up_one_symbol.
11889 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11890 parameter. Use it instead of all_symbols_looked_up.
11891 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11892 field.
11893 (all_symbols_looked_up): Don't declare.
11894 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11895 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11896 field.
11897 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11898 Set all_symbols_looked_up here.
11899 (thread_db_look_up_one_symbol): New.
11900 (thread_db_get_tls_address): Adjust.
11901 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11902 thread_db object on the heap, and tentatively set it in the
11903 process structure.
11904 (thread_db_init): Don't set all_symbols_looked_up here.
11905 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11906
11907 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11908
11909 * linux-low.c (linux_kill, linux_detach): Adjust.
11910 (status_pending_p_callback): Remove redundant statement. Check
11911 for !TARGET_WAITIKIND_IGNORE, instead of
11912 TARGET_WAITKIND_STOPPED.
11913 (handle_tracepoints): Make sure LWP is locked. Adjust.
11914 (linux_wait_for_event_1): Adjust.
11915 (linux_cancel_breakpoints): New.
11916 (unsuspend_one_lwp): New.
11917 (unsuspend_all_lwps): New.
11918 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11919 (send_sigstop_callback): Change return type to int, add new
11920 `except' parameter and handle it.
11921 (suspend_and_send_sigstop_callback): New.
11922 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11923 pass them down. If SUSPEND, also increment the lwp's suspend
11924 count.
11925 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11926 (need_step_over_p): Don't consider suspended LWPs.
11927 (start_step_over): Adjust.
11928 (proceed_one_lwp): Change return type to int, add new `except'
11929 parameter and handle it.
11930 (unsuspend_and_proceed_one_lwp): New.
11931 (proceed_all_lwps): Use find_inferior instead of
11932 for_each_inferior.
11933 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11934 also decrement the suspend count of LWPs. Pass `except' down,
11935 instead of hacking its suspend count.
11936 (linux_pause_all): Add `freeze' parameter. Adjust.
11937 (linux_unpause_all): New.
11938 (linux_target_ops): Install linux_unpause_all.
11939 * server.c (handle_status): Adjust.
11940 * target.h (struct target_ops): New fields `unpause_all' and
11941 `cancel_breakpoints'. Add new parameter to `pause_all'.
11942 (pause_all): Add new `freeze' parameter.
11943 (unpause_all): New.
11944 (cancel_breakpoints): New.
11945 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11946 cancel breakpoints.
11947 (cmd_qtstart): Pause threads.
11948 (stop_tracing): Pause threads, and cancel breakpoints.
11949 * win32-low.c (win32_target_ops): Adjust.
11950
11951 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11952
11953 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11954 the inferior right away from here...
11955 (linux_wait_1): ... to here, and adjust to check the thread's
11956 last_resume_kind instead of the lwp's step or stop_expected flags.
11957
11958 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11959
11960 * README: Use consistent `GDB' and `GDBserver' spellings.
11961
11962 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11963
11964 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11965 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11966 (linux_detach_one_lwp): Assume the lwp is stopped.
11967 (any_thread_of): Delete.
11968 (linux_detach): Stop all lwps here. Don't blindly delete all
11969 breakpoints.
11970 (delete_lwp_callback): New.
11971 (linux_mourn): Delete all lwps of the process that is gone.
11972 (linux_wait_1): Don't delete the last lwp of the process here.
11973 * mem-break.h (mark_breakpoints_out): Declare.
11974 * mem-break.c (mark_breakpoints_out): New.
11975 (free_all_breakpoints): Use it.
11976 * server.c (handle_target_event): If the process is gone, mark
11977 breakpoints out.
11978 * thread-db.c (struct thread_db) <create_bp>: New field.
11979 (thread_db_enable_reporting): Fix prototype. Store a thread event
11980 breakpoint reference in the thread_db struct.
11981 (thread_db_load_search): Clear the thread_db object.
11982 (try_thread_db_load_1): Ditto.
11983 (switch_to_process): New.
11984 (disable_thread_event_reporting): Use it.
11985 (remove_thread_event_breakpoints): New.
11986 (thread_db_detach, thread_db_mourn): Use it.
11987
11988 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11989
11990 * linux-low.c (linux_enable_event_reporting): New.
11991 (linux_wait_for_event_1, handle_extended_wait): Use it.
11992
11993 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11994
11995 * linux-low.c (linux_kill_one_lwp, linux_kill)
11996 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11997 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11998 SIGSTOP even if the LWP is stopped.
11999 (send_sigstop_callback): New.
12000 (stop_all_lwps): Use send_sigstop_callback instead.
12001 (linux_resume_one_thread): Adjust.
12002 (proceed_one_lwp): Still proceed an LWP that the client has
12003 requested to stop, if we haven't reported it as stopped yet. Make
12004 sure that LWPs the client want stopped, have a pending SIGSTOP.
12005
12006 2010-04-26 Doug Evans <dje@google.com>
12007
12008 * server.c (handle_general_set): Make static.
12009
12010 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12011 Print received char after testing for error/eof instead of before.
12012 (input_interrupt): Tweak comment.
12013
12014 2010-04-23 Doug Evans <dje@google.com>
12015
12016 * server.c (start_inferior): Print inferior argv if --debug.
12017
12018 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12019
12020 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12021 * nto-x86-low.c: Include server.h
12022
12023 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12024
12025 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12026 be consistent with other sources of this directory.
12027 (init_registers_amd64): Correct name of source file of this function
12028 in the comment.
12029
12030 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12031
12032 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12033 64-bit executables.
12034
12035 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12036
12037 * win32-i386-low.c: Add 64-bit support.
12038 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12039 (init_registers_amd64): Declare.
12040 (mappings): Add 64-bit version of array.
12041 (init_windows_x86): New function.
12042 (the_low_target): Change init_arch field to init_windows_x86.
12043
12044 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12045
12046 * win32-low.c: Adapt to support also 64-bit architecture.
12047 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12048 (get_image_name): Use SIZE_T type for local variable `done'.
12049 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12050 (toolhelp_get_dll_name): Idem.
12051 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12052 Use uintptr_t typecast to avoid warning.
12053 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12054 (handle_exception): Use phex_nz to avoid warning.
12055 (win32_wait): Remove unused local variable `process'.
12056
12057 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12058
12059 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12060 `amd64-avx.o'.
12061
12062 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12063
12064 * configure.ac: Use `ws2_32' library for srv_mingw.
12065 * configure: Regenerate.
12066 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12067 * remote-utils.c: Likewise.
12068
12069 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12070
12071 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12072 if __x86_64__ is defined.
12073
12074 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12075
12076 * configure: Regenerate.
12077
12078 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12079
12080 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12081 * target.h (target_ops): New get_tib_address field.
12082 * win32-low.h (win32_thread_info): Add thread_local_base field.
12083 * win32-low.c (child_add_thread): Add tlb argument.
12084 Set thread_local_base field to TLB.
12085 (get_child_debug_event): Adapt to child_add_thread change.
12086 (win32_get_tib_address): New function.
12087 (win32_target_ops): Set get_tib_address field to
12088 win32_get_tib_address.
12089 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12090
12091 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12092
12093 * linux-low.c (linux_mourn): Also remove the process.
12094 * server.c (handle_target_event): Don't remove the process here.
12095 * nto-low.c (nto_mourn): New.
12096 (nto_target_ops): Install it.
12097 * spu-low.c (spu_mourn): New.
12098 (spu_target_ops): Install it.
12099 * win32-low.c (win32_mourn): New.
12100 (win32_target_ops): Install it.
12101
12102 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12103
12104 * server.h (buffer_xml_printf): Remove redundant `;'.
12105
12106 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12107
12108 * regcache.c (set_register_cache): Invalidate regcaches before
12109 changing the register cache layout.
12110 (regcache_invalidate_one): Allow a NULL regcache.
12111 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12112 regcaches before changing the register cache layout or the target
12113 regsets.
12114
12115 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12116
12117 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12118 variable warning on Linux/x86-64.
12119
12120 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12121
12122 GDBserver disconnected tracing support.
12123
12124 * linux-low.c (linux_remove_process): Delete.
12125 (add_lwp): Don't set last_resume_kind here.
12126 (linux_kill): Use `mourn'.
12127 (linux_detach): Use `thread_db_detach', and `mourn'.
12128 (linux_mourn): New.
12129 (linux_attach_lwp_1): Adjust comment.
12130 (linux_attach): last_resume_kind moved the thread_info; adjust.
12131 (status_pending_p_callback): Adjust.
12132 (linux_wait_for_event_1): Adjust.
12133 (count_events_callback, select_singlestep_lwp_callback)
12134 (select_event_lwp_callback, cancel_breakpoints_callback)
12135 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12136 (proceed_one_lwp): Adjust.
12137 (linux_async): Add debug output.
12138 (linux_thread_stopped): New.
12139 (linux_pause_all): New.
12140 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12141 linux_pause_all.
12142 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12143 (thread_db_free): Delete declaration.
12144 (thread_db_detach, thread_db_mourn): Declare.
12145 * thread-db.c (thread_db_init): Use thread_db_mourn.
12146 (thread_db_free): Delete, split in two.
12147 (disable_thread_event_reporting): New.
12148 (thread_db_detach): New.
12149 (thread_db_mourn): New.
12150
12151 * server.h (struct thread_info) <last_resume_kind>: New field.
12152 <attached>: Add comment.
12153 <gdb_detached>: New field.
12154 (handler_func): Change return type to int.
12155 (handle_serial_event, handle_target_event): Ditto.
12156 (gdb_connected): Declare.
12157 (tracing): Delete.
12158 (disconnected_tracing): Declare.
12159 (stop_tracing): Declare.
12160
12161 * server.c (handle_query) <qSupported>: Report support for
12162 disconnected tracing.
12163 (queue_stop_reply_callback): Account for running threads.
12164 (gdb_wants_thread_stopped): New.
12165 (gdb_wants_all_threads_stopped): New.
12166 (gdb_reattached_process): New.
12167 (handle_status): Clear the `gdb_detached' flag of all processes.
12168 In all-stop, stop all threads.
12169 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12170 (process_serial_event): If the remote connection breaks, or if an
12171 exit was forced with "monitor exit", force an event loop exit.
12172 Handle disconnected tracing on detach.
12173 (handle_serial_event): Adjust.
12174 (handle_target_event): If GDB isn't connected, forward events back
12175 to the inferior, unless the last process exited, in which case,
12176 exit gdbserver. Adjust interface.
12177
12178 * remote-utils.c (remote_open): Don't block in accept. Instead
12179 register an event loop source on the listen socket file
12180 descriptor. Refactor bits into ...
12181 (listen_desc): ... this new global.
12182 (gdb_connected): ... this new function.
12183 (enable_async_notification): ... this new function.
12184 (handle_accept_event): ... this new function.
12185 (remote_close): Clear remote_desc.
12186
12187 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12188
12189 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12190 New fields.
12191 (mourn_inferior): Define.
12192 (target_process_qsupported): Avoid the dangling else problem.
12193 (thread_stopped): Define.
12194 (pause_all): Define.
12195 (target_waitstatus_to_string): Declare.
12196 * target.c (target_waitstatus_to_string): New.
12197
12198 * tracepoint.c (tracing): Make extern.
12199 (disconnected_tracing): New.
12200 (stop_tracing): Make extern. Handle tracing stops due to GDB
12201 disconnecting.
12202 (cmd_qtdisconnected): New.
12203 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12204 (handle_tracepoint_general_set): Handle QTDisconnected.
12205
12206 * event-loop.c (event_handler_func): Change return type to int.
12207 (process_event): Bail out if the event handler wants the event
12208 loop to stop.
12209 (handle_file_event): Ditto.
12210 (start_event_loop): Bail out if the event handler wants the event
12211 loop to stop.
12212
12213 * nto-low.c (nto_target_ops): Adjust.
12214 * spu-low.c (spu_wait): Don't remove the process here.
12215 (spu_target_ops): Adjust.
12216 * win32-low.c (win32_wait): Don't remove the process here.
12217 (win32_target_ops): Adjust.
12218
12219 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12220
12221 * regcache.c (realloc_register_cache): Invalidate inferior's
12222 regcache before recreating it.
12223
12224 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12225
12226 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12227
12228 2010-04-09 Stan Shebs <stan@codesourcery.com>
12229 Pedro Alves <pedro@codesourcery.com>
12230
12231 * server.h (LONGEST): New.
12232 (struct thread_info) <while_stepping>: New field.
12233 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12234 Declare.
12235 (initialize_tracepoint, handle_tracepoint_general_set)
12236 (handle_tracepoint_query, tracepoint_finished_step)
12237 (tracepoint_was_hit, release_while_stepping_state_list):
12238 (current_traceframe): Declare.
12239 * server.c (handle_general_set): Handle tracepoint packets.
12240 (read_memory): New.
12241 (write_memory): New.
12242 (handle_search_memory_1): Use read_memory.
12243 (handle_query): Report support for conditional tracepoints, trace
12244 state variables, and tracepoint sources. Handle tracepoint
12245 queries.
12246 (main): Initialize the tracepoints module.
12247 (process_serial_event): Handle traceframe reads/writes.
12248
12249 * linux-low.c (handle_tracepoints): New.
12250 (linux_wait_1): Call it.
12251 (linux_resume_one_lwp): Handle while-stepping.
12252 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12253 (linux_target_ops): Install them.
12254 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12255 New field.
12256 * linux-x86-low.c (x86_supports_tracepoints): New.
12257 (the_low_target). Install it.
12258
12259 * mem-break.h (delete_breakpoint): Declare.
12260 * mem-break.c (delete_breakpoint): Make external.
12261
12262 * target.h (struct target_ops): Add `supports_tracepoints',
12263 `read_pc', and `write_pc' fields.
12264 (target_supports_tracepoints): Define.
12265 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12266 (phex_nz): New.
12267
12268 * regcache.h (struct regcache) <registers_owned>: New field.
12269 (init_register_cache, regcache_cpy): Declare.
12270 (regcache_read_pc, regcache_write_pc): Declare.
12271 (register_cache_size): Declare.
12272 (supply_regblock): Declare.
12273 * regcache.c (init_register_cache): New.
12274 (new_register_cache): Use it.
12275 (regcache_cpy): New.
12276 (register_cache_size): New.
12277 (supply_regblock): New.
12278 (regcache_read_pc, regcache_write_pc): New.
12279
12280 * tracepoint.c: New.
12281
12282 * Makefile.in (OBS): Add tracepoint.o.
12283 (tracepoint.o): New rule.
12284
12285 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12286
12287 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12288 (i386-mmx.o): New.
12289 (i386-mmx.c): Likewise.
12290 (i386-mmx-linux.o): Likewise.
12291 (i386-mmx-linux.c): Likewise.
12292
12293 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12294 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12295 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12296 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12297
12298 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12299 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12300 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12301
12302 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12303
12304 * Makefile.in (clean): Updated.
12305 (i386-avx.o): New.
12306 (i386-avx.c): Likewise.
12307 (i386-avx-linux.o): Likewise.
12308 (i386-avx-linux.c): Likewise.
12309 (amd64-avx.o): Likewise.
12310 (amd64-avx.c): Likewise.
12311 (amd64-avx-linux.o): Likewise.
12312 (amd64-avx-linux.c): Likewise.
12313
12314 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12315 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12316 (srv_amd64_regobj): Add amd64-avx.o.
12317 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12318 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12319 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12320 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12321 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12322 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12323 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12324
12325 * i387-fp.c: Include "i386-xstate.h".
12326 (i387_xsave): New.
12327 (i387_cache_to_xsave): Likewise.
12328 (i387_xsave_to_cache): Likewise.
12329 (x86_xcr0): Likewise.
12330
12331 * i387-fp.h (i387_cache_to_xsave): Likewise.
12332 (i387_xsave_to_cache): Likewise.
12333 (x86_xcr0): Likewise.
12334
12335 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12336 * linux-crisv32-low.c (target_regsets): Likewise.
12337 * linux-m68k-low.c (target_regsets): Likewise.
12338 * linux-mips-low.c (target_regsets): Likewise.
12339 * linux-ppc-low.c (target_regsets): Likewise.
12340 * linux-s390-low.c (target_regsets): Likewise.
12341 * linux-sh-low.c (target_regsets): Likewise.
12342 * linux-sparc-low.c (target_regsets): Likewise.
12343 * linux-xtensa-low.c (target_regsets): Likewise.
12344
12345 * linux-low.c: Include <sys/uio.h>.
12346 (regsets_fetch_inferior_registers): Support nt_type.
12347 (regsets_store_inferior_registers): Likewise.
12348 (linux_process_qsupported): New.
12349 (linux_target_ops): Add linux_process_qsupported.
12350
12351 * linux-low.h (regset_info): Add nt_type.
12352 (linux_target_ops): Add process_qsupported.
12353
12354 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12355 and <sys/uio.h>.
12356 (init_registers_i386_avx_linux): New.
12357 (init_registers_amd64_avx_linux): Likewise.
12358 (xmltarget_i386_linux_no_xml): Likewise.
12359 (xmltarget_amd64_linux_no_xml): Likewise.
12360 (PTRACE_GETREGSET): Likewise.
12361 (PTRACE_SETREGSET): Likewise.
12362 (x86_fill_xstateregset): Likewise.
12363 (x86_store_xstateregset): Likewise.
12364 (use_xml): Likewise.
12365 (x86_linux_update_xmltarget): Likewise.
12366 (x86_linux_process_qsupported): Likewise.
12367 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12368 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12369 init_registers_i386_linux here. Call
12370 x86_linux_update_xmltarget.
12371 (the_low_target): Add x86_linux_process_qsupported.
12372
12373 * server.c (handle_query): Call target_process_qsupported.
12374
12375 * target.h (target_ops): Add process_qsupported.
12376 (target_process_qsupported): New.
12377
12378 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12379
12380 * inferiors.c (add_thread): Set last_status kind to
12381 TARGET_WAITKIND_IGNORE.
12382 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12383 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12384 (linux_wait_1): Move `thread' local definition to block that uses
12385 it. Don't NULL initialize `event_child'.
12386 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12387 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12388 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12389
12390 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12391
12392 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12393 an extended waitstatus, or by a watchpoint.
12394 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12395 thread was stepping or has been stopped by a watchpoint.
12396
12397 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12398
12399 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12400 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12401 of another, then delete the previous, and validate all
12402 breakpoints.
12403 (validate_inserted_breakpoint): New.
12404 (delete_disabled_breakpoints): New.
12405 (validate_breakpoints): New.
12406 (check_mem_read): Validate breakpoints before trusting their
12407 shadow. Delete disabled breakpoints.
12408 (check_mem_write): Validate breakpoints before trusting they
12409 should be inserted. Delete disabled breakpoints.
12410 * mem-break.h (validate_breakpoints):
12411 * server.c (handle_query): Validate breakpoints when we see a
12412 qSymbol query.
12413
12414 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12415
12416 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12417 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12418 if we could tell there's a GDB breakpoint at stop_pc.
12419 (need_step_over_p): Don't do a step over if we find a GDB
12420 breakpoint at the resume PC.
12421
12422 * mem-break.c (struct raw_breakpoint): New.
12423 (enum bkpt_type): New type `gdb_breakpoint'.
12424 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12425 fields. New field `raw'.
12426 (find_raw_breakpoint_at): New.
12427 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12428 breakpoint instead.
12429 (set_breakpoint_at): Adjust.
12430 (delete_raw_breakpoint): New.
12431 (release_breakpoint): New.
12432 (delete_breakpoint): Rename to...
12433 (delete_breakpoint_1): ... this. Add proc parameter. Use
12434 release_breakpoint. Return ENOENT.
12435 (delete_breakpoint): Reimplement.
12436 (find_breakpoint_at): Delete.
12437 (find_gdb_breakpoint_at): New.
12438 (delete_breakpoint_at): Delete.
12439 (set_gdb_breakpoint_at): New.
12440 (delete_gdb_breakpoint_at): New.
12441 (gdb_breakpoint_here): New.
12442 (set_reinsert_breakpoint): Use release_breakpoint.
12443 (uninsert_breakpoint): Rename to ...
12444 (uninsert_raw_breakpoint): ... this.
12445 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12446 (reinsert_raw_breakpoint): Change parameter type to
12447 raw_breakpoint.
12448 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12449 instead.
12450 (check_breakpoints): Adjust. Use release_breakpoint.
12451 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12452 (breakpoint_inserted_here): Ditto.
12453 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12454 Don't trust the breakpoint's shadow if it is not inserted.
12455 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12456 (delete_all_breakpoints): Adjust.
12457 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12458 use delete_breakpoint_1.
12459
12460 * mem-break.h (breakpoints_supported): Delete declaration.
12461 (set_gdb_breakpoint_at): Declare.
12462 (gdb_breakpoint_here): Declare.
12463 (delete_breakpoint_at): Delete.
12464 (delete_gdb_breakpoint_at): Declare.
12465
12466 * server.h (struct raw_breakpoint): Forward declare.
12467 (struct process_info): New field `raw_breakpoints'.
12468
12469 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12470 breakpoints.
12471
12472 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12473
12474 * linux-low.c (status_pending_p_callback): Fix comment.
12475 (linux_wait_for_event_1): Move most of the internal breakpoint
12476 handling from here...
12477 (linux_wait_1): ... to here.
12478 (count_events_callback): New.
12479 (select_singlestep_lwp_callback): New.
12480 (select_event_lwp_callback): New.
12481 (cancel_breakpoints_callback): New.
12482 (select_event_lwp): New.
12483 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12484 priority to all LWPs that have had events that should be reported
12485 to the client. Cancel breakpoints when about to reporting the
12486 event to the client, not while stopping lwps. No longer cancel
12487 finished single-steps here.
12488 (cancel_finished_single_step): Delete.
12489 (cancel_finished_single_steps): Delete.
12490
12491 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12492
12493 * mem-break.c (enum bkpt_type): New.
12494 (struct breakpoint): New field `type'.
12495 (set_breakpoint_at): Change return type to struct breakpoint
12496 pointer. Set type to `other_breakpoint' by default.
12497 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12498 in the breakpoint list.
12499 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12500 (reinsert_breakpoint): Rename to ...
12501 (reinsert_raw_breakpoint): ... this.
12502 (reinsert_breakpoints_at): Adjust.
12503 * mem-break.h (struct breakpoint): Declare.
12504 (set_breakpoint_at): Change return type to struct breakpoint
12505 pointer.
12506
12507 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12508
12509 * server.c (handle_query): Assign, not compare.
12510
12511 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12512
12513 Teach linux gdbserver to step-over-breakpoints.
12514
12515 * linux-low.c (can_hardware_single_step): New.
12516 (supports_breakpoints): New.
12517 (handle_extended_wait): If stopping threads, read the stop pc of
12518 the new cloned LWP.
12519 (get_pc): New.
12520 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12521 low target doesn't support retrieving the PC.
12522 (add_lwp): Set last_resume_kind to resume_continue.
12523 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12524 (linux_attach): Don't clear stop_expected. Set the lwp's
12525 last_resume_kind to resume_stop.
12526 (linux_detach_one_lwp): Don't check for removed breakpoints.
12527 (check_removed_breakpoint): Delete.
12528 (status_pending_p): Rename to ...
12529 (status_pending_p_callback): ... this. Don't check for removed
12530 breakpoints. Don't consider threads that are stopped from GDB's
12531 perspective.
12532 (linux_wait_for_lwp): Always read the stop_pc here.
12533 (cancel_breakpoint): New.
12534 (step_over_bkpt): New global.
12535 (linux_wait_for_event_1): Implement stepping over breakpoints.
12536 (gdb_wants_lwp_stopped): New.
12537 (gdb_wants_all_stopped): New.
12538 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12539 single-step traps here. Store the thread's last reported target
12540 wait status.
12541 (send_sigstop): Don't clear stop_expected. Always set it,
12542 instead.
12543 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12544 (cancel_finished_single_step): New.
12545 (cancel_finished_single_steps): New.
12546 (wait_for_sigstop): Don't cancel finished single-step traps here.
12547 (linux_resume_one_lwp): Don't check for removed breakpoints.
12548 Don't set `step' on non-hardware step archs.
12549 (linux_set_resume_request): Ignore resume_stop requests if already
12550 stopping or stopped. Set the lwp's last_resume_kind.
12551 (resume_status_pending_p): Don't check for removed breakpoints.
12552 (need_step_over_p): New.
12553 (start_step_over): New.
12554 (finish_step_over): New.
12555 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12556 requests. Clear the thread's last reported target waitstatus.
12557 Don't use the `suspended' flag. Don't consider pending breakpoints.
12558 (linux_resume): Start a step-over if necessary.
12559 (proceed_one_lwp): New.
12560 (proceed_all_lwps): New.
12561 (unstop_all_lwps): New.
12562 * linux-low.h (struct lwp_info): Rewrite comment for the
12563 `suspended' flag. Add the `stop_pc' field. Delete the
12564 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12565 Add `'last_resume_kind' and `need_step_over' fields.
12566 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12567 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12568 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12569 (set_raw_breakpoint_at): New.
12570 (set_breakpoint_at): Rewrite to use it.
12571 (reinsert_breakpoint_handler): Delete.
12572 (set_reinsert_breakpoint): New.
12573 (reinsert_breakpoint_by_bp): Delete.
12574 (delete_reinsert_breakpoints): New.
12575 (uninsert_breakpoint): Rewrite.
12576 (uninsert_breakpoints_at): New.
12577 (reinsert_breakpoint): Rewrite.
12578 (reinsert_breakpoints_at): New.
12579 (check_breakpoints): Rewrite.
12580 (breakpoint_here): New.
12581 (breakpoint_inserted_here): New.
12582 (check_mem_read): Adjust.
12583 * mem-break.h (breakpoints_supported, breakpoint_here)
12584 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12585 (reinsert_breakpoint_by_bp): Delete declaration.
12586 (delete_reinsert_breakpoints): Declare.
12587 (reinsert_breakpoint): Delete declaration.
12588 (reinsert_breakpoints_at): Declare.
12589 (uninsert_breakpoint): Delete declaration.
12590 (uninsert_breakpoints_at): Declare.
12591 (check_breakpoints): Adjust prototype.
12592 * server.h: Adjust include order.
12593 (struct thread_info): Declare here. Add a `last_status' field.
12594
12595 2010-03-23 Michael Snyder <msnyder@vmware.com>
12596
12597 * server.c (crc32): New function.
12598 (handle_query): Add handling for 'qCRC:' request.
12599
12600 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12601
12602 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12603 lwp had been stopped by a watchpoint.
12604
12605 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12606
12607 * server.h (internal_error): Declare.
12608 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12609 * utils.c (internal_error): New function.
12610
12611 2010-03-15 Andreas Schwab <schwab@redhat.com>
12612
12613 * configure.srv: Fix typo setting srv_regobj.
12614
12615 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12616
12617 * linux-low.c (fetch_register): Avoid passing a non string literal
12618 format to `error'.
12619 (usr_store_inferior_registers): Ditto.
12620
12621 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12622
12623 * linux-low.c (linux_write_memory): Bail out early if peeking
12624 memory failed.
12625
12626 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12627
12628 * linux-low.h (struct lwp_info): New fields
12629 `stopped_by_watchpoint' and `stopped_data_address'.
12630 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12631 here, and cache them in the lwp object.
12632 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12633 directly.
12634 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12635 field.
12636 (linux_stopped_by_watchpoint): Rewrite.
12637 (linux_stopped_data_address): Rewrite.
12638
12639 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12640
12641 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12642 switching the current inferior, not before.
12643
12644 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12645
12646 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12647 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12648 i386-linux.c and amd64-linux.c.
12649 (reg-i386.o): Removed.
12650 (reg-i386.c): Likewise.
12651 (reg-i386-linux.o): Likewise.
12652 (reg-i386-linux.c): Likewise.
12653 (reg-x86-64.o): Likewise.
12654 (reg-x86-64.c): Likewise.
12655 (reg-x86-64-linux.o): Likewise.
12656 (reg-x86-64-linux.c): Likewise.
12657 (i386.o): New.
12658 (i386.c): Likewise.
12659 (i386-linux.o): Likewise.
12660 (i386-linux.c): Likewise.
12661 (amd64.o): Likewise.
12662 (amd64.c): Likewise.
12663 (amd64-linux.o): Likewise.
12664 (amd64-linux.c): Likewise.
12665
12666 * configure.srv (srv_i386_regobj): New.
12667 (srv_i386_linux_regobj): Likewise.
12668 (srv_amd64_regobj): Likewise.
12669 (srv_amd64_linux_regobj): Likewise.
12670 (srv_i386_32bit_xmlfiles): Likewise.
12671 (srv_i386_64bit_xmlfiles): Likewise.
12672 (srv_i386_xmlfiles): Likewise.
12673 (srv_amd64_xmlfiles): Likewise.
12674 (srv_i386_linux_xmlfiles): Likewise.
12675 (srv_amd64_linux_xmlfiles): Likewise.
12676 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12677 srv_xmlfiles to $srv_i386_xmlfiles.
12678 (i[34567]86-*-mingw32ce*): Likewise.
12679 (i[34567]86-*-mingw*): Likewise.
12680 (i[34567]86-*-nto*): Likewise.
12681 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12682 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12683 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12684 (x86_64-*-linux*): Likewise.
12685
12686 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12687 (init_registers_amd64_linux): New.
12688 (x86_arch_setup): Replace init_registers_x86_64_linux with
12689 init_registers_amd64_linux.
12690
12691 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12692
12693 * configure.ac: Check for libdl. If it is not available link against
12694 static libthread_db.
12695 * configure: Regenerate.
12696
12697 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12698
12699 PR9605
12700
12701 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12702 handing a read watchpoint.
12703 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12704
12705 2010-02-12 Doug Evans <dje@google.com>
12706
12707 * linux-low.c (linux_supports_tracefork_flag): Document.
12708 (linux_look_up_symbols): Add comment.
12709
12710 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12711
12712 * regcache.c (supply_register): Clear regcache if buf is NULL.
12713
12714 2010-02-02 Nicolas Roche <roche@sourceware.org>
12715 Joel Brobecker <brobecker@adacore.com>
12716
12717 * inferiors.c (find_inferior): Add function documentation.
12718 (unloaded_dll): Handle the case where the unloaded dll has not
12719 been previously registered in the dll list.
12720
12721 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12722
12723 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12724 (thumb2_breakpoint): New.
12725 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12726
12727 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12728
12729 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12730 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12731 breakpoints.
12732
12733 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12734
12735 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12736
12737 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12738
12739 * linux-s390-low.c (s390_collect_ptrace_register)
12740 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12741
12742 2010-01-21 Doug Evans <dje@google.com>
12743
12744 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12745 (PTRACE_ARG4_TYPE): New macro.
12746 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12747 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12748 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12749 (usr_store_inferior_registers): Ditto.
12750 (linux_read_memory, linux_write_memory): Ditto.
12751 (linux_test_for_tracefork): Ditto.
12752
12753 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12754 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12755
12756 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12757
12758 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12759 target.
12760
12761 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12762
12763 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12764 prototype to take a regcache. Adjust.
12765
12766 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12767
12768 * regcache.h (struct thread_info): Forward declare.
12769 (struct regcache): New.
12770 (new_register_cache): Adjust prototype.
12771 (get_thread_regcache): Declare.
12772 (free_register_cache): Adjust prototype.
12773 (registers_to_string, registers_from_string): Ditto.
12774 (supply_register, supply_register_by_name, collect_register)
12775 (collect_register_as_string, collect_register_by_name): Ditto.
12776 * regcache.c (struct inferior_regcache_data): Delete.
12777 (get_regcache): Rename to ...
12778 (get_thread_regcache): ... this. Adjust. Switch inferior before
12779 fetching registers.
12780 (regcache_invalidate_one): Adjust.
12781 (regcache_invalidate): Fix prototype.
12782 (new_register_cache): Return the new register cache.
12783 (free_register_cache): Change prototype.
12784 (realloc_register_cache): Adjust.
12785 (registers_to_string): Change prototype to take a regcache. Adjust.
12786 (registers_from_string): Ditto.
12787 (register_data): Ditto.
12788 (supply_register): Ditto.
12789 (supply_register_by_name): Ditto.
12790 (collect_register): Ditto.
12791 (collect_register_as_string): Ditto.
12792 (collect_register_by_name): Ditto.
12793 * server.c (process_serial_event): Adjust.
12794 * linux-low.h (regset_fill_func, regset_store_func): Change
12795 prototype.
12796 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12797 Change prototype.
12798 * linux-low.c (get_stop_pc): Adjust.
12799 (check_removed_breakpoint): Adjust.
12800 (linux_wait_for_event): Adjust.
12801 (linux_resume_one_lwp): Adjust.
12802 (fetch_register): Add regcache parameter. Adjust.
12803 (usr_store_inferior_registers): Ditto.
12804 (regsets_fetch_inferior_registers): Ditto.
12805 (regsets_store_inferior_registers): Ditto.
12806 (linux_fetch_registers, linux_store_registers): Ditto.
12807 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12808 regcache. Adjust.
12809 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12810 Ditto.
12811 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12812 prototype to take a regcache.
12813 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12814 * remote-utils.c (convert_ascii_to_int, outreg)
12815 (prepare_resume_reply): Change prototype to take a regcache.
12816 Adjust.
12817 * target.h (struct target_ops) <fetch_registers, store_registers>:
12818 Change prototype to take a regcache.
12819 (fetch_inferior_registers, store_inferior_registers): Change
12820 prototype to take a regcache. Adjust.
12821 * proc-service.c (ps_lgetregs): Adjust.
12822 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12823 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12824 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12825 take a regcache. Adjust.
12826 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12827 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12828 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12829 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12830 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12831 (cris_cannot_fetch_register):
12832 (cris_breakpoint_at): Change prototype to take a regcache.
12833 Adjust.
12834 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12835 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12836 to take a regcache. Adjust.
12837 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12838 Adjust.
12839 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12840 take a regcache. Adjust.
12841 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12842 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12843 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12844 * linux-mips-low.c (mips_get_pc):
12845 (mips_set_pc): Change prototype to take a regcache. Adjust.
12846 (mips_reinsert_addr): Adjust.
12847 (mips_collect_register): Change prototype to take a regcache.
12848 Adjust.
12849 (mips_supply_register):
12850 (mips_collect_register_32bit, mips_supply_register_32bit)
12851 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12852 (mips_store_fpregset): Ditto.
12853 * linux-ppc-low.c (ppc_supply_ptrace_register)
12854 (ppc_supply_ptrace_register): Ditto.
12855 (parse_spufs_run): Adjust.
12856 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12857 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12858 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12859 take a regcache. Adjust.
12860 * linux-s390-low.c (s390_collect_ptrace_register)
12861 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12862 (s390_set_pc): Change prototype to take a regcache. Adjust.
12863 (s390_arch_setup): Adjust.
12864 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12865 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12866 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12867 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12868 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12869 regcache. Adjust.
12870 (sparc_breakpoint_at): Adjust.
12871 * linux-xtensa-low.c (xtensa_fill_gregset):
12872 (xtensa_store_gregset):
12873 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12874 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12875 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12876 prototype to take a regcache. Adjust.
12877 * win32-arm-low.c (arm_fetch_inferior_register)
12878 (arm_store_inferior_register): Change prototype to take a
12879 regcache. Adjust.
12880 * win32-i386-low.c (i386_fetch_inferior_register)
12881 (i386_store_inferior_register): Change prototype to take a
12882 regcache. Adjust.
12883 * win32-low.c (child_fetch_inferior_registers)
12884 (child_store_inferior_registers): Change prototype to take a
12885 regcache. Adjust.
12886 (win32_wait): Adjust.
12887 (win32_fetch_inferior_registers): Change prototype to take a
12888 regcache. Adjust.
12889 (win32_store_inferior_registers): Adjust.
12890 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12891 store_inferior_register>: Change prototype to take a regcache.
12892
12893 2010-01-20 Doug Evans <dje@google.com>
12894
12895 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12896 #ifdef.
12897 (linux_wait_for_event1, linux_init_signals): Ditto.
12898 (W_STOPCODE): Provide definition if missing.
12899
12900 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12901
12902 * linux-low.c (linux_core_of_thread): New.
12903 (compare_ints, show_process, list_threads): New.
12904 (linux_qxfer_osdata): Report threads and cores.
12905 (linux_target_op): Register linux_core_of_thread.
12906 * remote-utils.c (prepare_resume_reply): Report the core.
12907 (buffer_xml_printf): Support %d specifier.
12908 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12909 New.
12910 (handle_query): Handle qXfer:threads. Announce availability
12911 thereof.
12912 * target.h (struct target_ops): New field core_of_thread.
12913
12914 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12915
12916 * Makefile.in (clean): Remove new generated files.
12917 (reg-s390.o, reg-s390.c): Remove rules.
12918 (reg-s390x.o, reg-s390x.c): Likewise.
12919 (s390-linux32.o, s390-linux32.c): Add rules.
12920 (s390-linux64.o, s390-linux64.c): Likewise.
12921 (s390x-linux64.o, s390x-linux64.c): Likewise.
12922 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12923 * linux-s390-low.c: Include <elf.h>.
12924 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12925 (init_registers_s390): Remove prototype.
12926 (init_registers_s390x): Likewise.
12927 (init_registers_s390_linux32): Add prototype.
12928 (init_registers_s390_linux64): Likewise.
12929 (init_registers_s390x_linux64): Likewise.
12930 (s390_num_regs_3264): New define.
12931 (s390_regmap_3264): New global variable.
12932 (s390_cannot_fetch_register): Remove obsolete check.
12933 (s390_cannot_store_register): Likewise.
12934 (s390_collect_ptrace_register): Handle upper/lower register halves.
12935 (s390_supply_ptrace_register): Likewise.
12936 (s390_fill_gregset): Update to register number changes.
12937 (s390_get_hwcap): New routine.
12938 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12939 Install appropriate regmap and register set.
12940
12941 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12942
12943 * server.c (gdbserver_version): Update copyright year to 2010.
12944 * gdbreplay.c (gdbreplay_version): Likewise.
12945
12946 2009-12-28 Doug Evans <dje@google.com>
12947
12948 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12949 elf/external.h. Include <elf.h> instead but only if necessary.
12950
12951 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12952
12953 * linux-low.c (linux_remove_process): Remove `detaching'
12954 parameter. Don't release/detach from thread_db here.
12955 (linux_kill): Release/detach from thread_db here, ...
12956 (linux_detach): ... and here, before actually detaching.
12957 (linux_wait_1): ... and here, when a process exits.
12958 * thread-db.c (any_thread_of): New.
12959 (thread_db_free): Switch the current inferior to a thread of the
12960 passed in process.
12961
12962 2009-12-21 Doug Evans <dje@google.com>
12963
12964 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12965
12966 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12967 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12968 warning ifndef __NR_tkill. Move setting of errno there too.
12969 Delete unnecessary resetting of errno after syscall.
12970 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12971
12972 * configure.ac: Check for dladdr.
12973 * config.in: Regenerate.
12974 * configure: Regenerate.
12975 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12976 (try_thread_db_load): Update.
12977
12978 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12979
12980 2009-12-18 Doug Evans <dje@google.com>
12981
12982 * event-loop.c: Include unistd.h if it exists.
12983
12984 * linux-low.c (my_waitpid): Move definition away from being in
12985 between linux_tracefork_child/linux_test_for_tracefork.
12986
12987 * gdb_proc_service.h (psaddr_t): Fix type.
12988 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12989 signature to match glibc.
12990
12991 2009-12-16 Doug Evans <dje@google.com>
12992
12993 * linux-low.c (linux_read_memory): Fix argument to read.
12994
12995 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12996
12997 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12998 events, don't leave current_inferior pointing at null.
12999
13000 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13001
13002 * win32-low.c (LOG): Delete.
13003 (OUTMSG): Output to stderr.
13004 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13005 on compile time LOG macro.
13006 (win32_wait): Fix debug output.
13007
13008 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13009
13010 * win32-low.c (win32_add_one_solib): If the dll name is
13011 "ntdll.dll", prepend the system directory to the dll path.
13012
13013 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13014
13015 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13016
13017 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13018 Vladimir Prus <vladimir@codesourcery.com>
13019
13020 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13021 * configure.ac: Check for __mcoldfire__ and set
13022 gdb_cv_m68k_is_coldfire.
13023 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13024 reg-cf.o and reg-m68k.o.
13025 * configure: Regenerated.
13026
13027 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13028
13029 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13030 Pass it to thread_db_free.
13031 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13032 proper `detaching' argument to linux_remove_process.
13033 * linux-low.h (thread_db_free): Add `detaching' parameter.
13034 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13035 to thread_db_free.
13036 (thread_db_free): Add `detaching' parameter. Only
13037 call td_ta_clear_event if detaching from process.
13038
13039 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13040
13041 * thread-db.c (thread_db_free): Fix typo.
13042
13043 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13044
13045 PR gdb/10838
13046 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13047
13048 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13049
13050 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13051 with an i686 compiler.
13052 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13053 needed.
13054 * configure: Rebuilt.
13055
13056 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13057
13058 PR gdb/10783
13059
13060 * server.c (handle_search_memory_1): Correct read_addr initialization
13061 in loop for searching subsequent chunks.
13062
13063 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13064
13065 * configure.ac: New --with-libthread-db option.
13066 * thread-db.c: Allow direct dependence on libthread_db.
13067 (thread_db_free): Adjust.
13068 * config.in: Regenerate.
13069 * configure: Likewise.
13070
13071 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13072
13073 PR gdb/10757
13074 * thread-db.c (attach_thread): New function.
13075 (maybe_attach_thread): Return success/failure.
13076 (find_new_threads_callback): Adjust.
13077 (thread_db_find_new_threads): Loop until no new threads.
13078
13079 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13080
13081 * proc-service.c (ps_lgetregs): Formatting.
13082
13083 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13084
13085 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13086 * configure.ac: Adjust.
13087 * linux-low.h (struct process_info_private): Move members to struct
13088 thread_db.
13089 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13090 * linux-low.c (linux_remove_process): Adjust.
13091 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13092 * server.c (handle_query): Move code ...
13093 (handle_monitor_command): ... here. New function.
13094 * target.h (struct target_ops): New member.
13095 * thread-db.c (struct thread_db): New.
13096 (libthread_db_search_path): New variable.
13097 (thread_db_create_event, thread_db_enable_reporting)
13098 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13099 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13100 (try_thread_db_load_1, dladdr_to_soname): New functions.
13101 (try_thread_db_load, thread_db_load_search): New functions.
13102 (thread_db_init): Search for libthread_db.
13103 (thread_db_free): New function.
13104 (thread_db_handle_monitor_command): Likewise.
13105 * config.in: Regenerate.
13106 * configure: Regenerate.
13107
13108 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13109
13110 * spu-low.c (spu_kill): Wait for inferior to terminate.
13111 Call clear_inferiors.
13112 (spu_detach): Call clear_inferiors.
13113
13114 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13115
13116 * aclocal.m4: Regenerate.
13117 * config.in: Likewise.
13118 * configure: Likewise.
13119
13120 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13121
13122 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13123 (parse_spufs_run): New function.
13124 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13125 (ppc_breakpoint_at): Handle SPU breakpoints.
13126
13127 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13128
13129 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13130 (SPUFS_MAGIC): Define.
13131 (spu_enumerate_spu_ids): New function.
13132 (linux_qxfer_spu): New function.
13133 (linux_target_ops): Install linux_qxfer_spu.
13134
13135 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13136
13137 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13138 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13139 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13140 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13141 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13142 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13143 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13144 (init_registers_powerpc_cell32l): Add prototype.
13145 (init_registers_powerpc_cell64l): Likewise.
13146 (ppc_arch_setup): Detect Cell/B.E. architecture.
13147
13148 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13149
13150 * Makefile.in (datarootdir): New variable.
13151
13152 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13153
13154 * linux-low.c (linux_write_memory): Update debugging output.
13155 * Makefile.in (clean): Add new descriptions.
13156 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13157 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13158 * configure.srv: Add new files for arm*-*-linux*.
13159 * linux-arm-low.c: Add new declarations.
13160 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13161 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13162 (HWCAP_VFPv3D16): New.
13163 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13164 instead of __IWMMXT__.
13165 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13166 (arm_arch_setup): New.
13167 (target_regsets): Remove #ifdef. Add VFP regset.
13168 (the_low_target): Use arm_arch_setup.
13169
13170 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13171
13172 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13173 the main thread again.
13174
13175 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13176
13177 Adding Neutrino gdbserver.
13178 * configure: Regenerated.
13179 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13180 * configure.srv (i[34567]86-*-nto*): New target.
13181 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13182 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13183 (nto_comctrl) [__QNX__]: New function.
13184 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13185
13186 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13187
13188 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13189 srv_tgtobj.
13190
13191 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13192 Pedro Alves <pedro@codesourcery.com>
13193
13194 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13195 don't support CONTEXT_EXTENDED_REGISTERS.
13196 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13197 (the_low_target): Install them.
13198 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13199 failing with ERROR_PIPE_NOT_CONNECTED.
13200
13201 2009-06-30 Doug Evans <dje@google.com>
13202 Pierre Muller <muller@ics.u-strasbg.fr>
13203
13204 Add h/w watchpoint support to x86-linux, win32-i386.
13205 * Makefile.in (SFILES): Add i386-low.c
13206 (i386_low_h): Define.
13207 (i386-low.o): Add dependencies.
13208 (linux-x86-low.o): Add i386-low.h dependency.
13209 (win32-i386-low.o): Ditto.
13210 * i386-low.c: New file.
13211 * i386-low.h: New file.
13212 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13213 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13214 * linux-low.c (linux_add_process): Initialize arch_private.
13215 (linux_remove_process): Free arch_private.
13216 (add_lwp): Initialize arch_private.
13217 (delete_lwp): Free arch_private.
13218 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13219 provided.
13220 * linux-low.h (process_info_private): New member arch_private.
13221 (lwp_info): New member arch_private.
13222 (linux_target_ops): New members new_process, new_thread,
13223 prepare_to_resume.
13224 (ptid_of): New macro.
13225 * linux-x86-low.c: Include stddef.h, i386-low.h.
13226 (arch_process_info): New struct.
13227 (arch_lwp_info): New struct.
13228 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13229 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13230 (i386_dr_low_get_status): New function.
13231 (x86_insert_point, x86_remove_point): New functions.
13232 (x86_stopped_by_watchpoint): New function.
13233 (x86_stopped_data_address): New function.
13234 (x86_linux_new_process, x86_linux_new_thread): New functions.
13235 (x86_linux_prepare_to_resume): New function.
13236 (the_low_target): Add entries for insert_point, remove_point,
13237 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13238 prepare_to_resume.
13239 * server.c (debug_hw_points): New global.
13240 (monitor_show_help): Document set debug-hw-points.
13241 (handle_query): Process "set debug-hw-points".
13242 * server.h (debug_hw_points): Declare.
13243 (paddress): Declare.
13244 * utils.c (NUMCELLS, CELLSIZE): New macros.
13245 (get_sell, xsnprintf, paddress): New functions.
13246 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13247 remove_point, stopped_by_watchpoint, stopped_data_address.
13248 * win32-i386-low.c: Include i386-low.h.
13249 (debug_reg_state): Replaces dr.
13250 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13251 (i386_dr_low_get_status): New function.
13252 (i386_insert_point, i386_remove_point): New functions.
13253 (i386_stopped_by_watchpoint): New function.
13254 (i386_stopped_data_address): New function.
13255 (i386_initial_stuff): Update.
13256 (get_thread_context,set_thread_context,i386_thread_added): Update.
13257 (the_low_target): Add entries for insert_point,
13258 remove_point, stopped_by_watchpoint, stopped_data_address.
13259 * win32-low.c (win32_insert_watchpoint): New function.
13260 (win32_remove_watchpoint): New function.
13261 (win32_stopped_by_watchpoint): New function.
13262 (win32_stopped_data_address): New function.
13263 (win32_target_ops): Add entries for insert_watchpoint,
13264 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13265 * win32-low.h (win32_target_ops): New members insert_point,
13266 remove_point, stopped_by_watchpoint, stopped_data_address.
13267
13268 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13269
13270 * server.c (process_serial_event): Re-return unsupported, not
13271 error, if the type isn't recognized. Re-allow supporting only
13272 insert or remove packets. Also call require_running for
13273 breakpoints. Add missing break statement to default case. Tidy.
13274 * target.h (struct target_ops): Rename insert_watchpoint to
13275 insert_point, and remove_watchpoint to remove_point.
13276
13277 * linux-low.h (struct linux_target_ops): Likewise.
13278 * linux-low.c (linux_insert_watchpoint): Rename to ...
13279 (linux_insert_point): ... this. Adjust.
13280 (linux_remove_watchpoint): Rename to ...
13281 (linux_remove_point): ... this. Adjust.
13282 (linux_target_ops): Adjust.
13283 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13284 (cris_insert_point): ... this.
13285 (cris_remove_watchpoint): Rename to ...
13286 (cris_remove_point): ... this.
13287 (the_low_target): Adjust.
13288
13289 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13290
13291 * server.c (handle_v_kill): Pass signal_pid to
13292 kill_inferior if multi_process is zero.
13293
13294 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13295
13296 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13297 * target.h (target_ops): Comment for *_watchpoint to make it clear
13298 the functions can get types '0' and '1'.
13299
13300 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13301
13302 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13303 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13304 * regcache.c (get_regcache): Likewise.
13305 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13306 * win32-low.c (child_fetch_inferior_registers): Remove check for
13307 regno 0.
13308
13309 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13310 Pedro Alves <pedro@codesourcery.com>
13311
13312 * target.h (struct target_ops) <supports_multi_process>: New
13313 callback.
13314 (target_supports_multi_process): New.
13315 * server.c (handle_query): Even if GDB reports support, only
13316 enable multi-process if the target also supports it. Report
13317 multi-process support only if the target backend supports it.
13318 * linux-low.c (linux_supports_multi_process): New function.
13319 (linux_target_ops): Install it as target_supports_multi_process
13320 callback.
13321
13322 2009-05-24 Doug Evans <dje@google.com>
13323
13324 Global renaming of find_thread_pid to find_thread_ptid.
13325 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13326 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13327 All callers updated.
13328
13329 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13330 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13331 directly.
13332
13333 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13334 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13335 (linux_resume_one_lwp): Ditto.
13336
13337 2009-05-23 Doug Evans <dje@google.com>
13338
13339 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13340 from struct inferior_list_entry * to struct lwp_info *.
13341 All callers updated.
13342
13343 2009-05-13 Doug Evans <dje@google.com>
13344
13345 * linux-x86-low.c: Don't include assert.h.
13346 (x86_siginfo_fixup): Use fatal, not assert.
13347 (x86_arch_setup): Fix comment.
13348
13349 2009-05-12 Doug Evans <dje@google.com>
13350
13351 Biarch support for i386/amd64 gdbserver.
13352 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13353 Add linux-x86-low.c.
13354 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13355 (linux-x86-low.o): Add.
13356 * linux-x86-64-low.c: Delete.
13357 * linux-i386-low.c: Delete.
13358 * linux-x86-low.c: New file.
13359 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13360 linux-x86-low.o.
13361 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13362 linux-x86-low.o.
13363 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13364 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13365 (linux_child_pid_to_exec_file): New function.
13366 (elf_64_header_p, elf_64_file_p): New functions.
13367 (siginfo_fixup): New function.
13368 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13369 give target a chance to convert layout.
13370 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13371 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13372
13373 2009-05-07 Doug Evans <dje@google.com>
13374
13375 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13376 (regsets_store_inferior_registers): Ditto.
13377
13378 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13379
13380 PR server/10048
13381
13382 * linux-low.c (must_set_ptrace_flags): Delete.
13383 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13384 of the global.
13385 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13386 `lwp->must_set_ptrace_flags' instead.
13387 (linux_wait_for_event_1): Set ptrace options here.
13388 (linux_wait_1): ... not here.
13389
13390 2009-04-30 Doug Evans <dje@google.com>
13391
13392 * inferiors.c (started_inferior_callback): New function.
13393 (attached_inferior_callback): New function.
13394 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13395 * server.c (print_started_pid, print_attached_pid): New functions.
13396 (detach_or_kill_for_exit): New function.
13397 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13398 * server.h (have_started_inferiors_p): Declare.
13399 (have_attached_inferiors_p): Declare.
13400
13401 * inferiors.c (remove_process): Fix memory leak, free process.
13402 * linux-low.c (linux_remove_process): New function.
13403 (linux_kill): Call it instead of remove_process.
13404 (linux_detach, linux_wait_1): Ditto.
13405
13406 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13407
13408 * configure.srv: Add x86 Windows CE target.
13409
13410 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13411
13412 * inferiors.c (get_thread_process): Make global.
13413 * server.h (get_thread_process): Add prototype.
13414 * thread-db.c (find_one_thread): Use get_thread_process
13415 instead of current_process.
13416 (thread_db_get_tls_address): Do not crash if called when
13417 thread layer is not yet initialized.
13418
13419 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13420
13421 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13422 * spu-low.c (current_tid): Rename to ...
13423 (current_ptid): ... this.
13424 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13425 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13426 ptid_get_lwp (current_ptid) instead of current_tid.
13427 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13428 instead of current_tid. Use find_process_pid to verify pid
13429 argument is valid. Pass proper argument to remove_process.
13430 (spu_thread_alive): Compare current_ptid instead of current_tid.
13431 (spu_resume): Likewise.
13432
13433 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13434
13435 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13436 variable.
13437
13438 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13439
13440 Implement the multiprocess extensions, and add linux multiprocess
13441 support.
13442
13443 * server.h (ULONGEST): Declare.
13444 (struct ptid, ptid_t): New.
13445 (minus_one_ptid, null_ptid): Declare.
13446 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13447 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13448 (struct inferior_list_entry): Change `id' type from unsigned from
13449 to ptid_t.
13450 (struct sym_cache, struct breakpoint, struct
13451 process_info_private): Forward declare.
13452 (struct process_info): Declare.
13453 (current_process): Declare.
13454 (all_processes): Declare.
13455 (initialize_inferiors): Declare.
13456 (add_thread): Adjust to use ptid_t.
13457 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13458 (add_process, remove_process, find_thread_pid): Declare.
13459 (find_inferior_id): Adjust to use ptid_t.
13460 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13461 (multi_process): Declare.
13462 (push_event): Adjust to use ptid_t.
13463 (read_ptid, write_ptid): Declare.
13464 (prepare_resume_reply): Adjust to use ptid_t.
13465 (clear_symbol_cache): Declare.
13466 * inferiors.c (all_processes): New.
13467 (null_ptid, minus_one_ptid): New.
13468 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13469 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13470 (add_thread): Change unsigned long to ptid. Remove gdb_id
13471 parameter. Adjust.
13472 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13473 (gdb_id_to_thread): Rename to ...
13474 (find_thread_pid): ... this. Change unsigned long to ptid.
13475 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13476 (loaded_dll, pull_pid_from_list): Adjust.
13477 (add_process, remove_process, find_process_pid)
13478 (get_thread_process, current_process, initialize_inferiors): New.
13479 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13480 (struct target_waitstatus) <related_pid>: Ditto.
13481 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13482 return type to int.
13483 (struct target_ops) <join>: Add `pid' argument.
13484 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13485 (struct target_ops) <wait>: Add `ptid' field. Change return type
13486 to ptid.
13487 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13488 (mywait): Add `ptid' argument. Change return type to ptid_t.
13489 (target_pid_to_str): Declare.
13490 * target.c (set_desired_inferior): Adjust to use ptids.
13491 (mywait): Add new `ptid' argument. Adjust.
13492 (target_pid_to_str): New.
13493 * mem-break.h (free_all_breakpoints): Declare.
13494 * mem-break.c (breakpoints): Delelete.
13495 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13496 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13497 to use per-process breakpoint list.
13498 (free_all_breakpoints): New.
13499 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13500 (symbol_cache, all_symbols_looked_up): Delete.
13501 (hexchars): New.
13502 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13503 read_ptid): New.
13504 (prepare_resume_reply): Change ptid argument's type from unsigned
13505 long to ptid_t. Adjust. Implement W;process and X;process.
13506 (free_sym_cache, clear_symbol_cache): New.
13507 (look_up_one_symbol): Adjust to per-process symbol cache. *
13508 * server.c (cont_thread, general_thread, step_thread): Change type
13509 to ptid_t.
13510 (attached): Delete.
13511 (multi_process): New.
13512 (last_ptid): Change type to ptid_t.
13513 (struct vstop_notif) <ptid>: Change type to ptid_t.
13514 (queue_stop_reply, push_event): Change `ptid' argument's type to
13515 ptid_t.
13516 (discard_queued_stop_replies): Add `pid' argument.
13517 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13518 changes. Don't reference the `attached' global.
13519 (attach_inferior): Adjust to mywait interface changes.
13520 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13521 features. Handle and report "multiprocess+". Handle
13522 "qAttached:PID".
13523 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13524 changes.
13525 (handle_v_kill): New.
13526 (handle_v_stopped): Adjust to use target_pid_to_str.
13527 (handle_v_requests): Allow multiple attaches and runs when
13528 multiprocess extensions are in effect. Handle "vKill".
13529 (myresume): Adjust to use ptids.
13530 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13531 (handle_status): Adjust to discard_queued_stop_replies interface
13532 change.
13533 (first_thread_of, kill_inferior_callback)
13534 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13535 (main): Call initialize_inferiors. Adjust to use ptids, killing
13536 and detaching from all inferiors. Handle multiprocess packet
13537 variants.
13538 * linux-low.h: Include gdb_proc_service.h.
13539 (struct process_info_private): New.
13540 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13541 <lwpid_of>: Use ptid_get_lwp.
13542 (get_lwp_thread): Adjust.
13543 (struct lwp_info): Add `dead' member.
13544 (find_lwp_pid): Declare.
13545 * linux-low.c (thread_db_active): Delete.
13546 (new_inferior): Adjust comment.
13547 (inferior_pid): Delete.
13548 (linux_add_process): New.
13549 (handle_extended_wait): Adjust.
13550 (add_lwp): Change unsigned long to ptid.
13551 (linux_create_inferior): Add process to processes table. Adjust
13552 to use ptids. Don't set new_inferior here.
13553 (linux_attach_lwp): Rename to ...
13554 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13555 it. Adjust to use ptids.
13556 (linux_attach_lwp): New.
13557 (linux_attach): Add process to processes table. Don't set
13558 new_inferior here.
13559 (struct counter): New.
13560 (second_thread_of_pid_p, last_thread_of_process_p): New.
13561 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13562 multiple processes.
13563 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13564 processes. Remove process from process table.
13565 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13566 to multiple processes.
13567 (any_thread_of): New.
13568 (linux_detach): Add `pid' argument, and handle it. Remove process
13569 from processes table.
13570 (linux_join): Add `pid' argument. Handle it.
13571 (linux_thread_alive): Change unsighed long argument to ptid_t.
13572 Consider dead lwps as not being alive.
13573 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13574 threads we're not interested in.
13575 (same_lwp, find_lwp_pid): New.
13576 (linux_wait_for_lwp): Change `pid' argument's type from int to
13577 ptid_t. Adjust.
13578 (linux_wait_for_event): Rename to ...
13579 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13580 from int to ptid_t. Adjust.
13581 (linux_wait_for_event): New.
13582 (linux_wait_1): Add `ptid' argument. Change return type to
13583 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13584 that exit from the process table.
13585 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13586 Adjust.
13587 (mark_lwp_dead): New.
13588 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13589 stopping all threads, mark its main lwp as dead.
13590 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13591 ptids.
13592 (fetch_register, usr_store_inferior_registers)
13593 (regsets_fetch_inferior_registers)
13594 (regsets_store_inferior_registers, linux_read_memory)
13595 (linux_write_memory): Inline `inferior_pid'.
13596 (linux_look_up_symbols): Adjust to use per-process
13597 `thread_db_active'.
13598 (linux_request_interrupt): Adjust to use ptids.
13599 (linux_read_auxv): Inline `inferior_pid'.
13600 (initialize_low): Don't reference thread_db_active.
13601 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13602 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13603 (ps_getpid): Return the pid of the current inferior.
13604 * thread-db.c (proc_handle, thread_agent): Delete.
13605 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13606 per-process data.
13607 (find_one_thread): Change argument type to ptid_t. Adjust to
13608 per-process data.
13609 (maybe_attach_thread): Adjust to per-process data and ptids.
13610 (thread_db_find_new_threads): Ditto.
13611 (thread_db_init): Ditto.
13612 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13613 processes table. Adjust to use ptids.
13614 (spu_kill, spu_detach): Adjust interface. Remove process from
13615 processes table.
13616 (spu_join, spu_thread_alive): Adjust interface.
13617 (spu_wait): Adjust interface. Remove process from processes
13618 table. Adjust to use ptids.
13619 * win32-low.c (current_inferior_tid): Delete.
13620 (current_inferior_ptid): New.
13621 (debug_event_ptid): New.
13622 (thread_rec): Take a ptid. Adjust.
13623 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13624 (child_delete_thread): Ditto.
13625 (do_initial_child_stuff): Add `attached' argument. Add process to
13626 processes table.
13627 (child_fetch_inferior_registers, child_store_inferior_registers):
13628 Adjust.
13629 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13630 (win32_attach): Pass 1 to do_initial_child_stuff.
13631 (win32_kill): Adjust interface. Remove process from processes
13632 table.
13633 (win32_detach): Ditto.
13634 (win32_join): Adjust interface.
13635 (win32_thread_alive): Take a ptid.
13636 (win32_resume): Adjust to use ptids.
13637 (get_child_debug_event): Ditto.
13638 (win32_wait): Adjust interface. Remove exiting process from
13639 processes table.
13640
13641 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13642
13643 Non-stop mode support.
13644
13645 * server.h (non_stop): Declare.
13646 (gdb_client_data, handler_func): Declare.
13647 (delete_file_handler, add_file_handler, start_event_loop):
13648 Declare.
13649 (handle_serial_event, handle_target_event, push_event)
13650 (putpkt_notif): Declare.
13651 * target.h (enum resume_kind): New.
13652 (struct thread_resume): Replace `step' field by `kind' field.
13653 (TARGET_WNOHANG): Define.
13654 (struct target_ops) <wait>: Add `options' argument.
13655 <supports_non_stop, async, start_non_stop>: New fields.
13656 (target_supports_non_stop, target_async): New.
13657 (start_non_stop): Declare.
13658 (mywait): Add `options' argument.
13659 * target.c (mywait): Add `options' argument. Print child exit
13660 notifications here.
13661 (start_non_stop): New.
13662 * server.c (non_stop, own_buf, mem_buf): New globals.
13663 (struct vstop_notif): New.
13664 (notif_queue): New global.
13665 (queue_stop_reply, push_event, discard_queued_stop_replies)
13666 (send_next_stop_reply): New.
13667 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13668 interface changes.
13669 (attach_inferior): In non-stop mode, don't wait for the target
13670 here.
13671 (handle_general_set): Handle QNonStop.
13672 (handle_query): When handling qC, return the current general
13673 thread, instead of the first thread of the list.
13674 (handle_query): If the backend supports non-stop mode, include
13675 QNonStop+ in the qSupported query response.
13676 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13677 and non-stop mode.
13678 (handle_v_attach, handle_v_run): Handle non-stop mode.
13679 (handle_v_stopped): New.
13680 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13681 (myresume): Adjust to use resume_kind. Handle non-stop.
13682 (queue_stop_reply_callback): New.
13683 (handle_status): Handle non-stop mode.
13684 (main): Clear non_stop flag on reconnection. Use the event-loop.
13685 Refactor serial protocol handling from here ...
13686 (process_serial_event): ... to this new function. When GDB
13687 selects any thread, select one here. In non-stop mode, wait until
13688 GDB acks all pending events before exiting.
13689 (handle_serial_event, handle_target_event): New.
13690 * remote-utils.c (remote_open): Install remote_desc in the event
13691 loop.
13692 (remote_close): Remove remote_desc from the event loop.
13693 (putpkt_binary): Rename to...
13694 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13695 (putpkt_binary): New as wrapper around putpkt_binary_1.
13696 (putpkt_notif): New.
13697 (prepare_resume_reply): In non-stop mode, don't change the
13698 general_thread.
13699 * event-loop.c: New.
13700 * Makefile.in (OBJ): Add event-loop.o.
13701 (event-loop.o): New rule.
13702
13703 * linux-low.h (pid_of): Moved here.
13704 (lwpid_of): New.
13705 (get_lwp_thread): Use lwpid_of.
13706 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13707 * linux-low.c (pid_of): Delete.
13708 (inferior_pid): Use lwpid_of.
13709 (linux_event_pipe): New.
13710 (target_is_async_p): New.
13711 (delete_lwp): New.
13712 (handle_extended_wait): Use lwpid_of.
13713 (add_lwp): Don't set lwpid field.
13714 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13715 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13716 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13717 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13718 first. Adjust to linux_wait_for_event interface changes. Use
13719 lwpid_of.
13720 (linux_detach): Don't delete the main lwp here.
13721 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13722 (status_pending_p): Don't consider explicitly suspended lwps.
13723 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13724 pointer. Add OPTIONS argument. Change return type to int. Use
13725 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13726 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13727 pointer. Add status pointer argument. Return a pid instead of a
13728 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13729 changes. In non-stop mode, don't switch to a random thread.
13730 (linux_wait): Rename to...
13731 (linux_wait_1): ... this. Add target_options argument, and handle
13732 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13733 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13734 clean exit and signal exit code. Don't stop all threads in
13735 non-stop mode. In all-stop mode, only stop all threads when
13736 reporting a stop to GDB. Handle explicit thread stop requests.
13737 (async_file_flush, async_file_mark): New.
13738 (linux_wait): New.
13739 (send_sigstop): Use lwpid_of.
13740 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13741 interface changes. In non-stop mode, don't switch to a random
13742 thread.
13743 (linux_resume_one_lwp): Use lwpid_of.
13744 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13745 (linux_resume_one_thread): ... this. Handle resume_stop. In
13746 non-stop mode, don't look for pending flag in all threads.
13747 (resume_status_pending_p): Don't consider explicitly suspended
13748 threads.
13749 (my_waitpid): Reimplement. Emulate __WALL.
13750 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13751 Use lwpid_of.
13752 (sigchld_handler, linux_supports_non_stop, linux_async)
13753 (linux_start_non_stop): New.
13754 (linux_target_ops): Register linux_supports_non_stop, linux_async
13755 and linux_start_non_stop.
13756 (initialize_low): Install SIGCHLD handler.
13757 * thread-db.c (thread_db_create_event, find_one_thread)
13758 (thread_db_get_tls_address): Use lwpid_of.
13759 * win32-low.c (win32_detach): Adjust to use resume_kind.
13760 (win32_wait): Add `options' argument.
13761 * spu-low.c (spu_resume): Adjust to use resume_kind.
13762 (spu_wait): Add `options' argument.
13763
13764 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13765
13766 Decouple target code from remote protocol.
13767
13768 * target.h (enum target_waitkind): New.
13769 (struct target_waitstatus): New.
13770 (struct target_ops) <wait>: Return an unsigned long. Take a
13771 target_waitstatus pointer instead of a char pointer.
13772 (mywait): Likewise.
13773 * target.c (mywait): Change prototype to return an unsigned long.
13774 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13775 * server.h (thread_from_wait, old_thread_from_wait): Delete
13776 declarations.
13777 (prepare_resume_reply): Change prototype to take a
13778 target_waitstatus.
13779 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13780 (last_status, last_ptid): New.
13781 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13782 pid instead of a signal.
13783 (attach_inferior): Remove "status" and "signal" parameters.
13784 Adjust.
13785 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13786 not as an address.
13787 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13788 (handle_v_requests, myresume): Remove "status" and "signal"
13789 parameters. Adjust.
13790 (handle_status): New.
13791 (main): Delete local `status'. Adjust.
13792 * remote-utils.c: Include target.h.
13793 (prepare_resume_reply): Change prototype to take a
13794 target_waitstatus. Adjust.
13795
13796 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13797 interface.
13798 * spu-low.c (spu_wait): Adjust.
13799 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13800 Delete.
13801 (win32_wait): Adjust.
13802
13803 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13804
13805 * target.h (struct thread_resume): Delete leave_stopped member.
13806 (struct target_ops): Add a `n' argument to the `resume' callback.
13807 * server.c (start_inferior): Adjust.
13808 (handle_v_cont, myresume): Adjust.
13809 * linux-low.c (check_removed_breakpoint): Adjust to resume
13810 interface change, and to removed leave_stopped field.
13811 (resume_ptr): Delete.
13812 (struct thread_resume_array): New.
13813 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13814 resume interface change.
13815 (linux_continue_one_thread, linux_queue_one_thread)
13816 (resume_status_pending_p): Check if the resume field is NULL
13817 instead of checking the leave_stopped member.
13818 (linux_resume): Adjust to the target resume interface change.
13819 * spu-low.c (spu_resume): Adjust to the target resume interface
13820 change.
13821 * win32-low.c (win32_detach, win32_resume): Ditto.
13822
13823 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13824
13825 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13826 flag.
13827 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13828 pending.
13829 (linux_continue_one_thread): Only preserve the stepping flag if
13830 there's a pending breakpoint.
13831
13832 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13833
13834 * server.c (main): After the inferior having exited, call
13835 remote_close before exiting gdbserver.
13836
13837 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13838
13839 Fix size of FPSCR in Power 7 processors.
13840 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13841 (PPC_FEATURE_HAS_DFP): New #define.
13842 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13843 size of the FPSCR.
13844
13845 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13846
13847 * server.c (handle_query) Whitespace and formatting.
13848
13849 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13850
13851 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13852 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13853 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13854 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13855 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13856 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13857 Makefile.in, configure.ac: Fix whitespace throughout.
13858 * configure: Regenerate.
13859
13860 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13861
13862 * inferiors.c (find_inferior): Make it safe for the callback
13863 function to delete the currently iterated inferior.
13864
13865 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13866
13867 * Makefile.in (linuw_low_h): Move higher.
13868 (thread-db.o): Depend on $(linux_low_h).
13869
13870 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13871
13872 Rename "process" to "lwp" throughout.
13873
13874 * linux-low.c (all_processes): Rename to...
13875 (all_lwps): ... this.
13876 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13877 (add_process): Rename to ...
13878 (add_lwp): ... this. Adjust.
13879 (linux_create_inferior): Adjust.
13880 (linux_attach_lwp): Adjust.
13881 (linux_attach): Adjust.
13882 (linux_kill_one_process): Rename to ...
13883 (linux_kill_one_lwp): ... this. Adjust.
13884 (linux_kill): Adjust.
13885 (linux_detach_one_process): Rename to ...
13886 (linux_detach_one_lwp): ... this. Adjust.
13887 (linux_detach): Adjust.
13888 (check_removed_breakpoint): Adjust.
13889 (status_pending_p): Adjust.
13890 (linux_wait_for_process): Rename to ...
13891 (linux_wait_for_lwp): ... this. Adjust.
13892 (linux_wait_for_event): Adjust.
13893 (send_sigstop): Adjust.
13894 (wait_for_sigstop): Adjust.
13895 (stop_all_processes): Rename to ...
13896 (stop_all_lwps): ... this.
13897 (linux_resume_one_process): Rename to ...
13898 (linux_resume_one_lwp): ... this. Adjust.
13899 (linux_set_resume_request, linux_continue_one_thread)
13900 (linux_queue_one_thread, resume_status_pending_p)
13901 (usr_store_inferior_registers, regsets_store_inferior_registers)
13902 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13903 Adjust.
13904 * linux-low.h (get_process): Rename to ...
13905 (get_lwp): ... this. Adjust.
13906 (get_thread_process): Rename to ...
13907 (get_thread_lwp): ... this. Adjust.
13908 (get_process_thread): Rename to ...
13909 (get_lwp_thread): ... this. Adjust.
13910 (struct process_info): Rename to ...
13911 (struct lwp_info): ... this.
13912 (all_processes): Rename to ...
13913 (all_lwps): ... this.
13914 * proc-service.c (ps_lgetregs): Adjust.
13915 * thread-db.c (thread_db_create_event, find_one_thread)
13916 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13917
13918 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13919
13920 * server.c (handle_query): Handle "qAttached".
13921
13922 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13923
13924 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13925 GPLv3, update license URL.
13926
13927 2009-03-01 Doug Evans <dje@google.com>
13928
13929 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13930 (server_h): Add gdb_signals.h.
13931 (signals.o): Update.
13932 * server.h (target_signal_from_host,target_signal_to_host_p)
13933 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13934
13935 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13936
13937 * remote-utils.c (getpkt): Also generate remote-debug
13938 information if noack_mode is set.
13939
13940 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13941
13942 * server.c (handle_query): Report qXfer:siginfo:read and
13943 qXfer:siginfo:write as supported and handle them.
13944 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13945 * linux-low.c (linux_xfer_siginfo): New.
13946 (linux_target_ops): Set it.
13947
13948 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13949
13950 * server.c (gdbserver_usage): Mention --remote-debug.
13951 (main): Accept '--remote-debug' switch.
13952
13953 2009-01-18 Doug Evans <dje@google.com>
13954
13955 * regcache.c (new_register_cache): No need to check result of xcalloc.
13956 * server.c (handle_search_memory): Back out calls to xmalloc,
13957 result is checked and error is returned to user upon failure.
13958 (handle_query): Ditto. Add more checks for result of malloc.
13959 (handle_v_cont): Check result of malloc, report error back to
13960 user upon failure.
13961 (handle_v_run): Ditto. Call freeargv.
13962 * server.h (freeargv): Declare.
13963 * utils.c (freeargv): New fn.
13964
13965 2009-01-15 Doug Evans <dje@google.com>
13966
13967 * gdbreplay.c (perror_with_name): Make arg const char *.
13968 * server.h (target_signal_to_name): Make return type const char *.
13969 * thread-db.c (thread_db_err_str): Make return type const char *.
13970 * utils.c (perror_with_name): Make arg const char *.
13971
13972 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13973
13974 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13975 when handling a EXIT_PROCESS_DEBUG_EVENT.
13976
13977 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13978
13979 * gdbreplay.c (gdbreplay_version): Update copyright year.
13980 * server.c (gdbserver_version): Likewise.
13981
13982 2009-01-05 Doug Evans <dje@google.com>
13983
13984 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13985 (handle_extended_wait): Improve comment.
13986
13987 2008-12-13 Doug Evans <dje@google.com>
13988
13989 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13990 * server.h (ATTR_MALLOC): New macro.
13991 (xmalloc,xcalloc,xstrdup): Declare.
13992 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13993 * inferiors.c: Ditto.
13994 * linux-low.c: Ditto.
13995 * mem-break.c: Ditto.
13996 * regcache.c: Ditto.
13997 * remote-utils.c: Ditto.
13998 * server.c: Ditto.
13999 * target.c: Ditto.
14000 * win32-low.c: Ditto.
14001
14002 2008-12-12 Doug Evans <dje@google.com>
14003
14004 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14005 in debugging printf.
14006
14007 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14008
14009 2008-12-09 Doug Evans <dje@google.com>
14010
14011 * linux-low.h (struct process_info): Delete member tid, unused.
14012 * thread-db.c (find_one_thread): Update.
14013 (maybe_attach_thread): Update.
14014
14015 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14016
14017 * target.h (struct target_ops): Add qxfer_osdata member.
14018 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14019 and dirent.h.
14020 (linux_qxfer_osdata): New functions.
14021 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14022 callback.
14023 * server.c (handle_query): Handle "qXfer:osdata:read:".
14024 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14025 (buffer_xml_printf): New functions.
14026 * server.h (struct buffer): New.
14027 (buffer_grow_str, buffer_grow_str0): New macros.
14028 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14029 (buffer_xml_printf): Declare.
14030
14031 2008-11-24 Doug Evans <dje@google.com>
14032
14033 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14034
14035 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14036
14037 * server.c (handle_v_run): Always use the supplied argument list.
14038
14039 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14040
14041 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14042 (xtensa_regmap_table): Add entry for scompare1.
14043
14044 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14045
14046 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14047 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14048 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14049 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14050 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14051 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14052 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14053 XML target descriptions.
14054 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14055 when inferior is running on an ISA 2.05 or later processor. Add
14056 special case to return offset for full 64-bit slot of FPSCR when
14057 in 32-bits.
14058
14059 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14060
14061 * Makefile.in (SFILES, clean): Added sparc64 files.
14062 (reg-sparc64.o, reg-sparc64.c): New.
14063 * configure.srv (sparc*-*-linux*): New configuration.
14064 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14065 syscall arguments for SPARC.
14066 (regsets_store_inferior_registers): Likewise.
14067 * linux-sparc-low.c: New file.
14068
14069 2008-10-21 Doug Evans <dje@google.com>
14070
14071 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14072 (READLINE_DIR,READLINE_DEP): Delete.
14073 (INTERNAL_CFLAGS): Update.
14074 (LINTFLAGS): Update.
14075
14076 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14077
14078 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14079 whole argv from the last run, not just argv[0].
14080
14081 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14082
14083 * regcache.c (new_register_cache): Return NULL if the register
14084 cache size isn't known yet.
14085 (free_register_cache): Avoid dereferencing a NULL regcache.
14086
14087 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14088
14089 * configure.srv: Merge MIPS and MIPS64.
14090
14091 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14092
14093 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14094
14095 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14096
14097 * Makefile.in: Add required vsx dependencies.
14098
14099 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14100 Declare init_registers_powerpc_vsx32l.
14101 Declare init_registers_powerpc_vsx64l.
14102 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14103 (ppc_arch_setup): Check for VSX in hwcap.
14104 (ppc_fill_vsxregset): New function.
14105 (ppc_store_vsxregset): New function.
14106 Add new VSX entry in regset_info target_regsets.
14107
14108 * configure.srv: Add new VSX dependencies.
14109
14110 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14111
14112 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14113 (remote_open): Set or clear transport_is_reliable.
14114 (putpkt_binary): Don't expect acks in noack mode.
14115 (getpkt): Don't send ack/nac in noack mode.
14116 * server.c (handle_general_set): Handle QStartNoAckMode.
14117 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14118 qSupported.
14119 (main): Reset noack_mode on every connection.
14120 * server.h (noack_mode): Declare.
14121
14122 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14123
14124 * Makefile.in (GDBREPLAY_OBS): New variable.
14125 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14126
14127 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14128 Daniel Jacobowitz <dan@codesourcery.com>
14129
14130 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14131 (usr_store_inferior_registers): Likewise.
14132 (regsets_store_inferior_registers): Likewise.
14133
14134 2008-07-31 Rolf Jansen <rj@surtec.com>
14135 Pedro Alves <pedro@codesourcery.com>
14136
14137 * configure.ac: Check for memmem declaration.
14138 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14139 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14140 (disable_packet_qfThreadInfo): Unconditionally compile.
14141 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14142 * configure, config.in: Regenerate.
14143
14144 2008-07-28 Doug Kwan <dougkwan@google.com>
14145
14146 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14147 (linux_write_memory): Remove declaration of errno.
14148
14149 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14150
14151 * linux-low.c (handle_extended_wait): Do not use "status"
14152 variable uninitialized.
14153
14154 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14155
14156 * server.c (handle_v_attach): Inhibit reporting dll changes.
14157
14158 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14159
14160 * remote-utils.c (prepare_resume_reply): If requested, don't
14161 output "thread:TID" in the T stop reply.
14162
14163 * server.c (disable_packet_vCont, disable_packet_Tthread)
14164 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14165 (handle_query): If requested, disable support for qC, qfThreadInfo
14166 and qsThreadInfo.
14167 (handle_v_requests): If requested, disable support for vCont.
14168 (gdbserver_show_disableable): New.
14169 (main): Handle --disable-packet and --disable-packet=LIST.
14170
14171 * server.h (disable_packet_vCont, disable_packet_Tthread)
14172 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14173
14174 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14175
14176 * server.c (gdbserver_usage): Mention --version.
14177
14178 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14179
14180 * Makefile.in (gdbreplay.o): New rule.
14181
14182 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14183
14184 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14185 message, not gdbserver.
14186
14187 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14188 Nathan Sidwell <nathan@codesourcery.com>
14189 Joseph Myers <joseph@codesourcery.com>
14190
14191 * acinclude.m4: Include ../../config/acx.m4.
14192 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14193 * configure, config.in: Regenerate.
14194 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14195 * server.c (gdbserver_version): Print PKGVERSION.
14196 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14197 (main): Adjust gdbserver_usage calls.
14198 * gdbreplay.c (version, host_name): Add declarations.
14199 (gdbreplay_version, gdbreplay_usage): New.
14200 (main): Accept --version and --help options.
14201
14202 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14203
14204 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14205 (arm_breakpoint_at): Handle Thumb.
14206 (the_low_target): Add comment.
14207
14208 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14209
14210 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14211
14212 2008-05-09 Doug Evans <dje@google.com>
14213
14214 * server.h (decode_search_memory_packet): Declare.
14215 * remote-utils.c (decode_search_memory_packet): New fn.
14216 * server.c (handle_search_memory_1): New fn.
14217 (handle_search_memory): New fn.
14218 (handle_query): Process qSearch:memory packets.
14219
14220 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14221
14222 * regcache.c (registers_length): Remove.
14223 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14224 full register packet.
14225 * regcache.h (registers_length): Remove prototype.
14226 * server.h (PBUFSIZ): Define to 16384.
14227
14228 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14229
14230 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14231 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14232 powerpc-64l.o, and powerpc-altivec64l.o.
14233 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14234 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14235 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14236 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14237 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14238 to srv_xmlfiles.
14239
14240 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14241 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14242 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14243 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14244 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14245 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14246 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14247 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14248 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14249 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14250 (clean): Update.
14251
14252 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14253 (init_registers_powerpc_32l): ... this new prototype.
14254 (init_registers_powerpc_32): Remove, replace by ...
14255 (init_registers_powerpc_altivec32l): ... this new prototype.
14256 (init_registers_powerpc_e500): Remove, replace by ...
14257 (init_registers_powerpc_e500l): ... this new prototype.
14258 (init_registers_ppc64): Remove, replace by ...
14259 (init_registers_powerpc_64l): ... this new prototype.
14260 (init_registers_powerpc_64): Remove, replace by ...
14261 (init_registers_powerpc_altivec64l): ... this new prototype.
14262 (ppc_num_regs): Set to 73.
14263 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14264 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14265 (ppc_cannot_store_register): Handle orig_r3 and trap.
14266 (ppc_arch_setup): Update init_registers_... calls.
14267 (ppc_fill_gregset): Handle orig_r3 and trap.
14268
14269 * inferiors.c (clear_inferiors): Reset current_inferior.
14270
14271 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14272
14273 * acinclude.m4: Add override.m4.
14274 * configure: Regenerate.
14275
14276 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14277
14278 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14279 initial call to init_register_ppc64.
14280
14281 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14282
14283 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14284 single powerpc*-*-linux* case.
14285 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14286
14287 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14288
14289 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14290 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14291 from reg_xmlfiles.
14292 * linux-ppc-low.c: Include <elf.h>.
14293 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14294 (ppc_hwcap): New global variable.
14295 (ppc_regmap): Remove __SPE__ #ifdef sections.
14296 (ppc_regmap_e500): New global variable.
14297 (ppc_cannot_store_register): Update __SPE__ special case.
14298 (ppc_get_hwcap): New function.
14299 (ppc_arch_setup): Use it to determine whether inferior supports
14300 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14301 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14302 Do not access registers if target does not support AltiVec.
14303 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14304 Do not access registers if target does not support SPE.
14305 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14306
14307 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14308
14309 * linux-low.c (disabled_regsets, num_regsets): New.
14310 (use_regsets_p): Delete.
14311 (linux_wait_for_process): Clear disabled_regsets.
14312 (regsets_fetch_inferior_registers): Check and set it.
14313 (regsets_store_inferior_registers): Likewise.
14314 (linux_fetch_registers, linux_store_registers): Do not use
14315 use_regsets_p.
14316 (initialize_low): Allocate disabled_regsets.
14317
14318 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14319
14320 * Makefile.in (LIBOBJS): New.
14321 (OBS): Use LIBOBJS.
14322 (memmem.o): New rule.
14323 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14324 * configure: Regenerated.
14325
14326 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14327
14328 * server.c (handle_query): Never return "unsupported" for
14329 qXfer:features:read queries.
14330
14331 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14332
14333 * server.c (get_features_xml): Fix inverted condition.
14334 (handle_query): Always support qXfer:feature:read.
14335
14336 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14337
14338 * server.c (wrapper_argv): New.
14339 (start_inferior): Handle wrapper_argv. If set, expect an extra
14340 trap.
14341 (gdbserver_usage): Document --wrapper.
14342 (main): Parse --wrapper.
14343
14344 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14345
14346 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14347 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14348 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14349 (ppc_set_pc): Likewise.
14350 (ppc_arch_setup): New function.
14351 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14352 of collect_register.
14353 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14354
14355 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14356
14357 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14358 instead of linux-ppc64-low.o.
14359 * linux-ppc64-low.c: Remove file.
14360 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14361 (linux-ppc64-low.o): Remove rule.
14362
14363 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14364 (init_registers_powerpc_64): Likewise.
14365 (ppc_regmap): Conditionally define depending on __powerpc64__.
14366 (ppc_cannot_store_register): Do not special-case "fpscr" when
14367 compiled on __powerpc64__.
14368 (ppc_collect_ptrace_register): New function.
14369 (ppc_supply_ptrace_register): New function.
14370 (ppc_breakpoint): Change type to "unsigned int".
14371 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14372 (the_low_target): Conditionally provide initializers for the
14373 arch_setup member depending on __powerpc64__. Install
14374 collect_ptrace_register and supply_ptrace_register members.
14375
14376 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14377
14378 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14379 * server.c (gdbserver_xmltarget): Define.
14380 (get_features_xml): Use it to replace "target.xml" and arch_string.
14381
14382 * configure.srv: Remove srv_xmltarget. Add XML files that were
14383 mentioned there to srv_xmlfiles instead. Remove conditional tests
14384 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14385 srv_xmlfiles and srv_regobj to include all possible choices.
14386 * configure.ac (srv_xmltarget): Remove.
14387 (srv_xmlfiles): Do not add "target.xml".
14388 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14389 checks for supplementary target information.
14390 * configure: Regenerate.
14391 * Makefile.in (XML_TARGET): Remove.
14392 (target.xml): Remove rule.
14393 (clean): Do not clean up target.xml.
14394 (.PRECIOUS): Do not mention target.xml.
14395
14396 * target.h (struct target_ops): Remove arch_string member.
14397 * linux-low.c (linux_arch_string): Remove.
14398 (linux_target_ops): Remove arch_string initializer.
14399 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14400 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14401 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14402 * spu-low.c (spu_arch_string): Remove.
14403 (spu_target_ops): Remove arch_string initializer.
14404 * win32-low.c (win32_arch_string): Remove.
14405 (win32_target_ops): Remove arch_string initializer.
14406 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14407 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14408 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14409
14410 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14411
14412 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14413 by collect_ptrace_register and supply_ptrace_register hooks.
14414 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14415 instead of checking for the_low_target.left_pad_xfer.
14416 (usr_store_inferior_registers): Use collect_ptrace_register callback
14417 instead of checking for the_low_target.left_pad_xfer.
14418
14419 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14420 (s390_supply_ptrace_register): Likewise.
14421 (s390_fill_gregset): Call s390_collect_ptrace_register.
14422 (the_low_target): Update.
14423
14424 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14425 (ppc_supply_ptrace_register): Likewise.
14426 (the_low_target): Update.
14427
14428 * linux-i386-low.c (the_low_target): Update.
14429 * linux-x86-64-low.c (the_low_target): Update.
14430
14431 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14432
14433 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14434 reg-s390.o and reg-s390x.o.
14435
14436 * linux-low.c (new_inferior): New global variable.
14437 (linux_create_inferior, linux_attach): Set it.
14438 (linux_wait_for_process): Call the_low_target.arch_setup after the
14439 target has stopped for the first time.
14440 (initialize_low): Do not call the_low_target.arch_setup.
14441
14442 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14443 (s390_set_pc): Likewise.
14444 (s390_arch_setup): New function.
14445 (the_low_target): Use s390_arch_setup as arch_setup routine.
14446
14447 * regcache.c (realloc_register_cache): New function.
14448 (set_register_cache): Call it for each existing regcache.
14449
14450 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14451
14452 * server.h (init_registers): Remove prototype.
14453
14454 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14455 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14456 instead of init_registers ().
14457 * linux-arm-low.c (init_registers_arm): Add prototype.
14458 (init_registers_arm_with_iwmmxt): Likewise.
14459 (the_low_target): Add initializer for arch_setup field.
14460 * linux-cris-low.c (init_registers_cris): Add prototype.
14461 (the_low_target): Add initializer for arch_setup field.
14462 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14463 (the_low_target): Add initializer for arch_setup field.
14464 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14465 (the_low_target): Add initializer for arch_setup field.
14466 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14467 (the_low_target): Add initializer for arch_setup field.
14468 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14469 (the_low_target): Add initializer for arch_setup field.
14470 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14471 (the_low_target): Add initializer for arch_setup field.
14472 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14473 (init_registers_mips64_linux): Likewise.
14474 (the_low_target): Add initializer for arch_setup field.
14475 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14476 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14477 (the_low_target): Add initializer for arch_setup field.
14478 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14479 (init_registers_powerpc_64): Likewise.
14480 (the_low_target): Add initializer for arch_setup field.
14481 * linux-s390-low.c (init_registers_s390): Add prototype.
14482 (init_registers_s390x): Likewise.
14483 (the_low_target): Add initializer for arch_setup field.
14484 * linux-sh-low.c (init_registers_sh): Add prototype.
14485 (the_low_target): Add initializer for arch_setup field.
14486 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14487 (the_low_target): Add initializer for arch_setup field.
14488 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14489 (the_low_target): Add initializer for arch_setup field.
14490
14491 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14492 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14493 instead of init_registers ().
14494 * win32-arm-low.c (init_registers_arm): Add prototype.
14495 (the_low_target): Add initializer for arch_setup field.
14496 * win32-i386-low.c (init_registers_i386): Add prototype.
14497 (the_low_target): Add initializer for arch_setup field.
14498
14499 * spu-low.c (init_registers_spu): Add prototype.
14500 (initialize_low): Call initialie_registers_spu () instead of
14501 initialize_registers ().
14502
14503 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14504
14505 * server.c (handle_v_requests): When handling the vRun and vAttach
14506 packets, if already debugging a process, don't kill it. Return an
14507 error instead.
14508
14509 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14510
14511 * server.c (handle_query): Correct length check.
14512
14513 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14514
14515 * win32-low.c (do_initial_child_stuff): Add process handle
14516 parameter. Set current_process_handle and current_process_id from the
14517 parameters. Clear globals.
14518 (win32_create_inferior): Don't set current_process_handle and
14519 current_process_id here. Instead pass them on the call to
14520 do_initial_child_stuff.
14521 (win32_attach): Likewise.
14522 (win32_clear_inferiors): New.
14523 (win32_kill): Don't close the current process handle or the
14524 current thread handle here. Instead call win32_clear_inferiors.
14525 (win32_detach): Don't open a new handle to the process. Call
14526 win32_clear_inferiors.
14527 (win32_join): Don't rely on current_process_handle; open a new
14528 handle using the process id.
14529 (win32_wait): Call win32_clear_inferiors when the inferior process
14530 has exited.
14531
14532 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14533
14534 * server.c (monitor_show_help): Add "exit".
14535
14536 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14537
14538 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14539 (clean): Add reg-xtensa.c.
14540 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14541 * configure.srv (xtensa*-*-linux*) New target.
14542 * linux-xtensa-low.c: New.
14543 * xtensa-xtregs.c: New.
14544
14545 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14546
14547 * hostio.c: Don't include errno.h.
14548 (errno_to_fileio_errno): Move to hostio-errno.
14549 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14550 error number outputting to the target->hostio_last_error callback.
14551 (hostio_packet_error): Use FILEIO_EINVAL directly.
14552 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14553 calls to hostio_error.
14554 * hostio-errno.c: New.
14555 * server.h (hostio_last_error_from_errno): Declare.
14556 * target.h (target_ops): Add hostio_last_error member.
14557 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14558 as hostio_last_error handler.
14559 * spu-low.c (spu_target_ops): Likewise.
14560 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14561 (wince_hostio_last_error): New functions.
14562 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14563 as hostio_last_error handler.
14564 (win32_target_ops) [!_WIN32_WCE]: Register
14565 hostio_last_error_from_errno as hostio_last_error handler.
14566 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14567 (hostio-errno.o): New rule.
14568 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14569 * configure.srv (srv_hostio_err_objs): New variable. Default to
14570 hostio-errno.o.
14571 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14572 * configure: Regenerate.
14573
14574 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14575
14576 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14577 (linux_kill, linux_detach): Clean up the process list.
14578 * remote-utils.c (remote_open): Improve port number parsing.
14579 (putpkt_binary, input_interrupt): Only send interrupts if the target
14580 is running.
14581 * server.c (extended_protocol): Make static.
14582 (attached): Define earlier.
14583 (exit_requested, response_needed, program_argv): New variables.
14584 (target_running): New.
14585 (start_inferior): Clear attached here.
14586 (attach_inferior): Set attached here.
14587 (require_running): Define.
14588 (handle_query): Use require_running and target_running. Implement
14589 "monitor exit".
14590 (handle_v_attach, handle_v_run): New.
14591 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14592 (gdbserver_usage): Update.
14593 (main): Redo argument parsing. Handle --debug and --multi. Handle
14594 --attach along with other options or after the port. Save
14595 program_argv. Support no initial program. Resynchronize
14596 communication with GDB after an error. Handle "monitor exit".
14597 Use require_running and target_running. Always allow the extended
14598 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14599 restart in extended mode.
14600 * README: Refer to the GDB manual. Update --attach usage.
14601
14602 2007-12-20 Andreas Schwab <schwab@suse.de>
14603
14604 * linux-low.c (STACK_SIZE): Define.
14605 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14606 (linux_test_for_tracefork): Likewise.
14607
14608 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14609
14610 * linux-low.c (linux_wait_for_event): Update messages. Do not
14611 reinsert auto-delete breakpoints.
14612 * mem-break.c (struct breakpoint): Change return type of handler to
14613 int.
14614 (set_breakpoint_at): Update handler type.
14615 (reinsert_breakpoint_handler): Return 1 instead of calling
14616 delete_breakpoint.
14617 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14618 setting a new one.
14619 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14620 * mem-break.h (set_breakpoint_at): Update handler type.
14621 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14622 * win32-low.c (auto_delete_breakpoint): New.
14623 (get_child_debug_event): Use it.
14624
14625 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14626
14627 * configure.ac: Check for pread and pwrite.
14628 * hostio.c (handle_pread): Fall back to lseek and read.
14629 (handle_pwrite): Fall back to lseek and write.
14630 * config.in, configure: Regenerated.
14631
14632 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14633
14634 * server.c (myresume): Add own_buf argument.
14635 (main): Update calls.
14636
14637 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14638
14639 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14640 * remote-utils.c (remote_open): Do not call disable_async_io.
14641 (block_async_io): Delete.
14642 (unblock_async_io): Make static.
14643 (initialize_async_io): New.
14644 * server.c (handle_v_cont): Handle async I/O here.
14645 (myresume): Likewise. Move other common resume tasks here...
14646 (main): ... from here. Call initialize_async_io. Disable async
14647 I/O before the main loop.
14648 * server.h (initialize_async_io): Declare.
14649 (block_async_io, unblock_async_io): Delete prototypes.
14650 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14651
14652 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14653
14654 * remote-utils.c (readchar): Allow binary data in received messages.
14655
14656 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14657
14658 * win32-low.c (attaching): New global.
14659 (win32_create_inferior): Clear the `attaching' global.
14660 (win32_attach): Set the `attaching' global.
14661 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14662 attaching. Only set a breakpoint at the entry point if not
14663 attaching.
14664
14665 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14666
14667 * server.c (main): Don't report dll events on the initial
14668 connection on attaches.
14669
14670 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14671
14672 * server.c (main): Relax numerical bases supported for the pid of
14673 the --attach command line argument.
14674
14675 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14676
14677 * win32-low.c (win32_attach): Call OpenProcess before
14678 DebugActiveProcess, not after. Add last error output to error
14679 call.
14680
14681 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14682
14683 * win32-low.c (win32_get_thread_context)
14684 (win32_set_thread_context): New functions.
14685 (thread_rec): Use win32_get_thread_context.
14686 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14687 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14688 field.
14689
14690 2007-12-03 Leo Zayas
14691 Pedro Alves <pedro_alves@portugalmail.pt>
14692
14693 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14694 global variables.
14695 (child_add_thread): Minor cleanup.
14696 (child_continue): Resume artificially suspended threads before
14697 calling ContinueDebugEvent.
14698 (suspend_one_thread): New.
14699 (fake_breakpoint_event): New.
14700 (get_child_debug_event): Change return type to int. Check here if
14701 gdb sent an interrupt request. If a soft interrupt was requested,
14702 fake a breakpoint event. Return 0 if there is no event to handle,
14703 and 1 otherwise.
14704 (win32_wait): Don't check here if gdb sent an interrupt request.
14705 Ensure there is a valid event to handle.
14706 (win32_request_interrupt): Add soft interruption method as last
14707 resort.
14708
14709 2007-12-03 Leo Zayas
14710 Pedro Alves <pedro_alves@portugalmail.pt>
14711
14712 * win32-low.h (win32_thread_info): Add descriptions to the
14713 structure members. Replace `suspend_count' counter by a
14714 `suspended' flag.
14715 * win32-low.c (thread_rec): Update condition of when to get the
14716 context from the inferior. Rely on ContextFlags being set if it
14717 has already been retrieved. Only suspend the inferior thread if
14718 we haven't already. Warn if that fails.
14719 (continue_one_thread): s/suspend_count/suspended/. Only call
14720 ResumeThread once. Warn if that fails.
14721
14722 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14723
14724 * win32-low.c (win32_wait): Don't read from the inferior when it
14725 has already exited.
14726
14727 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14728
14729 * Makefile.in (win32_low_h): New variable.
14730 (win32-low.o): Add dependency on $(win32_low_h).
14731 (win32-arm-low.o, win32-i386-low.o): New rules.
14732
14733 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14734
14735 * hostio.c: Correct copyright year.
14736
14737 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14738
14739 * Makefile.in (OBS): Add hostio.o.
14740 (hostio.o): New rule.
14741 * server.h (handle_vFile): Declare.
14742 * hostio.c: New file.
14743 * server.c (handle_v_requests): Take packet_len and new_packet_len
14744 for binary packets. Call handle_vFile.
14745 (main): Update call to handle_v_requests.
14746
14747 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14748
14749 * linux-low.c: Include <sched.h>.
14750
14751 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14752
14753 * linux-low.c (linux_tracefork_grandchild): New.
14754 (linux_tracefork_child): Use clone.
14755 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14756
14757 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14758
14759 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14760
14761 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14762
14763 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14764
14765 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14766
14767 * inferiors.c (change_inferior_id): Delete.
14768 (add_pid_to_list, pull_pid_from_list): New.
14769 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14770 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14771 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14772 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14773 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14774 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14775 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14776 (using_threads): Always set to 1.
14777 (handle_extended_wait): New.
14778 (add_process): Do not set TID.
14779 (linux_create_inferior): Set must_set_ptrace_flags.
14780 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14781 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14782 (linux_thread_alive): Rename TID argument to LWPID.
14783 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14784 (linux_wait_for_event): Do not use TID or check using_threads. Update
14785 call to dead_thread_notify. Call handle_extended_wait.
14786 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14787 (send_sigstop): Delete sigstop_sent.
14788 (wait_for_sigstop): Avoid TID.
14789 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14790 (linux_test_for_tracefork): New.
14791 (linux_lookup_signals): Use thread_db_active and
14792 linux_supports_tracefork_flag.
14793 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14794 * linux-low.h (get_process_thread): Avoid TID.
14795 (struct process_ifo): Move thread_known and tid to the end. Remove
14796 sigstop_sent.
14797 (linux_attach_lwp, thread_db_init): Update prototypes.
14798 * server.h (change_inferior_id): Delete prototype.
14799 (add_pid_to_list, pull_pid_from_list): New prototypes.
14800 * thread-db.c (thread_db_use_events): New.
14801 (find_first_thread): Rename to...
14802 (find_one_thread): ...this. Update callers and messages. Do not
14803 call fatal. Check thread_db_use_events. Do not call
14804 change_inferior_id or new_thread_notify.
14805 (maybe_attach_thread): Update. Do not call new_thread_notify.
14806 (thread_db_init): Set thread_db_use_events. Check use_events.
14807 * utils.c (fatal, warning): Correct message prefix.
14808
14809 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14810
14811 * Makefile.in (clean): Remove new files.
14812 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14813 (powerpc-64.o, powerpc-64.c): New rules.
14814 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14815 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14816 with SPE.
14817 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14818 SPE targets.
14819 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14820 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14821 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14822 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14823 (target_regsets): Add AltiVec and SPE register sets.
14824 * configure.ac: Check for AltiVec and SPE.
14825 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14826 (ppc_fill_vrregset, ppc_store_vrregset): New.
14827 (target_regsets): Add AltiVec register set.
14828 * configure: Regenerated.
14829
14830 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14831
14832 * linux-low.c (O_LARGEFILE): Define.
14833 (linux_read_memory): Use /proc/PID/mem.
14834 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14835 * configure, config.in: Regenerated.
14836
14837 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14838
14839 * linux-low.c (linux_wait_for_event): Do not pass signals while
14840 single-stepping.
14841
14842 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14843
14844 * win32-low.c (create_process): New.
14845 (win32_create_inferior): Use create_process instead of
14846 CreateProcess. If create_process failed retry appending an ".exe"
14847 suffix. Store the GetLastError result immediatelly after
14848 create_process calls and use it on the call to error.
14849
14850 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14851
14852 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14853
14854 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14855
14856 * configure.ac: Switch license to GPLv3.
14857
14858 2007-08-01 Michael Snyder <msnyder@access-company.com>
14859
14860 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14861
14862 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14863
14864 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14865 typedef.
14866 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14867 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14868 CloseToolhelp32Snapshot.
14869 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14870 CloseToolhelp32Snapshot.
14871
14872 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14873
14874 * server.c (main): Check for inferior exit before main loop.
14875
14876 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14877
14878 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14879 instead of on tmp_desc.
14880
14881 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14882 Daniel Jacobowitz <dan@codesourcery.com>
14883
14884 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14885 (add_thread): Minor cleanups.
14886 (clear_inferiors): Move lower in the file. Clear the DLL
14887 list.
14888 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14889 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14890 (xml_escape_text): New.
14891 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14892 for qSupported.
14893 (handle_v_cont): Report errors.
14894 (gdbserver_version): Update.
14895 (main): Correct size of own_buf. Do not report initial DLL events.
14896 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14897 (unloaded_dll, xml_escape_text): New.
14898 * win32-low.c (enum target_waitkind): Update comments.
14899 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14900 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14901 (win32_EnumProcessModules, win32_GetModuleInformation)
14902 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14903 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14904 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14905 (win32_Module32First, win32_Module32Next, load_toolhelp)
14906 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14907 (get_child_debug_event): Handle DLL events.
14908 (win32_wait): Likewise.
14909
14910 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14911
14912 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14913 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14914
14915 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14916
14917 * win32-low.c (handle_output_debug_string): Ignore event if not
14918 waiting.
14919
14920 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14921
14922 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14923
14924 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14925
14926 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14927
14928 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14929
14930 * inferiors.c (change_inferior_id): Add comment.
14931 * linux-low.c (check_removed_breakpoint): Add an early
14932 prototype. Improve debug output.
14933 (linux_attach): Doc update.
14934 (linux_detach_one_process, linux_detach): Clean up before releasing
14935 each process.
14936 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14937 * linux-low.h (struct process_info): Doc improvement.
14938 * mem-break.c (delete_all_breakpoints): New.
14939 * mem-break.h (delete_all_breakpoints): New prototype.
14940 * thread-db.c (find_first_thread): New.
14941 (thread_db_create_event): Call it instead of
14942 thread_db_find_new_threads. Clean up unused variables.
14943 (maybe_attach_thread): Remove first thread handling.
14944 (thread_db_find_new_threads): Use find_first_thread.
14945 (thread_db_get_tls_address): Likewise.
14946
14947 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14948
14949 * thread-db.c (thread_db_find_new_threads): Add prototype.
14950 (thread_db_create_event): Check for the main thread before adding
14951 a new thread.
14952 (maybe_attach_thread): Only enable event reporting if TID == 0.
14953 (thread_db_get_tls_address): Check for new threads.
14954
14955 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14956
14957 * linux-low.c (linux_create_inferior): Try execv before execvp.
14958 * spu-low.c (spu_create_inferior): Likewise.
14959
14960 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14961
14962 * linux-low.c (linux_create_inferior): Change execv to execvp.
14963 * spu-low.c (spu_create_inferior): Likewies.
14964
14965 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14966
14967 * Makefile.in (clean): Clean new files instead of deleted ones.
14968 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14969 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14970 rules.
14971 * configure.srv: Specify XML files and new regformats for MIPS and
14972 MIPS64 GNU/Linux.
14973 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14974 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14975 an entry for the restart register.
14976 (mips_cannot_fetch_register, mips_cannot_store_register)
14977 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14978 register names to match the XML descriptions.
14979 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14980 restart register instead of $0.
14981
14982 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14983 Markus Deuling <deuling@de.ibm.com>
14984
14985 * remote-utils.c (decode_xfer_write): New function.
14986 * server.h (decode_xfer_write): Add prototype.
14987 * server.c (handle_query): Add PACKET_LEN argument. Support
14988 qXfer:spu:read and qXfer:spu:write packets.
14989 (main): Pass packet_len to handle_query.
14990 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14991 * target.h (target_ops): Add qxfer_spu.
14992
14993 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14994
14995 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14996 accessing non-seekable spufs files.
14997
14998 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14999
15000 * server.c (handle_query): Add reply for qC packet.
15001
15002 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15003 Leo Zayas <lerele@champenstudios@com>
15004
15005 * server.h (check_remote_input_interrupt_request): New function.
15006 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15007 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15008 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15009 (check_remote_input_interrupt_request): New function.
15010 * server.h (check_remote_input_interrupt_request): Declare.
15011 * win32-low.c (winapi_DebugBreakProcess,
15012 winapi_GenerateConsoleCtrlEvent): New typedefs.
15013 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15014 to 250 ms.
15015 (win32_wait): Check for remote interrupt request
15016 with check_remote_input_interrupt_request.
15017 (win32_request_interrupt): New function.
15018 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15019
15020 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15021
15022 * win32-low.c (debug_registers_changed,
15023 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15024 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15025 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15026 (thread_rec): Get context using the low target.
15027 (child_add_thread): Call thread_added on the low target,
15028 which does the same thing.
15029 (regptr): Delete.
15030 (do_initial_child_stuff): Remove debug registers references.
15031 Set context using the low target. Resume threads after
15032 setting the contexts.
15033 (child_continue): Remove dead variable. Remove debug
15034 registers references.
15035 (child_fetch_inferior_registers): Go through the low target.
15036 (do_child_store_inferior_registers): Remove.
15037 (child_store_inferior_registers): Go through the low target.
15038 (win32_resume): Remove debug registers references.
15039 Set context using the low target.
15040 (handle_exception): Change return type to void. Don't record
15041 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15042 first chance exception.
15043 (get_child_debug_event): Change return type to void. Remove
15044 goto loop. Always return after waiting for debug event.
15045 (win32_wait): Convert to switch statement. Handle spurious
15046 events.
15047
15048 * win32-i386-low.c (debug_registers_changed,
15049 debug_registers_used): New.
15050 (initial_stuff): Rename to ...
15051 (i386_initial_stuff): ... this. Clear debug registers
15052 state variables.
15053 (store_debug_registers): Delete.
15054 (i386_get_thread_context): New.
15055 (load_debug_registers): Delete.
15056 (i386_set_thread_context): New.
15057 (i386_thread_added): New.
15058 (single_step): Rename to ...
15059 (i386_single_step): ... this.
15060 (do_fetch_inferior_registers): Rename to ...
15061 (i386_fetch_inferior_register): ... this.
15062 (i386_store_inferior_register): New.
15063 (the_low_target): Adapt to new interface.
15064
15065 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15066 (arm_get_thread_context): New.
15067 (arm_set_thread_context): New.
15068 (regptr): New.
15069 (do_fetch_inferior_registers): Rename to ...
15070 (arm_fetch_inferior_register): ... this.
15071 (arm_store_inferior_register): New.
15072 (arm_wince_breakpoint): Reimplement as unsigned long.
15073 (arm_wince_breakpoint_len): Define.
15074 (the_low_target): Adapt to new interface.
15075
15076 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15077 load_debug_registers. Add get_thread_context, set_thread_context,
15078 thread_added and store_inferior_register. Rename
15079 fetch_inferior_registers to fetch_inferior_register.
15080 (regptr): Remove declaration.
15081
15082 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15083
15084 * linux-low.c (linux_detach): Change return type to int. Return 0.
15085 * spu-low.c (spu_detach): Likewise.
15086
15087 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15088
15089 * target.h (target_ops): Change return type of detach to int.
15090 Add join.
15091 (join_inferior): New.
15092 * server.c (main): Don't skip detach support on mingw32.
15093 If the inferior doesn't support detaching return error.
15094 Call join_inferior instead of using waitpid.
15095 * linux-low.c (linux_join): New.
15096 (linux_target_op): Add linux_join.
15097 * spu-low.c (spu_join): New.
15098 (spu_target_ops): Add spu_join.
15099 * win32-low.c (win32_detach): Adapt to new interface.
15100 Reopen current_process_handle before detaching. Issue a child
15101 resume before detaching.
15102 (win32_join): New.
15103 (win32_target_op): Add win32_join.
15104
15105 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15106
15107 * win32-low.c (win32-attach): Fix return value.
15108 * target.h (target_ops): Describe ATTACH return values.
15109
15110 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15111
15112 * win32-low.c (GETPROCADDRESS): Define.
15113 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15114 (winapi_DebugSetProcessKillOnExit): Likewise.
15115 (win32_create_inferior): Force usage of ansi CreateProcessA.
15116 (win32_attach): Use GETPROCADDRESS.
15117 (win32_detach): Likewise.
15118
15119 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15120
15121 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15122
15123 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15124
15125 * win32-low.c: Commit leftover changes from 2007-03-29.
15126
15127 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15128
15129 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15130 fields short instead of int. Add explicit padding.
15131 (i387_cache_to_fsave): Remove unnecessary casts.
15132 (i387_fsave_to_cache): Doc fix.
15133 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15134
15135 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15136
15137 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15138 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15139
15140 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15141
15142 * configure.srv (arm*-*-mingw32ce*): Move near the other
15143 arm targets.
15144
15145 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15146
15147 * configure.ac: Add errno checking.
15148 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15149 sys/file.h and malloc.h.
15150 (AC_CHECK_DECLS): Add perror.
15151 (srv_mingwce): Handle.
15152 * configure.srv (i[34567]86-*-cygwin*): Add
15153 win32-i386-low.o to srv_tgtobj.
15154 (i[34567]86-*-mingw*): Likewise.
15155 (arm*-*-mingw32ce*): Add case.
15156 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15157 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15158 [__MINGW32CE__] (strerror): New function.
15159 [__MINGW32CE__] (errno): Define to GetLastError.
15160 [__MINGW32CE__] (COUNTOF): New macro.
15161 (remote_open): Remove extra close call.
15162 * mem-break.c (delete_breakpoint_at): New function.
15163 * mem-break.h (delete_breakpoint_at): Declare.
15164 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15165 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15166 [USE_WIN32API] (read, write): Add char* casts.
15167 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15168 * server.h: Include wincecompat.h on Windows CE.
15169 [HAVE_ERRNO_H]: Check.
15170 (perror): Declare if not declared.
15171 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15172 (perror_with_name): Remove errno declaration.
15173 * wincecompat.h: New.
15174 * wincecompat.c: New.
15175 * win32-low.h: New.
15176 * win32-arm-low.c: New.
15177 * win32-i386-low.c: New.
15178 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15179 (OUTMSG2): Make it safe.
15180 (_T): New macro.
15181 (COUNTOF): New macro.
15182 (NUM_REGS): Get it from the low target.
15183 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15184 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15185 (thread_rec): Let low target handle debug registers.
15186 (child_add_thread): Likewise.
15187 (child_init_thread_list): Likewise.
15188 (continue_one_thread): Likewise.
15189 (regptr): New.
15190 (do_child_fetch_inferior_registers): Move to ...
15191 * win32-i386-low.c: ... here, and rename to ...
15192 (do_fetch_inferior_registers): ... this.
15193 * win32-low.c (child_fetch_inferior_registers):
15194 Go through the low target.
15195 (do_child_store_inferior_registers): Use regptr.
15196 (strwinerror): New function.
15197 (win32_create_inferior): Handle Windows CE.
15198 Use strwinerror instead of strerror on Windows error
15199 codes. Add program to the error output.
15200 Don't close the main thread handle on Windows CE.
15201 (win32_attach): Use coredll.dll on Windows CE.
15202 (win32_kill): Close current process and current
15203 thread handles.
15204 (win32_detach): Use coredll.dll on Windows CE.
15205 (win32_resume): Let low target handle debug registers, and
15206 step request.
15207 (handle_exception): Add/Remove initial breakpoint. Avoid
15208 non-existant WSTOPSIG on Windows CE.
15209 (win32_read_inferior_memory): Cast to remove warning.
15210 (win32_arch_string): Go through the low target.
15211 (initialize_low): Call set_breakpoint_data with the low
15212 target's breakpoint.
15213 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15214 FOP_REGNUM, mappings): Move to ...
15215 * win32-i386-low.c: ... here.
15216 * win32-low.c (win32_thread_info): Move to ...
15217 * win32-low.h: ... here.
15218 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15219 win32-arm-low.c and wincecompat.c.
15220 (all:): Add $EXEEXT.
15221 (install-only:): Likewise.
15222 (gdbserver:): Likewise.
15223 (gdbreplay:): Likewise.
15224 * config.in: Regenerate.
15225 * configure: Regenerate.
15226
15227 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15228
15229 * win32-low.c: Rename typedef thread_info to
15230 win32_thread_info throughout.
15231
15232 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15233
15234 * win32-i386-low.c: Rename to ...
15235 * win32-low.c: ... this.
15236 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15237 * Makefile.in: Likewise.
15238
15239 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15240
15241 * remote-utils.c (monitor_output): Constify msg parameter.
15242 * server.h (monitor_output): Likewise.
15243 * win32-i386-low.c (handle_output_debug_string): New.
15244 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15245 handle_output_debug_string.
15246 (get_child_debug_event): Likewise.
15247
15248 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15249
15250 * server.c (main): Correct strtoul check.
15251
15252 2007-03-27 Jon Ringle <jon@ringle.org>
15253
15254 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15255
15256 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15257
15258 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15259
15260 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15261
15262 * terminal.h: Check HAVE_SGTTY_H.
15263
15264 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15265
15266 * remote-utils.c (remote_open): Print out the assigned port number.
15267
15268 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15269
15270 * remote-utils.c (monitor_output): New function.
15271 * server.c (debug_threads): Define here.
15272 (monitor_show_help): New function.
15273 (handle_query): Handle qRcmd.
15274 (main): Do not handle 'd' packet.
15275 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15276 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15277 of debug_threads.
15278
15279 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15280
15281 * Makefile.in (EXEEXT): New.
15282 (clean): Use $(EXEEXT).
15283
15284 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15285
15286 * target.h (target_ops): Rename send_signal to request_interrupt,
15287 and remove enum target_signal parameter.
15288 * linux-low.c (linux_request_interrupt): Rename from
15289 linux_send_signal, and always send SIGINT.
15290 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15291 and always send SIGINT.
15292 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15293 of send_signal.
15294 (input_interrupt): Likewise.
15295
15296 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15297
15298 * server.c (get_features_xml): Check if target implemented
15299 arch_string.
15300 * win32-i386-low.c (win32_arch_string): New.
15301 (win32_target_ops): Add win32_arch_string as arch_string member.
15302
15303 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15304
15305 * spu-low.c (spu_arch_string): New.
15306 (spu_target_ops): Add spu_arch_string.
15307
15308 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15309
15310 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15311 * configure.ac: Do not check for terminal.h.
15312 * configure, config.in: Regenerated.
15313
15314 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15315
15316 * Makefile.in (OBS): Add $(XML_BUILTIN).
15317 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15318 (clean): Update.
15319 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15320 (arm-with-iwmmxt.c): New.
15321 * config.in, configure: Regenerate.
15322 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15323 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15324 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15325 (arm*-*-linux*): Add iWMMXt and regset support.
15326 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15327 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15328 (arm_store_wmmxregset, target_regsets): New.
15329 * server.c (get_features_xml): Take annex argument. Check builtin
15330 XML documents.
15331 (handle_query): Handle multiple annexes.
15332
15333 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15334
15335 * remote-utils.c [USE_WIN32API] (read, write): Define.
15336 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15337 write.
15338
15339 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15340
15341 * linux-i386-low.c (the_low_target): Set arch_string.
15342 * linux-x86-64-low.c (the_low_target): Likewise.
15343 * linux-low.c (linux_arch_string): New.
15344 (linux_target_ops): Add it.
15345 * linux-low.h (struct linux_target_ops): Add arch_string.
15346 * server.c (write_qxfer_response): Use const void * for DATA.
15347 (get_features_xml): New.
15348 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15349 * target.h (struct target_ops): Add arch_string method.
15350
15351 2007-01-03 Denis Pilat <denis.pilat@st.com>
15352 Daniel Jacobowitz <dan@codesourcery.com>
15353
15354 * linux-low.c (linux_kill): Handle being called with no threads.
15355 * win32-i386-low.c (win32_kill): Likewise.
15356 (get_child_debug_event): Clear current_process_handle.
15357
15358 2006-12-30 Denis PILAT <denis.pilat@st.com>
15359 Daniel Jacobowitz <dan@codesourcery.com>
15360
15361 * remote-utils.c (remote_open): Check the type of specified
15362 serial port devices before opening them.
15363 * server.c (main): Kill the inferior if an error occurs during
15364 the first remote_open.
15365
15366 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15367
15368 * README: Update supported targets.
15369
15370 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15371
15372 * Makefile.in (clean): Remove reg-mips64.c.
15373 (reg-mips64.c, reg-mips64.o): New rules.
15374 * configure.srv: Handle mips64. Include regset support for mips.
15375 * linux-mips-low.c (union mips_register): New.
15376 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15377 (mips_breakpoint, mips_breakpoint_at): Use int.
15378 (mips_collect_register, mips_supply_register)
15379 (mips_collect_register_32bit, mips_supply_register_32bit)
15380 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15381 (mips_store_fpregset, target_regsets): New.
15382 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15383
15384 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15385
15386 * configure.srv: Add target "spu*-*-*".
15387 * Makefile.in (clean): Remove reg-spu.c.
15388 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15389 * spu-low.c: New file.
15390
15391 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15392
15393 * configure.ac: Correct td_thr_tls_get_addr test.
15394 * configure: Regenerated.
15395
15396 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15397
15398 * linux-low.c (linux_wait_for_event): Reformat. Use the
15399 pass_signals array.
15400 * remote-utils.c (decode_address_to_semicolon): New.
15401 * server.c (pass_signals, handle_general_set): New.
15402 (handle_query): Mention QPassSignals for qSupported.
15403 (main): Call handle_general_set.
15404 * server.h (pass_signals, decode_address_to_semicolon): New.
15405
15406 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15407
15408 * server.c (handle_query): Correct error handling for read_auxv.
15409
15410 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15411
15412 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15413 and srv_linux_thread_db to yes.
15414 * linux-s390-low.c (s390_fill_gregset): New function.
15415 (target_regsets): Define data structure.
15416
15417 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15418
15419 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15420 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15421 * config.in, configure: Regenerated.
15422 * inferiors.c (gdb_id_to_thread): New function.
15423 (gdb_id_to_thread_id): Use it.
15424 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15425 * linux-low.h (struct process_info): Add th member.
15426 (thread_db_get_tls_address): New prototype.
15427 * remote-utils.c (decode_address): Make non-static.
15428 * server.c (handle_query): Handle qGetTLSAddr.
15429 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15430 * target.h (struct target_ops): Add get_tls_address.
15431 * thread-db.c (maybe_attach_thread): Save the thread handle.
15432 (thread_db_get_tls_address): New.
15433
15434 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15435
15436 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15437 (linux_resume_one_process): Take a siginfo_t *. Update all
15438 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15439 (struct pending_signals): Add a siginfo_t.
15440 (linux_wait_for_process): Always set last_status.
15441 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15442 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15443 * linux-low.h (struct process_info): Add last_status.
15444
15445 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15446
15447 * remote-utils.c (try_rle): New function.
15448 (putpkt_binary): Use it.
15449
15450 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15451
15452 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15453 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15454 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15455 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15456 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15457 point registers.
15458
15459 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15460
15461 * server.c (terminal_fd): New variable.
15462 (old_foreground_pgrp): Likewise.
15463 (restore_old_foreground_pgrp): New function.
15464 (start_inferior): Record the terminal file descriptor in terminal_fd
15465 and its original foreground group in old_foreground_pgrp. Register
15466 restore_old_foreground_pgrp with atexit().
15467
15468 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15469
15470 * server.c (handle_query): Correct qPart to qXfer.
15471
15472 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15473
15474 * configure.ac: Check for more headers which are missing on
15475 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15476 * configure.srv: Add Cygwin and mingw32.
15477 * remote-utils.c: Don't include headers unconditionally which
15478 are missing on mingw32. Include <winsock.h> for mingw32.
15479 (remote_open): Adjust for mingw32 support. Flush
15480 standard error after writing to it.
15481 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15482 (unblock_async_io, enable_async_io, disable_async_io)
15483 (readchar, getpkt): Update for Winsock support.
15484 (prepare_resume_reply): Expect a protocol signal number.
15485 * server.c: Disable <sys/wait.h> on mingw32.
15486 (start_inferior): Adjust for mingw32 support. Flush
15487 standard error after writing to it.
15488 (attach_inferior): Likewise. Use protocol signal
15489 numbers.
15490 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15491 and names.
15492 * win32-i386-low.c: New file.
15493 * Makefile.in (XM_CLIBS): Set.
15494 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15495 (win32-i386-low.o): New dependency rule.
15496 * linux-low.c (linux_wait): Use target signal numbers.
15497 * target.h (struct target_ops): Doc fix.
15498 * server.h (target_signal_to_name): New prototype.
15499 * gdbreplay.c: Don't include headers unconditionally which
15500 are missing on mingw32. Include <winsock.h> for mingw32.
15501 (remote_close, remote_open): Adjust for Winsock support.
15502 * configure, config.in: Regenerated.
15503
15504 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15505
15506 * server.c (decode_xfer_read, write_qxfer_response): New.
15507 (handle_query): Take a packet length argument. Handle
15508 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15509 the qSupported response.
15510 (main): Update call to handle_query.
15511
15512 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15513
15514 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15515 (putpkt_binary): Renamed from putpkt and adjusted for binary
15516 data.
15517 (putpkt): New wrapper for putpkt_binary.
15518 (readchar): Don't mask off the high bit.
15519 (decode_X_packet): New function.
15520 * server.c (main): Call putpkt_binary if a handler sets the packet
15521 length. Save the length of the incoming packet. Handle 'X'.
15522 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15523
15524 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15525
15526 * server.c (handle_query): Handle qSupported.
15527
15528 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15529
15530 * remote-utils.c (all_symbols_looked_up): New variable.
15531 (look_up_one_symbol): Check it.
15532 * server.h (look_up_one_symbol): New declaration.
15533 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15534
15535 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15536
15537 * Makefile.in (linux-arm-low.o): Update dependencies.
15538 * linux-arm-low.c: Include "gdb_proc_service.h".
15539 (PTRACE_GET_THREAD_AREA): Define.
15540 (ps_get_thread_area): New function.
15541
15542 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15543
15544 * configure.srv (m68k*-*-uclinux*): New target.
15545 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15546 (linux_resume_one_process): Remove extraneous cast.
15547 (linux_read_offsets): New.
15548 (linux_target_op): Add linux_read_offsets on mmuless systems.
15549 * server.c (handle_query): Add qOffsets logic.
15550 * target.h (struct target_ops): Add read_offsets.
15551
15552 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15553
15554 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15555 (PTRACE_GET_THREAD_AREA): Define.
15556 (ps_get_thread_area): New function.
15557 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15558 (linux-x86-64-low.o): Update.
15559
15560 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15561
15562 * configure.ac: Remove checks for prfpregset_t.
15563 * gdb_proc_service.h: New file.
15564 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15565 new "gdb_proc_service.h".
15566 * proc-service.c: Likewise.
15567 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15568 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15569 * Makefile.in (gdb_proc_service_h): Updated.
15570 * configure, config.in: Regenerated.
15571
15572 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15573
15574 * remote-utils.c (prepare_resume_reply): Move declaration
15575 of gdb_id_from_wait to the top of the block.
15576
15577 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15578
15579 * linux-low.c (regsets_store_inferior_registers): Read the regset
15580 from the target before filling it.
15581
15582 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15583
15584 * server.c (attach_inferior): Return SIGTRAP for a successful
15585 attach.
15586
15587 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15588
15589 * Makefile.in (OBS): Add version.o.
15590 (STAGESTUFF): Delete.
15591 (version.o): Add dependencies.
15592 (version.c): Replace rule.
15593 (clean): Remove version.c.
15594 * server.c (gdbserver_version): New.
15595 (gdbserver_usage): Use printf.
15596 (main): Handle --version and --help.
15597 * server.h (version, host_name): Add declarations.
15598
15599 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15600
15601 * linux-arm-low.c:
15602 * linux-arm-low.c:
15603 * inferiors.c:
15604 * i387-fp.h:
15605 * i387-fp.c:
15606 * gdbreplay.c:
15607 * regcache.c:
15608 * proc-service.c:
15609 * mem-break.h:
15610 * mem-break.c:
15611 * linux-x86-64-low.c:
15612 * linux-sh-low.c:
15613 * linux-s390-low.c:
15614 * linux-ppc64-low.c:
15615 * linux-ppc-low.c:
15616 * linux-mips-low.c:
15617 * linux-m68k-low.c:
15618 * linux-m32r-low.c:
15619 * linux-low.h:
15620 * linux-low.c:
15621 * linux-ia64-low.c:
15622 * linux-i386-low.c:
15623 * linux-crisv32-low.c:
15624 * thread-db.c:
15625 * terminal.h:
15626 * target.h:
15627 * target.c:
15628 * server.h:
15629 * server.c:
15630 * remote-utils.c:
15631 * regcache.h:
15632 * utils.c:
15633 * Makefile.in:
15634 * configure.ac:
15635 * gdbserver.1: Add (C) after Copyright. Update the FSF
15636 address.
15637
15638 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15639
15640 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15641 (arm_breakpoint_at): Recognize both breakpoints.
15642 (the_low_target): Use the correct breakpoint instruction.
15643
15644 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15645
15646 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15647 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15648 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15649 (the_low_target): Update.
15650
15651 2005-10-25 Andreas Schwab <schwab@suse.de>
15652
15653 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15654
15655 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15656 (ia64_num_regs): Reduce to 462.
15657
15658 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15659
15660 * acinclude.m4: Correct quoting.
15661 * aclocal.m4: Regenerated.
15662
15663 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15664 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15665 (thread_db_init): Call thread_db_err_str.
15666 * configure.ac: Check for TD_VERSION.
15667 * config.in, configure: Regenerated.
15668
15669 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15670
15671 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15672
15673 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15674
15675 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15676 is not available. Define HAVE_PTRACE_GETREGS if it is.
15677 * config.in, configure: Regenerated.
15678 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15679 * linux-i386-low.c, linux-m68k-low.c: Update to use
15680 HAVE_PTRACE_GETREGS.
15681 * linux-low.c (regsets_fetch_inferior_registers)
15682 (regsets_store_inferior_registers): Only return 0 if we processed
15683 GENERAL_REGS.
15684 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15685 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15686
15687 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15688
15689 * inferiors.c (struct thread_info): Add gdb_id.
15690 (add_thread): Add gdb_id argument.
15691 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15692 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15693 calls to add_thread.
15694 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15695 * server.c (handle_query): Use thread_to_gdb_id.
15696 (handle_v_cont, main): Use gdb_id_to_thread_id.
15697 * server.h (add_thread): Update prototype.
15698 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15699 prototypes.
15700
15701 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15702
15703 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15704 left-padded registers.
15705 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15706 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15707
15708 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15709
15710 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15711 * configure: Regenerate.
15712 * config.in: Regenerate.
15713 * server.h (NEED_DECLARATION_STRERROR):
15714 Replace with !HAVE_DECL_STRERROR.
15715
15716 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15717
15718 * linux-low.c (linux_wait, linux_send_signal): Don't test
15719 an unsigned long variable for > 0 if it could be MAX_ULONG.
15720 * server.c (myresume): Likewise.
15721 * target.c (set_desired_inferior): Likewise.
15722
15723 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15724
15725 * configure.ac: Simplify and improve check for socklen_t.
15726 * configure, config.in: Regenerate.
15727
15728 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15729
15730 * acconfig.h: Remove.
15731 * configure.ac: Add a test for socklen_t. Use three-argument
15732 AC_DEFINE throughout.
15733 * config.in: Regenerated using autoheader 2.59.
15734 * configure: Regenerated.
15735
15736 * gdbreplay.c (socklen_t): Provide a default.
15737 (remote_open): Use socklen_t.
15738 * remote-utils.c (socklen_t): Provide a default.
15739 (remote_open): Use socklen_t.
15740 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15741 unsigned char.
15742
15743 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15744 char for buffers.
15745 * linux-low.c (linux_read_memory, linux_write_memory)
15746 (linux_read_auxv): Likewise.
15747 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15748 (check_mem_write): Likewise.
15749 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15750 Likewise.
15751 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15752 (registers_from_string, register_data): Likewise.
15753 * server.c (handle_query, main): Likewise.
15754 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15755 (decode_M_packet): Likewise.
15756 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15757 * target.h (struct target_ops): Update read_memory, write_memory,
15758 and read_auxv.
15759 (read_inferior_memory, write_inferior_memory): Update.
15760 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15761 to unsigned char *.
15762 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15763 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15764 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15765 linux-s390-low.c, linux-sh-low.c: Update for changes in
15766 read_inferior_memory and the_low_target->breakpoint.
15767
15768 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15769
15770 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15771 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15772 * configure.srv: Add powerpc64-*-linux*.
15773 * linux-ppc64-low.c: New file.
15774
15775 2005-05-23 Orjan Friberg <orjanf@axis.com>
15776
15777 * linux-cris-low.c: New file with support for CRIS.
15778 * linux-crisv32-low.c: Ditto for CRISv32.
15779 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15780 (clean): Add reg-cris.c and reg-crisv32.c.
15781 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15782 reg-crisv32.o, and reg-crisv32.c to make rules.
15783 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15784 recognized targets.
15785
15786 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15787
15788 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15789 of sizeof (PTRACE_XFER_TYPE).
15790 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15791
15792 2005-05-12 Orjan Friberg <orjanf@axis.com>
15793
15794 * target.h (struct target_ops): Add insert_watchpoint,
15795 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15796 pointers for hardware watchpoint support.
15797 * linux-low.h (struct linux_target_ops): Ditto.
15798 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15799 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15800 to linux_target_ops.
15801 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15802 reply packet.
15803 * server.c (main): Recognize 'Z' and 'z' packets.
15804
15805 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15806
15807 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15808 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15809 (the_low_target): Add new members.
15810
15811 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15812
15813 * proc-service.c (ps_lgetregs): Search all_processes instead of
15814 all_threads.
15815
15816 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15817
15818 * server.c (start_inferior): Change return type to int.
15819 (attach_inferior): Change sigptr to int *.
15820 (handle_v_cont, handle_v_requests): Change signal to int *.
15821 (main): Change signal to int.
15822
15823 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15824
15825 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15826 * configure.srv: Add m32r*-*-linux*.
15827 * linux-m32r-low.c: New file.
15828
15829 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15830
15831 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15832
15833 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15834
15835 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15836 Take unsigned long arguments for PIDs.
15837 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15838 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15839 (wait_for_sigstop, linux_resume_one_process)
15840 (regsets_fetch_inferior_registers, linux_send_signal)
15841 (linux_read_auxv): Likewise. Update the types of variables holding
15842 PIDs. Update format string specifiers.
15843 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15844 * remote-utils.c (prepare_resume_reply): Likewise.
15845 * server.c (cont_thread, general_thread, step_thread)
15846 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15847 unsigned long.
15848 (handle_query): Update format specifiers.
15849 (handle_v_cont, main): Use strtoul for thread IDs.
15850 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15851 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15852 (general_thread, step_thread, thread_from_wait)
15853 (old_thread_from_wait): Update.
15854 * target.h (struct thread_resume): Use unsigned long for THREAD.
15855 (struct target_ops): Use unsigned long for arguments to attach and
15856 thread_alive.
15857
15858 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15859
15860 * acinclude.m4: Include bfd/bfd.m4 directly.
15861 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15862 <agriffis@toolchain.org>.
15863 * aclocal.m4, configure: Regenerated.
15864
15865 2005-01-07 Andrew Cagney <cagney@gnu.org>
15866
15867 * configure.ac: Rename configure.in, require autoconf 2.59.
15868 * configure: Re-generate.
15869
15870 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15871
15872 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15873 LIBS when finished.
15874 * aclocal.m4: Regenerated.
15875 * configure: Regenerated.
15876
15877 2004-11-21 Andreas Schwab <schwab@suse.de>
15878
15879 * linux-m68k-low.c (m68k_num_gregs): Define.
15880 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15881 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15882 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15883 (m68k_breakpoint_at): New. Add to the_low_target.
15884
15885 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15886 srv_linux_thread_db to yes.
15887
15888 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15889
15890 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15891 (ARCH_SET_FS): Likewise.
15892 (ARCH_GET_FS): Likewise.
15893 (ARCH_GET_GS): Likewise.
15894
15895 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15896
15897 * linux-i386-low.c (ps_get_thread_area): New.
15898 * linux-x86-64-low.c (ps_get_thread_area): New.
15899 * linux-low.c: Include <sys/syscall.h>.
15900 (linux_kill_one_process): Don't kill the first thread here.
15901 (linux_kill): Kill the first thread here.
15902 (kill_lwp): New function.
15903 (send_sigstop, linux_send_signal): Use it.
15904 * proc-service.c: Clean up #ifdefs.
15905 (fpregset_info): Delete.
15906 (ps_lgetregs): Update and enable implementation.
15907 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15908 implementations.
15909 * remote-utils.c (struct sym_cache, symbol_cache): New.
15910 (input_interrupt): Print a clearer message.
15911 (async_io_enabled): New variable.
15912 (enable_async_io, disable_async_io): Use it. Update comments.
15913 (look_up_one_symbol): Use the symbol cache.
15914 * thread-db.c (thread_db_look_up_symbols): New function.
15915 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15916
15917 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15918
15919 * configure.in: Test for -rdynamic.
15920 * configure: Regenerated.
15921 * Makefile (INTERNAL_LDFLAGS): New.
15922 (gdbserver, gdbreplay): Use it.
15923
15924 2004-09-02 Andrew Cagney <cagney@gnu.org>
15925
15926 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15927
15928 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15929
15930 * linux-low.c (linux_wait): Clear all_processes list also.
15931
15932 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15933
15934 * linux-low.c: Include <errno.h>. Remove extern declaration of
15935 errno.
15936
15937 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15938
15939 * gdbreplay.c, server.h, utils.c: Update copyright years.
15940
15941 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15942
15943 * server.c (main): Print child status or termination signal from
15944 variable 'signal', not 'sig'.
15945
15946 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15947
15948 * linux-low.c (linux_read_memory): Change return type to
15949 int. Check for and return error from ptrace().
15950 * target.c (read_inferior_memory): Change return type to int. Pass
15951 back return status from the_target->read_memory().
15952 * target.h (struct target_ops): Adapt *read_memory() prototype.
15953 Update comment.
15954 (read_inferior_memory): Adapt prototype.
15955 * server.c (main): Return an error packet if
15956 read_inferior_memory() returns an error.
15957
15958 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15959
15960 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15961 Unify with other clean targets.
15962
15963 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15964
15965 * server.c (handle_v_cont): Call set_desired_inferior.
15966
15967 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15968
15969 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15970
15971 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15972
15973 * linux-low.c (linux_wait): Unblock async I/O.
15974 (linux_resume): Block and enable async I/O.
15975 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15976 * server.h (block_async_io, unblock_async_io): Add prototypes.
15977
15978 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15979
15980 * remote-utils.c (remote_open): Print a status notice after
15981 opening a TCP port.
15982 * server.c (attach_inferior): Print a status notice after
15983 attaching.
15984
15985 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15986
15987 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15988
15989 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15990
15991 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15992 error packet.
15993 * server.c, target.h: Update copyright years.
15994
15995 2004-02-25 Roland McGrath <roland@redhat.com>
15996
15997 * target.h (struct target_ops): New member `read_auxv'.
15998 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15999 * linux-low.c (linux_read_auxv): New function.
16000 (linux_target_ops): Initialize `read_auxv' member to that.
16001
16002 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16003
16004 Committed by Jim Blandy <jimb@redhat.com>.
16005
16006 * linux-s390-low.c (s390_num_regs): Update.
16007 (s390_regmap): Remove control registers. Use __s390x__ predefine
16008 instead of GPR_SIZE to distiguish s390 and s390x targets.
16009
16010 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16011
16012 * linux-low.c: Update copyright year.
16013 (check_removed_breakpoint): Clear pending_is_breakpoint.
16014 (linux_set_resume_request, linux_queue_one_thread)
16015 (resume_status_pending_p): New functions.
16016 (linux_continue_one_thread): Use process->resume.
16017 (linux_resume): Only resume threads if there are no pending events.
16018 * linux-low.h (struct process_info): Add resume request
16019 pointer.
16020
16021 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16022
16023 * regcache.c (new_register_cache): Clear the allocated register
16024 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16025
16026 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16027
16028 * linux-low.c (linux_resume): Take a struct thread_resume *
16029 argument.
16030 (linux_wait): Update call.
16031 (resume_ptr): New static variable.
16032 (linux_continue_one_thread): Renamed from
16033 linux_continue_one_process. Use resume_ptr.
16034 (linux_resume): Use linux_continue_one_thread.
16035 * server.c (handle_v_cont, handle_v_requests): New functions.
16036 (myresume): New function.
16037 (main): Handle 'v' case.
16038 * target.h (struct thread_resume): New type.
16039 (struct target_ops): Change argument of "resume" to struct
16040 thread_resume *.
16041 (myresume): Delete macro.
16042
16043 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16044
16045 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16046 (uninstall): Support DESTDIR.
16047
16048 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16049
16050 * configure.srv: Add xscale*linux copy of arm*linux entry.
16051
16052 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16053
16054 * linux-arm-low.c (arm_reinsert_addr): New function.
16055 (the_low_target): Add arm_reinsert_addr.
16056
16057 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16058
16059 * mem-break.c: Remove whitespace at end of file.
16060
16061 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16062
16063 * configure.in: Check whether we need to prototype strerror.
16064 * server.h: Optionally prototype strerror.
16065 * gdbreplay.c (perror_with_name): Use strerror.
16066 * linux-low.c (linux_attach_lwp): Use strerror.
16067 * utils.c (perror_with_name): Use strerror.
16068 * config.in, configure: Regenerated.
16069
16070 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16071
16072 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16073 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16074
16075 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16076
16077 * Makefile.in (SFILES): Update.
16078 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16079 low-sun3.c: Remove files.
16080
16081 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16082
16083 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16084 (linux_detach_one_process, linux_detach): New functions.
16085 (linux_target_ops): Add linux_detach.
16086 * server.c (main): Handle 'D' packet.
16087 * target.h (struct target_ops): Add "detach" member.
16088 (detach_inferior): Define.
16089
16090 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16091
16092 From Kelley Cook <kelleycook@wideopenwest.com>:
16093 * configure.srv: Accept i[34567]86 variants.
16094
16095 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16096
16097 * linux-low.c (linux_wait_for_event): Correct comment typos.
16098 (linux_resume_one_process): Call check_removed_breakpoint.
16099 (linux_send_signal): New function.
16100 (linux_target_ops): Add linux_send_signal.
16101 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16102 of kill.
16103 * target.h (struct target_ops): Add send_signal.
16104
16105 2003-05-29 Jim Blandy <jimb@redhat.com>
16106
16107 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16108 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16109 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16110 away part of the register's value.
16111
16112 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16113
16114 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16115 (linux_wait_for_event, linux_init_signals): Likewise.
16116
16117 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16118
16119 * configure.in: Check for stdlib.h.
16120 * configure: Regenerated.
16121 * config.in: Regenerated.
16122
16123 2003-01-04 Andreas Schwab <schwab@suse.de>
16124
16125 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16126
16127 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16128
16129 * Makefile.in: Remove obsolete code.
16130
16131 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16132
16133 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16134 defined(PT_FPR0_HI).
16135
16136 2002-11-17 Stuart Hughes <seh@zee2.com>
16137
16138 * linux-arm-low.c (arm_num_regs): Increase.
16139 (arm_regmap): Include status register.
16140
16141 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16142
16143 * linux-low.c (register_addr): Remove incorrect -1 check.
16144
16145 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16146
16147 * linux-low.c (linux_create_inferior): Call setpgid. Return
16148 the new PID.
16149 (unstopped_p, linux_signal_pid): Remove.
16150 (linux_target_ops): Remove linux_signal_pid.
16151 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16152 global instead of target method.
16153 * target.h (struct target_ops): Remove signal_pid. Update comment
16154 for create_inferior.
16155 * server.c (signal_pid): New variable.
16156 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16157 gdbserver. Set the child to be the foreground process group.
16158 (attach_inferior): Set signal_pid.
16159
16160 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16161
16162 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16163
16164 2002-08-20 Jim Blandy <jimb@redhat.com>
16165
16166 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16167 default for this.
16168
16169 2002-08-01 Andrew Cagney <cagney@redhat.com>
16170
16171 * Makefile.in: Make chill references obsolete.
16172
16173 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16174
16175 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16176 * configure: Regenerate.
16177 * config.in: Regenerate.
16178
16179 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16180
16181 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16182 (perror_with_name, remote_close, remote_open, expect, play): Static.
16183
16184 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16185
16186 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16187 byte offsets instead of an array of indexes.
16188 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16189
16190 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16191
16192 * regcache.c: Add comment.
16193
16194 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16195
16196 * thread-db.c: New file.
16197 * proc-service.c: New file.
16198 * acinclude.m4: New file.
16199 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16200 proc-service.o, and thread-db.o.
16201 (linux-low.o): Add USE_THREAD_DB.
16202 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16203 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16204 * aclocal.m4: Regenerated.
16205 * config.in: Regenerated.
16206 * configure: Regenerated.
16207 * configure.in: Check for proc_service.h, sys/procfs.h,
16208 thread_db.h, and linux/elf.h headrs.
16209 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16210 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16211 Check for -lthread_db and thread support.
16212 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16213 PowerPC, and SuperH.
16214 * i387-fp.c: Constify arguments.
16215 * i387-fp.h: Likewise.
16216 * inferiors.c: (struct thread_info): Renamed from
16217 `struct inferior_info'. Remove PID member. Use generic inferior
16218 list header. All uses updated.
16219 (inferiors, signal_pid): Removed.
16220 (all_threads): New variable.
16221 (get_thread): Define.
16222 (add_inferior_to_list): New function.
16223 (for_each_inferior): New function.
16224 (change_inferior_id): New function.
16225 (add_inferior): Removed.
16226 (remove_inferior): New function.
16227 (add_thread): New function.
16228 (free_one_thread): New function.
16229 (remove_thread): New function.
16230 (clear_inferiors): Use for_each_inferior and free_one_thread.
16231 (find_inferior): New function.
16232 (find_inferior_id): New function.
16233 (inferior_target_data): Update argument type.
16234 (set_inferior_target_data): Likewise.
16235 (inferior_regcache_data): Likewise.
16236 (set_inferior_regcache_data): Likewise.
16237 * linux-low.c (linux_bp_reinsert): Remove.
16238 (all_processes, stopping_threads, using_thrads)
16239 (struct pending_signals, debug_threads, pid_of): New.
16240 (inferior_pid): Replace with macro.
16241 (struct inferior_linux_data): Remove.
16242 (get_stop_pc, add_process): New functions.
16243 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16244 Use add_process and add_thread.
16245 (linux_attach_lwp): New function, based on old linux_attach. Use
16246 add_process and add_thread. Set stop_expected for new threads.
16247 (linux_attach): New function.
16248 (linux_kill_one_process): New function.
16249 (linux_kill): Kill all LWPs.
16250 (linux_thread_alive): Use find_inferior_id.
16251 (check_removed_breakpoints, status_pending_p): New functions.
16252 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16253 Update. Use WNOHANG. Wait for cloned processes also. Update process
16254 struct for the found process.
16255 (linux_wait_for_event): New function.
16256 (linux_wait): Use it. Support LWPs.
16257 (send_sigstop, wait_for_sigstop, stop_all_processes)
16258 (linux_resume_one_process, linux_continue_one_process): New functions.
16259 (linux_resume): Support LWPs.
16260 (REGISTER_RAW_SIZE): Remove.
16261 (fetch_register): Use register_size instead. Call supply_register.
16262 (usr_store_inferior_registers): Likewise. Call collect_register.
16263 Fix recursive case.
16264 (regsets_fetch_inferior_registers): Improve error message.
16265 (regsets_store_inferior_registers): Add debugging.
16266 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16267 (unstopped_p, linux_signal_pid): New functions.
16268 (linux_target_ops): Add linux_signal_pid.
16269 (linux_init_signals): New function.
16270 (initialize_low): Call it. Initialize using_threads.
16271 * regcache.c (inferior_regcache_data): Add valid
16272 flag.
16273 (get_regcache): Fetch registers lazily. Add fetch argument
16274 and update all callers.
16275 (regcache_invalidate_one, regcache_invalidate): New
16276 functions.
16277 (new_register_cache): Renamed from create_register_cache.
16278 Return the new regcache.
16279 (free_register_cache): Change argument to a void *.
16280 (registers_to_string, registers_from_string): Call get_regcache
16281 with fetch flag set.
16282 (register_data): Make static. Pass fetch flag to get_regcache.
16283 (supply_register): Call get_regcache with fetch flag clear.
16284 (collect_register): Call get_regcache with fetch flag set.
16285 (collect_register_as_string): New function.
16286 * regcache.h: Update.
16287 * remote-utils.c (putpkt): Flush after debug output and use
16288 stderr.
16289 Handle input interrupts while waiting for an ACK.
16290 (input_interrupt): Use signal_pid method.
16291 (getpkt): Flush after debug output and use stderr.
16292 (outreg): Use collect_register_as_string.
16293 (new_thread_notify, dead_thread_notify): New functions.
16294 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16295 and general_thread.
16296 (look_up_one_symbol): Flush after debug output.
16297 * server.c (step_thread, server_waiting): New variables.
16298 (start_inferior): Don't use signal_pid. Update call to mywait.
16299 (attach_inferior): Update call to mywait.
16300 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16301 (main): Don't fetch/store registers explicitly. Use
16302 set_desired_inferior. Support proposed ``Hs'' packet. Update
16303 calls to mywait.
16304 * server.h: Update.
16305 (struct inferior_list, struct_inferior_list_entry): New.
16306 * target.c (set_desired_inferior): New.
16307 (write_inferior_memory): Constify.
16308 (mywait): New function.
16309 * target.h: Update.
16310 (struct target_ops): New signal_pid method.
16311 (mywait): Removed macro, added prototype.
16312
16313 * linux-low.h (regset_func): Removed.
16314 (regset_fill_func, regset_store_func): New.
16315 (enum regset_type): New.
16316 (struct regset_info): Add type field. Use new operation types.
16317 (struct linux_target_ops): stop_pc renamed to get_pc.
16318 Add decr_pc_after_break and breakpoint_at.
16319 (get_process, get_thread_proess, get_process_thread)
16320 (strut process_info, all_processes, linux_attach_lwp)
16321 (thread_db_init): New.
16322
16323 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16324 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16325 (the_low_target): Add new members.
16326 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16327 (i386_store_fpxregset): Constify.
16328 (target_regsets): Add new kind identifier.
16329 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16330 (i386_set_pc): Add debugging.
16331 (i386_breakpoint_at): New function.
16332 (the_low_target): Add new members.
16333 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16334 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16335 (mips_breakpoint_at): New.
16336 (the_low_target): Add new members.
16337 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16338 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16339 (the_low_target): Add new members.
16340 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16341 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16342 (the_low_target): Add new members.
16343 * linux-x86-64-low.c (target_regsets): Add new kind
16344 identifier.
16345
16346 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16347
16348 From Martin Pool <mbp@samba.org>:
16349 * server.c (gdbserver_usage): New function.
16350 (main): Call it.
16351
16352 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16353
16354 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16355 stop_at -> stop_pc.
16356
16357 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16358
16359 * Makefile.in: Remove obsolete code.
16360
16361 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16362
16363 * linux-low.c (regsets_fetch_inferior_registers),
16364 (regsets_store_inferior_registers): Removed cast to int from
16365 ptrace() calls.
16366 * regcache.h: Added declaration of struct inferior_info.
16367
16368 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16369
16370 * inferiors.c (struct inferior_info): Add regcache_data.
16371 (add_inferior): Call create_register_cache.
16372 (clear_inferiors): Call free_register_cache.
16373 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16374 * regcache.c (struct inferior_regcache_data): New.
16375 (registers): Remove.
16376 (get_regcache): New function.
16377 (create_register_cache, free_register_cache): New functions.
16378 (set_register_cache): Don't initialize the register cache here.
16379 (registers_to_string, registers_from_string, register_data): Call
16380 get_regcache.
16381 * regcache.h: Add prototypes.
16382 * server.h: Likewise.
16383
16384 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16385
16386 * mem-break.c: New file.
16387 * mem-break.h: New file.
16388 * Makefile.in: Add mem-break.o rule; update server.h
16389 dependencies.
16390 * inferiors.c (struct inferior_info): Add target_data
16391 member.
16392 (clear_inferiors): Free target_data member if set.
16393 (inferior_target_data, set_inferior_target_data): New functions.
16394 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16395 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16396 * linux-low.c (linux_bp_reinsert): New variable.
16397 (struct inferior_linux_data): New.
16398 (linux_create_inferior): Use set_inferior_target_data.
16399 (linux_attach): Likewise. Call add_inferior.
16400 (linux_wait_for_one_inferior): New function.
16401 (linux_wait): Call it.
16402 (linux_write_memory): Add const.
16403 (initialize_low): Call set_breakpoint_data.
16404 * linux-low.h (struct linux_target_ops): Add breakpoint
16405 handling members.
16406 * server.c (attach_inferior): Remove extra add_inferior
16407 call.
16408 * server.h: Include mem-break.h. Update inferior.c
16409 prototypes.
16410 * target.c (read_inferior_memory)
16411 (write_inferior_memory): New functions.
16412 * target.h (read_inferior_memory)
16413 (write_inferior_memory): Change macros to prototypes.
16414 (struct target_ops): Update comments. Add const to write_memory
16415 definition.
16416
16417 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16418
16419 * linux-low.c (usr_store_inferior_registers): Support
16420 registers which are allowed to fail to store.
16421 * linux-low.h (linux_target_ops): Likewise.
16422 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16423 (ppc_cannot_store_register): FPSCR may not be storable.
16424
16425 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16426
16427 * server.h: Include <string.h> if HAVE_STRING_H.
16428 * ChangeLog: Correct paths in last ChangeLog entry.
16429
16430 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16431
16432 * linux-low.h: Remove obsolete prototypes.
16433 (struct linux_target_ops): New.
16434 (extern the_low_target): New.
16435 * linux-low.c (num_regs, regmap): Remove declarations.
16436 (register_addr): Use the_low_target explicitly.
16437 (fetch_register): Likewise.
16438 (usr_fetch_inferior_registers): Likewise.
16439 (usr_store_inferior_registers): Likewise.
16440 * linux-arm-low.c (num_regs): Remove.
16441 (arm_num_regs): Define.
16442 (arm_regmap): Renamed from regmap, made static.
16443 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16444 made static.
16445 (arm_cannot_store_register): Renamed from cannot_store_register,
16446 made static.
16447 (the_low_target): New.
16448 * linux-i386-low.c (num_regs): Remove.
16449 (i386_num_regs): Define.
16450 (i386_regmap): Renamed from regmap, made static.
16451 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16452 made static.
16453 (i386_cannot_store_register): Renamed from cannot_store_register,
16454 made static.
16455 (the_low_target): New.
16456 * linux-ia64-low.c (num_regs): Remove.
16457 (ia64_num_regs): Define.
16458 (ia64_regmap): Renamed from regmap, made static.
16459 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16460 made static.
16461 (ia64_cannot_store_register): Renamed from cannot_store_register,
16462 made static.
16463 (the_low_target): New.
16464 * linux-m68k-low.c (num_regs): Remove.
16465 (m68k_num_regs): Define.
16466 (m68k_regmap): Renamed from regmap, made static.
16467 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16468 made static.
16469 (m68k_cannot_store_register): Renamed from cannot_store_register,
16470 made static.
16471 (the_low_target): New.
16472 * linux-mips-low.c (num_regs): Remove.
16473 (mips_num_regs): Define.
16474 (mips_regmap): Renamed from regmap, made static.
16475 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16476 made static.
16477 (mips_cannot_store_register): Renamed from cannot_store_register,
16478 made static.
16479 (the_low_target): New.
16480 * linux-ppc-low.c (num_regs): Remove.
16481 (ppc_num_regs): Define.
16482 (ppc_regmap): Renamed from regmap, made static.
16483 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16484 made static.
16485 (ppc_cannot_store_register): Renamed from cannot_store_register,
16486 made static.
16487 (the_low_target): New.
16488 * linux-s390-low.c (num_regs): Remove.
16489 (s390_num_regs): Define.
16490 (s390_regmap): Renamed from regmap, made static.
16491 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16492 made static.
16493 (s390_cannot_store_register): Renamed from cannot_store_register,
16494 made static.
16495 (the_low_target): New.
16496 * linux-sh-low.c (num_regs): Remove.
16497 (sh_num_regs): Define.
16498 (sh_regmap): Renamed from regmap, made static.
16499 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16500 made static.
16501 (sh_cannot_store_register): Renamed from cannot_store_register,
16502 made static.
16503 (the_low_target): New.
16504 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16505 (the_low_target): New.
16506
16507 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16508
16509 * Makefile.in: Add stamp-h target.
16510 * configure.in: Create stamp-h.
16511 * configure: Regenerated.
16512
16513 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16514
16515 * inferiors.c: New file.
16516 * target.c: New file.
16517 * target.h: New file.
16518 * Makefile.in: Add target.o and inferiors.o. Update
16519 dependencies.
16520 * linux-low.c (inferior_pid): New static variable,
16521 moved from server.c.
16522 (linux_create_inferior): Renamed from create_inferior.
16523 Call add_inferior. Return 0 on success instead of a PID.
16524 (linux_attach): Renamed from myattach.
16525 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16526 (linux_thread_alive): Renamed from mythread_alive.
16527 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16528 child dies.
16529 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16530 (regsets_store_inferior_registers): Correct error message.
16531 Add missing ``return 0''.
16532 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16533 (linux_store_registers): Renamed from store_inferior_registers.
16534 (linux_read_memory): Renamed from read_inferior_memory.
16535 (linux_write_memory): Renamed from write_inferior_memory.
16536 (linux_target_ops): New structure.
16537 (initialize_low): Call set_target_ops ().
16538 * remote-utils.c (unhexify): New function.
16539 (hexify): New function.
16540 (input_interrupt): Send signals to ``signal_pid''.
16541 * server.c (inferior_pid): Remove.
16542 (start_inferior): Update create_inferior call.
16543 (attach_inferior): Call add_inferior.
16544 (handle_query): New function.
16545 (main): Call handle_query for `q' packets.
16546 * server.h: Include "target.h". Remove obsolete prototypes.
16547 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16548
16549 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16550
16551 * Makefile.in: Add WARN_CFLAGS. Update configury
16552 dependencies.
16553 * configure.in: Check for <string.h>
16554 * configure: Regenerate.
16555 * config.in: Regenerate.
16556 * gdbreplay.c: Include needed system headers.
16557 (remote_open): Remove strchr prototype.
16558 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16559 * regcache.c (supply_register): Change buf argument to const void *.
16560 (supply_register_by_name): Likewise.
16561 (collect_register): Change buf argument to void *.
16562 (collect_register_by_name): Likewise.
16563 * regcache.h: Add missing prototypes.
16564 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16565 * server.c (handle_query): New function.
16566 (attached): New static variable, moved out of main.
16567 (main): Quiet longjmp clobber warnings.
16568 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16569 * utils.c (error): Remove NORETURN.
16570 (fatal): Likewise.
This page took 0.491821 seconds and 5 git commands to generate.