Add feature reference in .dat files
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
d278f585
AH
12018-04-18 Alan Hayward <alan.hayward@arm.com>
2
3 * tdesc.c (tdesc_architecture_name): Add new function.
4 (tdesc_osabi_name): Likewise.
5 (tdesc_get_features_xml): Use new functions.
6
eee8a18d
AH
72018-04-18 Alan Hayward <alan.hayward@arm.com>
8
9 * tdesc.c (tdesc_create_flags): Remove.
10 (tdesc_add_flag): Likewise.
11 (tdesc_named_type): Likewise.
12 (tdesc_create_union): Likewise.
13 (tdesc_create_struct): Likewise.
14 (tdesc_create_vector): Likewise.
15 (tdesc_add_bitfield): Likewise.
16 (tdesc_add_field): Likewise.
17 (tdesc_set_struct_size): Likewise.
18
82ec9bc7
AH
192018-04-18 Alan Hayward <alan.hayward@arm.com>
20
21 * tdesc.c (~target_desc): Remove implictly deleted items.
22 (init_target_desc): Iterate all features.
23 (tdesc_get_features_xml): Use vector.
24 (tdesc_create_feature): Create feature.
25 * tdesc.h (tdesc_feature) Remove
26 (target_desc): Add features.
27
ea3e7d71
AH
282018-04-18 Alan Hayward <alan.hayward@arm.com>
29
30 * Makefile.in: Add common/tdesc.c
31 * tdesc.c (init_target_desc): init all reg_defs from register
32 vector.
33 (tdesc_create_reg): Create tdesc_reg.
34 * tdesc.h (tdesc_feature): Add register vector.
35
17d08cd4
SM
362018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
37
38 * tdesc.h (struct target_desc) <features>: Change type to
39 std::vector<std::string>.
40 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
41 changes.
42 (tdesc_get_features_xml): Likewise.
43 (tdesc_create_feature): Likewise.
44
5cd3e386
AH
452018-03-26 Alan Hayward <alan.hayward@arm.com>
46
47 * regcache.c (find_register_by_number): Return a ref.
48 (find_regno): Use references.
49 (register_size): Likewise.
50 (register_data): Likewise.
51 * tdesc.c (target_desc::~target_desc): Remove free calls.
52 (target_desc::operator==): Use std::vector compare.
53 (init_target_desc): Use reference.
54 (tdesc_create_reg): Use reg constructors.
55 * tdesc.h (struct target_desc): Replace pointer with object.
56
dff7492c
AH
572018-03-23 Alan Hayward <alan.hayward@arm.com>
58
59 * regcache.c (find_register_by_number): Make static.
60 (find_regno): Use find_register_by_number
61 * regcache.h (struct reg): Remove declaration.
62
d80e5242
AH
632018-03-23 Alan Hayward <alan.hayward@arm.com>
64
65 * tdesc.c (target_desc::~target_desc): Move to here.
66 (target_desc::operator==): Likewise.
67 * tdesc.h (target_desc::~target_desc): Move from here.
68 (target_desc::operator==): Likewise.
69
f69c5afb
AA
702018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
71
72 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
73
ce29f843
AA
742018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
75
76 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
77 S390_TDESC_GS.
78 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
79 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
80 and init_registers_s390_gs_linux64.
81
c49bd90b
AA
822018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
83
84 * linux-s390-low.c (s390_fill_gs): Remove function.
85 (s390_fill_gsbc): Remove function.
86 (s390_regsets): Set fill functions for the guarded storage regsets
87 to NULL.
88
7edb9bd3
AA
892018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
90
91 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
92 the word size. Add comment.
93 (s390_get_wordsize): New function.
94 (s390_arch_setup): No longer select a temporary tdesc to fetch the
95 pswm with it. Instead, use s390_get_wordsize to determine the
96 word size first and derive the correct tdesc from that directly.
97
39be3c7e
SM
982018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
99
100 * Makefile.in: Include silent-rules.mk.
101 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
102 (COMPILE): Add ECHO_CXX.
103 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
104 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
105 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
106 (version-generated.c): Add ECHO_GEN.
107 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
108 (IPAGENT_COMPILE): Add ECHO_CXX.
109 (%-generated.c): Add ECHO_REGDAT.
110
3ae9ce5d
TT
1112018-03-14 Tom Tromey <tom@tromey.com>
112
113 PR cli/14977:
114 * ax.c (ax_printf): Special case for NULL.
115
e6a58aa8
SM
1162018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
117
118 * linux-low.c (linux_qxfer_libraries_svr4): Use
119 xml_escape_text_append.
120
f6e8a41e
SM
1212018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
122
123 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
124
b9671caf
SM
1252018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
126
127 * server.c (handle_general_set): Remove unnecessary xstrdup.
128
e80aaf61
SM
1292018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
130
131 * server.c (parse_debug_format_options): Adjust to
132 delim_string_to_char_ptr_vec changes.
133 * thread-db.c (thread_db_load_search): Adjust to
134 dirnames_to_char_ptr_vec changes.
135
b1223e78
MM
1362018-03-01 Markus Metzger <markus.t.metzger@intel.com>
137
138 * target.h (target_enable_btrace, target_disable_btrace)
139 (target_read_btrace, target_read_btrace_conf): Turn macro into
140 inline function. Throw error if target method is not defined.
141 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
142 check for btrace target method. Be prepared to handle exceptions
143 from btrace target methods.
144
81561546
SDJ
1452018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
146
147 * server.c (captured_main): Change order of error message printed
148 when the current working directory cannot be found.
149
25e3c82c
SDJ
1502018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
151
152 * server.c: Include "filenames.h" and "pathstuff.h".
153 (program_name): Delete variable.
154 (program_path): New anonymous class.
155 (get_exec_wrapper): Use "program_path" instead of
156 "program_name".
157 (handle_v_run): Likewise.
158 (captured_main): Likewise.
159 (process_serial_event): Likewise.
160
b4987c95
SDJ
1612018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
162
163 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
164 (OBJS): Add "pathstuff.o".
165 * server.c (current_directory): New global variable.
166 (captured_main): Initialize "current_directory".
167
f46cd62a
AH
1682018-02-26 Alan Hayward <alan.hayward@arm.com>
169
170 * tdesc.c: Use common/tdesc.h.
171 * tdesc.h: Likewise.
172
a543c5ca
AH
1732018-02-20 Alan Hayward <alan.hayward@arm.com>
174 Simon Marchi <simon.marchi@ericsson.com>
175
176 * Makefile.in: Switch order of make rules.
177
b5884fa7
AH
1782018-02-19 Alan Hayward <alan.hayward@arm.com>
179
180 * Makefile.in: Add common directory in build.
181 * configure.ac: Add common reference.
182 * configure: Regenerate.
183
de6242d3
MM
1842018-02-09 Markus Metzger <markus.t.metzger@intel.com>
185
186 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
187 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
188 * spu-low.c (spu_target_ops): Likewise.
189 * win32-low.c (win32_target_ops): Likewise.
190 * server.c (supported_btrace_packets): Report packets unconditionally.
191 * target.h (target_ops) <supports_btrace>: Remove.
192 (target_supports_btrace): Remove.
193
9ee23a85
MM
1942018-02-09 Markus Metzger <markus.t.metzger@intel.com>
195
196 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
197 (handle_btrace_disable): Change return type to void. Use exceptions
198 to report errors.
199 (handle_btrace_general_set): Catch exception and copy message to
200 return message.
201
8ce47547
TT
2022018-02-08 Tom Tromey <tom@tromey.com>
203
204 * linux-low.c (install_software_single_step_breakpoints): Use
205 make_scoped_restore.
206 * inferiors.c (make_cleanup_restore_current_thread): Remove.
207 (do_restore_current_thread_cleanup): Remove.
208 * gdbthread.h (make_cleanup_restore_current_thread): Don't
209 declare.
210
45dd3607
TT
2112018-02-08 Tom Tromey <tom@tromey.com>
212
213 * mem-break.c (set_raw_breakpoint_at): Use
214 gdb::unique_xmalloc_ptr.
215
e671cd59
PA
2162018-01-30 Pedro Alves <palves@redhat.com>
217
218 PR gdb/13211
219 * target.c (target_terminal::terminal_state): Rename to ...
220 (target_terminal::m_terminal_state): ... this.
221
a0aad537
JC
2222018-01-19 James Clarke <jrtc27@jrtc27.com>
223
224 * linux-low.c (handle_extended_wait): Surround call to
225 thread_db_notice_clone with #ifdef USE_THREAD_DB.
226
4d9b86e1
SM
2272018-01-17 Simon Marchi <simon.marchi@ericsson.com>
228
229 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
230 linux_ptrace_attach_fail_reason_string now returning an
231 std::string.
232 (linux_attach): Likewise.
233 * thread-db.c (attach_thread): Likewise.
234
f517c180
EA
2352018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
236
237 PR gdb/21559
238 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
239 checking for fs_base/gs_base fields in struct user_regs_struct.
240 * configure: Regenerate.
241
9a70f35c
YQ
2422018-01-16 Yao Qi <yao.qi@linaro.org>
243
244 PR gdb/18749
245 * linux-low.c (fetch_register): Call supply_register instead of
246 error.
247
605fd3c6
YQ
2482018-01-08 Yao Qi <yao.qi@linaro.org>
249 Simon Marchi <simon.marchi@ericsson.com>
250
251 * Makefile.in (OBS): Remove selftest.o.
252 * configure.ac: Set srv_selftest_objs if $development is true.
253 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
254 * configure: Re-generated.
255 * server.c (captured_main): Wrap variable selftest_filter with
256 GDB_SELF_TEST.
257
2cc05030
SM
2582018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
259
260 * server.c (parse_debug_format_options): Return std::string.
261 (handle_monitor_command, captured_main): Adjust.
262
e379cee6
PA
2632018-01-05 Pedro Alves <palves@redhat.com>
264
265 PR gdb/18653
266 * server.c (captured_main): Pass quiet=false to
267 save_original_signals_state.
268
82e1e79a
JB
2692018-01-01 Joel Brobecker <brobecker@adacore.com>
270
271 * gdbreplay.c (gdbreplay_version): Update copyright year in
272 version message.
273 * server.c (gdbserver_version): Likewise.
274
8e481c3b
TT
2752017-12-08 Tom Tromey <tom@tromey.com>
276
277 * ax.c (ax_printf): Update.
278
a8806230
YQ
2792017-12-07 Yao Qi <yao.qi@linaro.org>
280
281 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
282 aarch64_linux_read_description.
283 * linux-amd64-ipa.c (idx2mask): New array.
284 (get_ipa_tdesc): Move idx2mask out.
285 (initialize_low_tracepoint): Initialize target descriptions.
286 * linux-i386-ipa.c (idx2mask): New array.
287 (get_ipa_tdesc): Move idx2mask out.
288 (initialize_low_tracepoint): Initialize target descriptions.
289
d4a0e8b5
SM
2902017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
291
292 * tdesc.c (struct tdesc_type): Change return type.
293 (tdesc_add_flag): Change parameter type.
294 (tdesc_add_bitfield): Likewise.
295 (tdesc_add_field): Likewise.
296 (tdesc_set_struct_size): Likewise.
297
798a7429
SM
2982017-12-05 Simon Marchi <simon.marchi@ericsson.com>
299
300 * regcache.c (registers_to_string): Remove unused variable.
301
c0e15c9b
SM
3022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
303
304 * inferiors.c (for_each_inferior_with_data): Remove.
305 * inferiors.h (for_each_inferior_with_data): Remove.
306 * server.c (handle_qxfer_threads_worker): Change parameter type.
307 (handle_qxfer_threads_proper): Use for_each_thread.
308
f0045347
SM
3092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
310
311 * inferiors.c (for_each_inferior): Remove.
312 (clear_inferiors): Use for_each_thread.
313 * inferiors.h (for_each_inferior): Remove.
314 * linux-low.c (linux_wait_for_event_filtered): Use
315 for_each_thread.
316 (linux_stabilize_threads): Likewise.
317 * regcache.c (regcache_release): Likewise.
318 * server.c (gdb_wants_all_threads_stopped): Likewise.
319 (clear_pending_status_callback): Remove.
320 (handle_status): Use for_each_thread.
321 (captured_main): Likewise.
322 * win32-low.c (child_init_thread_list): Likewise.
323 (win32_clear_inferiors): Likewise.
324 (fake_breakpoint_event): Likewise.
325
9521758b
SM
3262017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
327
328 * inferiors.h (find_inferior): Remove.
329 * inferiors.c (find_inferior): Remove.
330
8f86d7aa
SM
3312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
332
333 * linux-low.c (resume_status_pending_p): Update comment.
334 (need_step_over_p): Update comment.
335
e2b44075
SM
3362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
337
338 * linux-low.c (proceed_one_lwp): Return void, change parameter
339 type.
340 (unsuspend_and_proceed_one_lwp): Likewise.
341 (proceed_all_lwps): Use for_each_thread.
342 (unstop_all_lwps): Likewise.
343
c80825ff
SM
3442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
345
346 * linux-low.c (linux_resume_one_thread): Return void, take
347 parameter directly.
348 (linux_resume): Use for_each_thread.
349
df3e4dbe
SM
3502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
351
352 * linux-low.c (send_sigstop_callback): Return void, change
353 parameter type. Rename to...
354 (send_sigstop): ... this.
355 (suspend_and_send_sigstop_callback): Return void, change parameter
356 type. Rename to...
357 (suspend_and_send_sigstop): ... this.
358 (stop_all_lwps): Use for_each_thread.
359
5a6b0a41
SM
3602017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
361
362 * linux-low.c (lwp_running): Return bool, remove unused
363 argument.
364 (linux_stabilize_threads): Use find_thread.
365
39a64da5
SM
3662017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
367
368 * linux-low.c (select_singlestep_lwp_callback): Remove.
369 (count_events_callback): Remove.
370 (select_event_lwp_callback): Remove.
371 (select_event_lwp): Use find_thread/for_each_thread.
372
a1385b7b
SM
3732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
374
375 * linux-low.c (not_stopped_callback): Return bool, take filter
376 argument directly.
377 (linux_wait_for_event_filtered): Use find_thread.
378 (linux_wait_1): Likewise.
379
454296a2
SM
3802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
381
382 * linux-low.c (same_lwp): Remove.
383 (find_lwp_pid): Use find_thread.
384
6b2a85da
SM
3852017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
386
387 * linux-low.c (delete_lwp_callback): Remove.
388 (linux_mourn): Use for_each_thread.
389
798a38e8
SM
3902017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
391
392 * linux-low.c (linux_detach_lwp_callback): Return void, remove
393 args parameter, don't check for pid.
394 (linux_detach): Use for_each_thread.
395
e4eb0dec
SM
3962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
397
398 * linux-low.c (struct counter): Remove.
399 (second_thread_of_pid_p): Remove.
400 (last_thread_of_process_p): Use find_thread.
401
83e1b6c1
SM
4022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
403
404 * inferiors.c (find_inferior_in_random): Remove.
405 * inferiors.h (find_inferior_in_random): Remove.
406 * linux-low.c (status_pending_p_callback): Return bool, accept
407 parameter ptid directly.
408 (linux_wait_for_event_filtered): Use find_thread_in_random.
409 (linux_wait_1): Likewise.
410
8dc7b443
SM
4112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
412
413 * inferiors.c (find_inferior_id): Remove.
414 (find_thread_ptid): Move implemention from find_inferior_id to
415 here.
416 * inferiors.h (find_inferior_id): Remove.
417 * server.c (handle_status): Use find_thread_ptid.
418 (process_serial_event): Likewise.
419 * thread-db.c (find_one_thread): Likewise.
420 (thread_db_thread_handle): Likewise.
421 * win32-low.c (thread_rec): Likewise.
422 (child_delete_thread): Likewise.
423 (win32_thread_alive): Likewise.
424 (get_child_debug_event): Likewise.
425
da25033c
SM
4262017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
427
428 * linux-mips-low.c (update_watch_registers_callback): Return
429 void, remove pid_p parameter, don't check for pid.
430 (mips_insert_point, mips_remove_point): Use for_each_thread.
431
c91bb56b
SM
4322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
433
434 * lynx.low (lynx_delete_thread_callback): Remove.
435 (lynx_mourn): Use for_each_thread.
436
634a3254
SM
4372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
438
439 * regcache.c (regcache_invalidate_one): Remove.
440 (regcache_invalidate_pid): use for_each_thread.
441
41272101
TT
4422017-11-26 Tom Tromey <tom@tromey.com>
443
444 * linux-low.c (linux_create_inferior): Update.
445
f5291a6f
UW
4462017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
447
448 * spu-low.c (spu_create_inferior): Fix typo in argument name.
449
6654d750
AH
4502017-11-24 Alan Hayward <alan.hayward@arm.com>
451
452 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
453 * linux-aarch64-low.c (initialize_low_arch): Call init func.
454 * linux-aarch64-tdesc-selftest.c: New file.
455 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
456
4572017-11-24 Alan Hayward <alan.hayward@arm.com>
458
459 * configure.srv: Add new file.
460 * linux-aarch64-low.c (initialize_low_arch): Call init func.
461 * linux-aarch64-tdesc-selftest.c: New file.
462 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
463
49bdb7ee
AH
4642017-11-24 Alan Hayward <alan.hayward@arm.com>
465
466 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
467 * linux-aarch64-low.c (initialize_low_arch): Remove init.
468 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
469
d6d7ce56
AH
4702017-11-24 Alan Hayward <alan.hayward@arm.com>
471
472 * configure.srv: Add new files.
473 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
474 aarch64_linux_read_description.
475 * linux-aarch64-low.c (aarch64_linux_read_description):
476 Merge with aarch64_arch_setup.
477 (aarch64_arch_setup): Call aarch64_linux_read_description.
478 * linux-aarch64-tdesc.c: New file.
479 * linux-aarch64-tdesc.h: New file.
480
506fe5f4
YQ
4812017-11-24 Yao Qi <yao.qi@linaro.org>
482
483 * configure.srv: Set $srv_regobj for tic6x-linux.
484 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
485 (tic6x_read_description): Move some code to tic6x_arch_setup.
486 (tic6x_tdesc_test): New function.
487 (initialize_low_arch): Call selftests::register_test.
488
29f9a567
YQ
4892017-11-22 Yao Qi <yao.qi@linaro.org>
490
491 * remote-utils.c (prepare_resume_reply): Use memcpy.
492
578290ec
SM
4932017-11-19 Simon Marchi <simon.marchi@ericsson.com>
494
495 * linux-low.c (kill_one_lwp_callback): Return void, take
496 argument directly, don't filter on pid.
497 (linux_kill): Use for_each_thread.
498
eca55aec
SM
4992017-11-19 Simon Marchi <simon.marchi@ericsson.com>
500
501 * linux-low.c (need_step_over_p): Return bool, remove dummy
502 argument.
503 (linux_resume, proceed_all_lwps): Use find_thread.
504
25c28b4d
SM
5052017-11-19 Simon Marchi <simon.marchi@ericsson.com>
506
507 * linux-low.c (resume_status_pending_p): Return bool, remove
508 flag_p argument.
509 (linux_resume): Use find_thread.
510
5fdda392
SM
5112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
512
513 * linux-low.c (struct thread_resume_array): Remove.
514 (linux_set_resume_request): Return void, take arguments
515 directly.
516 (linux_resume): Use for_each_thread.
517
fcb056a5
SM
5182017-11-19 Simon Marchi <simon.marchi@ericsson.com>
519
520 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
521 return bool, remove data argument.
522 (linux_stabilize_threads): Use find_thread.
523
139720c5
SM
5242017-11-19 Simon Marchi <simon.marchi@ericsson.com>
525
526 * linux-low.c (unsuspend_one_lwp): Remove.
527 (unsuspend_all_lwps): Use for_each_thread, inline code from
528 unsuspend_one_lwp.
529
6d1e5673
SM
5302017-11-19 Simon Marchi <simon.marchi@ericsson.com>
531
532 * gdbthread.h (find_thread): Add overload with ptid_t filter.
533 * linux-low.c (struct iterate_over_lwps_args): Remove.
534 (iterate_over_lwps_filter): Remove.
535 (iterate_over_lwps): Use find_thread.
536
bbf550d5
SM
5372017-11-19 Simon Marchi <simon.marchi@ericsson.com>
538
539 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
540 (linux_handle_new_gdb_connection): Use for_each_thread, inline
541 code from reset_lwp_ptrace_options_callback.
542
00192f77
SM
5432017-11-19 Simon Marchi <simon.marchi@ericsson.com>
544
545 * linux-arm-low.c (struct update_registers_data): Remove.
546 (update_registers_callback): Return void, take arguments
547 directly, don't check thread's pid.
548 (arm_insert_point, arm_remove_point): Use for_each_thread.
549
2bee2b6c
SM
5502017-11-19 Simon Marchi <simon.marchi@ericsson.com>
551
552 * win32-low.c (continue_one_thread): Return void, take argument
553 directly.
554 (child_continue): Use for_each_thread.
555
0b360f19
SM
5562017-11-19 Simon Marchi <simon.marchi@ericsson.com>
557
558 * win32-i386-low.c (update_debug_registers_callback): Rename
559 to ...
560 (update_debug_registers): ... this, return void, remove pid_p arg.
561 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
562
f27866ba
SM
5632017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
564
565 * inferiors.h (struct process_info): Add constructor, initialize
566 fields..
567 <syscalls_to_catch>: Change type to std::vector<int>.
568 * inferiors.c (add_process): Allocate process_info with new.
569 (remove_process): Free process_info with delete.
570 * linux-low.c (handle_extended_wait): Adjust.
571 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
572 * server.c (handle_general_set): Adjust.
573
e849ea89
PA
5742017-11-16 Pedro Alves <palves@redhat.com>
575
576 * remote-utils.c (remote_close): Block SIGIO signals instead of
577 uninstalling the SIGIO handler.
578
1d0aa65c
AH
5792017-11-16 Alan Hayward <alan.hayward@arm.com>
580
581 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
582
3491a34c
YQ
5832017-11-16 Yao Qi <yao.qi@linaro.org>
584
585 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
586 (tic6x_store_gregset): Likewise.
587 (tic6x_usrregs_info): Move it up.
588
a602f924
AH
5892017-11-15 Alan Hayward <alan.hayward@arm.com>
590
591 * Makefile.in: Update arch rules.
592 * configure.srv: Explicitly mark arch/ files.
593
5616b6c3
AS
5942017-11-13 Andreas Schwab <schwab@suse.de>
595
596 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
597 function.
598 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
599
d1928160
PA
6002017-11-06 Pedro Alves <palves@redhat.com>
601
602 * config.in, configure: Regenerate.
603
bac608e7
SM
6042017-10-27 Simon Marchi <simon.marchi@ericsson.com>
605
606 * target.c (struct thread_search): Remove.
607 (thread_search_callback): Remove.
608 (prepare_to_access_memory): Use for_each_thread instead of
609 find_inferior. Inline code from thread_search_callback.
610
eaddb425
SM
6112017-10-27 Simon Marchi <simon.marchi@ericsson.com>
612
613 * server.c (struct visit_actioned_threads_data): Remove.
614 (visit_actioned_threads): Change prototype to take arguments
615 directly.
616 (resume): Use find_thread instead of find_inferior.
617
99078d34
SM
6182017-10-27 Simon Marchi <simon.marchi@ericsson.com>
619
620 * server.c (queue_stop_reply_callback): Change prototype, return
621 void.
622 (find_status_pending_thread_callback): Remove.
623 (handle_status): Replace find_inferior with find_thread and
624 for_each_thread.
625
cc628f3d
AH
6262017-10-25 Alan Hayward <alan.hayward@arm.com>
627
628 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
629 with REGNO.
630 (aarch64_store_gregset): Likewise.
631 (aarch64_fill_fpregset): Likewise.
632 (aarch64_store_fpregset): Likewise.
633
4d3bb80e
SM
6342017-10-21 Simon Marchi <simon.marchi@ericsson.com>
635
636 * gdbthread.h (find_thread, for_each_thread): New functions.
637 * inferiors.c (thread_of_pid): Remove.
638 (find_any_thread_of_pid): Use find_thread.
639 * linux-low.c (num_lwps): Use for_each_thread.
640
7a7cdfa0
YQ
6412017-10-17 Yao Qi <yao.qi@linaro.org>
642
643 * Makefile.in: Remove one rule.
644 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
645
e675d170
YQ
6462017-10-17 Yao Qi <yao.qi@linaro.org>
647
648 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
649 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
650
7eb4e0f9
YQ
6512017-10-17 Yao Qi <yao.qi@linaro.org>
652
653 * configure.srv: Rename arm.o with arch/arm.o.
654
60d6cfc9
YQ
6552017-10-17 Yao Qi <yao.qi@linaro.org>
656
657 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
658 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
659 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
660 (arch-i386.o, arch-amd64.o): Remove rules.
661 (arch/%.o): New rule.
662 Update POSTCOMPILE and COMPILE.pre.
663 * configure.ac: Invoke AC_CONFIG_COMMANDS.
664 * configure: Re-generated.
665 * configure.srv: Replace arch-i386.o with arch/i386.o.
666 Replace arch-amd64.o with arch/amd64.o.
667
5bfda255
YQ
6682017-10-16 Yao Qi <yao.qi@linaro.org>
669
670 * configure: Regenerated.
671
9c80ecd6
SM
6722017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
673
674 * inferiors.h: (struct inferior_list): Remove.
675 (struct inferior_list_entry); Remove.
676 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
677 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
678 get_first_inferior): Remove.
679 (for_each_inferior, for_each_inferior_with_data, find_inferior,
680 find_inferior_id, find_inferior_in_random): Change signature.
681 * inferiors.c (all_threads): Change type to
682 std::list<thread_info *>.
683 (get_thread): Remove macro.
684 (find_inferior, find_inferior_id): Change signature, implement
685 using find_thread.
686 (find_inferior_in_random): Change signature, implement using
687 find_thread_in_random.
688 (for_each_inferior, for_each_inferior_with_data): Change
689 signature, implement using for_each_thread.
690 (add_inferior_to_list, remove_inferior): Remove.
691 (add_thread, get_first_thread, thread_of_pid,
692 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
693 (get_first_inferior, one_inferior_p, clear_inferior_list):
694 Remove.
695 (clear_inferiors, get_thread_process): Update.
696 * gdbthread.h: Include <list>.
697 (struct thread_info) <entry>: Remove field.
698 <id>: New field.
699 (all_threads): Change type to std::list<thread_info *>.
700 (get_first_inferior): Add doc.
701 (find_thread, for_each_thread, find_thread_in_random): New
702 functions.
703 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
704 * linux-arm-low.c (update_registers_callback): Update.
705 * linux-low.c (second_thread_of_pid_p): Update.
706 (kill_one_lwp_callback, linux_detach_lwp_callback,
707 delete_lwp_callback, status_pending_p_callback, same_lwp,
708 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
709 iterate_over_lwps, not_stopped_callback,
710 resume_stopped_resumed_lwps, count_events_callback,
711 select_singlestep_lwp_callback, select_event_lwp_callback,
712 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
713 suspend_and_send_sigstop_callback, wait_for_sigstop,
714 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
715 lwp_running, linux_set_resume_request, resume_status_pending_p,
716 need_step_over_p, start_step_over, linux_resume_one_thread,
717 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
718 reset_lwp_ptrace_options_callback): Update.
719 * linux-mips-low.c (update_watch_registers_callback): Update.
720 * regcache.c (regcache_invalidate_one, regcache_invalidate):
721 Update.
722 (free_register_cache_thread_one): Remove.
723 (regcache_release): Update.
724 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
725 handle_qxfer_threads_worker): Update.
726 (handle_query): Update, use list iterator.
727 (visit_actioned_threads, handle_pending_status,
728 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
729 clear_pending_status_callback, set_pending_status_callback,
730 find_status_pending_thread_callback, handle_status,
731 process_serial_event): Update.
732 * target.c (thread_search_callback): Update.
733 * thread-db.c (thread_db_get_tls_address): Update.
734 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
735 Update.
736 * win32-i386-low.c (update_debug_registers_callback): Update.
737 * win32-low.c (delete_thread_info, child_delete_thread,
738 continue_one_thread, suspend_one_thread,
739 get_child_debug_event): Adjust.
740
9179355e
SM
7412017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
742
743 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
744 * inferiors.h: Include <list>.
745 (struct process_info) <entry>: Remove field.
746 <pid>: New field.
747 (pid_of): Change macro to function.
748 (ptid_of, lwpid_of): Remove macro.
749 (all_processes): Change type to std::list<process_info *>.
750 (ALL_PROCESSES): Remove macro.
751 (for_each_process, find_process): New function.
752 * inferiors.c (all_processes): Change type to
753 std::list<process_info *>.
754 (find_thread_process): Adjust.
755 (add_process): Likewise.
756 (remove_process): Likewise.
757 (find_process_pid): Likewise.
758 (get_first_process): Likewise.
759 (started_inferior_callback): Remove.
760 (have_started_inferiors_p): Adjust.
761 (attached_inferior_callback): Remove.
762 (have_attached_inferiors_p): Adjust.
763 * linux-low.c (check_zombie_leaders): Likewise.
764 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
765 (x86_linux_update_xmltarget): Adjust.
766 * server.c (handle_query): Likewise.
767 (gdb_reattached_process): Remove.
768 (handle_status): Adjust.
769 (kill_inferior_callback): Likewise.
770 (detach_or_kill_inferior): Remove.
771 (print_started_pid): Likewise.
772 (print_attached_pid): Likewise.
773 (detach_or_kill_for_exit): Update.
774 (process_serial_event): Likewise.
775 * linux-arm-low.c (arm_new_fork): Likewise.
776
c9cb8905
SM
7772017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
778
779 * dll.h: Include <list>.
780 (struct dll_info): Add constructor.
781 <entry>: Remove field.
782 (all_dlls): Change type to std::list<dll_info>.
783 * dll.c: Include <algorithm>.
784 (get_dll): Remove macro.
785 (all_dlls): Change type to std::list<dll_info *>.
786 (free_one_dll): Remove.
787 (match_dll): Likewise.
788 (loaded_dll): Adjust.
789 (unloaded_dll): Adjust to all_dlls type change, use
790 std::find_if. Inline code from match_dll.
791 (clear_dlls): Adjust to all_dlls type change.
792 * server.c (emit_dll_description): Remove.
793 (handle_qxfer_libraries): Adjust to all_dlls type change,
794 integrate emit_dll_description's functionality.
795
04ec7890
SM
7962017-10-12 Simon Marchi <simon.marchi@ericsson.com>
797
798 * linux-low.h (struct linux_target_ops) <delete_process>: New
799 field.
800 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
801 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
802 (struct linux_target_ops): Add delete_process callback.
803 * linux-arm-low.c (arm_delete_process): New.
804 (struct linux_target_ops): Add delete_process callback.
805 * linux-bfin-low.c (struct linux_target_ops): Likewise.
806 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
807 * linux-m32r-low.c (struct linux_target_ops): Likewise.
808 * linux-mips-low.c (mips_linux_delete_process): New.
809 (struct linux_target_ops): Add delete_process callback.
810 * linux-ppc-low.c (struct linux_target_ops): Likewise.
811 * linux-s390-low.c (struct linux_target_ops): Likewise.
812 * linux-sh-low.c (struct linux_target_ops): Likewise.
813 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
814 * linux-tile-low.c (struct linux_target_ops): Likewise.
815 * linux-x86-low.c (x86_linux_delete_process): New.
816 (struct linux_target_ops): Add delete_process callback.
817 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
818
466eecee
SM
8192017-10-12 Simon Marchi <simon.marchi@ericsson.com>
820
821 * linux-aarch64-low.c (the_low_target): Add thread delete
822 callback.
823 * linux-arm-low.c (arm_delete_thread): New function.
824 (the_low_target): Add thread delete callback.
825 * linux-bfin-low.c (the_low_target): Likewise.
826 * linux-crisv32-low.c (the_low_target): Likewise.
827 * linux-low.c (delete_lwp): Invoke delete_thread callback if
828 set.
829 * linux-low.h (struct linux_target_ops) <delete_thread>: New
830 field.
831 * linux-m32r-low.c (the_low_target): Add thread delete callback.
832 * linux-mips-low.c (mips_linux_delete_thread): New function.
833 (the_low_target): Add thread delete callback.
834 * linux-ppc-low.c (the_low_target): Likewise.
835 * linux-s390-low.c (the_low_target): Likewise.
836 * linux-sh-low.c (the_low_target): Likewise.
837 * linux-tic6x-low.c (the_low_target): Likewise.
838 * linux-tile-low.c (the_low_target): Likewise.
839 * linux-x86-low.c (the_low_target): Likewise.
840 * linux-xtensa-low.c (the_low_target): Likewise.
841
b79f7801
YZ
8422017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
843
844 * win32-low.c: Include "common-inferior.h".
845
bc3b087d
SDJ
8462017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
847
848 * inferiors.c (set_inferior_cwd): New function.
849 * server.c (handle_general_set): Handle QSetWorkingDir packet.
850 (handle_query): Inform that QSetWorkingDir is supported.
851 * win32-low.c (create_process): Pass the inferior's cwd to
852 CreateProcess.
853
d092c5a2
SDJ
8542017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
855
856 * inferiors.c (current_inferior_cwd): New global variable.
857 (get_inferior_cwd): New function.
858 * inferiors.h (struct process_info) <cwd>: New field.
859
7da0a886
SDJ
8602017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
861
862 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
863 (OBS): Add gdb_tilde_expand.o.
864
289a6840
SM
8652017-10-02 Simon Marchi <simon.marchi@ericsson.com>
866
867 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
868 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
869
256642e8
PA
8702017-09-29 Pedro Alves <palves@redhat.com>
871
872 * ax.c (gdb_parse_agent_expr): Constify.
873 * ax.h (gdb_parse_agent_expr): Constify.
874 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
875 Constify.
876 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
877 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
878 * remote-utils.h (read_ptid): Constify.
879 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
880 (process_point_options, process_serial_event): Constify.
881 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
882 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
883 (cmd_qtbuffer): Constify.
884
5b9ca4d4
PA
8852017-09-29 Pedro Alves <palves@redhat.com>
886
887 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
888 fails.
889
94c207e0
PA
8902017-09-29 Pedro Alves <palves@redhat.com>
891
892 * linux-low.c (handle_extended_wait): Pass parent thread instead
893 of process to thread_db_notice_clone.
894 * linux-low.h (thread_db_notice_clone): Replace parent process
895 parameter with parent thread parameter.
896 * thread-db.c (find_one_thread): Add comment.
897 (thread_db_notice_clone): Replace parent process parameter with
898 parent thread parameter. Temporarily switch to the parent thread.
899
75352e28
SDJ
9002017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
901
902 * gdbthread.h: Include "common-gdbthread.h".
903 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
904 "if" when validating the ptid.
905 * remote-utils.c: Include "gdbthread.h".
906 (prepare_resume_reply): Use "switch_to_thread".
907 * target.c (done_accessing_memory): Likewise.
908
ad339634
AA
9092017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
910
911 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
912 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
913 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
914 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
915 s390x-gs-linux64-ipa.o to ipa_obj.
916 * linux-s390-low.c (HWCAP_S390_GS): New define.
917 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
918 New functions.
919 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
920 (s390_arch_setup): Check for guarded-storage support and choose
921 appropriate tdesc.
922 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
923 init_registers_s390x_gs_linux64.
924 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
925 enum value.
926 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
927 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
928
cc4d742f
SM
9292017-09-22 Simon Marchi <simon.marchi@ericsson.com>
930
931 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
932
f6327dcb
KB
9332017-09-21 Kevin Buettner <kevinb@redhat.com>
934
935 * linux-low.h (struct lwp_info): Add new field, thread_handle.
936 (thread_db_thread_handle): Declare.
937 * linux-low.c (linux_target_ops): Initialize thread_handle.
938 * server.c (handle_qxfer_threads_worker): Add support for
939 "handle" attribute.
940 * target.h (struct target_ops): Add new function pointer,
941 thread_handle.
942 (target_thread_handle): Define.
943 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
944 field in lwp.
945 (thread_db_thread_handle): New function.
946
86299109
KB
9472017-09-21 Kevin Buettner <kevinb@redhat.com>
948
949 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
950 * linux-low.h (thread_db_notice_clone): Declare.
951 * thread-db.c (thread_db_notice_clone): New function.
952
f557a88a
PA
9532017-09-21 Pedro Alves <palves@redhat.com>
954
955 * server.c (gdb_read_memory, handle_status, process_serial_event)
956 (handle_serial_event, handle_target_event): Adjust to
957 set_desired_thread prototype change.
958 * target.c (set_desired_thread): Remove 'use_general' parameter
959 and adjust.
960 * target.h (set_desired_thread): Remove 'use_general' parameter.
961
223ffa71
TT
9622017-09-20 Tom Tromey <tom@tromey.com>
963
964 * target.c (target_terminal::terminal_state): Define.
965 (target_terminal::init): Rename from target_terminal_init.
966 (target_terminal::inferior): Rename from
967 target_terminal_inferior.
968 (target_terminal::ours): Rename from target_terminal_ours.
969 (target_terminal::ours_for_output, target_terminal::info): New.
970
04fd3ba9
SM
9712017-09-16 Simon Marchi <simon.marchi@ericsson.com>
972
973 * server.c (accumulate_file_name_length): Remove.
974 (emit_dll_description): Adjust to std::string change.
975 (handle_qxfer_libraries): Use std::string to hold document.
976
5e187554
SM
9772017-09-16 Simon Marchi <simon.marchi@ericsson.com>
978
979 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
980 return type of xml_escape_text.
981 * server.c (emit_dll_description): Likewise.
982
1526853e
SM
9832017-09-16 Simon Marchi <simon.marchi@ericsson.com>
984
985 * server.c (captured_main): Accept argument for --selftest.
986 Update run_tests call.
987 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
988 when registering selftests.
989
c4dfafab
SDJ
9902017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
991
992 * regcache.c (get_thread_regcache): Update code to use "std::vector"
993 instead of "VEC" for "target_desc.reg_defs".
994 (regcache_cpy): Likewise.
995 (registers_to_string): Likewise.
996 (registers_from_string): Likewise.
997 (find_regno): Likewise.
998 (supply_regblock): Likewise.
999 (regcache_raw_read_unsigned): Likewise.
1000 * tdesc.c (init_target_desc): Likewise.
1001 (tdesc_create_reg): Likewise.
1002 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1003 (struct target_desc) <reg_defs>: Convert to "std::vector".
1004 (target_desc): Do not initialize "reg_defs".
1005 (~target_desc): Update code to use "std::vector" instead of "VEC"
1006 for "target_desc.reg_defs".
1007 (operator==): Likewise.
1008
124aceb4
SM
10092017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1010
1011 * inferiors.h (thread_to_gdb_id): Remove.
1012 * inferiors.c (thread_to_gdb_id): Remove.
1013 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1014 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1015 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1016 Likewise.
1017 * nto-low.c (nto_fetch_registers, nto_store_registers,
1018 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1019
96cde54f
SM
10202017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1021
1022 * inferiors.h (gdb_id_to_thread_id): Remove.
1023 * inferiors.c (gdb_id_to_thread_id): Remove.
1024 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1025 removal. Move pid declaration closer to where it's used.
1026
e8ca139e
SM
10272017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1028
1029 * server.c (handle_detach): New function.
1030 (process_serial_event): Move code out, call handle_detach.
1031
f8a4e119
SM
10322017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1033
1034 * server.c (require_running): Rename to ...
1035 (require_running_or_return): ... this ...
1036 (require_running_or_break): ... and this.
1037 (handle_query, process_serial_event): Adjust.
1038
0eb0a407
SM
10392017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1040
1041 * linux-low.c (linux_set_resume_request): Remove unused
1042 variables.
1043
785922a5
SM
10442017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1045
1046 * server.c (first_thread_of): Remove.
1047 (process_serial_event): Replace usage of first_thread_of with
1048 find_any_thread_of_pid.
1049 * tracepoint.c (same_process_p): Remove.
1050 (gdb_agent_about_to_close): Replace usage of same_process_p with
1051 find_any_thread_of_pid.
1052 * linux-x86-low.c (same_process_callback): Remove.
1053 (x86_arch_setup_process_callback): Replace usage of
1054 same_process_callback with find_any_thread_of_pid.
1055 * thread-db.c (any_thread_of): Remove.
1056 (switch_to_process): Replace usage of any_thread_of with
1057 find_any_thread_of_pid.
1058 * inferiors.c (thread_pid_matches_callback): Remove.
1059 (find_thread_process): Adjust to use find_any_thread_of_pid.
1060
a059f00c
SDJ
10612017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1062
1063 * regcache.c (get_thread_regcache): Guard calls to "memset"
1064 with "!VEC_empty".
1065
cc397f3a
SDJ
10662017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1067
1068 * linux-low.c (handle_extended_wait): Use
1069 "allocate_target_description" instead of "XNEW".
1070 * linux-x86-low.c (initialize_low_arch): Likewise.
1071
22916b07
YQ
10722017-09-05 Yao Qi <yao.qi@linaro.org>
1073
1074 * configure.srv (srv_i386_regobj): Remove.
1075 (srv_amd64_regobj): Remove.
1076 (srv_regobj): Set it to "" for x86 non-linux targets.
1077 * linux-x86-tdesc.c (i386_linux_read_description):
1078 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1079 (init_registers_i386): Remove the declaration.
1080 (tdesc_i386): Remove the declaration.
1081 (lynx_i386_arch_setup): Call i386_create_target_description.
1082 * nto-x86-low.c: Likewise.
1083 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1084 [!__x86_64__]: include arch/i386.h.
1085 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1086
38602d55
YQ
10872017-09-05 Yao Qi <yao.qi@linaro.org>
1088
1089 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1090 i386/amd64-XXX-linux from it.
1091
44b886ff
YQ
10922017-09-05 Yao Qi <yao.qi@linaro.org>
1093
1094 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1095 false.
1096 (ipa_amd64_linux_regobj): Remove.
1097 (ipa_x32_linux_regobj): Remove.
1098
b4570e4b
YQ
10992017-09-05 Yao Qi <yao.qi@linaro.org>
1100
1101 * Makefile.in (arch-amd64.o): New rule.
1102 * configure.srv: Append arch-amd64.o.
1103 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1104 (get_ipa_tdesc): Call amd64_linux_read_description.
1105 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1106 and init_registers_amd64_XXX.
1107 * linux-x86-low.c (x86_linux_read_description): Call
1108 amd64_linux_read_description.
1109 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1110 (initialize_low_arch): Don't call init_registers_x32_XXX and
1111 init_registers_amd64_XXX.
1112 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1113 and tdesc_amd64_XXX.
1114 [__x86_64__] (amd64_tdesc_test): New function.
1115 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1116 and init_registers_amd64_XXX.
1117 * linux-x86-tdesc.c: Include arch/amd64.h.
1118 (xcr0_to_tdesc_idx): New function.
1119 (i386_linux_read_description): New function.
1120 (amd64_get_ipa_tdesc_idx): New function.
1121 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1122 (amd64_get_ipa_tdesc): Declare.
1123
d1f28ea2
YQ
11242017-09-05 Yao Qi <yao.qi@linaro.org>
1125
1126 * configure.srv (srv_i386_linux_xmlfiles): Remove
1127 i386/i386-XXX-linux.xml from it.
1128
25a93583
YQ
11292017-09-05 Yao Qi <yao.qi@linaro.org>
1130
1131 * configure.srv: Set srv_i386_linux_regobj empty if $development
1132 is false.
1133 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1134 initialize_low_tdesc.
1135 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1136 with #if initialize_low_tdesc.
1137 * linux-x86-tdesc-selftest.c: New file.
1138 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1139
5f035c07
YQ
11402017-09-05 Yao Qi <yao.qi@linaro.org>
1141
1142 * Makefile.in (arch-i386.o): New rule.
1143 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1144 (x86_64-*-linux*): Likewise.
1145 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1146 include arch/i386.h.
1147 (i386_linux_read_description): Remove code and call
1148 i386_create_target_description.
1149 * tdesc.c (allocate_target_description): New function.
1150 * tdesc.h (set_tdesc_architecture): Remove declaration.
1151 (set_tdesc_osabi): Likewise.
1152
0abe8a89
YQ
11532017-09-05 Yao Qi <yao.qi@linaro.org>
1154
1155 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1156 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1157 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1158 .xmltarget.
1159 * server.c (get_features_xml): Call tdesc_get_features_xml.
1160 * tdesc.c (set_tdesc_architecture): New function.
1161 (set_tdesc_osabi): New function.
1162 (tdesc_get_features_xml): New function.
1163 (tdesc_create_feature): Add an argument.
1164 * tdesc.h (struct target_desc) <features>: New field.
1165 <arch, osabi>: New field.
1166 (~target_desc): xfree features, arch, and osabi.
1167 (target_desc::oerator==): Don't compare .xmltarget.
1168 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1169 (set_tdesc_osabi): Likewise.
1170 (tdesc_get_features_xml): Likewise.
1171
0a188386
YQ
11722017-09-05 Yao Qi <yao.qi@linaro.org>
1173
1174 * linux-x86-tdesc.c: Include selftest.h.
1175 (i386_tdesc_test): New function.
1176 (initialize_low_tdesc): Call selftests::register_test.
1177 * tdesc.h: Include regdef.h.
1178 (target_desc): Override operator == and !=.
1179
f49ff000
YQ
11802017-09-05 Yao Qi <yao.qi@linaro.org>
1181
1182 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1183 (ipa_obj): Likewise.
1184 * linux-i386-ipa.c: Include common/x86-xstate.h
1185 (get_ipa_tdesc): Call i386_linux_read_description.
1186 (initialize_low_tracepoint): Don't call init_registers_XXX
1187 functions, call initialize_low_tdesc instead.
1188 * linux-x86-low.c (x86_linux_read_description): Call
1189 i386_linux_read_description.
1190 (initialize_low_arch): Don't call init_registers_i386_XXX
1191 functions, call initialize_low_tdesc.
1192 * linux-x86-tdesc.c: New file.
1193 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1194 (i386_get_ipa_tdesc_idx): Declare.
1195 (i386_get_ipa_tdesc): Declare.
1196 (initialize_low_tdesc): Declare.
1197
2b68ef2f
YQ
11982017-09-05 Yao Qi <yao.qi@linaro.org>
1199
1200 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1201 instead of 0.
1202
f7000548
YQ
12032017-09-05 Yao Qi <yao.qi@linaro.org>
1204
1205 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1206 * regcache.c (get_thread_regcache): Use VEC_length.
1207 (init_register_cache): Likewise.
1208 (regcache_cpy): Likewise.
1209 (registers_to_string): Iterate reg_defs via VEC_iterate.
1210 (find_regno): Likewise.
1211 (find_register_by_number): Use VEC_index.
1212 (register_size): Call find_register_by_number.
1213 (register_data): Call find_register_by_number.
1214 (supply_regblock): Use VEC_length.
1215 (regcache_raw_read_unsigned): Likewise.
1216 * tdesc.c (init_target_desc): Iterate reg_defs via
1217 VEC_iterate.
1218 (default_description): Update initializer.
1219 (copy_target_description): Don't update field num_registers.
1220 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1221 <num_registers>: Remove.
1222
50a421ac
SM
12232017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1224
1225 * Makefile.in (.SECONDARY): Define target.
1226
23fdd69e
SM
12272017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1228
1229 * linux-low.c (linux_wait_1): Adjust.
1230 * server.c (queue_stop_reply_callback): Adjust.
1231
0a2dde4a
SDJ
12322017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1233
1234 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1235 QEnvironmentUnset and QEnvironmentReset packets.
1236 (handle_query): Inform remote that QEnvironmentHexEncoded,
1237 QEnvironmentUnset and QEnvironmentReset are supported.
1238
6afd337d
SM
12392017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1240
1241 * inferiors.h (inferior_target_data): Rename to ...
1242 (thread_target_data): ... this.
1243 (inferior_regcache_data): Rename to ...
1244 (thread_regcache_data): ... this.
1245 (set_inferior_regcache_data): Rename to ...
1246 (set_thread_regcache_data): ... this.
1247 * inferiors.c (inferior_target_data): Rename to ...
1248 (thread_target_data): ... this.
1249 (inferior_regcache_data): Rename to ...
1250 (thread_regcache_data): ... this.
1251 (set_inferior_regcache_data): Rename to ...
1252 (set_thread_regcache_data): ... this.
1253 (free_one_thread): Update.
1254 * linux-low.h (get_thread_lwp): Update.
1255 * regcache.c (get_thread_regcache): Update.
1256 (regcache_invalidate_thread): Update.
1257 (free_register_cache_thread): Update.
1258 * win32-i386-low.c (update_debug_registers_callback): Update.
1259 (win32_get_current_dr): Update.
1260 * win32-low.c (thread_rec): Update.
1261 (delete_thread_info): Update.
1262 (continue_one_thread): Update.
1263 (suspend_one_thread): Update.
1264
a160cc46
SM
12652017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1266
1267 * inferiors.c (set_inferior_target_data): Remove.
1268 * inferiors.h (set_inferior_target_data): Remove.
1269
6d580b63
YQ
12702017-08-18 Yao Qi <yao.qi@linaro.org>
1271
1272 * Makefile.in (OBS): Add selftest.o.
1273 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1274 * configure, config.in: Re-generated.
1275 * server.c: Include common/sefltest.h.
1276 (captured_main): Handle option --selftest.
1277
f5a29eb0
YQ
12782017-08-09 Yao Qi <yao.qi@linaro.org>
1279
1280 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1281 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1282 i386-avx-mpx.o and i386-mmx.o.
1283 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1284 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1285 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1286 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1287 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1288 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1289 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1290 i386/amd64-avx-mpx.xml.
1291
57757c2f
YQ
12922017-08-09 Yao Qi <yao.qi@linaro.org>
1293
1294 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1295 and x32-avx-avx512.o.
1296 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1297 i386/x32-avx-avx512.xml.
1298
229d26fc
SM
12992017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1300
1301 * tracepoint.h (enum class fast_tpoint_collect_result): New
1302 enumeration.
1303 (fast_tracepoint_collecting): Change return type to
1304 fast_tpoint_collect_result.
1305 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1306 * linux-low.h: Include tracepoint.h.
1307 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1308 fast_tpoint_collect_result.
1309 * linux-low.c (handle_tracepoints): Adjust.
1310 (linux_fast_tracepoint_collecting): Change return type to
1311 fast_tpoint_collect_result.
1312 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1313 linux_wait_1, stuck_in_jump_pad_callback,
1314 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1315 proceed_one_lwp): Adjust to type change.
1316
2e1e43e1
YQ
13172017-07-10 Yao Qi <yao.qi@linaro.org>
1318
1319 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1320
adc764e7
YQ
13212017-06-29 Yao Qi <yao.qi@linaro.org>
1322
1323 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1324 Remove.
1325 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1326
a206891a
SM
13272017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1328
1329 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1330
9a6c7d9c
SDJ
13312017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1332
1333 * linux-low.c (linux_create_inferior): Adjust code to access the
1334 environment information via 'gdb_environ' class.
1335 * lynx-low.c (lynx_create_inferior): Likewise.
1336 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1337 (get_environ): Return a pointer to 'our_environ'.
1338 (captured_main): Initialize 'our_environ'.
1339 * server.h (get_environ): Adjust prototype.
1340 * spu-low.c (spu_create_inferior): Adjust code to access the
1341 environment information via 'gdb_environ' class.
1342
ae3e2ccf
SM
13432017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1344
1345 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1346 usage of "register" keyword.
1347
3e019bdc
SM
13482017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1349
1350 * configure: Re-generate.
1351
8465943a
SM
13522017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1353
1354 * configure: Re-generate.
1355
cf0dd6f0
SM
13562017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1357
1358 * Makefile.in (COMPILE.pre): Add "-x c++".
1359
9845682b
SDJ
13602017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1361
1362 * fork-child.c: Conditionally include <signal.h>.
1363
aefd8b33
SDJ
13642017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1365
1366 * server.c (handle_general_set): Handle new packet
1367 "QStartupWithShell".
1368 (handle_query): Add "QStartupWithShell" to the list of supported
1369 packets.
1370 (gdbserver_usage): Add help text explaining the
1371 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1372 options.
1373 (captured_main): Recognize and act upon the presence of the new
1374 CLI options.
1375
2090129c
SDJ
13762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1377 Pedro Alves <palves@redhat.com>
1378
1379 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1380 * configure: Regenerate.
1381 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1382 "fork-inferior.o".
1383 (i[34567]86-*-lynxos*): Likewise.
1384 (spu*-*-*): Likewise.
1385 * fork-child.c: New file.
1386 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1387 and "environ.h".
1388 (linux_ptrace_fun): New function.
1389 (linux_create_inferior): Adjust function prototype to reflect
1390 change on "target.h". Adjust function code to use
1391 "fork_inferior".
1392 (linux_request_interrupt): Delete "signal_pid".
1393 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1394 (lynx_ptrace_fun): New function.
1395 (lynx_create_inferior): Adjust function prototype to reflect
1396 change on "target.h". Adjust function code to use
1397 "fork_inferior".
1398 * nto-low.c (nto_create_inferior): Adjust function prototype and
1399 code to reflect change on "target.h". Update comments.
1400 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1401 "common-terminal.h" and "environ.h".
1402 (terminal_fd): Moved to fork-child.c.
1403 (old_foreground_pgrp): Likewise.
1404 (restore_old_foreground_pgrp): Likewise.
1405 (last_status): Make it global.
1406 (last_ptid): Likewise.
1407 (our_environ): New variable.
1408 (startup_with_shell): Likewise.
1409 (program_name): Likewise.
1410 (program_argv): Rename to...
1411 (program_args): ...this.
1412 (wrapper_argv): New variable.
1413 (start_inferior): Delete function.
1414 (get_exec_wrapper): New function.
1415 (get_exec_file): Likewise.
1416 (get_environ): Likewise.
1417 (prefork_hook): Likewise.
1418 (post_fork_inferior): Likewise.
1419 (postfork_hook): Likewise.
1420 (postfork_child_hook): Likewise.
1421 (handle_v_run): Update code to deal with arguments coming from the
1422 remote host. Update calls from "start_inferior" to
1423 "create_inferior".
1424 (captured_main): Likewise. Initialize environment variable. Call
1425 "have_job_control".
1426 * server.h (post_fork_inferior): New prototype.
1427 (get_environ): Likewise.
1428 (last_status): Declare.
1429 (last_ptid): Likewise.
1430 (signal_pid): Likewise.
1431 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1432 (spu_ptrace_fun): New function.
1433 (spu_create_inferior): Adjust function prototype to reflect change
1434 on "target.h". Adjust function code to use "fork_inferior".
1435 * target.c (target_terminal_init): New function.
1436 (target_terminal_inferior): Likewise.
1437 (target_terminal_ours): Likewise.
1438 * target.h: Include <vector>.
1439 (struct target_ops) <create_inferior>: Update prototype.
1440 (create_inferior): Update macro.
1441 * utils.c (gdb_flush_out_err): New function.
1442 * win32-low.c (win32_create_inferior): Adjust function prototype
1443 and code to reflect change on "target.h".
1444
043a4934
SDJ
14452017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1446
1447 * inferiors.c (switch_to_thread): New function.
1448
15652511
SDJ
14492017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1450
1451 * Makefile.in (SFILE): Add "common/job-control.c".
1452 (OBS): Add "job-control.o".
1453
21ea5acd
SDJ
14542017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1455
1456 * Makefile: Remove "@host_makefile_frag@".
1457
e13cb306
PA
14582017-05-05 Pedro Alves <palves@redhat.com>
1459
1460 * configure: Regenerate.
1461
c94fee56
SDJ
14622017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1463
1464 * configure: Regenerate.
1465
a0ff9e1a
SM
14662017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1467
1468 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1469 software_single_step change of return type to
1470 std::vector<CORE_ADDR>.
1471 * linux-low.c (install_software_single_step_breakpoints):
1472 Likewise.
1473 * linux-low.h (install_software_single_step_breakpoints):
1474 Likewise.
1475
be628ab8
SDJ
14762017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1477
1478 * remote-utils.c: Include "gdb_termios.h" instead of
1479 "terminal.h".
1480 * terminal.h: Delete file.
1481
7c5ded6a
SDJ
14822017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1483
1484 * server.c: Include <vector>.
1485 <program_argv, wrapper_argv>: Convert to std::vector.
1486 (start_inferior): Rewrite function to use C++.
1487 (handle_v_run): Likewise. Update code that calculates the argv
1488 based on the vRun packet; use C++.
1489 (captured_main): Likewise.
1490
436252de
SM
14912017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1492
1493 * server.c (handle_v_cont): Initialize thread_resume::thread
1494 with null_ptid.
1495
9bf2a700
PA
14962017-04-05 Pedro Alves <palves@redhat.com>
1497
1498 * configure: Regenerate.
1499
a121b7c1
PA
15002017-04-05 Pedro Alves <palves@redhat.com>
1501
1502 * gdbreplay.c (sync_error): Constify.
1503 * linux-x86-low.c (push_opcode): Constify.
1504
21c8a587
PA
15052017-04-05 Pedro Alves <palves@redhat.com>
1506
1507 * win32-low.c (get_child_debug_event)
1508 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1509 Report TARGET_WAITKIND_SPURIOUS instead.
1510
fb32b4f7
PA
15112017-04-05 Pedro Alves <palves@redhat.com>
1512
1513 * remote-utils.c (remote_prepare, remote_open): Constify.
1514 * remote-utils.h (remote_prepare, remote_open): Constify.
1515 * server.c (captured_main): Constify 'port' handling.
1516
65dd1e59
SM
15172017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1518
1519 * Makefile.in (clean): Clear .deps.
1520
8fa5b777
SM
15212017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1522
1523 * .gitignore: Remove generated files, replace with wildcard.
1524 * (clean): Replace removal of generated files with wildcard.
1525 (version.c): Replace with...
1526 (version-generated.c): ...this.
1527 (xml-builtin.c): Replace with...
1528 (xml-builtin-generated.c): ...this.
1529 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1530 (%.c: *regformats*): Replace with...
1531 (%-generated.c: *regformats*): ...this.
1532
a12e714b
MF
15332017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1534
1535 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1536 (xtensa_fill_gregset): Call collect_register_by_name for
1537 threadptr register.
1538 (xtensa_store_gregset): Call supply_register_by_name for
1539 threadptr register.
1540
1a09b50a
MF
15412017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1542
1543 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1544 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1545 (xtensa_store_gregset): Call supply_register for all registers in
1546 a0_regnum..a0_regnum + C0_NREGS range.
1547
1a01e7c6
SM
15482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1549
1550 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1551 (ax-ipa.o: ax.c): Remove.
1552 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1553 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1554 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1555 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1556 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1557
36bc18a8
SM
15582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1559
1560 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1561 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1562 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1563 (errors-ipa.o: ../common/errors.c): Remove.
1564 (format-ipa.o: ../common/format.c): Remove.
1565 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1566
a8ebe3d5
SM
15672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1568
1569 * Makefile.in (%-ipa.o: %.c): New rule.
1570 (tracepoint-ipa.o: tracepoint.c): Remove.
1571 (utils-ipa.o: utils.c): Remove.
1572 (remote-utils-ipa.o: remote-utils.c): Remove.
1573 (regcache-ipa.o: regcache.c): Remove.
1574 (i386-linux-ipa.o: i386-linux.c): Remove.
1575 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1576 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1577 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1578 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1579 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1580 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1581 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1582 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1583 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1584 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1585 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1586 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1587 (aarch64-ipa.o: aarch64.c): Remove.
1588 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1589 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1590 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1591 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1592 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1593 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1594 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1595 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1596 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1597 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1598 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1599 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1600 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1601 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1602 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1603 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1604 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1605 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1606 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1607 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1608 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1609 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1610 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1611 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1612 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1613 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1614 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1615 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1616 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1617 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1618 (tdesc-ipa.o: tdesc.c): Remove.
1619 (x32-linux-ipa.o: x32-linux.c): Remove.
1620 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1621 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1622
50cfacb7
SM
16232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1624
1625 * Makefile.in (%.o: ../arch/%.c): New rule.
1626 (arm.o: ../arch/arm.c): Remove.
1627 (arm-linux.o: ../arch/arm-linux.c): Remove.
1628 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1629 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1630
c5a22423
SM
16312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1632
1633 * Makefile.in (%.o: ../nat/%.c): New rule.
1634 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1635 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1636 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1637 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1638 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1639 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1640 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1641 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1642 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1643 (linux-personality.o: ../nat/linux-personality.c): Remove.
1644 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1645 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1646 (x86-linux.o: ../nat/x86-linux.c): Remove.
1647 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1648 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1649
6bda016b
SM
16502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1651
1652 * Makefile.in (%.o: ../common/%.c): New rule.
1653 (signals.o: ../common/signals.c): Remove.
1654 (print-utils.o: ../common/print-utils.c): Remove.
1655 (rsp-low.o: ../common/rsp-low.c): Remove.
1656 (common-utils.o: ../common/common-utils.c): Remove.
1657 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1658 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1659 (vec.o: ../common/vec.c): Remove.
1660 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1661 (xml-utils.o: ../common/xml-utils.c): Remove.
1662 (ptid.o: ../common/ptid.c): Remove.
1663 (buffer.o: ../common/buffer.c): Remove.
1664 (format.o: ../common/format.c): Remove.
1665 (filestuff.o: ../common/filestuff.c): Remove.
1666 (agent.o: ../common/agent.c): Remove.
1667 (errors.o: ../common/errors.c): Remove.
1668 (environ.o: ../common/environ.c): Remove.
1669 (common-debug.o: ../common/common-debug.c): Remove.
1670 (cleanups.o: ../common/cleanups.c): Remove.
1671 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1672 (fileio.o: ../common/fileio.c): Remove.
1673 (common-regcache.o: ../common/common-regcache.c): Remove.
1674 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1675 (new-op.o: ../common/new-op.c): Remove.
1676 (btrace-common.o: ../common/btrace-common.c): Remove.
1677
21122961
SM
16782017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1679
1680 * Makefile.in (%.o: ../target/%.c): New rule.
1681 (waitstatus.o: ../target/waitstatus.c): Remove.
1682
c362e621
SM
16832017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1684
1685 * Makefile.in
1686 (%.c: ../regformats/%.dat,
1687 (%.c: ../regformats/arm/%.dat,
1688 (%.c: ../regformats/i386/%.dat,
1689 (%.c: ../regformats/rs6000/%.dat): New rules.
1690 (aarch64.c): Remove.
1691 (reg-arm.c): Remove.
1692 (arm-with-iwmmxt.c): Remove.
1693 (arm-with-vfpv2.c): Remove.
1694 (arm-with-vfpv3.c): Remove.
1695 (arm-with-neon.c): Remove.
1696 (reg-bfin.c): Remove.
1697 (reg-cris.c): Remove.
1698 (reg-crisv32.c): Remove.
1699 (i386.c): Remove.
1700 (i386-linux.c): Remove.
1701 (i386-avx.c): Remove.
1702 (i386-avx-linux.c): Remove.
1703 (i386-avx-avx512.c): Remove.
1704 (i386-avx-avx512-linux.c): Remove.
1705 (i386-mpx.c): Remove.
1706 (i386-mpx-linux.c): Remove.
1707 (i386-avx-mpx-avx512-pku.c): Remove.
1708 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1709 (i386-avx-mpx.c): Remove.
1710 (i386-avx-mpx-linux.c): Remove.
1711 (i386-mmx.c): Remove.
1712 (i386-mmx-linux.c): Remove.
1713 (reg-ia64.c): Remove.
1714 (reg-m32r.c): Remove.
1715 (reg-m68k.c): Remove.
1716 (reg-cf.c): Remove.
1717 (mips-linux.c): Remove.
1718 (mips-dsp-linux.c): Remove.
1719 (mips64-linux.c): Remove.
1720 (mips64-dsp-linux.c): Remove.
1721 (nios2-linux.c): Remove.
1722 (powerpc-32.c): Remove.
1723 (powerpc-32l.c): Remove.
1724 (powerpc-altivec32l.c): Remove.
1725 (powerpc-cell32l.c): Remove.
1726 (powerpc-vsx32l.c): Remove.
1727 (powerpc-isa205-32l.c): Remove.
1728 (powerpc-isa205-altivec32l.c): Remove.
1729 (powerpc-isa205-vsx32l.c): Remove.
1730 (powerpc-e500l.c): Remove.
1731 (powerpc-64l.c): Remove.
1732 (powerpc-altivec64l.c): Remove.
1733 (powerpc-cell64l.c): Remove.
1734 (powerpc-vsx64l.c): Remove.
1735 (powerpc-isa205-64l.c): Remove.
1736 (powerpc-isa205-altivec64l.c): Remove.
1737 (powerpc-isa205-vsx64l.c): Remove.
1738 (s390-linux32.c): Remove.
1739 (s390-linux32v1.c): Remove.
1740 (s390-linux32v2.c): Remove.
1741 (s390-linux64.c): Remove.
1742 (s390-linux64v1.c): Remove.
1743 (s390-linux64v2.c): Remove.
1744 (s390-te-linux64.c): Remove.
1745 (s390-vx-linux64.c): Remove.
1746 (s390-tevx-linux64.c): Remove.
1747 (s390x-linux64.c): Remove.
1748 (s390x-linux64v1.c): Remove.
1749 (s390x-linux64v2.c): Remove.
1750 (s390x-te-linux64.c): Remove.
1751 (s390x-vx-linux64.c): Remove.
1752 (s390x-tevx-linux64.c): Remove.
1753 (tic6x-c64xp-linux.c): Remove.
1754 (tic6x-c64x-linux.c): Remove.
1755 (tic6x-c62x-linux.c): Remove.
1756 (reg-sh.c): Remove.
1757 (reg-sparc64.c): Remove.
1758 (reg-spu.c): Remove.
1759 (amd64.c): Remove.
1760 (amd64-linux.c): Remove.
1761 (amd64-avx.c): Remove.
1762 (amd64-avx-linux.c): Remove.
1763 (amd64-avx-avx512.c): Remove.
1764 (amd64-avx-avx512-linux.c): Remove.
1765 (amd64-mpx.c): Remove.
1766 (amd64-mpx-linux.c): Remove.
1767 (amd64-avx-mpx-avx512-pku.c): Remove.
1768 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1769 (amd64-avx-mpx.c): Remove.
1770 (amd64-avx-mpx-linux.c): Remove.
1771 (x32.c): Remove.
1772 (x32-linux.c): Remove.
1773 (x32-avx.c): Remove.
1774 (x32-avx-linux.c): Remove.
1775 (x32-avx-avx512.c): Remove.
1776 (x32-avx-avx512-linux.c): Remove.
1777 (reg-xtensa.c): Remove.
1778 (reg-tilegx.c): Remove.
1779 (reg-tilegx32.c): Remove.
1780
1672e0d9
SDJ
17812017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1782
1783 * Makefile.in (SFILES): Add "common/environ.c".
1784 (OBJS): Add "common/environ.h".
1785
239b6d10
WT
17862017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1787
1788 * configure.ac: Check if the fs_base and gs_base members of
1789 `struct user_regs_struct' exist.
1790 * config.in: Regenerated.
1791 * configure: Likewise.
1792
694b382c
AT
17932017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1794
1795 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1796 target_read_memory.
1797 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1798 (get_next_pcs_syscall_next_pc): Likewise.
1799
7dc53023
LM
18002016-12-23 Luis Machado <lgustavo@codesourcery.com>
1801
1802 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1803 * nto-x86-low.c: Likewise.
1804
ad02e4fe
SM
18052016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1806
1807 * Makefile.in: Include disable-implicit-rules.mk.
1808
dcb07cfa
PA
18092016-11-23 Pedro Alves <palves@redhat.com>
1810
1811 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1812 (debug_vprintf): Use std::chrono::steady_clock instead of
1813 gettimeofday. Use '.' instead of ':'.
1814 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1815 (get_timestamp): Use std::chrono::steady_clock instead of
1816 gettimeofday.
1817
8629c02c
SM
18182016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1819
1820 * Makefile.in: Fix whitespace formatting.
1821
b593ecca
SM
18222016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1823
1824 * Makefile.in (SFILES, OBS): Flatten list and order
1825 alphabetically.
1826
9986ba08
PA
18272016-11-23 Pedro Alves <palves@redhat.com>
1828
1829 * event-loop.c (handle_file_event): Use warning.
1830 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1831 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1832 Use warning.
1833
4eefa7bc
PA
18342016-11-23 Pedro Alves <palves@redhat.com>
1835
1836 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1837 output.
1838 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1839 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1840 debug_printf and debug_flush for debug output.
1841 * server.c (handle_general_set): Likewise.
1842 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1843 output.
1844
5443506e
SM
18452016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1846
1847 * Makefile.in (.c.o): Replace rule with ...
1848 (%.o: %.c): ... this one.
1849
3b165252
SM
18502016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1851
1852 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1853 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1854 make.
1855 * configure.ac: Remove checks for the make program.
1856 * configure: Re-generate.
1857
0bcda685
PA
18582016-10-28 Pedro Alves <palves@redhat.com>
1859
1860 * Makefile.in (CXX_DIALECT): Get from configure.
1861 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1862 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1863 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1864 * config.in: Regenerate.
1865 * configure: Regenerate.
1866
c3805894
YQ
18672016-10-27 Yao Qi <yao.qi@linaro.org>
1868
1869 * linux-low.c (linux_supports_range_stepping): Return true if
1870 can_software_single_step return true.
1871
89342618
YQ
18722016-10-27 Yao Qi <yao.qi@linaro.org>
1873
1874 * inferiors.c (find_inferior_in_random): New function.
1875 * inferiors.h (find_inferior_in_random): Declare.
1876 * linux-low.c (linux_wait_for_event_filtered): Call
1877 find_inferior_in_random instead of find_inferior.
1878
e3652c84
YQ
18792016-10-27 Yao Qi <yao.qi@linaro.org>
1880
1881 * linux-low.c (linux_wait_1): If single-step breakpoints are
1882 inserted, remove them.
1883
5a04c4cf
PA
18842016-10-26 Pedro Alves <palves@redhat.com>
1885
1886 * linux-low.c (handle_extended_wait): Link parent/child fork
1887 threads.
1888 (linux_wait_1): Unlink them.
1889 (linux_set_resume_request): Ignore resume requests for
1890 already-resumed and unhandled fork child threads.
1891 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1892 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1893 New functions.
1894 (handle_v_requests) <vCont>: Don't call require_running.
1895 * server.h (in_queued_stop_replies): New declaration.
1896
cb93dc7f
YQ
18972016-10-24 Yao Qi <yao.qi@linaro.org>
1898
1899 PR server/20733
1900 * linux-aarch64-low.c (append_insns): Cast the return value to
1901 'uint32_t *'.
1902
a1078bea
YQ
19032016-10-10 Yao Qi <yao.qi@linaro.org>
1904
1905 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1906
1fb77080
SDJ
19072016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1908
1909 * target.c (target_supports_multi_process): New function, moved
1910 from...
1911 * target.h (target_supports_multi_process): ... here. Remove
1912 macro.
1913
39b5a3b9
TT
19142016-10-05 Tom Tromey <tom@tromey.com>
1915
1916 PR remote/20655:
1917 * tracepoint.c (handle_tracepoint_bkpts): Check
1918 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1919
c1d0b70a
YQ
19202016-10-05 Yao Qi <yao.qi@linaro.org>
1921
1922 * configure.srv: Update the path of arm-*.xml files.
1923
0a69eedb
YQ
19242016-10-05 Terry Guo <terry.guo@arm.com>
1925 Yao Qi <yao.qi@linaro.org>
1926
1927 * Makefile.in: Adjust the path of rules.
1928 * configure.srv: Update the path of xml files.
1929 * regformats/arm-with-iwmmxt.dat: Regenerated.
1930 * regformats/arm-with-neon.dat: Likewise.
1931 * regformats/arm-with-vfpv2.dat: Likewise.
1932 * regformats/arm-with-vfpv3.dat Likewise.
1933
17e16485
YQ
19342016-09-30 Yao Qi <yao.qi@linaro.org>
1935
1936 PR gdbserver/20627
1937 * target.c (target_stop_and_wait): Don't call
1938 target_continue_no_signal, use resume_stop instead.
1939
edeeb602
YQ
19402016-09-26 Yao Qi <yao.qi@linaro.org>
1941
1942 * linux-low.c (linux_wait_1): Call debug_exit.
1943
503b1c39
PA
19442016-09-23 Pedro Alves <palves@redhat.com>
1945
1946 * Makefile.in (SFILES): Add common/new-op.c.
1947 (OBS): Add common/new-op.o.
1948 (new-op.o): New rule.
1949
74172ecf
SM
19502016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1951
1952 * .gitinore: Ignore more files.
1953
fc6cda2e
YQ
19542016-09-21 Yao Qi <yao.qi@linaro.org>
1955
1956 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1957 23.
1958
bc1e6c81
SDJ
19592016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1960
1961 * server.c (start_inferior): Call target_mourn_inferior instead of
1962 mourn_inferior; pass ptid_t argument to it.
1963 (resume): Likewise.
1964 (handle_target_event): Likewise.
1965 * target.c (target_mourn_inferior): New function.
1966 * target.h (mourn_inferior): Delete macro.
1967
0e00e962
AA
19682016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1969
1970 * linux-low.c (lwp_is_stepping): New function.
1971
1d8cb77d
CL
19722016-09-06 Carl Love <cel@us.ibm.com>
1973
1974 * server.c (start_inferior): Fixed comment, requested comment change
1975 didn't get updated correctly. Removed reference to ptrace () call as
1976 it is only true on Linux systems.
1977
7313bced
CL
19782016-09-06 Carl Love <cel@us.ibm.com>
1979
1980 * server.c (start_inferior): Do not call
1981 function target_post_create_inferior () if the
1982 inferior process has already exited.
1983
cf6de44d
PA
19842016-09-05 Pedro Alves <palves@redhat.com>
1985
1986 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1987 (COMPILE.pre, CC_LD): Use CXX directly.
1988 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1989 * acinclude.m4: Don't include build-with-cxx.m4.
1990 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1991 * configure: Regenerate.
1992
c1da6748
AT
19932016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1994
1995 PR gdb/19495
1996 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1997 call writing data to own_buf.
1998
f2b9e3df
SDJ
19992016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2000
2001 * target.c (mywait): Call target_wait instead of
2002 the_target->wait.
2003 (target_wait): New function.
2004
049a8570
SDJ
20052016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2006
2007 * server.c (start_inferior): New variable 'ptid'. Replace calls
2008 to the_target->resume by target_continue{,_no_signal}, depending
2009 on the case.
2010 * target.c (target_stop_and_wait): Call target_continue_no_signal
2011 instead of the_target->resume.
2012 (target_continue): New function.
2013
3aa5cfa0
AT
20142016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2015
2016 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2017
754653a7
AZ
20182016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019
2020 PR server/20491
2021 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2022 ps_prochandle.
2023 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2024 * linux-arm-low.c (ps_get_thread_area): Likewise.
2025 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2026 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2027 * linux-mips-low.c (ps_get_thread_area): Likewise.
2028 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2029 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2030 * linux-x86-low.c (ps_get_thread_area): Likewise.
2031 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2032
ed036b40
PA
20332016-08-19 Pedro Alves <palves@redhat.com>
2034
2035 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2036
c8ef42ee
PA
20372016-08-19 Pedro Alves <palves@redhat.com>
2038
2039 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2040 comment. Use memcpy instead of casting through unsigned long.
2041
9c235a72
PA
20422016-08-19 Pedro Alves <palves@redhat.com>
2043
2044 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2045 allocating around 0x80000000.
2046
201506da
PA
20472016-08-19 Pedro Alves <palves@redhat.com>
2048
2049 PR gdb/20415
2050 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2051 (x32-avx512-linux-ipa.o): New rules.
2052 * configure.ac (x86_64-*-linux*): New x32 check.
2053 * configure.srv (ipa_x32_linux_regobj): New.
2054 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2055 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2056 descriptions.
2057 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2058 descriptions.
2059 * configure: Regenerate.
2060
f348d89a
PA
20612016-08-09 Pedro Alves <palves@redhat.com>
2062
2063 PR gdb/18653
2064 * Makefile.in (OBS): Add signals-state-save-restore.o.
2065 (signals-state-save-restore.o): New rule.
2066 * config.in: Regenerate.
2067 * configure: Regenerate.
2068 * linux-low.c: Include "signals-state-save-restore.h".
2069 (linux_create_inferior): Call
2070 restore_original_signals_state.
2071 * server.c: Include "dispositions-save-restore.h".
2072 (captured_main): Call save_original_signals_state.
2073
1baf5149
PA
20742016-08-05 Pedro Alves <palves@redhat.com>
2075
2076 * configure: Regenerate.
2077
fcd4a73d
YQ
20782016-08-04 Yao Qi <yao.qi@linaro.org>
2079
2080 * linux-low.c (regsets_fetch_inferior_registers): Check
2081 errno is ESRCH or not.
2082
979659d0
YQ
20832016-08-02 Yao Qi <yao.qi@linaro.org>
2084
2085 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2086 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2087 (thread_db_load_search): Update.
2088 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2089 td_ta_set_event and td_ta_event_getmsg.
2090
6598661d
PA
20912016-07-26 Pedro Alves <palves@redhat.com>
2092
2093 PR server/20414
2094 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2095 of unsigned long for 64-bit registers and use uint32_t instead of
2096 unsigned int for 32-bit registers.
2097
9cf12d57
PA
20982016-07-26 Pedro Alves <palves@redhat.com>
2099
2100 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2101 to 'ptrace'.
2102
305450ed
TT
21032016-07-21 Tom Tromey <tom@tromey.com>
2104
2105 * configure: Rebuild.
2106
2583da7c
YQ
21072016-07-21 Yao Qi <yao.qi@linaro.org>
2108
2109 * mem-break.c (find_gdb_breakpoint): Cast bp to
2110 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2111
21536b36
YQ
21122016-07-21 Yao Qi <yao.qi@linaro.org>
2113
2114 * server.c (handle_v_requests): Support s and S actions
2115 if target_supports_software_single_step return true.
2116
8901d193
YQ
21172016-07-21 Yao Qi <yao.qi@linaro.org>
2118
2119 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2120 is resume_step, call maybe_hw_step.
2121 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2122 and unstop them.
2123 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2124 breakpoints or not.
2125 (proceed_one_lwp): If resume request is resume_step, install
2126 reinsert breakpoints and call maybe_hw_step.
2127
0e9a339e
YQ
21282016-07-21 Yao Qi <yao.qi@linaro.org>
2129
2130 * linux-low.c (proceed_one_lwp): Declare.
2131 (linux_resume_one_thread): Remove local variable 'step'.
2132 Lift code enqueue signal. Call proceed_one_lwp instead of
2133 linux_resume_one_lwp.
2134
4281b351
YQ
21352016-07-21 Yao Qi <yao.qi@linaro.org>
2136
2137 * linux-low.c (linux_resume_one_thread): Call
2138 enqueue_pending_signal.
2139
984a2c04
YQ
21402016-07-21 Yao Qi <yao.qi@linaro.org>
2141
2142 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2143 * inferiors.c (do_restore_current_thread_cleanup): New function.
2144 (make_cleanup_restore_current_thread): Likewise.
2145 * linux-low.c (install_software_single_step_breakpoints): Call
2146 make_cleanup_restore_current_thread. Switch current_thread to
2147 thread.
2148
bec903c9
YQ
21492016-07-21 Yao Qi <yao.qi@linaro.org>
2150
2151 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2152 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2153 (clone_one_breakpoint): Likewise.
2154 (delete_reinsert_breakpoints): Change parameter to thread.
2155 Callers updated.
2156 (has_reinsert_breakpoints): Likewise.
2157 (uninsert_reinsert_breakpoints): Likewise.
2158 (reinsert_reinsert_breakpoints): Likewise.
2159 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2160 (delete_reinsert_breakpoints): Likewise.
2161 (reinsert_reinsert_breakpoints): Likewise.
2162 (uninsert_reinsert_breakpoints): Likewise.
2163 (has_reinsert_breakpoints): Likewise.
2164
63c40ec7
YQ
21652016-07-21 Yao Qi <yao.qi@linaro.org>
2166
2167 * inferiors.c (get_thread_process): Make parameter const.
2168 * inferiors.h (get_thread_process): Update declaration.
2169 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2170 Add new parameters child_thread and parent_thread. Callers
2171 updated.
2172 * mem-break.h (clone_all_breakpoints): Update declaration.
2173
9aa76cd0
YQ
21742016-07-21 Yao Qi <yao.qi@linaro.org>
2175
2176 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2177 <command_list, handler>: Remove.
2178 (struct gdb_breakpoint): New.
2179 (struct other_breakpoint): New.
2180 (struct reinsert_breakpoint): New.
2181 (is_gdb_breakpoint): New function.
2182 (any_persistent_commands): Update command_list if
2183 is_gdb_breakpoint returns true.
2184 (set_breakpoint): Create breakpoints according to their types.
2185 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2186 (set_gdb_breakpoint_1): Likewise.
2187 (set_gdb_breakpoint): Likewise.
2188 (clear_breakpoint_conditions): Change parameter type to
2189 'struct gdb_breakpoint *'.
2190 (clear_breakpoint_commands): Likewise.
2191 (clear_breakpoint_conditions_and_commands): Likewise.
2192 (add_condition_to_breakpoint): Likewise.
2193 (add_breakpoint_condition): Likewise.
2194 (add_commands_to_breakpoint): Likewise.
2195 (check_breakpoints): Check other_breakpoint.
2196 (clone_one_breakpoint): Clone breakpopint according to its type.
2197 * mem-break.h (struct gdb_breakpoint): Declare.
2198 (set_gdb_breakpoint): Update declaration.
2199 (clear_breakpoint_conditions_and_commands): Likewise.
2200 (add_breakpoint_condition): Likewise.
2201 (add_breakpoint_commands): Likewise.
2202 * server.c (process_point_options): Change parameter type to
2203 'struct gdb_breakpoint *'.
2204
811f8301
YQ
22052016-07-21 Yao Qi <yao.qi@linaro.org>
2206
2207 * mem-break.c (set_breakpoint_at): Rename it to ...
2208 (set_breakpoint_type_at): ... it.
2209 (set_breakpoint_at): Call set_breakpoint_type_at.
2210 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2211 * mem-break.h (set_breakpoint_at): Update comments.
2212
b1c51e36
CLT
22132016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2214
2215 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2216 to buf parameter.
2217 (nios2_store_gregset): Likewise.
2218
ced2dffb
PA
22192016-07-01 Pedro Alves <palves@redhat.com>
2220 Antoine Tremblay <antoine.tremblay@ericsson.com>
2221
2222 * linux-low.c: Change interface to take the target lwp_info
2223 pointer directly and return void. Handle detaching from a zombie
2224 thread.
2225 (linux_detach_lwp_callback): New function.
2226 (linux_detach): Detach from the leader thread after detaching from
2227 the clone threads.
2228
2ac09a5b
YQ
22292016-06-28 Yao Qi <yao.qi@linaro.org>
2230
2231 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2232 for variable new_offset.
2233 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2234 (aarch64_ftrace_insn_reloc_cb): Likewise.
2235 (aarch64_ftrace_insn_reloc_tb): Likewise.
2236 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2237 PRIx64 instead of PRIx32.
2238
79e7fd4f
YQ
22392016-06-28 Yao Qi <yao.qi@linaro.org>
2240
2241 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2242 (the_low_target): Install arm_get_syscall_trapinfo.
2243
061fc021
YQ
22442016-06-28 Yao Qi <yao.qi@linaro.org>
2245
2246 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2247 function.
2248 (the_low_target): Install aarch64_get_syscall_trapinfo.
2249
4cc32bec
YQ
22502016-06-28 Yao Qi <yao.qi@linaro.org>
2251
2252 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2253 Callers updated.
2254 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2255 Remove parameter sysno.
2256 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2257 sysret.
2258
782c1122
AA
22592016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2260
2261 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2262 (s390_emit_ne_goto): Likewise.
2263 (s390_emit_lt_goto): Likewise.
2264 (s390_emit_le_goto): Likewise.
2265 (s390_emit_gt_goto): Likewise.
2266 (s390_emit_ge_goto): Likewise.
2267 (s390x_emit_eq_goto): Likewise.
2268 (s390x_emit_ne_goto): Likewise.
2269 (s390x_emit_lt_goto): Likewise.
2270 (s390x_emit_le_goto): Likewise.
2271 (s390x_emit_gt_goto): Likewise.
2272 (s390x_emit_ge_goto): Likewise.
2273 (s390_emit_ops_impl): Mark variable static.
2274 (s390x_emit_ops): Likewise.
2275
2e7b624b
YQ
22762016-06-17 Yao Qi <yao.qi@linaro.org>
2277
2278 * linux-low.c (handle_extended_wait): Call
2279 uninsert_reinsert_breakpoints for the parent process. Remove
2280 reinsert breakpoints from the child process. Reinsert them to
2281 the parent process when vfork is done.
2282 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2283 (reinsert_reinsert_breakpoints): New function.
2284 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2285 (reinsert_reinsert_breakpoints): Declare.
2286
8a81c5d7
YQ
22872016-06-17 Yao Qi <yao.qi@linaro.org>
2288
2289 * linux-low.c (handle_extended_wait): If the parent is doing
2290 step-over, remove the reinsert breakpoints from the forked child.
2291
f50bf8e5
YQ
22922016-06-17 Yao Qi <yao.qi@linaro.org>
2293
2294 * linux-low.c (unsuspend_all_lwps): Declare.
2295 (linux_low_filter_event): If thread exited, call finish_step_over.
2296 If step-over is finished, unsuspend other threads.
2297
8376a3cb
YQ
22982016-06-17 Yao Qi <yao.qi@linaro.org>
2299
2300 * linux-low.c (linux_resume_one_lwp_throw): Assert
2301 has_reinsert_breakpoints returns false.
2302 * mem-break.c (delete_disabled_breakpoints): Assert
2303 bp type isn't reinsert_breakpoint.
2304
f79b145d
YQ
23052016-06-17 Yao Qi <yao.qi@linaro.org>
2306
2307 * linux-low.c (maybe_hw_step): New function.
2308 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2309 (finish_step_over): Switch current_thread to lwp temporarily,
2310 and assert has_reinsert_breakpoints returns true.
2311 (proceed_one_lwp): Call maybe_hw_step.
2312 * mem-break.c (has_reinsert_breakpoints): New function.
2313 * mem-break.h (has_reinsert_breakpoints): Declare.
2314
0ae534d2
JT
23152016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2316
2317 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2318
fcdad592
YQ
23192016-05-17 Yao Qi <yao.qi@linaro.org>
2320
2321 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2322 instead of find_inferior.
2323
9e784964
YQ
23242016-05-05 Yao Qi <yao.qi@linaro.org>
2325
2326 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2327 Initialize res to zero.
2328
cf2ebb6e
YQ
23292016-05-05 Yao Qi <yao.qi@linaro.org>
2330
2331 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2332 to uint32_t.
2333
c1aebf87
UW
23342016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2335
2336 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2337 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2338 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2339
35fd2deb 23402016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2341 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2342
2343 * tracepoint.c (write_inferior_int8): New function.
2344 (cmd_qtenable_disable): Write enable flag using
2345 write_inferior_int8.
2346
484b3c32
YQ
23472016-04-25 Yao Qi <yao.qi@linaro.org>
2348
2349 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2350 (need_step_over_p): Return zero if the LWP has pending signals
2351 can be delivered on software single step target.
2352
85ba7d86
YQ
23532016-04-25 Yao Qi <yao.qi@linaro.org>
2354
2355 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2356 return instead of error.
2357
3539aa13
YQ
23582016-04-22 Yao Qi <yao.qi@linaro.org>
2359
2360 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2361 to 23.
2362
5b061e98
YQ
23632016-04-22 Yao Qi <yao.qi@linaro.org>
2364
2365 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2366 signal when stepping over breakpoint with software single
2367 step.
2368
3451269c
PA
23692016-04-21 Pedro Alves <palves@redhat.com>
2370
2371 * linux-s390-low.c (s390_collect_ptrace_register)
2372 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2373 add casts.
2374 (s390_check_regset): Use void * instead of gdb_byte *.
2375
a2358508
PA
23762016-04-20 Pedro Alves <palves@redhat.com>
2377
2378 * configure: Renegerate.
2379
6885166d
YQ
23802016-04-20 Yao Qi <yao.qi@linaro.org>
2381
2382 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2383 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2384 number 16.
2385 (arm_store_gregset): Likewise.
2386
2b863f51
WT
23872016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2388
2389 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2390 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2391 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2392 (amd64-avx-mpx-linux.c): New rules.
2393 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2394 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2395 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2396 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2397 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2398 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2399 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2400 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2401 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2402 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2403 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2404 * linux-x86-low.c (x86_linux_read_description): Add case for
2405 X86_XSTATE_AVX_MPX_MASK.
2406 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2407 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2408 init_registers_i386_avx_mpx_linux.
2409 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2410 (initialize_low_tracepoint): Call
2411 init_registers_i386_avx_mpx_linux.
2412 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2413 (initialize_low_tracepoint): Call
2414 init_registers_amd64_avx_mpx_linux.
2415 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2416 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2417 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2418 declarations.
2419
9b30624b
PA
24202016-04-18 Pedro Alves <palves@redhat.com>
2421
2422 * configure: Regenerate.
2423
45e3745e
AT
24242016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2425
2426 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2427 (aarch64_emit_sub): Likewise.
2428
2afc13ff
PA
24292016-04-12 Pedro Alves <palves@redhat.com>
2430
2431 * utils.c (prepare_to_throw_exception): Delete.
2432
6e774b13
SM
24332016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2434
2435 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2436
4dca19f8
MK
24372016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2438
2439 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2440
d0a9981f
MK
24412016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2442
2443 * linux-aarch64-ipa.c: Add <elf.h> include.
2444 * linux-ppc-ipa.c: Add <elf.h> include.
2445 * linux-s390-ipa.c: Add <elf.h> include.
2446
252db07e
MK
24472016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2448
2449 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2450 (get_raw_reg_ptr): Likewise.
2451 (get_trace_state_variable_value_ptr): Likewise.
2452 (set_trace_state_variable_value_ptr): Likewise.
2453 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2454 char *.
2455
14e2b6d9
MK
24562016-03-31 Wei-cheng Wang <cole945@gmail.com>
2457 Marcin Kościelnicki <koriakin@0x04.net>
2458
2459 PR/17221
2460 * linux-ppc-low.c (emit_insns): New function.
2461 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2462 (ppc_emit_prologue): New function.
2463 (ppc_emit_epilogue): New function.
2464 (ppc_emit_add): New function.
2465 (ppc_emit_sub): New function.
2466 (ppc_emit_mul): New function.
2467 (ppc_emit_lsh): New function.
2468 (ppc_emit_rsh_signed): New function.
2469 (ppc_emit_rsh_unsigned): New function.
2470 (ppc_emit_ext): New function.
2471 (ppc_emit_zero_ext): New function.
2472 (ppc_emit_log_not): New function.
2473 (ppc_emit_bit_and): New function.
2474 (ppc_emit_bit_or): New function.
2475 (ppc_emit_bit_xor): New function.
2476 (ppc_emit_bit_not): New function.
2477 (ppc_emit_equal): New function.
2478 (ppc_emit_less_signed): New function.
2479 (ppc_emit_less_unsigned): New function.
2480 (ppc_emit_ref): New function.
2481 (ppc_emit_const): New function.
2482 (ppc_emit_reg): New function.
2483 (ppc_emit_pop): New function.
2484 (ppc_emit_stack_flush): New function.
2485 (ppc_emit_swap): New function.
2486 (ppc_emit_stack_adjust): New function.
2487 (ppc_emit_call): New function.
2488 (ppc_emit_int_call_1): New function.
2489 (ppc_emit_void_call_2): New function.
2490 (ppc_emit_if_goto): New function.
2491 (ppc_emit_goto): New function.
2492 (ppc_emit_eq_goto): New function.
2493 (ppc_emit_ne_goto): New function.
2494 (ppc_emit_lt_goto): New function.
2495 (ppc_emit_le_goto): New function.
2496 (ppc_emit_gt_goto): New function.
2497 (ppc_emit_ge_goto): New function.
2498 (ppc_write_goto_address): New function.
2499 (ppc_emit_ops_impl): New static variable.
2500 (ppc64v1_emit_prologue): New function.
2501 (ppc64v2_emit_prologue): New function.
2502 (ppc64_emit_epilogue): New function.
2503 (ppc64_emit_add): New function.
2504 (ppc64_emit_sub): New function.
2505 (ppc64_emit_mul): New function.
2506 (ppc64_emit_lsh): New function.
2507 (ppc64_emit_rsh_signed): New function.
2508 (ppc64_emit_rsh_unsigned): New function.
2509 (ppc64_emit_ext): New function.
2510 (ppc64_emit_zero_ext): New function.
2511 (ppc64_emit_log_not): New function.
2512 (ppc64_emit_bit_and): New function.
2513 (ppc64_emit_bit_or): New function.
2514 (ppc64_emit_bit_xor): New function.
2515 (ppc64_emit_bit_not): New function.
2516 (ppc64_emit_equal): New function.
2517 (ppc64_emit_less_signed): New function.
2518 (ppc64_emit_less_unsigned): New function.
2519 (ppc64_emit_ref): New function.
2520 (ppc64_emit_const): New function.
2521 (ppc64v1_emit_reg): New function.
2522 (ppc64v2_emit_reg): New function.
2523 (ppc64_emit_pop): New function.
2524 (ppc64_emit_stack_flush): New function.
2525 (ppc64_emit_swap): New function.
2526 (ppc64v1_emit_call): New function.
2527 (ppc64v2_emit_call): New function.
2528 (ppc64v1_emit_int_call_1): New function.
2529 (ppc64v2_emit_int_call_1): New function.
2530 (ppc64v1_emit_void_call_2): New function.
2531 (ppc64v2_emit_void_call_2): New function.
2532 (ppc64_emit_if_goto): New function.
2533 (ppc64_emit_eq_goto): New function.
2534 (ppc64_emit_ne_goto): New function.
2535 (ppc64_emit_lt_goto): New function.
2536 (ppc64_emit_le_goto): New function.
2537 (ppc64_emit_gt_goto): New function.
2538 (ppc64_emit_ge_goto): New function.
2539 (ppc64v1_emit_ops_impl): New static variable.
2540 (ppc64v2_emit_ops_impl): New static variable.
2541 (ppc_emit_ops): New function.
2542 (linux_low_target): Wire in ppc_emit_ops.
2543
a2174ba4
MK
25442016-03-31 Wei-cheng Wang <cole945@gmail.com>
2545 Marcin Kościelnicki <koriakin@0x04.net>
2546
2547 PR/17221
2548 * Makefile.in: Add powerpc-*-ipa.o
2549 * configure.srv: Add ipa_obj for powerpc*-linux.
2550 * linux-ppc-ipa.c: New file.
2551 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2552 includes.
2553 (PPC_FIELD): New macro.
2554 (PPC_SEXT): New macro.
2555 (PPC_OP6): New macro.
2556 (PPC_BO): New macro.
2557 (PPC_LI): New macro.
2558 (PPC_BD): New macro.
2559 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2560 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2561 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2562 (ppc_get_thread_area): New function.
2563 (is_elfv2_inferior): New function.
2564 (gen_ds_form): New function.
2565 (GEN_STD): New macro.
2566 (GEN_STDU): New macro.
2567 (GEN_LD): New macro.
2568 (GEN_LDU): New macro.
2569 (gen_d_form): New function.
2570 (GEN_ADDI): New macro.
2571 (GEN_ADDIS): New macro.
2572 (GEN_LI): New macro.
2573 (GEN_LIS): New macro.
2574 (GEN_ORI): New macro.
2575 (GEN_ORIS): New macro.
2576 (GEN_LWZ): New macro.
2577 (GEN_STW): New macro.
2578 (GEN_STWU): New macro.
2579 (gen_xfx_form): New function.
2580 (GEN_MFSPR): New macro.
2581 (GEN_MTSPR): New macro.
2582 (GEN_MFCR): New macro.
2583 (GEN_MTCR): New macro.
2584 (GEN_SYNC): New macro.
2585 (GEN_LWSYNC): New macro.
2586 (gen_x_form): New function.
2587 (GEN_OR): New macro.
2588 (GEN_MR): New macro.
2589 (GEN_LWARX): New macro.
2590 (GEN_STWCX): New macro.
2591 (GEN_CMPW): New macro.
2592 (gen_md_form): New function.
2593 (GEN_RLDICL): New macro.
2594 (GEN_RLDICR): New macro.
2595 (gen_i_form): New function.
2596 (GEN_B): New macro.
2597 (GEN_BL): New macro.
2598 (gen_b_form): New function.
2599 (GEN_BNE): New macro.
2600 (GEN_LOAD): New macro.
2601 (GEN_STORE): New macro.
2602 (gen_limm): New function.
2603 (gen_atomic_xchg): New function.
2604 (gen_call): New function.
2605 (ppc_relocate_instruction): New function.
2606 (ppc_install_fast_tracepoint_jump_pad): New function.
2607 (ppc_get_min_fast_tracepoint_insn_len): New function.
2608 (ppc_get_ipa_tdesc_idx): New function.
2609 (the_low_target): Wire in the new functions.
2610 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2611 tdescs.
2612 * linux-ppc-tdesc.h: New file.
2613
a13c4696
MK
26142016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2615
2616 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2617 (alloc_jump_pad_buffer): New function.
2618 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2619 (alloc_jump_pad_buffer): New function.
2620 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2621 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2622 (alloc_jump_pad_buffer): New function.
2623 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2624 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2625 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2626 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2627
1cda1512
MK
26282016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2629
2630 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2631 * linux-amd64-ipa.c: Likewise.
2632 * linux-i386-ipa.c: Likewise.
2633 * linux-s390-ipa.c: Likewise.
2634 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2635 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2636 set_trace_state_variable_value_ptr.
2637 (struct ipa_sym_addresses): Likewise.
2638 (symbol_list): Likewise.
2639 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2640 accessing gdb_collect directly.
2641 (gdb_collect_ptr_type): New typedef.
2642 (get_raw_reg_ptr_type): New typedef.
2643 (get_trace_state_variable_value_ptr_type): New typedef.
2644 (set_trace_state_variable_value_ptr_type): New typedef.
2645 (gdb_collect_ptr): New global.
2646 (get_raw_reg_ptr): New global.
2647 (get_trace_state_variable_value_ptr): New global.
2648 (set_trace_state_variable_value_ptr): New global.
2649 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2650 accessing get_raw_reg directly.
2651 (get_get_tsv_func_addr): Likewise for
2652 get_trace_state_variable_value_ptr.
2653 (get_set_tsv_func_addr): Likewise for
2654 set_trace_state_variable_value_ptr.
2655 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2656
72fb5488
SM
26572016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2658
2659 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2660
28170b88
MK
26612016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2662
2663 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2664 packets.
2665 (relocate_instruction): Remove own_buf.
2666 * server.c (own_buf): Make global.
2667 (handle_v_requests): Make global.
2668 * server.h (own_buf): New declaration.
2669 (handle_v_requests): New prototype.
2670
f39e8743
MK
26712016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2672
2673 PR 18377
2674 * linux-s390-low.c (add_insns): New function.
2675 (s390_emit_prologue): New function.
2676 (s390_emit_epilogue): New function.
2677 (s390_emit_add): New function.
2678 (s390_emit_sub): New function.
2679 (s390_emit_mul): New function.
2680 (s390_emit_lsh): New function.
2681 (s390_emit_rsh_signed): New function.
2682 (s390_emit_rsh_unsigned): New function.
2683 (s390_emit_ext): New function.
2684 (s390_emit_log_not): New function.
2685 (s390_emit_bit_and): New function.
2686 (s390_emit_bit_or): New function.
2687 (s390_emit_bit_xor): New function.
2688 (s390_emit_bit_not): New function.
2689 (s390_emit_equal): New function.
2690 (s390_emit_less_signed): New function.
2691 (s390_emit_less_unsigned): New function.
2692 (s390_emit_ref): New function.
2693 (s390_emit_if_goto): New function.
2694 (s390_emit_goto): New function.
2695 (s390_write_goto_address): New function.
2696 (s390_emit_litpool): New function.
2697 (s390_emit_const): New function.
2698 (s390_emit_call): New function.
2699 (s390_emit_reg): New function.
2700 (s390_emit_pop): New function.
2701 (s390_emit_stack_flush): New function.
2702 (s390_emit_zero_ext): New function.
2703 (s390_emit_swap): New function.
2704 (s390_emit_stack_adjust): New function.
2705 (s390_emit_set_r2): New function.
2706 (s390_emit_int_call_1): New function.
2707 (s390_emit_void_call_2): New function.
2708 (s390_emit_eq_goto): New function.
2709 (s390_emit_ne_goto): New function.
2710 (s390_emit_lt_goto): New function.
2711 (s390_emit_le_goto): New function.
2712 (s390_emit_gt_goto): New function.
2713 (s390_emit_ge_goto): New function.
2714 (s390x_emit_prologue): New function.
2715 (s390x_emit_epilogue): New function.
2716 (s390x_emit_add): New function.
2717 (s390x_emit_sub): New function.
2718 (s390x_emit_mul): New function.
2719 (s390x_emit_lsh): New function.
2720 (s390x_emit_rsh_signed): New function.
2721 (s390x_emit_rsh_unsigned): New function.
2722 (s390x_emit_ext): New function.
2723 (s390x_emit_log_not): New function.
2724 (s390x_emit_bit_and): New function.
2725 (s390x_emit_bit_or): New function.
2726 (s390x_emit_bit_xor): New function.
2727 (s390x_emit_bit_not): New function.
2728 (s390x_emit_equal): New function.
2729 (s390x_emit_less_signed): New function.
2730 (s390x_emit_less_unsigned): New function.
2731 (s390x_emit_ref): New function.
2732 (s390x_emit_if_goto): New function.
2733 (s390x_emit_const): New function.
2734 (s390x_emit_call): New function.
2735 (s390x_emit_reg): New function.
2736 (s390x_emit_pop): New function.
2737 (s390x_emit_stack_flush): New function.
2738 (s390x_emit_zero_ext): New function.
2739 (s390x_emit_swap): New function.
2740 (s390x_emit_stack_adjust): New function.
2741 (s390x_emit_int_call_1): New function.
2742 (s390x_emit_void_call_2): New function.
2743 (s390x_emit_eq_goto): New function.
2744 (s390x_emit_ne_goto): New function.
2745 (s390x_emit_lt_goto): New function.
2746 (s390x_emit_le_goto): New function.
2747 (s390x_emit_gt_goto): New function.
2748 (s390x_emit_ge_goto): New function.
2749 (s390_emit_ops): New function.
2750 (struct linux_target_ops): Fill in emit_ops hook.
2751
abd9baf9
MK
27522016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2753
2754 PR 18377
2755 * Makefile.in: Add s390 IPA files.
2756 * configure.srv: Build IPA for s390.
2757 * linux-s390-ipa.c: New file.
2758 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2759 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2760 (tdesc_s390_linux32): Likewise.
2761 (init_registers_s390_linux32v1): Likewise.
2762 (tdesc_s390_linux32v1): Likewise.
2763 (init_registers_s390_linux32v2): Likewise.
2764 (tdesc_s390_linux32v2): Likewise.
2765 (init_registers_s390_linux64): Likewise.
2766 (tdesc_s390_linux64): Likewise.
2767 (init_registers_s390_linux64v1): Likewise.
2768 (tdesc_s390_linux64v1): Likewise.
2769 (init_registers_s390_linux64v2): Likewise.
2770 (tdesc_s390_linux64v2): Likewise.
2771 (init_registers_s390_te_linux64): Likewise.
2772 (tdesc_s390_te_linux64): Likewise.
2773 (init_registers_s390_vx_linux64): Likewise.
2774 (tdesc_s390_vx_linux64): Likewise.
2775 (init_registers_s390_tevx_linux64): Likewise.
2776 (tdesc_s390_tevx_linux64): Likewise.
2777 (init_registers_s390x_linux64): Likewise.
2778 (tdesc_s390x_linux64): Likewise.
2779 (init_registers_s390x_linux64v1): Likewise.
2780 (tdesc_s390x_linux64v1): Likewise.
2781 (init_registers_s390x_linux64v2): Likewise.
2782 (tdesc_s390x_linux64v2): Likewise.
2783 (init_registers_s390x_te_linux64): Likewise.
2784 (tdesc_s390x_te_linux64): Likewise.
2785 (init_registers_s390x_vx_linux64): Likewise.
2786 (tdesc_s390x_vx_linux64): Likewise.
2787 (init_registers_s390x_tevx_linux64): Likewise.
2788 (tdesc_s390x_tevx_linux64): Likewise.
2789 (have_hwcap_s390_vx): New static variable.
2790 (s390_arch_setup): Fill have_hwcap_s390_vx.
2791 (s390_get_thread_area): New function.
2792 (s390_ft_entry_gpr_esa): New const.
2793 (s390_ft_entry_gpr_zarch): New const.
2794 (s390_ft_entry_misc): New const.
2795 (s390_ft_entry_fr): New const.
2796 (s390_ft_entry_vr): New const.
2797 (s390_ft_main_31): New const.
2798 (s390_ft_main_64): New const.
2799 (s390_ft_exit_fr): New const.
2800 (s390_ft_exit_vr): New const.
2801 (s390_ft_exit_misc): New const.
2802 (s390_ft_exit_gpr_esa): New const.
2803 (s390_ft_exit_gpr_zarch): New const.
2804 (append_insns): New function.
2805 (s390_relocate_instruction): New function.
2806 (s390_install_fast_tracepoint_jump_pad): New function.
2807 (s390_get_min_fast_tracepoint_insn_len): New function.
2808 (s390_get_ipa_tdesc_idx): New function.
2809 (struct linux_target_ops): Wire in the above functions.
2810 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2811 * linux-s390-tdesc.h: New file.
2812
a4105d04
MK
28132016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2814
2815 * linux-s390-low.c (s390_supports_tracepoints): New function.
2816 (struct linux_target_ops): Fill supports_tracepoints hook.
2817
35ac8b3e
YQ
28182016-03-18 Yao Qi <yao.qi@linaro.org>
2819
2820 * linux-low.c (lwp_signal_can_be_delivered): New function.
2821 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2822
94610ec4
YQ
28232016-03-18 Yao Qi <yao.qi@linaro.org>
2824
2825 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2826 0 if signal is enqueued. Remove 'signal' from one debugging
2827 message. Move one debugging message to some lines below.
2828 Remove code setting 'signal' to 0.
2829
80aea927
YQ
28302016-03-18 Yao Qi <yao.qi@linaro.org>
2831
2832 * linux-low.c (linux_low_filter_event): Remove redundant
2833 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2834
b04fd3be
MK
28352016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2836
2837 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2838 (struct linux_target_ops): Wire in the above.
2839
c40c8d4b
YQ
28402016-03-03 Yao Qi <yao.qi@linaro.org>
2841
2842 * linux-low.c: Update comments to start_step_over.
2843
0f8288ae
YQ
28442016-03-03 Yao Qi <yao.qi@linaro.org>
2845
2846 PR server/19736
2847 * linux-low.c (handle_extended_wait): Set child suspended
2848 if event_lwp->bp_reinsert isn't zero.
2849
fdbd04a8
YQ
28502016-03-02 Yao Qi <yao.qi@linaro.org>
2851
2852 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2853 enqueue_pending_signal.
2854
6896a8fa
MK
28552016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2856
2857 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2858 is actually loaded.
2859
ab503087
MK
28602016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2861
2862 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2863 (s390_regmap_3264) [!__s390x__]: New global.
2864 (s390_collect_ptrace_register): Skip map entries containing -1.
2865 (s390_supply_ptrace_register): Ditto.
2866 (s390_fill_gprs_high): New function.
2867 (s390_store_gprs_high): New function.
2868 (s390_regsets): Add NT_S390_HIGH_GPRS.
2869 (s390_get_hwcap): Enable on 31-bit.
2870 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2871 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2872 Detect NT_S390_HIGH_GPRS.
2873 (s390_usrregs_info_3264): Enable on 31-bit.
2874 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2875 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2876
ae91f625
MK
28772016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2878
2879 PR gdb/13808
2880 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2881 * configure.srv: Ditto.
2882 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2883 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2884 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2885 (init_registers_amd64_linux): Remove prototype.
2886 (tdesc_amd64_linux): Remove declaration.
2887 (get_ipa_tdesc): New function.
2888 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2889 initialize remaining tdescs.
2890 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2891 (init_registers_i386_linux): Remove prototype.
2892 (tdesc_i386_linux): Remove declaration.
2893 (get_ipa_tdesc): New function.
2894 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2895 initialize remaining tdescs.
2896 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2897 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2898 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2899 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2900 (x86_get_ipa_tdesc_idx): New function.
2901 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2902 * linux-x86-tdesc.h: New file.
2903 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2904 (target_get_ipa_tdesc_idx): New macro.
2905 * tracepoint.c (ipa_tdesc_idx): New macro.
2906 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2907 (symbol_list): Add ipa_tdesc_idx.
2908 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2909 (ipa_tdesc): Remove.
2910 (ipa_tdesc_idx): New variable.
2911 (get_context_regcache): Use get_ipa_tdesc.
2912 (gdb_collect): Ditto.
2913 (gdb_probe): Ditto.
2914 * tracepoint.h (get_ipa_tdesc): New prototype.
2915 (ipa_tdesc): Remove.
2916
e7ad2f14
PA
29172016-02-24 Pedro Alves <palves@redhat.com>
2918
2919 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2920 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2921 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2922 Factor out common code between the USE_SIGTRAP_SIGINFO and
2923 !USE_SIGTRAP_SIGINFO blocks.
2924 (linux_low_filter_event): Call save_stop_reason instead of
2925 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2926 Update comments.
2927 (linux_wait_1): Update comments.
2928
657f9cde
WW
29292016-02-24 Wei-cheng Wang <cole945@gmail.com>
2930
2931 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2932 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2933 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2934 ppc_insert_point, ppc_remove_point.
2935
b00b61e1
MK
29362016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2937
2938 * linux-s390-low.c (s390_supports_z_point_type): New function.
2939 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2940
553cb527
YQ
29412016-02-16 Yao Qi <yao.qi@linaro.org>
2942
2943 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2944 PC. Get pc from regcache_read_pc.
2945
a5652c21
YQ
29462016-02-12 Yao Qi <yao.qi@linaro.org>
2947
2948 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2949 or linux_get_pc_32bit.
2950 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2951
ed443b61
YQ
29522016-02-12 Yao Qi <yao.qi@linaro.org>
2953
2954 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2955 arm_linux_get_next_pcs_fixup.
2956
020ecd38
MK
29572016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2958
2959 * tracepoint.c (x_tracepoint_action_download): Change
2960 write_inferior_data_ptr to write_inferior_data_pointer.
2961 (cmd_qtstart): Likewise.
2962 (write_inferior_data_ptr): Remove.
2963 (download_agent_expr): Change write_inferior_data_ptr to
2964 write_inferior_data_pointer.
2965 (download_tracepoint_1): Likewise.
2966 (download_tracepoint): Likewise.
2967 (download_trace_state_variables): Likewise.
2968
7cae9051
WW
29692016-02-11 Wei-cheng Wang <cole945@gmail.com>
2970 Marcin Kościelnicki <koriakin@0x04.net>
2971
2972 * tracepoint.c (struct tracepoint_action_ops): Remove.
2973 (struct tracepoint_action): Remove ops.
2974 (m_tracepoint_action_download, r_tracepoint_action_download)
2975 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2976 size and offset accordingly.
2977 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2978 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2979 (tracepoint_action_send, tracepoint_action_download): New functions.
2980 Helpers for trace action handlers.
2981 (add_tracepoint_action): Remove setup actions ops.
2982 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2983
9f6a71b4
YQ
29842016-02-10 Yao Qi <yao.qi@linaro.org>
2985
2986 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2987
1e94266c
SM
29882016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2989
2990 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2991 to AC_OUTPUT.
2992 * configure: Regenerate.
2993
8adce034
SM
29942016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2995
2996 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2997 void * to gdb_byte *.
2998 * linux-low.c (siginfo_fixup): Likewise.
2999 (linux_xfer_siginfo): Likewise.
3000 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3001 Likewise.
3002 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3003
93813b37
WT
30042016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3005
3006 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3007 to srv_tgtobj.
3008 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3009 to srv_tgtobj.
3010 * linux-x86-low.c [__x86_64__]: Include
3011 "nat/amd64-linux-siginfo.h".
3012 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3013 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3014 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3015 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3016 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3017 (cpt_si_fd, si_timerid, si_overrun): Move from
3018 nat/amd64-linux-siginfo.c.
3019 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3020
8424cc97
SM
30212016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3022
3023 * server.c (skip_to_semicolon): Remove.
3024 (process_point_options): Use strchrnul instead of
3025 skip_to_semicolon.
3026
4d18591b
YQ
30272016-01-26 Yao Qi <yao.qi@linaro.org>
3028
3029 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3030 * linux-low.c (install_software_single_step_breakpoints): Don't
3031 call regcache_read_pc.
3032 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3033 argument pc.
3034
d8020970
YQ
30352016-01-26 Yao Qi <yao.qi@linaro.org>
3036
3037 * linux-low.c (install_software_single_step_breakpoints): Call
3038 regcache_read_pc instead of get_pc.
3039
8b207339
YQ
30402016-01-26 Yao Qi <yao.qi@linaro.org>
3041
3042 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3043 (unblock_async_io): Rename to ...
3044 (block_unblock_async_io): ... it. New function.
3045 (enable_async_io): Don't install SIGIO handler. Unblock it
3046 instead.
3047 (disable_async_io): Don't ignore SIGIO. Block it instead.
3048 (initialize_async_io): Install SIGIO handler. Don't call
3049 unblock_async_io.
3050
18879fef
YQ
30512016-01-26 Yao Qi <yao.qi@linaro.org>
3052
3053 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3054 first character is '\003', call *the_target->request_interrupt.
3055
a0f8e08a
YQ
30562016-01-25 Yao Qi <yao.qi@linaro.org>
3057
3058 * remote-utils.c (new_thread_notify): Remove.
3059 (dead_thread_notify): Likewise.
3060 * remote-utils.h (new_thread_notify): Remove declaration.
3061 (dead_thread_notify): Likewise.
3062
cc5fd9ab
MK
30632016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3064
3065 * gdb.trace/pending.exp: Fix expected message on continue.
3066
99e8eb11
MK
30672016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3068
3069 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3070 it works properly on big-endian machines where sizeof (CORE_ADDR)
3071 != sizeof (void *).
3072
a994041d
PA
30732016-01-21 Pedro Alves <palves@redhat.com>
3074
3075 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3076 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3077 * configure: Regenerate.
3078
f7a6a40d
YQ
30792016-01-21 Yao Qi <yao.qi@linaro.org>
3080
3081 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3082 is_thumb and set it according to CPSR saved on the stack.
3083 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3084 arm_sigreturn_next_pc.
3085
6f69e520
YQ
30862016-01-18 Yao Qi <yao.qi@linaro.org>
3087
3088 * linux-low.c (linux_set_pc_64bit): New function.
3089 (linux_get_pc_64bit): New function.
3090 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3091 Declare.
3092 * linux-sparc-low.c (debug_threads): Remove declaration.
3093 (sparc_get_pc): Remove.
3094 (the_low_target): Use linux_get_pc_64bit instead of
3095 sparc_get_pc.
3096 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3097 (the_low_target): Use linux_get_pc_64bit and
3098 linux_set_pc_64bit.
3099
276d4552
YQ
31002016-01-18 Yao Qi <yao.qi@linaro.org>
3101
3102 * linux-arm-low.c (debug_threads): Remove declaration.
3103 (arm_get_pc, arm_set_pc): Remove.
3104 (the_low_target): Use linux_get_pc_32bit and
3105 linux_set_pc_32bit.
3106 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3107 (the_low_target): Use linux_get_pc_32bit and
3108 linux_set_pc_32bit.
3109 * linux-cris-low.c (debug_threads): Remove declaration.
3110 (cris_get_pc, cris_set_pc,): Remove.
3111 (the_low_target): Use linux_get_pc_32bit and
3112 linux_set_pc_32bit.
3113 * linux-crisv32-low.c (debug_threads): Remove declaration.
3114 (cris_get_pc, cris_set_pc): Remove.
3115 (the_low_target): Use linux_get_pc_32bit and
3116 linux_set_pc_32bit.
3117 * linux-low.c: Include inttypes.h.
3118 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3119 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3120 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3121 (the_low_target): Use linux_get_pc_32bit and
3122 linux_set_pc_32bit.
3123 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3124 (the_low_target): Use linux_get_pc_32bit and
3125 linux_set_pc_32bit.
3126 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3127 (the_low_target): Use linux_get_pc_32bit and
3128 linux_set_pc_32bit.
3129 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3130 (the_low_target): Use linux_get_pc_32bit and
3131 linux_set_pc_32bit.
3132 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3133 (the_low_target): Use linux_get_pc_32bit and
3134 linux_set_pc_32bit.
3135
eb0edac8
GB
31362016-01-18 Gary Benson <gbenson@redhat.com>
3137
3138 * configure.ac (AC_FUNC_FORK): New check.
3139 * config.in: Regenerate.
3140 * configure: Likewise.
3141
1b451dda
YQ
31422016-01-14 Yao Qi <yao.qi@linaro.org>
3143
3144 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3145 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3146 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3147 arm_get_next_pcs_ctor.
3148
82075af2
JS
31492016-01-12 Josh Stone <jistone@redhat.com>
3150 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3151
3152 * inferiors.h: Include "gdb_vecs.h".
3153 (struct process_info): Add syscalls_to_catch.
3154 * inferiors.c (remove_process): Free syscalls_to_catch.
3155 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3156 syscall_return stops.
3157 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3158 * server.c (handle_general_set): Handle QCatchSyscalls.
3159 (handle_query): Report support for QCatchSyscalls.
3160 * target.h (struct target_ops): Add supports_catch_syscall.
3161 (target_supports_catch_syscall): New macro.
3162 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3163 (struct lwp_info): Add syscall_state.
3164 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3165 Maintain syscall_state and syscalls_to_catch across exec.
3166 (get_syscall_trapinfo): New function, proxy to the_low_target.
3167 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3168 (linux_low_filter_event): Toggle syscall_state entry/return for
3169 syscall traps, and set it ignored for all others.
3170 (gdb_catching_syscalls_p): New function.
3171 (gdb_catch_this_syscall_p): New function.
3172 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3173 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3174 (linux_supports_catch_syscall): New function.
3175 (linux_target_ops): Install it.
3176 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3177 (the_low_target): Install it.
3178
8f13a3ce
MF
31792016-01-12 Mike Frysinger <vapier@gentoo.org>
3180
3181 * acinclude.m4: Include new ../warning.m4 file.
3182 * configure: Regenerated.
3183 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3184
5b3da067
MF
31852016-01-12 Mike Frysinger <vapier@gentoo.org>
3186
3187 * ax.c (is_goto_target): Mark static.
3188 * linux-low.c (register_addr): Likewise.
3189 (linux_fetch_registers, linux_store_registers): Likewise.
3190 * mem-break.c (any_persistent_commands): Fix old prototype.
3191 (add_commands_to_breakpoint): Mark static.
3192 * regcache.c (find_register_by_name): Delete unused func.
3193 * remote-utils.c (hex_or_minus_one): Mark static.
3194 * server.c (monitor_show_help): Mark static.
3195 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3196 handle_v_requests): Likewise.
3197
bc504a31
PA
31982016-01-12 Pedro Alves <palves@redhat.com>
3199
3200 Remove use of the registered trademark symbol throughout.
3201
5a0dd67a
YQ
32022016-01-08 Yao Qi <yao.qi@linaro.org>
3203
3204 * remote-utils.c (getpkt): If c is '\003', call target hook
3205 request_interrupt.
3206
b2ca446f
YQ
32072016-01-06 Yao Qi <yao.qi@linaro.org>
3208
3209 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3210 linux-aarch32-low.c.
3211 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3212 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3213 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3214 (thumb2_breakpoint): Declare.
3215 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3216 linux-aarch32-low.h.
3217 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3218 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3219 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3220
edd88788
JB
32212016-01-01 Joel Brobecker <brobecker@adacore.com>
3222
3223 * gdbreplay.c (gdbreplay_version): Change copyright year in
3224 version message.
3225 * server.c (gdbserver_version): Likewise.
3226
65da7f14
PP
32272015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3228
3229 * server.c (crc32_table): Delete.
3230 (crc32): Use libiberty's xcrc32 function.
3231
4abd5ed2
JB
32322015-12-22 Joel Brobecker <brobecker@adacore.com>
3233
3234 * lynx-low.c (lynx_delete_thread_callback): New function.
3235 (lynx_mourn): Properly delete our process and all of its
3236 threads. Remove call to clear_inferiors.
3237
0e50fe5c
JB
32382015-12-22 Joel Brobecker <brobecker@adacore.com>
3239
3240 * target.c (thread_search_callback): Add check that
3241 the thread_stopped target callback is not NULL before
3242 calling it.
3243
35adc03f
YQ
32442015-12-21 Yao Qi <yao.qi@linaro.org>
3245
3246 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3247 arm breakpoint.
3248
bd2b2909
AT
32492015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3250
3251 * server.c (handle_query): Call target_supports_software_single_step.
3252
7fe5e27e
AT
32532015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3254
3255 * linux-low.c (single_step): New function.
3256 (linux_resume_one_lwp_throw): Call single_step.
3257 (start_step_over): Likewise.
3258
d9311bfa
AT
32592015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3260
3261 * Makefile.in (SFILES): Append arch/arm-linux.c,
3262 arch/arm-get-next-pcs.c.
3263 (arm-linux.o): New rule.
3264 (arm-get-next-pcs.o): New rule.
3265 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3266 arm-linux.o.
3267 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3268 to linux-aarch32-low.c.
3269 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3270 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3271 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3272 (thumb2_breakpoint_len): Likewise.
3273 (arm_is_thumb_mode): Make non-static.
3274 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3275 from linux-aarch32-low.c.
3276 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3277 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3278 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3279 (thumb2_breakpoint_len): Likewise.
3280 (arm_is_thumb_mode): New declaration.
3281 * linux-arm-low.c: Include arch/arm-linux.h
3282 aarch/arm-get-next-pcs.h, sys/syscall.h.
3283 (get_next_pcs_ops): New struct.
3284 (get_next_pcs_addr_bits_remove): New function.
3285 (get_next_pcs_is_thumb): New function.
3286 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3287 (arm_sigreturn_next_pc): Likewise.
3288 (get_next_pcs_syscall_next_pc): Likewise.
3289 (arm_gdbserver_get_next_pcs): Likewise.
3290 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3291 Initialize.
3292 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3293 * server.h: Include gdb_vecs.h.
3294
68ce2059
AT
32952015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3296
3297 * Makefile.in (SFILES): Append common/common-regcache.c.
3298 (OBS): Append common-regcache.o.
3299 (common-regcache.o): New rule.
3300 * regcache.c (init_register_cache): Initialize cache to
3301 REG_UNAVAILABLE.
3302 (regcache_raw_read_unsigned): New function.
3303 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3304 register_status enum.
3305
fa5308bd
AT
33062015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3307
3308 * linux-aarch64-low.c (the_low_targets): Rename
3309 breakpoint_reinsert_addr to get_next_pcs.
3310 * linux-arm-low.c (the_low_targets): Likewise.
3311 * linux-bfin-low.c (the_low_targets): Likewise.
3312 * linux-cris-low.c (the_low_targets): Likewise.
3313 * linux-crisv32-low.c (the_low_targets): Likewise.
3314 * linux-low.c (can_software_single_step): Likewise.
3315 (install_software_single_step_breakpoints): New function.
3316 (start_step_over): Use install_software_single_step_breakpoints.
3317 * linux-low.h: New CORE_ADDR vector.
3318 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3319 get_next_pcs.
3320 * linux-mips-low.c (the_low_targets): Likewise.
3321 * linux-nios2-low.c (the_low_targets): Likewise.
3322 * linux-sparc-low.c (the_low_targets): Likewise.
3323
4a6ed09b
PA
33242015-12-17 Pedro Alves <palves@redhat.com>
3325
3326 * linux-low.c (linux_kill_one_lwp): Remove references to
3327 LinuxThreads.
3328 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3329 to 'kill'.
3330 (linux_init_signals): Delete.
3331 (initialize_low): Adjust.
3332 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3333
7544db95
PA
33342015-12-16 Pedro Alves <palves@redhat.com>
3335
3336 * configure.ac (compiler warning flags): When testing a
3337 -Wno-foo option, check whether -Wfoo works instead.
3338 * configure: Regenerate.
3339
8020350c
DB
33402015-12-11 Don Breazeal <donb@codesourcery.com>
3341
3342 * server.c (process_serial_event): Don't exit from gdbserver
3343 in remote mode if there are still active inferiors.
3344
db91f502
YQ
33452015-12-11 Yao Qi <yao.qi@linaro.org>
3346
3347 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3348 arm_breakpoint_at if the process is 32-bit.
3349
b37a6290
YQ
33502015-12-11 Yao Qi <yao.qi@linaro.org>
3351
3352 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3353 arm breakpoint.
3354
17b1509a
YQ
33552015-12-07 Yao Qi <yao.qi@linaro.org>
3356
3357 * configure.srv: Append arm.o to srv_tgtobj for
3358 aarch64*-*-linux* target.
3359 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3360 from linux-arm-low.c.
3361 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3362 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3363 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3364 (thumb2_breakpoint_len): Likewise.
3365 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3366 (arm_breakpoint_kinds): Likewise.
3367 (arm_breakpoint_kind_from_pc): Likewise.
3368 (arm_sw_breakpoint_from_kind): Likewise.
3369 (arm_breakpoint_kind_from_current_state): Likewise.
3370 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3371 (arm_sw_breakpoint_from_kind): Declare.
3372 (arm_breakpoint_kind_from_current_state): Declare.
3373 (arm_breakpoint_at): Declare.
3374 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3375 arm_sw_breakpoint_from_kind if process is 32-bit.
3376 (aarch64_breakpoint_kind_from_pc): New function.
3377 (aarch64_breakpoint_kind_from_current_state): New function.
3378 (the_low_target): Initialize fields breakpoint_kind_from_pc
3379 and breakpoint_kind_from_current_state.
3380 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3381 linux-aarch32-low.c.
3382 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3383 (arm_breakpoint, arm_breakpoint_len): Likewise.
3384 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3385 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3386 (arm_is_thumb_mode): Likewise.
3387 (arm_breakpoint_at): Likewise.
3388 (arm_breakpoint_kind_from_pc): Likewise.
3389 (arm_sw_breakpoint_from_kind): Likewise.
3390 (arm_breakpoint_kind_from_current_state): Likewise.
3391
3392 Revert:
3393 2015-08-04 Yao Qi <yao.qi@linaro.org>
3394
3395 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3396 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3397 * server.c (extended_protocol): Remove "static".
3398 * server.h (extended_protocol): Declare it.
3399
ece66d65
JS
34002015-12-04 Josh Stone <jistone@redhat.com>
3401
3402 * target.h (struct target_ops) <arch_setup>: Rename to ...
3403 (struct target_ops) <post_create_inferior>: ... this.
3404 (target_arch_setup): Rename to ...
3405 (target_post_create_inferior): ... this, calling post_create_inferior.
3406 * server.c (start_inferior): Update target_arch_setup calls to
3407 target_post_create_inferior.
3408 * linux-low.c (linux_low_ptrace_options): Forward declare.
3409 (linux_arch_setup): Update its comment for general use.
3410 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3411 (struct linux_target_ops): Use linux_post_create_inferior.
3412 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3413 to post_create_inferior.
3414 * nto-low.c (struct nto_target_ops): Likewise.
3415 * spu-low.c (struct spu_target_ops): Likewise.
3416 * win32-low.c (struct win32_target_ops): Likewise.
3417
e58c48b4
AT
34182015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3419
3420 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3421
fbec8956
AT
34222015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3423
3424 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3425 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3426 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3427 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3428 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3429 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3430 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3431 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3432 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3433 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3434 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3435 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3436
9b4c5f87
AT
34372015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3438
3439 * linux-low.c (linux_look_up_symbols): Don't call
3440 linux_supports_traceclone.
3441 * linux-low.h (thread_db_init): Remove use_events argument.
3442 * thread-db.c (thread_db_use_event): Remove global variable.
3443 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3444 (struct thread_db) <td_create_bp>: Remove field.
3445 (thread_db_create_event): Remove function.
3446 (thread_db_enable_reporting): Likewise.
3447 (find_one_thread): Don't check for thread_db_use_events.
3448 (attach_thread): Likewise.
3449 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3450 (try_thread_db_load_1): Don't check for thread_db_use_events.
3451 (thread_db_init): Remove use_events argument and thread events
3452 handling.
3453 (remove_thread_event_breakpoints): Remove function.
3454 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3455
7d00775e
AT
34562015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3457
3458 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3459 New function.
3460 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3461 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3462 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3463 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3464 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3465 Initialize.
3466 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3467 New function.
3468 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3469 * linux-low.c (can_hardware_single_step): Use
3470 supports_hardware_single_step.
3471 (can_software_single_step): New function.
3472 (start_step_over): Call can_software_single_step.
3473 (linux_supports_hardware_single_step): New function.
3474 (struct target_ops) <supports_software_single_step>: Initialize.
3475 * linux-low.h (struct linux_target_ops)
3476 <supports_hardware_single_step>: Initialize.
3477 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3478 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3479 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3480 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3481 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3482 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3483 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3484 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3485 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3486 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3487 Initialize.
3488 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3489 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3490 Initialize.
3491 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3492 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3493 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3494 New function.
3495 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3496 * target.h (struct target_ops): <supports_software_single_step>:
3497 New field.
3498 (target_supports_software_single_step): New macro.
3499
2d97cd35
AT
35002015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3501
3502 * linux-low.c (linux_wait_1): Fix pc advance condition.
3503 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3504 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3505
769ef81f
AT
35062015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3507
3508 * linux-arm-low.c (arm_is_thumb_mode): New function.
3509 (arm_breakpoint_at): Use arm_is_thumb_mode.
3510 (arm_breakpoint_kind_from_current_state): New function.
3511 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3512 Initialize.
3513 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3514 (linux_breakpoint_kind_from_current_state): New function.
3515 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3516 * linux-low.h (struct linux_target_ops)
3517 <breakpoint_kind_from_current_state>: New field.
3518 * target.h (struct target_ops): Likewise.
3519 (target_breakpoint_kind_from_current_state): New macro.
3520
1bebeeca
PA
35212015-11-30 Pedro Alves <palves@redhat.com>
3522
3523 * linux-low.c (linux_resume): Wake up the event loop before
3524 returning.
3525
a67a9fae
PA
35262015-11-30 Pedro Alves <palves@redhat.com>
3527
3528 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3529 check.
3530 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3531 to -1.
3532 * target.c (struct thread_search): New structure.
3533 (thread_search_callback): New function.
3534 (prev_general_thread): New global.
3535 (prepare_to_access_memory, done_accessing_memory): New functions.
3536 * target.h (prepare_to_access_memory, done_accessing_memory):
3537 Replace macros with function declarations.
3538
f2faf941
PA
35392015-11-30 Pedro Alves <palves@redhat.com>
3540
3541 PR 14618
3542 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3543 report TARGET_WAITKIND_NO_RESUMED.
3544 * remote-utils.c (prepare_resume_reply): Handle
3545 TARGET_WAITKIND_NO_RESUMED.
3546 * server.c (report_no_resumed): New global.
3547 (handle_query) <qSupported>: Handle "no-resumed+". Report
3548 "no-resumed+" support.
3549 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3550 return error if the client doesn't support no-resumed events.
3551 (push_stop_notification): New function.
3552 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3553 events if the client supports them.
3554
a681f9c9
PA
35552015-11-30 Pedro Alves <palves@redhat.com>
3556
3557 * linux-low.c (thread_still_has_status_pending_p): Don't check
3558 vCont;t here.
3559 (lwp_resumed): New function.
3560 (status_pending_p_callback): Return early if the LWP is not
3561 supposed to be resumed.
3562
65706a29
PA
35632015-11-30 Pedro Alves <palves@redhat.com>
3564
3565 * linux-low.c (handle_extended_wait): Assert that the LWP's
3566 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3567 thread create events, leave the new child's status pending.
3568 (linux_low_filter_event): If GDB wants to hear about thread exit
3569 events, leave the LWP marked dead and don't delete it.
3570 (linux_wait_for_event_filtered): Don't check for thread exit.
3571 (filter_exit_event): New function.
3572 (linux_wait_1): Use it, when returning an exit event.
3573 (linux_resume_one_lwp_throw): Assert that the LWP's
3574 waitstatus is TARGET_WAITKIND_IGNORE.
3575 * remote-utils.c (prepare_resume_reply): Handle
3576 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3577 * server.c (report_thread_events): New global.
3578 (handle_general_set): Handle QThreadEvents.
3579 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3580 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3581 TARGET_WAITKIND_THREAD_EXITED.
3582 * server.h (report_thread_events): Declare.
3583
56cf4bed
PA
35842015-11-30 Pedro Alves <palves@redhat.com>
3585
3586 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3587 the thread's last_resume_kind was resume_stop.
3588
500c1d85
PA
35892015-11-30 Pedro Alves <palves@redhat.com>
3590
3591 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3592 before returning.
3593
de979965
PA
35942015-11-30 Pedro Alves <palves@redhat.com>
3595
3596 * server.c (handle_v_requests): Handle vCtrlC.
3597
34c65914
PA
35982015-11-30 Pedro Alves <palves@redhat.com>
3599
3600 * gdbthread.h (find_any_thread_of_pid): Declare.
3601 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3602 functions.
3603 * server.c (handle_query): If current_thread is NULL, look for
3604 another thread of the selected process.
3605
79efa585 36062015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3607 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3608
3609 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3610 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3611 name in reply.
3612 * target.h (struct target_ops) <thread_name>: New field.
3613 (target_thread_name): New macro.
3614
80d82c19
JB
36152015-11-23 Joel Brobecker <brobecker@adacore.com>
3616
3617 * regcache.h (regcache_invalidate_pid): Add declaration.
3618 * regcache.c (regcache_invalidate_pid): New function, extracted
3619 from regcache_invalidate.
3620 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3621 Add trivial documentation comment.
3622 * lynx-low.c: Use regcache_invalidate_pid instead of
3623 regcache_invalidate.
3624
64da5dd5
JB
36252015-11-23 Joel Brobecker <brobecker@adacore.com>
3626
3627 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3628 and Elf64_auxv_t if the target is Android.
3629
37ce4055
DE
36302015-11-22 Doug Evans <xdje42@gmail.com>
3631
3632 * target.h: #include <sys/types.h>.
3633
06e03fff
PA
36342015-11-19 Pedro Alves <palves@redhat.com>
3635
3636 * linux-low.c (linux_process_qsupported): Change prototype.
3637 Adjust.
3638 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3639 Change prototype.
3640 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3641 and adjust to loop over all features.
3642 * server.c (handle_query) <qSupported>: Adjust to call
3643 target_process_qsupported once, passing it a vector of unprocessed
3644 features.
3645 * target.h (struct target_ops) <process_qsupported>: Change
3646 prototype.
3647 (target_process_qsupported): Adjust.
3648
9a084706
PA
36492015-11-19 Pedro Alves <palves@redhat.com>
3650
3651 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3652 mode.
3653 * configure: Regenerate.
3654
dad44a1f
PA
36552015-11-19 Pedro Alves <palves@redhat.com>
3656
3657 * configure: Regenerate.
3658
231c0592
YQ
36592015-11-19 Yao Qi <yao.qi@linaro.org>
3660
3661 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3662 type to uint32_t.
3663
6c1c9a8b
YQ
36642015-11-19 Yao Qi <yao.qi@linaro.org>
3665
3666 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3667 (struct aarch64_operand): Move enum out.
3668
9caa3311
YQ
36692015-11-19 Yao Qi <yao.qi@linaro.org>
3670
3671 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3672 struct user_fpsimd_state *.
3673 (aarch64_store_fpregset): Likewise.
3674
6a69a054
YQ
36752015-11-19 Yao Qi <yao.qi@linaro.org>
3676
3677 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3678 struct user_pt_regs *.
3679 (aarch64_store_gregset): Likewise.
3680
1798301e
PA
36812015-11-18 Pedro Alves <palves@redhat.com>
3682
3683 * Makefile.in (all_object_files): Add $IPA_OBJS.
3684
ce7715e2
PA
36852015-11-17 Pedro Alves <palves@redhat.com>
3686
3687 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3688 GDB_SIGNAL_0 and gdb_signal_to_string.
3689
c0879059
PA
36902015-11-17 Pedro Alves <palves@redhat.com>
3691
3692 * win32-low.c (handle_output_debug_string): Remove parameter.
3693 (win32_kill): Remove our_status local and adjust call to
3694 handle_output_debug_string.
3695 (get_child_debug_event): Adjust call to
3696 handle_output_debug_string.
3697
1996e237
SM
36982015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3699
3700 * linux-mips-low.c (mips_fill_gregset): Add cast.
3701 (mips_store_gregset): Likewise.
3702 (mips_fill_fpregset): Likewise.
3703 (mips_store_fpregset): Likewise.
3704
cbec665b
SM
37052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3706
3707 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3708 priv.
3709
eb3e3c67
SM
37102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3711
3712 * linux-mips-low.c (mips_linux_new_thread): Change type of
3713 watch_type to enum target_hw_bp_type.
3714
171de4b8
SM
37152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3716
3717 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3718 Change return type to arm_hwbp_type.
3719
04248ead
SM
37202015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3721
3722 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3723 (arm_store_gregset): Likewise.
3724 * linux-arm-low.c (arm_get_hwcap): Likewise.
3725 (arm_read_description): Likewise.
3726
04b3479c
SM
37272015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3728
3729 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3730
2bc84e8a
SM
37312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3732
3733 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3734 (ppc_fill_vsxregset): Likewise.
3735 (ppc_store_vsxregset): Likewise.
3736 (ppc_fill_vrregset): Likewise.
3737 (ppc_store_vrregset): Likewise.
3738 (ppc_fill_evrregset): Likewise.
3739 (ppc_store_evrregset): Likewise.
3740
e6c5bb05
SM
37412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3742
3743 * linux-ppc-low.c (ppc_usrregs_info): Remove
3744 forward-declaration.
3745 (ppc_arch_setup): Move lower in file.
3746
7ea45d72
SM
37472015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3748
3749 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3750 (ps_pdwrite): Likewise.
3751
69291610
HW
37522015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3753
3754 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3755 to after assert checks.
3756
b42945fd
SM
37572015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3758
3759 * proc-service.c (ps_pdread): Add/adjust casts.
3760 (ps_pdwrite): Add/adjust casts.
3761
d6f85c84
SM
37622015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3763
3764 * server.c (handle_search_memory_1): Cast return value of
3765 memmem.
3766
f98cd059
SM
37672015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3768
3769 * server.c (write_qxfer_response): Change type of data to
3770 gdb_byte *.
3771
d2412fa5
PA
37722015-10-29 Pedro Alves <palves@redhat.com>
3773
3774 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3775
c17414a2
PA
37762015-10-29 Pedro Alves <palves@redhat.com>
3777
3778 * tracepoint.c (clear_installed_tracepoints): Add casts.
3779
e053fbc4
PA
37802015-10-29 Pedro Alves <palves@redhat.com>
3781
3782 * server.c (handle_v_cont, process_serial_event): Add enum
3783 gdb_signal casts to signal parsing code.
3784
add67df8
PA
37852015-10-29 Pedro Alves <palves@redhat.com>
3786
3787 * linux-low.h (NULL_REGSET): Define.
3788 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3789 * linux-arm-low.c (arm_regsets): Likewise.
3790 * linux-crisv32-low.c (cris_regsets): Likewise.
3791 * linux-m68k-low.c (m68k_regsets): Likewise.
3792 * linux-mips-low.c (mips_regsets): Likewise.
3793 * linux-nios2-low.c (nios2_regsets): Likewise.
3794 * linux-ppc-low.c (ppc_regsets): Likewise.
3795 * linux-s390-low.c (s390_regsets): Likewise.
3796 * linux-sh-low.c (sh_regsets): Likewise.
3797 * linux-sparc-low.c (sparc_regsets): Likewise.
3798 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3799 * linux-tile-low.c (tile_regsets): Likewise.
3800 * linux-x86-low.c (x86_regsets): Likewise.
3801 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3802
50bc912a
PA
38032015-10-29 Pedro Alves <palves@redhat.com>
3804
3805 * linux-low.h (NULL_REGSET): Define.
3806 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3807 * linux-arm-low.c (arm_regsets): Likewise.
3808 * linux-crisv32-low.c (cris_regsets): Likewise.
3809 * linux-m68k-low.c (m68k_regsets): Likewise.
3810 * linux-mips-low.c (mips_regsets): Likewise.
3811 * linux-nios2-low.c (nios2_regsets): Likewise.
3812 * linux-ppc-low.c (ppc_regsets): Likewise.
3813 * linux-s390-low.c (s390_regsets): Likewise.
3814 * linux-sh-low.c (sh_regsets): Likewise.
3815 * linux-sparc-low.c (sparc_regsets): Likewise.
3816 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3817 * linux-tile-low.c (tile_regsets): Likewise.
3818 * linux-x86-low.c (x86_regsets): Likewise.
3819 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3820
682b2546
DE
38212015-10-26 Doug Evans <dje@google.com>
3822
3823 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3824
963843d4
DE
38252015-10-26 Doug Evans <dje@google.com>
3826
3827 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3828
d41401ac
DE
38292015-10-26 Doug Evans <dje@google.com>
3830
3831 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3832 for debug_printf.
3833 (attach_thread, find_new_threads_callback): Ditto.
3834
3db28855
AT
38352015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3836
3837 * mem-break.h (set_breakpoint_data): Remove.
3838
fb78e89c
AT
38392015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3840
3841 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3842 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3843 (initialize_low): Remove set_breakpoint_data call.
3844 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3845 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3846 (initialize_low): Remove set_breakpoint_data call.
3847 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3848 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3849 (initialize_low): Remove set_breakpoint_data call.
3850
2e6ee069
AT
38512015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3852
3853 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3854 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3855 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3856 * target.h (target_breakpoint_kind_from_pc): New macro.
3857
1652a986
AT
38582015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3859
3860 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3861 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3862 the default breakpoint kind.
3863
abeead09
AT
38642015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3865
3866 * linux-arm-low.c (arm_supports_z_point_type): Add software
3867 breakpoint support.
3868
b0b4b501
AT
38692015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3870
3871 * linux-arm-low.c: Refactor breakpoint definitions.
3872 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3873 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3874
8689682c
AT
38752015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3876
3877 * Makefile.in: Add arm.c/o.
3878 * configure.srv: Likewise.
3879 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3880 (arm_breakpoint_kind_from_pc): New function.
3881 (arm_sw_breakpoint_from_kind): Return proper kind.
3882 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3883
27165294
AT
38842015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3885
3886 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3887 removal.
3888 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3889 (struct raw_breakpoint) <size>: Remove.
3890 (struct raw_breakpoint) <kind>: Add.
3891 (bp_size): New function.
3892 (bp_opcode): Likewise.
3893 (find_raw_breakpoint_at): Adjust for kind.
3894 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3895 (remove_memory_breakpoint): Adjust for kind call bp_size.
3896 (set_raw_breakpoint_at): Adjust for kind.
3897 (set_breakpoint): Likewise.
3898 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3899 (delete_raw_breakpoint): Adjust for kind.
3900 (delete_breakpoint): Likewise.
3901 (find_gdb_breakpoint): Likewise.
3902 (set_gdb_breakpoint_1): Likewise.
3903 (set_gdb_breakpoint): Likewise.
3904 (delete_gdb_breakpoint_1): Likewise.
3905 (delete_gdb_breakpoint): Likewise.
3906 (uninsert_raw_breakpoint): Likewise.
3907 (reinsert_raw_breakpoint): Likewise.
3908 (set_breakpoint_data): Remove.
3909 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3910 (check_mem_read): Adjust for kind call bp_size.
3911 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3912 (clone_one_breakpoint): Adjust for kind.
3913 * mem-break.h (set_gdb_breakpoint): Likewise.
3914 (delete_gdb_breakpoint): Likewise.
3915 * server.c (process_serial_event): Likewise.
3916
dd373349
AT
39172015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3918
3919 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3920 (struct linux_target_ops) <breakpoint>: Remove.
3921 (struct linux_target_ops) <breakpoint_len>: Remove.
3922 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3923 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3924 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3925 (arm_sw_breakpoint_from_kind): New function.
3926 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3927 (struct linux_target_ops) <breakpoint>: Remove.
3928 (struct linux_target_ops) <breakpoint_len>: Remove.
3929 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3930 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3931 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3932 (struct linux_target_ops) <breakpoint>: Remove.
3933 (struct linux_target_ops) <breakpoint_len>: Remove.
3934 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3935 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3936 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3937 (struct linux_target_ops) <breakpoint>: Remove.
3938 (struct linux_target_ops) <breakpoint_len>: Remove.
3939 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3940 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3941 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3942 and sw_breakpoint_from_kind to increment the pc.
3943 (linux_breakpoint_kind_from_pc): New function.
3944 (linux_sw_breakpoint_from_kind): New function.
3945 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3946 (initialize_low): Call breakpoint_kind_from_pc and
3947 sw_breakpoint_from_kind to replace breakpoint_data/len.
3948 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3949 New field.
3950 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3951 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3952 (struct linux_target_ops) <breakpoint>: Remove.
3953 (struct linux_target_ops) <breakpoint_len>: Remove.
3954 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3955 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3956 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3957 (struct linux_target_ops) <breakpoint>: Remove.
3958 (struct linux_target_ops) <breakpoint_len>: Remove.
3959 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3960 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3961 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3962 (struct linux_target_ops) <breakpoint>: Remove.
3963 (struct linux_target_ops) <breakpoint_len>: Remove.
3964 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3965 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3966 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3967 (struct linux_target_ops) <breakpoint>: Remove.
3968 (struct linux_target_ops) <breakpoint_len>: Remove.
3969 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3970 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3971 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3972 (struct linux_target_ops) <breakpoint>: Remove.
3973 (struct linux_target_ops) <breakpoint_len>: Remove.
3974 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3975 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3976 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3977 (struct linux_target_ops) <breakpoint>: Remove.
3978 (struct linux_target_ops) <breakpoint_len>: Remove.
3979 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3980 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3981 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3982 (struct linux_target_ops) <breakpoint>: Remove.
3983 (struct linux_target_ops) <breakpoint_len>: Remove.
3984 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3985 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3986 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3987 (struct linux_target_ops) <breakpoint>: Remove.
3988 (struct linux_target_ops) <breakpoint_len>: Remove.
3989 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3990 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3991 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3992 (struct linux_target_ops) <breakpoint>: Remove.
3993 (struct linux_target_ops) <breakpoint_len>: Remove.
3994 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3995 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3996 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3997 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3998 (struct linux_target_ops) <breakpoint>: Remove.
3999 (struct linux_target_ops) <breakpoint_len>: Remove.
4000 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4001 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4002 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4003 (struct linux_target_ops) <breakpoint>: Remove.
4004 (struct linux_target_ops) <breakpoint_len>: Remove.
4005 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4006 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4007
4cd98a19
AT
40082015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4009
4010 * linux-cris-low.c (cris_get_pc): Remove void arg.
4011
774ee6d2
AR
40122015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4013
4014 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4015 variable name.
4016
833dcd29
AR
40172015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4018
4019 * inferiors.c (thread_pid_matches_callback): New function.
4020 (find_thread_process): New function.
4021 (remove_thread): Reset current_thread.
4022 (remove_process): Assert threads have been removed first.
4023
8d689ee5
YQ
40242015-10-15 Yao Qi <yao.qi@linaro.org>
4025
4026 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4027 if it is 3.
4028 (aarch64_remove_point): Likewise.
4029 * regcache.c (regcache_register_size): New function.
4030
1c2e1515
YQ
40312015-10-12 Yao Qi <yao.qi@linaro.org>
4032
4033 * linux-aarch64-low.c: Update all callers as emit_load_store
4034 is renamed to aarch64_emit_load_store.
4035
e1c587c3
YQ
40362015-10-12 Yao Qi <yao.qi@linaro.org>
4037
4038 * linux-aarch64-low.c: Update all callers of function renaming
4039 from emit_insn to aarch64_emit_insn.
4040
b6542f81
YQ
40412015-10-12 Yao Qi <yao.qi@linaro.org>
4042
4043 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4044 arch/aarch64-insn.h.
4045 (struct aarch64_memory_operand): Likewise.
4046 (ENCODE): Likewise.
4047 (emit_insn): Move to arch/aarch64-insn.c.
4048 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4049 (emit_load_store): Move to arch/aarch64-insn.c.
4050 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4051 (can_encode_int32): Remove.
4052
246994ce
YQ
40532015-10-12 Yao Qi <yao.qi@linaro.org>
4054
4055 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4056 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4057 (aarch64_relocate_instruction): Likewise.
4058 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4059 (struct aarch64_insn_visitor): Likewise.
4060
0badd99f
YQ
40612015-10-12 Yao Qi <yao.qi@linaro.org>
4062
4063 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4064 (struct aarch64_insn_visitor): New.
4065 (struct aarch64_insn_relocation_data): New.
4066 (aarch64_ftrace_insn_reloc_b): New function.
4067 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4068 (aarch64_ftrace_insn_reloc_cb): Likewise.
4069 (aarch64_ftrace_insn_reloc_tb): Likewise.
4070 (aarch64_ftrace_insn_reloc_adr): Likewise.
4071 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4072 (aarch64_ftrace_insn_reloc_others): Likewise.
4073 (visitor): New.
4074 (aarch64_relocate_instruction): Use visitor.
4075
dfaffe9d
YQ
40762015-10-12 Yao Qi <yao.qi@linaro.org>
4077
4078 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4079 int. Add argument buf.
4080 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4081 aarch64_relocate_instruction.
4082
70b439f0
YQ
40832015-10-12 Yao Qi <yao.qi@linaro.org>
4084
4085 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4086 argument insn. Remove local variable insn. Don't call
4087 target_read_uint32.
4088 (aarch64_install_fast_tracepoint_jump_pad): Call
4089 target_read_uint32.
4090
7781c06f
YQ
40912015-09-30 Yao Qi <yao.qi@linaro.org>
4092
4093 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4094 (emit_load_store_pair): Likewise.
4095
9a3c8263
SM
40962015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4097
4098 * dll.c (match_dll): Add cast(s).
4099 (unloaded_dll): Likewise.
4100 * linux-low.c (second_thread_of_pid_p): Likewise.
4101 (delete_lwp_callback): Likewise.
4102 (count_events_callback): Likewise.
4103 (select_event_lwp_callback): Likewise.
4104 (linux_set_resume_request): Likewise.
4105 * server.c (accumulate_file_name_length): Likewise.
4106 (emit_dll_description): Likewise.
4107 (handle_qxfer_threads_worker): Likewise.
4108 (visit_actioned_threads): Likewise.
4109 * thread-db.c (any_thread_of): Likewise.
4110 * tracepoint.c (same_process_p): Likewise.
4111 (match_blocktype): Likewise.
4112 (build_traceframe_info_xml): Likewise.
4113
224c3ddb
SM
41142015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4115
4116 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4117 assignment.
4118 (gdb_unparse_agent_expr): Likewise.
4119 * hostio.c (require_data): Likewise.
4120 (handle_pread): Likewise.
4121 * linux-low.c (disable_regset): Likewise.
4122 (fetch_register): Likewise.
4123 (store_register): Likewise.
4124 (get_dynamic): Likewise.
4125 (linux_qxfer_libraries_svr4): Likewise.
4126 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4127 (set_fast_tracepoint_jump): Likewise.
4128 (uninsert_fast_tracepoint_jumps_at): Likewise.
4129 (reinsert_fast_tracepoint_jumps_at): Likewise.
4130 (validate_inserted_breakpoint): Likewise.
4131 (clone_agent_expr): Likewise.
4132 * regcache.c (init_register_cache): Likewise.
4133 * remote-utils.c (putpkt_binary_1): Likewise.
4134 (decode_M_packet): Likewise.
4135 (decode_X_packet): Likewise.
4136 (look_up_one_symbol): Likewise.
4137 (relocate_instruction): Likewise.
4138 (monitor_output): Likewise.
4139 * server.c (handle_search_memory): Likewise.
4140 (handle_qxfer_exec_file): Likewise.
4141 (handle_qxfer_libraries): Likewise.
4142 (handle_qxfer): Likewise.
4143 (handle_query): Likewise.
4144 (handle_v_cont): Likewise.
4145 (handle_v_run): Likewise.
4146 (captured_main): Likewise.
4147 * target.c (write_inferior_memory): Likewise.
4148 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4149 * tracepoint.c (init_trace_buffer): Likewise.
4150 (add_tracepoint_action): Likewise.
4151 (add_traceframe): Likewise.
4152 (add_traceframe_block): Likewise.
4153 (cmd_qtdpsrc): Likewise.
4154 (cmd_qtdv): Likewise.
4155 (cmd_qtstatus): Likewise.
4156 (response_source): Likewise.
4157 (response_tsv): Likewise.
4158 (cmd_qtnotes): Likewise.
4159 (gdb_collect): Likewise.
4160 (initialize_tracepoint): Likewise.
4161
afbe19f8
PL
41622015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4163
4164 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4165 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4166 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4167 <NOP>: New.
4168 (enum aarch64_condition_codes): New enum.
4169 (w0): New static global.
4170 (fp): Likewise.
4171 (lr): Likewise.
4172 (struct aarch64_memory_operand) <type>: New
4173 MEMORY_OPERAND_POSTINDEX type.
4174 (postindex_memory_operand): New helper function.
4175 (emit_ret): New function.
4176 (emit_load_store_pair): New function, factored out of emit_stp
4177 with support for MEMORY_OPERAND_POSTINDEX.
4178 (emit_stp): Rewrite using emit_load_store_pair.
4179 (emit_ldp): New function.
4180 (emit_load_store): Likewise.
4181 (emit_ldr): Mention post-index instruction in comment.
4182 (emit_ldrh): New function.
4183 (emit_ldrb): New function.
4184 (emit_ldrsw): Mention post-index instruction in comment.
4185 (emit_str): Likewise.
4186 (emit_subs): New function.
4187 (emit_cmp): Likewise.
4188 (emit_and): Likewise.
4189 (emit_orr): Likewise.
4190 (emit_orn): Likewise.
4191 (emit_eor): Likewise.
4192 (emit_mvn): Likewise.
4193 (emit_lslv): Likewise.
4194 (emit_lsrv): Likewise.
4195 (emit_asrv): Likewise.
4196 (emit_mul): Likewise.
4197 (emit_sbfm): Likewise.
4198 (emit_sbfx): Likewise.
4199 (emit_ubfm): Likewise.
4200 (emit_ubfx): Likewise.
4201 (emit_csinc): Likewise.
4202 (emit_cset): Likewise.
4203 (emit_nop): Likewise.
4204 (emit_ops_insns): New helper function.
4205 (emit_pop): Likewise.
4206 (emit_push): Likewise.
4207 (aarch64_emit_prologue): New function.
4208 (aarch64_emit_epilogue): Likewise.
4209 (aarch64_emit_add): Likewise.
4210 (aarch64_emit_sub): Likewise.
4211 (aarch64_emit_mul): Likewise.
4212 (aarch64_emit_lsh): Likewise.
4213 (aarch64_emit_rsh_signed): Likewise.
4214 (aarch64_emit_rsh_unsigned): Likewise.
4215 (aarch64_emit_ext): Likewise.
4216 (aarch64_emit_log_not): Likewise.
4217 (aarch64_emit_bit_and): Likewise.
4218 (aarch64_emit_bit_or): Likewise.
4219 (aarch64_emit_bit_xor): Likewise.
4220 (aarch64_emit_bit_not): Likewise.
4221 (aarch64_emit_equal): Likewise.
4222 (aarch64_emit_less_signed): Likewise.
4223 (aarch64_emit_less_unsigned): Likewise.
4224 (aarch64_emit_ref): Likewise.
4225 (aarch64_emit_if_goto): Likewise.
4226 (aarch64_emit_goto): Likewise.
4227 (aarch64_write_goto_address): Likewise.
4228 (aarch64_emit_const): Likewise.
4229 (aarch64_emit_call): Likewise.
4230 (aarch64_emit_reg): Likewise.
4231 (aarch64_emit_pop): Likewise.
4232 (aarch64_emit_stack_flush): Likewise.
4233 (aarch64_emit_zero_ext): Likewise.
4234 (aarch64_emit_swap): Likewise.
4235 (aarch64_emit_stack_adjust): Likewise.
4236 (aarch64_emit_int_call_1): Likewise.
4237 (aarch64_emit_void_call_2): Likewise.
4238 (aarch64_emit_eq_goto): Likewise.
4239 (aarch64_emit_ne_goto): Likewise.
4240 (aarch64_emit_lt_goto): Likewise.
4241 (aarch64_emit_le_goto): Likewise.
4242 (aarch64_emit_gt_goto): Likewise.
4243 (aarch64_emit_ge_got): Likewise.
4244 (aarch64_emit_ops_impl): New static global variable.
4245 (aarch64_emit_ops): New target function, return
4246 &aarch64_emit_ops_impl.
4247 (struct linux_target_ops): Install it.
4248
bb903df0
PL
42492015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4250
4251 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4252 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4253 aarch64-ipa.o.
4254 * linux-aarch64-ipa.c: New file.
4255 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4256 and endian.h.
4257 (aarch64_get_thread_area): New target method.
4258 (extract_signed_bitfield): New helper function.
4259 (aarch64_decode_ldr_literal): New function.
4260 (enum aarch64_opcodes): New enum.
4261 (struct aarch64_register): New struct.
4262 (struct aarch64_operand): New struct.
4263 (x0): New static global.
4264 (x1): Likewise.
4265 (x2): Likewise.
4266 (x3): Likewise.
4267 (x4): Likewise.
4268 (w2): Likewise.
4269 (ip0): Likewise.
4270 (sp): Likewise.
4271 (xzr): Likewise.
4272 (aarch64_register): New helper function.
4273 (register_operand): Likewise.
4274 (immediate_operand): Likewise.
4275 (struct aarch64_memory_operand): New struct.
4276 (offset_memory_operand): New helper function.
4277 (preindex_memory_operand): Likewise.
4278 (enum aarch64_system_control_registers): New enum.
4279 (ENCODE): New macro.
4280 (emit_insn): New helper function.
4281 (emit_b): New function.
4282 (emit_bcond): Likewise.
4283 (emit_cb): Likewise.
4284 (emit_tb): Likewise.
4285 (emit_blr): Likewise.
4286 (emit_stp): Likewise.
4287 (emit_ldp_q_offset): Likewise.
4288 (emit_stp_q_offset): Likewise.
4289 (emit_load_store): Likewise.
4290 (emit_ldr): Likewise.
4291 (emit_ldrsw): Likewise.
4292 (emit_str): Likewise.
4293 (emit_ldaxr): Likewise.
4294 (emit_stxr): Likewise.
4295 (emit_stlr): Likewise.
4296 (emit_data_processing_reg): Likewise.
4297 (emit_data_processing): Likewise.
4298 (emit_add): Likewise.
4299 (emit_sub): Likewise.
4300 (emit_mov): Likewise.
4301 (emit_movk): Likewise.
4302 (emit_mov_addr): Likewise.
4303 (emit_mrs): Likewise.
4304 (emit_msr): Likewise.
4305 (emit_sevl): Likewise.
4306 (emit_wfe): Likewise.
4307 (append_insns): Likewise.
4308 (can_encode_int32_in): New helper function.
4309 (aarch64_relocate_instruction): New function.
4310 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4311 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4312 (struct linux_target_ops): Install aarch64_get_thread_area,
4313 aarch64_install_fast_tracepoint_jump_pad and
4314 aarch64_get_min_fast_tracepoint_insn_len.
4315
787749ea
PL
43162015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4317
4318 * Makefile.in (aarch64-insn.o): New rule.
4319 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4320
9812b2e6
YQ
43212015-09-21 Yao Qi <yao.qi@linaro.org>
4322
4323 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4324
18fe412b
YQ
43252015-09-21 Yao Qi <yao.qi@linaro.org>
4326
4327 * tracepoint.c (max_jump_pad_size): Remove.
4328
a0cc84cd
YQ
43292015-09-18 Yao Qi <yao.qi@linaro.org>
4330
4331 * linux-aarch64-low.c: Don't include sys/uio.h.
4332 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4333
d78908cf
WW
43342015-09-16 Wei-cheng Wang <cole945@gmail.com>
4335
4336 * tracepoint.c (eval_result_type): Change prototype.
4337 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4338
d57e0d50
PA
43392015-09-15 Pedro Alves <palves@redhat.com>
4340
4341 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4342 Check whether to report exec events instead of checking whether
4343 multiprocess is enabled.
4344
5a676acc
PA
43452015-09-15 Pedro Alves <palves@redhat.com>
4346
4347 PR remote/18965
4348 * remote-utils.c (prepare_resume_reply): Merge
4349 TARGET_WAITKIND_VFORK_DONE switch case with the
4350 TARGET_WAITKIND_FORKED case.
4351
7c5d0fad
YQ
43522015-09-15 Yao Qi <yao.qi@linaro.org>
4353
4354 * server.c (handle_query): Check string comparison using
4355 "else if" instead of "if".
4356
750ce8d1
YQ
43572015-09-15 Yao Qi <yao.qi@linaro.org>
4358
4359 * server.c (vCont_supported): New global variable.
4360 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4361 matches. Append ";vContSupported+" to own_buf.
4362 (handle_v_requests): Append ";s;S" to own_buf if target supports
4363 hardware single step or vCont_supported is false.
4364 (capture_main): Set vCont_supported to zero.
4365
70b90b91
YQ
43662015-09-15 Yao Qi <yao.qi@linaro.org>
4367
4368 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4369 it to ...
4370 (linux_supports_hardware_single_step): ... New function.
4371 (linux_target_ops): Update.
4372 * lynx-low.c (lynx_target_ops): Set field
4373 supports_hardware_single_step to target_can_do_hardware_single_step.
4374 * nto-low.c (nto_target_ops): Likewise.
4375 * spu-low.c (spu_target_ops): Likewise.
4376 * win32-low.c (win32_target_ops): Likewise.
4377 * target.c (target_can_do_hardware_single_step): New function.
4378 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4379 Remove. <supports_hardware_single_step>: New field.
4380 (target_supports_conditional_breakpoints): Remove.
4381 (target_supports_hardware_single_step): New macro.
4382 (target_can_do_hardware_single_step): Declare.
4383 * server.c (handle_query): Use target_supports_hardware_single_step
4384 instead of target_supports_conditional_breakpoints.
4385
ade90bde
YQ
43862015-09-15 Yao Qi <yao.qi@linaro.org>
4387
4388 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4389 function.
4390 (struct linux_target_ops the_low_target): Install
4391 aarch64_linux_siginfo_fixup.
4392
94585166
DB
43932015-09-11 Don Breazeal <donb@codesourcery.com>
4394 Luis Machado <lgustavo@codesourcery.com>
4395
4396 * linux-low.c (linux_mourn): Static declaration.
4397 (linux_arch_setup): Move in front of
4398 handle_extended_wait.
4399 (linux_arch_setup_thread): New function.
4400 (handle_extended_wait): Handle exec events. Call
4401 linux_arch_setup_thread. Make event_lwp argument a
4402 pointer-to-a-pointer.
4403 (check_zombie_leaders): Do not check stopped threads.
4404 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4405 (linux_low_filter_event): Add lwp and thread for exec'ing
4406 non-leader thread if leader thread has been deleted.
4407 Refactor code into linux_arch_setup_thread and call it.
4408 Pass child lwp pointer by reference to handle_extended_wait.
4409 (linux_wait_for_event_filtered): Update comment.
4410 (linux_wait_1): Prevent clobbering exec event status.
4411 (linux_supports_exec_events): New function.
4412 (linux_target_ops) <supports_exec_events>: Initialize new member.
4413 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4414 new member.
4415 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4416 * server.c (report_exec_events): New global variable.
4417 (handle_query): Handle qSupported query for exec-events feature.
4418 (captured_main): Initialize report_exec_events.
4419 * server.h (report_exec_events): Declare new global variable.
4420 * target.h (struct target_ops) <supports_exec_events>: New
4421 member.
4422 (target_supports_exec_events): New macro.
4423 * win32-low.c (win32_target_ops) <supports_exec_events>:
4424 Initialize new member.
4425
0568462b
MM
44262015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4427
4428 * linux-low.c (linux_low_enable_btrace): Remove.
4429 (linux_target_ops): Replace linux_low_enable_btrace with
4430 linux_enable_btrace.
4431
39edd165
YQ
44322015-09-03 Yao Qi <yao.qi@linaro.org>
4433
4434 * linux-aarch64-low.c (aarch64_insert_point): Call
4435 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4436 returns true.
4437
1db33b5a
UW
44382015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4439
4440 * linux-low.c (check_stopped_by_breakpoint): Use
4441 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4442
ab290430
PA
44432015-08-27 Pedro Alves <palves@redhat.com>
4444
4445 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4446
8d749320
SM
44472015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4448
6711b7f8
SM
4449 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4450 the XNEW-family equivalent.
8d749320
SM
4451 (compile_bytecodes): Likewise.
4452 * dll.c (loaded_dll): Likewise.
4453 * event-loop.c (append_callback_event): Likewise.
4454 (create_file_handler): Likewise.
4455 (create_file_event): Likewise.
4456 * hostio.c (handle_open): Likewise.
4457 * inferiors.c (add_thread): Likewise.
4458 (add_process): Likewise.
4459 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4460 * linux-arm-low.c (arm_new_process): Likewise.
4461 (arm_new_thread): Likewise.
4462 * linux-low.c (add_to_pid_list): Likewise.
4463 (linux_add_process): Likewise.
4464 (handle_extended_wait): Likewise.
4465 (add_lwp): Likewise.
4466 (enqueue_one_deferred_signal): Likewise.
4467 (enqueue_pending_signal): Likewise.
4468 (linux_resume_one_lwp_throw): Likewise.
4469 (linux_resume_one_thread): Likewise.
4470 (linux_read_memory): Likewise.
4471 (linux_write_memory): Likewise.
4472 * linux-mips-low.c (mips_linux_new_process): Likewise.
4473 (mips_linux_new_thread): Likewise.
4474 (mips_add_watchpoint): Likewise.
4475 * linux-x86-low.c (initialize_low_arch): Likewise.
4476 * lynx-low.c (lynx_add_process): Likewise.
4477 * mem-break.c (set_raw_breakpoint_at): Likewise.
4478 (set_breakpoint): Likewise.
4479 (add_condition_to_breakpoint): Likewise.
4480 (add_commands_to_breakpoint): Likewise.
4481 (clone_agent_expr): Likewise.
4482 (clone_one_breakpoint): Likewise.
4483 * regcache.c (new_register_cache): Likewise.
4484 * remote-utils.c (look_up_one_symbol): Likewise.
4485 * server.c (queue_stop_reply): Likewise.
4486 (start_inferior): Likewise.
4487 (queue_stop_reply_callback): Likewise.
4488 (handle_target_event): Likewise.
4489 * spu-low.c (fetch_ppc_memory): Likewise.
4490 (store_ppc_memory): Likewise.
4491 * target.c (set_target_ops): Likewise.
4492 * thread-db.c (thread_db_load_search): Likewise.
4493 (try_thread_db_load_1): Likewise.
4494 * tracepoint.c (add_tracepoint): Likewise.
4495 (add_tracepoint_action): Likewise.
4496 (create_trace_state_variable): Likewise.
4497 (cmd_qtdpsrc): Likewise.
4498 (cmd_qtro): Likewise.
4499 (add_while_stepping_state): Likewise.
4500 * win32-low.c (child_add_thread): Likewise.
4501 (get_image_name): Likewise.
4502
ed8b7b42
YQ
45032015-08-25 Yao Qi <yao.qi@linaro.org>
4504
4505 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4506
db3cb7cb
YQ
45072015-08-25 Yao Qi <yao.qi@linaro.org>
4508
4509 * Makefile.in (aarch64-linux.o): New rule.
4510 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4511 srv_tgtobj.
4512 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4513 (aarch64_init_debug_reg_state): Make it extern.
4514 (aarch64_linux_prepare_to_resume): Remove.
4515
f6011a1c
YQ
45162015-08-25 Yao Qi <yao.qi@linaro.org>
4517
4518 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4519 lwp_arch_private_info and ptid_of_lwp.
4520
88e2cf7e
YQ
45212015-08-25 Yao Qi <yao.qi@linaro.org>
4522
4523 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4524 Find proc_info by find_process_pid. All callers updated.
4525
5e35436e
YQ
45262015-08-25 Yao Qi <yao.qi@linaro.org>
4527
4528 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4529 Remove.
4530 (debug_reg_change_callback): Remove.
4531 (aarch64_notify_debug_reg_change): Remove.
4532
4a8a7965
YQ
45332015-08-25 Yao Qi <yao.qi@linaro.org>
4534
4535 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4536 Call current_lwp_ptid.
4537
32a271ee
YQ
45382015-08-25 Yao Qi <yao.qi@linaro.org>
4539
4540 * linux-aarch64-low.c (debug_reg_change_callback): Use
4541 debug_printf.
4542
0d51c8d7
YQ
45432015-08-25 Yao Qi <yao.qi@linaro.org>
4544
4545 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4546
31a43dd5
YQ
45472015-08-25 Yao Qi <yao.qi@linaro.org>
4548
4549 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4550
8ee52567
YQ
45512015-08-25 Yao Qi <yao.qi@linaro.org>
4552
4553 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4554 the code.
4555
ff3f0f45
YQ
45562015-08-25 Yao Qi <yao.qi@linaro.org>
4557
4558 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4559 Remove.
4560 (debug_reg_change_callback): Remove argument entry and add argument
4561 lwp. Remove local variable thread. Don't print thread id in the
4562 debugging output. Don't check whether pid of thread equals to pid.
4563 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4564 iterate_over_lwps instead find_inferior.
4565
3d40fbb5
PA
45662015-08-24 Pedro Alves <palves@redhat.com>
4567
4568 * inferiors.c (get_first_process): New function.
4569 * inferiors.h (get_first_process): New declaration.
4570 * remote-utils.c (read_ptid): Default to the first process in the
4571 list, instead of to the current thread's process.
4572
438e1e42
PA
45732015-08-24 Pedro Alves <palves@redhat.com>
4574
4575 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4576 * event-loop.c: Likewise.
4577 * remote-utils.c: Likewise.
4578 * tracepoint.c: Likewise.
4579
a8c6d4fc
PA
45802015-08-24 Pedro Alves <palves@redhat.com>
4581
4582 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4583 ptid_get_lwp.
4584
99b0bb12
PA
45852015-08-21 Pedro Alves <palves@redhat.com>
4586
4587 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4588 instead of literal 1.
4589
f8904751
PA
45902015-08-21 Pedro Alves <palves@redhat.com>
4591
4592 * tdesc.c (default_description): Explicitly zero-initialize.
4593
465a859e
PA
45942015-08-21 Pedro Alves <palves@redhat.com>
4595
4596 PR gdb/18749
4597 * inferiors.c (remove_thread): Discard any pending stop reply for
4598 this thread.
4599 * server.c (remove_all_on_match_pid): Rename to ...
4600 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4601 instead of a pid.
4602 (discard_queued_stop_replies): Change parameter to a ptid. Now
4603 extern.
4604 (handle_v_kill, kill_inferior_callback, captured_main)
4605 (process_serial_event): Adjust.
4606 * server.h (discard_queued_stop_replies): Declare.
4607
f0db101d
PA
46082015-08-21 Pedro Alves <palves@redhat.com>
4609
4610 * linux-low.c (wait_for_sigstop): Always switch to no thread
4611 selected if the previously current thread dies.
4612 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4613 process instead of the current thread's.
4614 * remote-utils.c (input_interrupt): Don't check if there's no
4615 current thread.
4616 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4617 current thread to the general thread fails, error out.
4618 (handle_qxfer_auxv, handle_qxfer_libraries)
4619 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4620 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4621 (handle_query): Check if there's a thread selected instead of
4622 checking whether there's any thread in the thread list.
4623 (handle_qxfer_threads, handle_qxfer_btrace)
4624 (handle_qxfer_btrace_conf): Don't error out early if there's no
4625 thread in the thread list.
4626 (handle_v_cont, myresume): Don't set the current thread to the
4627 continue thread.
4628 (process_serial_event) <Hg handling>: Also set thread_id if the
4629 previous general thread is still alive.
4630 (process_serial_event) <g/G handling>: If setting the current
4631 thread to the general thread fails, error out.
4632 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4633 thread's lwp instead of the current thread's.
4634 * target.c (set_desired_thread): If the desired thread was not
4635 found, leave the current thread pointing to NULL. Return an int
4636 (boolean) indicating success.
4637 * target.h (set_desired_thread): Change return type to int.
4638
40045d91
MF
46392015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4640
4641 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4642 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4643 #includes.
4644 (ps_get_thread_area): New function.
4645
45face3b
GB
46462015-08-19 Gary Benson <gbenson@redhat.com>
4647
4648 * hostio.c (handle_pread): Do not attempt to read more data
4649 than hostio_reply_with_data can fit in a packet.
4650
16d5f642
JB
46512015-08-18 Joel Brobecker <brobecker@adacore.com>
4652
4653 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4654
a738da3a
MF
46552015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4656
4657 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4658
33ebda9d
PA
46592015-08-06 Pedro Alves <palves@redhat.com>
4660
4661 * tracepoint.c (expr_eval_result): Now an int.
4662
a44892be
PA
46632015-08-06 Pedro Alves <palves@redhat.com>
4664
4665 * gdbthread.h (struct regcache): Forward declare.
4666 (struct thread_info) <regcache_data>: Now a struct regcache
4667 pointer.
4668 * inferiors.c (inferior_regcache_data)
4669 (set_inferior_regcache_data): Now work with struct regcache
4670 pointers.
4671 * inferiors.h (struct regcache): Forward declare.
4672 (inferior_regcache_data, set_inferior_regcache_data): Now work
4673 with struct regcache pointers.
4674 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4675 (free_register_cache_thread): Remove struct regcache pointer
4676 casts.
4677
608a1e46
PA
46782015-08-06 Pedro Alves <palves@redhat.com>
4679
4680 * server.c (captured_main): On error, print the exception message
4681 to stderr, and if run_once is set, throw a quit.
4682
f0ce0d3a
PA
46832015-08-06 Pedro Alves <palves@redhat.com>
4684
4685 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4686 the current thread.
4687
bf47e248
PA
46882015-08-06 Pedro Alves <palves@redhat.com>
4689
4690 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4691 reading beyond the passed in buffer length.
4692
b6b9ffcc
PL
46932015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4694
4695 * tracepoint.c (symbol_list) <required>: Remove.
4696
863d01bd
PA
46972015-08-06 Pedro Alves <palves@redhat.com>
4698
4699 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4700 count if stopping and suspending threads.
4701 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4702 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4703 (linux_detach): Complete an ongoing step-over.
4704 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4705 throughout.
4706 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4707 (linux_wait_1): If passing a signal to the inferior after
4708 finishing a step-over, unsuspend and re-resume all lwps. If we
4709 see a single-step event but the thread should be continuing, don't
4710 pass the trap to gdb.
4711 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4712 internal_error instead of gdb_assert.
4713 (enqueue_pending_signal): New function.
4714 (check_ptrace_stopped_lwp_gone): Add debug output.
4715 (start_step_over): Use internal_error instead of gdb_assert.
4716 (complete_ongoing_step_over): New function.
4717 (linux_resume_one_thread): Don't resume a suspended thread.
4718 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4719 it stepping.
4720
00db26fa
PA
47212015-08-06 Pedro Alves <palves@redhat.com>
4722
4723 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4724 (linux_thread_alive): Use lwp_is_marked_dead.
4725 (extended_event_reported): Delete.
4726 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4727 instead of extended_event_reported.
4728 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4729 as well.
4730 (lwp_is_marked_dead): New function.
4731 (lwp_running): Use lwp_is_marked_dead.
4732 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4733 comment.
4734
ad071a30
PA
47352015-08-06 Pedro Alves <palves@redhat.com>
4736
4737 * linux-low.c (linux_wait_1): Move fork event output out of the
4738 !report_to_gdb check. Pass event_child->waitstatus to
4739 target_waitstatus_to_string instead of ourstatus.
4740
524b57e6
YQ
47412015-08-04 Yao Qi <yao.qi@linaro.org>
4742
4743 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4744 if current_thread is 32 bit.
4745
6085d6f6
YQ
47462015-08-04 Yao Qi <yao.qi@linaro.org>
4747
4748 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4749 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4750 * server.c (extended_protocol): Remove "static".
4751 * server.h (extended_protocol): Declare it.
4752
8a7e4587
YQ
47532015-08-04 Yao Qi <yao.qi@linaro.org>
4754
4755 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4756 both aarch64 and aarch32.
4757 (aarch64_set_pc): Likewise.
4758
3b53ae99
YQ
47592015-08-04 Yao Qi <yao.qi@linaro.org>
4760
4761 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4762 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4763 arm-with-neon.xml to srv_xmlfiles.
4764 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4765 (is_64bit_tdesc): New function.
4766 (aarch64_linux_read_description): New function.
4767 (aarch64_arch_setup): Call aarch64_linux_read_description.
4768 (regs_info): Rename to regs_info_aarch64.
4769 (aarch64_regs_info): Return right regs_info.
4770 (initialize_low_arch): Call initialize_low_arch_aarch32.
4771
bd9e6534
YQ
47722015-08-04 Yao Qi <yao.qi@linaro.org>
4773
4774 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4775 * linux-aarch32-low.c: New file.
4776 * linux-aarch32-low.h: New file.
4777 * linux-arm-low.c (arm_fill_gregset): Move it to
4778 linux-aarch32-low.c.
4779 (arm_store_gregset): Likewise.
4780 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4781 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4782 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4783 (regs_info): Rename to regs_info_arm.
4784 (arm_regs_info): Return regs_info_aarch32 if
4785 have_ptrace_getregset is 1 and target description is
4786 arm_with_neon or arm_with_vfpv3.
4787 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4788 Call initialize_low_arch_aarch32 instead.
4789
ded48a5e
YQ
47902015-08-04 Yao Qi <yao.qi@linaro.org>
4791
4792 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4793 * linux-low.c: ... here.
4794 * linux-low.h (have_ptrace_getregset): Declare it.
4795
96e9210f
PA
47962015-08-04 Pedro Alves <palves@redhat.com>
4797
4798 * thread-db.c (struct thread_db): Use new typedefs.
4799 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4800 CHK calls.
4801 (disable_thread_event_reporting): Cast result of dlsym to
4802 destination function pointer type.
4803 (thread_db_mourn): Use td_ta_delete_ftype.
4804
af60a1ef
SL
48052015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4806
4807 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4808 arch variant.
4809 (CDX_BREAKPOINT): Define for R2.
4810 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4811 (the_low_target): Add comments.
4812
e8b41681
YQ
48132015-07-30 Yao Qi <yao.qi@linaro.org>
4814
4815 * linux-arm-low.c (arm_hwcap): Remove it.
4816 (arm_read_description): New local variable arm_hwcap. Don't
4817 set arm_hwcap to zero.
4818
89abb039
YQ
48192015-07-30 Yao Qi <yao.qi@linaro.org>
4820
4821 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4822 Use regcache->tdesc instead.
4823 (arm_store_wmmxregset): Likewise.
4824 (arm_fill_vfpregset): Likewise.
4825 (arm_store_vfpregset): Likewise.
4826
deca266c
YQ
48272015-07-30 Yao Qi <yao.qi@linaro.org>
4828
4829 * linux-arm-low.c: Include arch/arm.h.
4830 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4831 (arm_store_gregset): Likewise.
4832
aa58a496
SM
48332015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4834
4835 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4836 ptrace's 4th parameter.
4837
50904b25
YQ
48382015-07-27 Yao Qi <yao.qi@linaro.org>
4839
4840 * configure.srv (case aarch64*-*-linux*): Don't set
4841 srv_linux_usrregs.
4842
5826e159
PA
48432015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4844
4845 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4846 sys/ptrace.h.
4847 * linux-arm-low.c: Likewise.
4848 * linux-cris-low.c: Likewise.
4849 * linux-crisv32-low.c: Likewise.
4850 * linux-low.c: Likewise.
4851 * linux-m68k-low.c: Likewise.
4852 * linux-mips-low.c: Likewise.
4853 * linux-nios2-low.c: Likewise.
4854 * linux-s390-low.c: Likewise.
4855 * linux-sparc-low.c: Likewise.
4856 * linux-tic6x-low.c: Likewise.
4857 * linux-tile-low.c: Likewise.
4858 * linux-x86-low.c: Likewise.
4859
54019719
PA
48602015-07-24 Pedro Alves <palves@redhat.com>
4861
4862 * config.in: Regenerate.
4863 * configure: Regenerate.
4864
eb7aa561
PA
48652015-07-24 Pedro Alves <palves@redhat.com>
4866
4867 * acinclude.m4: Include ../ptrace.m4.
4868 * configure.ac: Call GDB_AC_PTRACE.
4869 * config.in, configure: Regenerate.
4870
55d7b841
YQ
48712015-07-24 Yao Qi <yao.qi@linaro.org>
4872
4873 * linux-low.c (linux_create_inferior): Remove setting to
4874 proc->priv->new_inferior.
4875 (linux_attach): Likewise.
4876 (linux_low_filter_event): Likewise.
4877 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4878
c06cbd92
YQ
48792015-07-24 Yao Qi <yao.qi@linaro.org>
4880
4881 * linux-low.c (linux_arch_setup): New function.
4882 (linux_low_filter_event): If proc->tdesc is NULL and
4883 proc->attached is true, call the_low_target.arch_setup.
4884 Otherwise, keep status pending, and return.
4885 (linux_resume_one_lwp_throw): Don't call get_pc if
4886 thread->while_stepping isn't NULL. Don't call
4887 get_thread_regcache if proc->tdesc is NULL.
4888 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4889 (linux_target_ops): Install arch_setup.
4890 * server.c (start_inferior): Call the_target->arch_setup.
4891 * target.h (struct target_ops) <arch_setup>: New field.
4892 (target_arch_setup): New marco.
4893 * lynx-low.c (lynx_target_ops): Update.
4894 * nto-low.c (nto_target_ops): Update.
4895 * spu-low.c (spu_target_ops): Update.
4896 * win32-low.c (win32_target_ops): Update.
4897
5ae3ebba
YQ
48982015-07-24 Yao Qi <yao.qi@linaro.org>
4899
4900 * linux-low.c (linux_add_process): Don't set
4901 proc->priv->new_inferior.
4902 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4903 (linux_attach): Likewise.
4904
eb97750b
YQ
49052015-07-24 Yao Qi <yao.qi@linaro.org>
4906
4907 * server.c (start_inferior): Code refactor.
4908
51aee833
YQ
49092015-07-24 Yao Qi <yao.qi@linaro.org>
4910
4911 * server.c (process_serial_event): Set general_thread.
4912
af1b22f3
YQ
49132015-07-21 Yao Qi <yao.qi@linaro.org>
4914
4915 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4916 aarch64_linux_get_debug_reg_capacity.
4917
554717a3
YQ
49182015-07-17 Yao Qi <yao.qi@linaro.org>
4919
4920 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4921 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4922 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4923 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4924 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4925 (AARCH64_HWP_ALIGNMENT): Likewise.
4926 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4927 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4928 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4929 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4930 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4931 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4932 (struct aarch64_debug_reg_state): Likewise.
4933 (struct arch_lwp_info): Likewise.
4934 (aarch64_align_watchpoint): Likewise.
4935 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4936 (aarch64_watchpoint_length): Likewise.
4937 (aarch64_point_encode_ctrl_reg): Likewise
4938 (aarch64_point_is_aligned): Likewise.
4939 (aarch64_align_watchpoint): Likewise.
4940 (aarch64_linux_set_debug_regs):
4941 (aarch64_dr_state_insert_one_point): Likewise.
4942 (aarch64_dr_state_remove_one_point): Likewise.
4943 (aarch64_handle_breakpoint): Likewise.
4944 (aarch64_handle_aligned_watchpoint): Likewise.
4945 (aarch64_handle_unaligned_watchpoint): Likewise.
4946 (aarch64_handle_watchpoint): Likewise.
4947
c67ca4de
YQ
49482015-07-17 Yao Qi <yao.qi@linaro.org>
4949
4950 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4951 and don't aarch64_get_debug_reg_state. All callers update.
4952 (aarch64_handle_aligned_watchpoint): Likewise.
4953 (aarch64_handle_unaligned_watchpoint): Likewise.
4954 (aarch64_handle_watchpoint): Likewise.
4955 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4956 (aarch64_remove_point): Likewise.
4957
25abf979
YQ
49582015-07-17 Yao Qi <yao.qi@linaro.org>
4959
4960 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4961 debug_printf.
4962 (aarch64_handle_unaligned_watchpoint): Likewise.
4963
db1ff28b
JK
49642015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4965
4966 Revert the previous 3 commits:
4967 Move gdb_regex* to common/
4968 Move linux_find_memory_regions_full & co.
4969 gdbserver build-id attribute generator
4970
700ca40f
JK
49712015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4972 Jan Kratochvil <jan.kratochvil@redhat.com>
4973
4974 gdbserver build-id attribute generator.
4975 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4976 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4977 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4978 (find_phdr): New.
4979 (get_dynamic): Use find_pdhr to traverse program headers.
4980 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4981 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4982 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4983 (get_hex_build_id): New.
4984 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4985 to reply XML document.
4986
9904185c
JK
49872015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4988 Jan Kratochvil <jan.kratochvil@redhat.com>
4989
4990 * target.c: Include target/target-utils.h and fcntl.h.
4991 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4992 (target_fileio_read_stralloc): New functions.
4993
6e5b4429
JK
49942015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4995
4996 * Makefile.in (OBS): Add gdb_regex.o.
4997 (gdb_regex.o): New.
4998 * config.in: Rebuilt.
4999 * configure: Rebuilt.
5000
ddc98fbf
JK
50012015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5002 Jan Kratochvil <jan.kratochvil@redhat.com>
5003
5004 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5005 * Makefile.in (OBS): Add target-utils.o.
5006 (linux-maps.o, target-utils.o): New.
5007 * configure.srv (srv_linux_obj): Add linux-maps.o.
5008
e57bb7a0
PL
50092015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5010
5011 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5012 function, return 1.
5013 (the_low_target): Install it.
5014
586b02a9
PA
50152015-07-14 Pedro Alves <palves@redhat.com>
5016
5017 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5018 Instead, ignore ECHILD, and throw an error for other errnos.
5019
58c1b36c
PA
50202015-07-10 Pedro Alves <palves@redhat.com>
5021
5022 * event-loop.c (struct callback_event) <data>: Change type to
5023 gdb_client_data instance instead of gdb_client_data pointer.
5024 (append_callback_event): Adjust.
5025
421530db
PL
50262015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5027
5028 * linux-aarch64-low.c: Add comments for each linux_target_ops
5029 method. Remove comments already covered in target_ops and
5030 linux_target_ops definitions.
5031 (the_low_target): Add comments for each unimplemented method.
5032
c2d65f38
YQ
50332015-07-09 Yao Qi <yao.qi@linaro.org>
5034
5035 * linux-aarch64-low.c (aarch64_regmap): Remove.
5036 (aarch64_usrregs_info): Remove.
5037 (regs_info): Set field usrregs to NULL.
5038
b20a6524
MM
50392015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5040
5041 * linux-low.c: Include "rsp-low.h"
5042 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5043 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5044 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5045 (handle_btrace_enable_pt): New.
5046 (handle_btrace_general_set): Support "pt".
5047 (handle_btrace_conf_general_set): Support "pt:size".
5048
96c97461
PL
50492015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5050
5051 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5052 Z_PACKET_SW_BP.
5053
37d66942
PL
50542015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5055
5056 * linux-aarch64-low.c: Remove comment about endianness.
5057 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5058 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5059 memcmp.
5060
dc06243f
GB
50612015-06-24 Gary Benson <gbenson@redhat.com>
5062
5063 * linux-i386-ipa.c (stdint.h): Do not include.
5064 * lynx-i386-low.c (stdint.h): Likewise.
5065 * lynx-ppc-low.c (stdint.h): Likewise.
5066 * mem-break.c (stdint.h): Likewise.
5067 * thread-db.c (stdint.h): Likewise.
5068 * tracepoint.c (stdint.h): Likewise.
5069 * win32-low.c (stdint.h): Likewise.
5070
124e13d9
SM
50712015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5072
5073 * server.c (write_qxfer_response): Update call to
5074 remote_escape_output.
5075
909c2cda
JK
50762015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5077 Jan Kratochvil <jan.kratochvil@redhat.com>
5078
5079 Merge multiple hex conversions.
5080 * gdbreplay.c (tohex): Rename to 'fromhex'.
5081 (logchar): Use fromhex.
5082
24c05f46
JK
50832015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5084
5085 * server.c (handle_qxfer_libraries): Set `version' attribute for
5086 <library-list>.
5087
14d2069a
GB
50882015-06-10 Gary Benson <gbenson@redhat.com>
5089
5090 * target.h (struct target_ops) <multifs_open>: New field.
5091 <multifs_unlink>: Likewise.
5092 <multifs_readlink>: Likewise.
5093 * linux-low.c (nat/linux-namespaces.h): New include.
5094 (linux_target_ops): Initialize the_target->multifs_open,
5095 the_target->multifs_unlink and the_target->multifs_readlink.
5096 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5097 * hostio.c (hostio_fs_pid): New static variable.
5098 (hostio_handle_new_gdb_connection): New function.
5099 (handle_setfs): Likewise.
5100 (handle_open): Use the_target->multifs_open as appropriate.
5101 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5102 (handle_readlink): Use the_target->multifs_readlink as
5103 appropriate.
5104 (handle_vFile): Handle vFile:setfs packets.
5105 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5106 after target_handle_new_gdb_connection.
5107
4b8b5e72
GB
51082015-06-10 Gary Benson <gbenson@redhat.com>
5109
5110 * configure.ac (AC_CHECK_FUNCS): Add setns.
5111 * config.in: Regenerate.
5112 * configure: Likewise.
5113 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5114 (linux-namespaces.o): New rule.
5115 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5116
3ac2e371
GB
51172015-06-09 Gary Benson <gbenson@redhat.com>
5118
5119 * hostio.c (handle_open): Process mode argument with
5120 fileio_to_host_mode.
5121
ca9b78ce
YQ
51222015-06-01 Yao Qi <yao.qi@linaro.org>
5123
5124 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5125 * linux-x86-low.c: Likewise.
5126
bfacd19d
DB
51272015-05-28 Don Breazeal <donb@codesourcery.com>
5128
5129 * linux-low.c (handle_extended_wait): Initialize
5130 thread_info.last_resume_kind for new fork children.
5131
452003ef
PA
51322015-05-15 Pedro Alves <palves@redhat.com>
5133
5134 * target.h (target_handle_new_gdb_connection): Rewrite using if
5135 wrapped in do/while.
5136
1041a03c
JB
51372015-05-14 Joel Brobecker <brobecker@adacore.com>
5138
5139 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5140 * configure, config.in: Regenerate.
5141 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5142 Declare typedef.
5143
c269dbdb
DB
51442015-05-12 Don Breazeal <donb@codesourcery.com>
5145
5146 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5147 PTRACE_EVENT_VFORK_DONE.
5148 (linux_low_ptrace_options, extended_event_reported): Add vfork
5149 events.
5150 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5151 and "vforkdone" for RSP 'T' Stop Reply Packet.
5152 * server.h (report_vfork_events): Declare
5153 global variable.
5154
3a8a0396
DB
51552015-05-12 Don Breazeal <donb@codesourcery.com>
5156
5157 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5158 (the_low_target) <new_fork>: Initialize new member.
5159 * linux-arm-low.c (arm_new_fork): New function.
5160 (the_low_target) <new_fork>: Initialize new member.
5161 * linux-low.c (handle_extended_wait): Call new target function
5162 new_fork.
5163 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5164 * linux-mips-low.c (mips_add_watchpoint): New function
5165 extracted from mips_insert_point.
5166 (the_low_target) <new_fork>: Initialize new member.
5167 (mips_linux_new_fork): New function.
5168 (mips_insert_point): Call mips_add_watchpoint.
5169 * linux-x86-low.c (x86_linux_new_fork): New function.
5170 (the_low_target) <new_fork>: Initialize new member.
5171
de0d863e
DB
51722015-05-12 Don Breazeal <donb@codesourcery.com>
5173
5174 * linux-low.c (handle_extended_wait): Implement return value,
5175 rename argument 'event_child' to 'event_lwp', handle
5176 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5177 (linux_low_ptrace_options): New function.
5178 (linux_low_filter_event): Call linux_low_ptrace_options,
5179 use different argument fo linux_enable_event_reporting,
5180 use return value from handle_extended_wait.
5181 (extended_event_reported): New function.
5182 (linux_wait_1): Call extended_event_reported and set
5183 status to report fork events.
5184 (linux_write_memory): Add pid to debug message.
5185 (reset_lwp_ptrace_options_callback): New function.
5186 (linux_handle_new_gdb_connection): New function.
5187 (linux_target_ops): Initialize new structure member.
5188 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5189 * lynx-low.c: Initialize new structure member.
5190 * remote-utils.c (prepare_resume_reply): Implement stop reason
5191 "fork" for "T" stop message.
5192 * server.c (handle_query): Call handle_new_gdb_connection.
5193 * server.h (report_fork_events): Declare global flag.
5194 * target.h (struct target_ops) <handle_new_gdb_connection>:
5195 New member.
5196 (target_handle_new_gdb_connection): New macro.
5197 * win32-low.c: Initialize new structure member.
5198
ddcbc397
DB
51992015-05-12 Don Breazeal <donb@codesourcery.com>
5200
5201 * mem-break.c (APPEND_TO_LIST): Define macro.
5202 (clone_agent_expr): New function.
5203 (clone_one_breakpoint): New function.
5204 (clone_all_breakpoints): New function.
5205 * mem-break.h: Declare new functions.
5206
89245bc0
DB
52072015-05-12 Don Breazeal <donb@codesourcery.com>
5208
5209 * linux-low.c (linux_supports_fork_events): New function.
5210 (linux_supports_vfork_events): New function.
5211 (linux_target_ops): Initialize new structure members.
5212 (initialize_low): Call linux_check_ptrace_features.
5213 * lynx-low.c (lynx_target_ops): Initialize new structure
5214 members.
5215 * server.c (report_fork_events, report_vfork_events):
5216 New global flags.
5217 (handle_query): Add new features to qSupported packet and
5218 response.
5219 (captured_main): Initialize new global variables.
5220 * target.h (struct target_ops) <supports_fork_events>:
5221 New member.
5222 <supports_vfork_events>: New member.
5223 (target_supports_fork_events): New macro.
5224 (target_supports_vfork_events): New macro.
5225 * win32-low.c (win32_target_ops): Initialize new structure
5226 members.
5227
835205d0
GB
52282015-05-12 Gary Benson <gbenson@redhat.com>
5229
5230 * server.c (handle_qxfer_exec_file): Use current process
5231 if annex is empty.
5232
21e94bd9
SL
52332015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5234
5235 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5236 Remove HAVE_PTRACE_GETREGS conditionals.
5237 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5238 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5239
45614f15
YQ
52402015-05-08 Yao Qi <yao.qi@linaro.org>
5241
5242 * linux-low.c (linux_supports_conditional_breakpoints): New
5243 function.
5244 (linux_target_ops): Install new target method.
5245 * lynx-low.c (lynx_target_ops): Install NULL hook for
5246 supports_conditional_breakpoints.
5247 * nto-low.c (nto_target_ops): Likewise.
5248 * spu-low.c (spu_target_ops): Likewise.
5249 * win32-low.c (win32_target_ops): Likewise.
5250 * server.c (handle_query): Check
5251 target_supports_conditional_breakpoints.
5252 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5253 New field.
5254 (target_supports_conditional_breakpoints): New macro.
5255
80ad801e
PA
52562015-05-06 Pedro Alves <palves@redhat.com>
5257
5258 PR server/18081
5259 * server.c (start_inferior): If the process exits, mourn it.
5260
819843c7
GB
52612015-04-21 Gary Benson <gbenson@redhat.com>
5262
5263 * hostio.c (fileio_open_flags_to_host): Factored out to
5264 fileio_to_host_openflags in common/fileio.c. Single use
5265 updated.
5266
a2d5a9d7
MF
52672015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5268
5269 * linux-xtensa-low.c (xtensa_fill_gregset)
5270 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5271 XCHAL_HAVE_LOOP.
5272
deb44829
MF
52732015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5274
5275 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5276 (regs_info): Replace usrregs pointer with NULL.
5277
e57f1de3
GB
52782015-04-17 Gary Benson <gbenson@redhat.com>
5279
5280 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5281 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5282 * server.c (handle_qxfer_exec_file): New function.
5283 (qxfer_packets): Add exec-file entry.
5284 (handle_query): Report qXfer:exec-file:read as supported packet.
5285
62828379
RN
52862015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5287
5288 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5289
b88bb450
GB
52902015-04-09 Gary Benson <gbenson@redhat.com>
5291
5292 * hostio-errno.c (errno_to_fileio_error): Remove function.
5293 Update caller to use remote_fileio_to_fio_error.
5294
c8f4bfdd
YQ
52952015-04-09 Yao Qi <yao.qi@linaro.org>
5296
5297 * linux-low.c (linux_insert_point): Call
5298 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5299 (linux_remove_point): Call remove_memory_breakpoint if type is
5300 raw_bkpt_type_sw.
5301 * linux-x86-low.c (x86_insert_point): Don't call
5302 insert_memory_breakpoint.
5303 (x86_remove_point): Don't call remove_memory_breakpoint.
5304
41f98f02
PA
53052015-04-01 Pedro Alves <palves@redhat.com>
5306 Cleber Rosa <crosa@redhat.com>
5307
5308 * server.c (gdbserver_usage): Reorganize and extend the usage
5309 message.
5310
2bf6fb9d
PA
53112015-03-24 Pedro Alves <palves@redhat.com>
5312
5313 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5314 output. Also dump TRAP_TRACE.
5315 (linux_low_filter_event): In debug output, distinguish a
5316 resume_stop SIGSTOP from a delayed SIGSTOP.
5317
369f6daa
GB
53182015-03-24 Gary Benson <gbenson@redhat.com>
5319
5320 * linux-x86-low.c (x86_linux_new_thread): Moved to
5321 nat/x86-linux.c.
5322 (x86_linux_prepare_to_resume): Likewise.
5323
8e5d4070
GB
53242015-03-24 Gary Benson <gbenson@redhat.com>
5325
5326 * Makefile.in (x86-linux-dregs.o): New rule.
5327 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5328 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5329 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5330 (x86_linux_dr_get): Likewise.
5331 (x86_linux_dr_set): Likewise.
5332 (update_debug_registers_callback): Likewise.
5333 (x86_linux_dr_set_addr): Likewise.
5334 (x86_linux_dr_get_addr): Likewise.
5335 (x86_linux_dr_set_control): Likewise.
5336 (x86_linux_dr_get_control): Likewise.
5337 (x86_linux_dr_get_status): Likewise.
5338 (x86_linux_update_debug_registers): Likewise.
5339
2b95d440
GB
53402015-03-24 Gary Benson <gbenson@redhat.com>
5341
5342 * linux-x86-low.c (x86_linux_update_debug_registers):
5343 New function, factored out from...
5344 (x86_linux_prepare_to_resume): ...this.
5345
14b0bc68
GB
53462015-03-24 Gary Benson <gbenson@redhat.com>
5347
5348 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5349 (x86_linux_dr_set): Likewise.
5350 (update_debug_registers_callback): Likewise.
5351 (x86_linux_dr_set_addr): Likewise.
5352 (x86_linux_dr_get_addr): Likewise.
5353 (x86_linux_dr_set_control): Likewise.
5354 (x86_linux_dr_get_control): Likewise.
5355 (x86_linux_dr_get_status): Likewise.
5356 (x86_linux_prepare_to_resume): Likewise.
5357
5dfe6ca8
GB
53582015-03-24 Gary Benson <gbenson@redhat.com>
5359
5360 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5361 Use perror_with_name. Pass string through gettext.
5362 (x86_linux_dr_set): Likewise.
5363
d33472ad
GB
53642015-03-24 Gary Benson <gbenson@redhat.com>
5365
5366 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5367 (x86_linux_dr_set_addr): ...this.
5368 (x86_dr_low_get_addr): Rename to...
5369 (x86_linux_dr_get_addr): ...this.
5370 (x86_dr_low_set_control): Rename to...
5371 (x86_linux_dr_set_control): ...this.
5372 (x86_dr_low_get_control): Rename to...
5373 (x86_linux_dr_get_control): ...this.
5374 (x86_dr_low_get_status): Rename to...
5375 (x86_linux_dr_get_status): ...this.
5376 (x86_dr_low): Update with new function names.
5377
4b134ca1
GB
53782015-03-24 Gary Benson <gbenson@redhat.com>
5379
5380 * Makefile.in (x86-linux.o): New rule.
5381 * configure.srv: Add x86-linux.o to relevant targets.
5382 * linux-low.c (lwp_set_arch_private_info): New function.
5383 (lwp_arch_private_info): Likewise.
5384 * linux-x86-low.c: Include nat/x86-linux.h.
5385 (arch_lwp_info): Removed structure.
5386 (update_debug_registers_callback):
5387 Use lwp_set_debug_registers_changed.
5388 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5389 and lwp_set_debug_registers_changed.
5390 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5391
34c703da
GB
53922015-03-24 Gary Benson <gbenson@redhat.com>
5393
5394 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5395 * linux-arm-low.c (arm_new_thread): Likewise.
5396 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5397 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5398 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5399 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5400
cff068da
GB
54012015-03-24 Gary Benson <gbenson@redhat.com>
5402
5403 * linux-low.c (ptid_of_lwp): New function.
5404 (lwp_is_stopped): Likewise.
5405 (lwp_stop_reason): Likewise.
5406 * linux-x86-low.c (update_debug_registers_callback):
5407 Use lwp_is_stopped.
5408 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5409 lwp_stop_reason.
5410
b2f7c7e8
GB
54112015-03-24 Gary Benson <gbenson@redhat.com>
5412
5413 * linux-low.h (linux_stop_lwp): Remove declaration.
5414
6d4ee8c6
GB
54152015-03-24 Gary Benson <gbenson@redhat.com>
5416
5417 * linux-low.h: Include nat/linux-nat.h.
5418 * linux-low.c (iterate_over_lwps_args): New structure.
5419 (iterate_over_lwps_filter): New function.
5420 (iterate_over_lwps): Likewise.
5421 * linux-x86-low.c (update_debug_registers_callback):
5422 Update signature to what iterate_over_lwps expects.
5423 Remove PID check that iterate_over_lwps now performs.
5424 (x86_dr_low_set_addr): Use iterate_over_lwps.
5425 (x86_dr_low_set_control): Likewise.
5426
70a0bb6b
GB
54272015-03-24 Gary Benson <gbenson@redhat.com>
5428
5429 * linux-x86-low.c (x86_debug_reg_state): New function.
5430 (x86_linux_prepare_to_resume): Use the above.
5431
7b669087
GB
54322015-03-24 Gary Benson <gbenson@redhat.com>
5433
5434 * linux-low.c (current_lwp_ptid): New function.
5435 * linux-x86-low.c: Include nat/linux-nat.h.
5436 (x86_dr_low_get_addr): Use current_lwp_ptid.
5437 (x86_dr_low_get_control): Likewise.
5438 (x86_dr_low_get_status): Likewise.
5439
eef49a3d
PA
54402015-03-20 Pedro Alves <palves@redhat.com>
5441
5442 * tracepoint.c (cmd_qtstatus): Make "str" const.
5443
b2333d22
PA
54442015-03-20 Pedro Alves <palves@redhat.com>
5445
5446 * server.c (handle_general_set): Make "req_str" const.
5447
23f238d3
PA
54482015-03-19 Pedro Alves <palves@redhat.com>
5449
5450 * linux-low.c (linux_resume_one_lwp): Rename to ...
5451 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5452 instead call perror_with_name.
5453 (check_ptrace_stopped_lwp_gone): New function.
5454 (linux_resume_one_lwp): Reimplement as wrapper around
5455 linux_resume_one_lwp_throw that swallows errors if the LWP is
5456 gone.
5457
91baf43f
PA
54582015-03-19 Pedro Alves <palves@redhat.com>
5459
5460 * linux-low.c (count_events_callback, select_event_lwp_callback):
5461 No longer check whether the thread has resume_stop as last resume
5462 kind.
5463
8bf3b159
PA
54642015-03-19 Pedro Alves <palves@redhat.com>
5465
5466 * linux-low.c (count_events_callback, select_event_lwp_callback):
5467 Use the lwp's status_pending_p field, not the thread's.
5468
b90fc188
PA
54692015-03-19 Pedro Alves <palves@redhat.com>
5470
5471 * linux-low.c (select_event_lwp_callback): Update comments to
5472 no longer mention SIGTRAP.
5473
464b0089
GB
54742015-03-18 Gary Benson <gbenson@redhat.com>
5475
5476 * server.c (handle_query): Do not report vFile:fstat as supported.
5477
aa9e327f
GB
54782015-03-11 Gary Benson <gbenson@redhat.com>
5479
5480 * hostio.c (sys/types.h): New include.
5481 (sys/stat.h): Likewise.
5482 (common-remote-fileio.h): Likewise.
5483 (handle_fstat): New function.
5484 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5485
791c0056
GB
54862015-03-11 Gary Benson <gbenson@redhat.com>
5487
5488 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5489 struct stat.st_blocks and struct stat.st_blksize.
5490 * configure: Regenerate.
5491 * config.in: Likewise.
5492 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5493 (OBS): Add common-remote-fileio.o.
5494 (common-remote-fileio.o): New rule.
5495
9a9df970
PA
54962015-03-09 Pedro Alves <palves@redhat.com>
5497
5498 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5499 'struct sockaddr' pointer in 'accept' call.
5500
9eb1356e
PA
55012015-03-09 Pedro Alves <palves@redhat.com>
5502
5503 Revert:
5504 2015-03-07 Pedro Alves <palves@redhat.com>
5505 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5506 or <winsock2.h> here. Instead include "gdb_socket.h".
5507 (remote_open): Use union gdb_sockaddr_u.
5508 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5509 or <winsock2.h> here. Instead include "gdb_socket.h".
5510 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5511 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5512 or <sys/un.h>.
5513 (init_named_socket, gdb_agent_helper_thread): Use union
5514 gdb_sockaddr_u.
5515
aac331e4
PA
55162015-03-07 Pedro Alves <palves@redhat.com>
5517
5518 * configure.ac (build_warnings): Move
5519 -Wdeclaration-after-statement to the C-specific set.
5520 * configure: Regenerate.
5521
366c75fc
PA
55222015-03-07 Pedro Alves <palves@redhat.com>
5523
5524 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5525 or <winsock2.h> here. Instead include "gdb_socket.h".
5526 (remote_open): Use union gdb_sockaddr_u.
5527 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5528 or <winsock2.h> here. Instead include "gdb_socket.h".
5529 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5530 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5531 or <sys/un.h>.
5532 (init_named_socket, gdb_agent_helper_thread): Use union
5533 gdb_sockaddr_u.
5534
492d29ea
PA
55352015-03-07 Pedro Alves <palves@redhat.com>
5536
5537 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5538 instead.
5539
60a191ed
YQ
55402015-03-06 Yao Qi <yao.qi@linaro.org>
5541
5542 * linux-aarch64-low.c (aarch64_insert_point): Use
5543 show_debug_regs as a boolean.
5544 (aarch64_remove_point): Likewise.
5545
f5771b1d
PA
55462015-03-05 Pedro Alves <palves@redhat.com>
5547
5548 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5549 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5550 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5551 * nto-low.c (nto_target_ops): Likewise.
5552 * spu-low.c (spu_target_ops): Likewise.
5553 * win32-low.c (win32_target_ops): Likewise.
5554
3e572f71
PA
55552015-03-04 Pedro Alves <palves@redhat.com>
5556
72f4393d 5557 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5558 Decide whether a breakpoint triggered based on the SIGTRAP's
5559 siginfo.si_code.
72f4393d
L
5560 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5561 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5562 (linux_low_filter_event): Check for breakpoints before checking
5563 watchpoints.
5564 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5565 siginfo.si_code.
72f4393d
L
5566 (linux_stopped_by_sw_breakpoint)
5567 (linux_supports_stopped_by_sw_breakpoint)
5568 (linux_stopped_by_hw_breakpoint)
5569 (linux_supports_stopped_by_hw_breakpoint): New functions.
5570 (linux_target_ops): Install new target methods.
3e572f71 5571
1ec68e26
PA
55722015-03-04 Pedro Alves <palves@redhat.com>
5573
5574 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5575 * server.c (swbreak_feature, hwbreak_feature): New globals.
5576 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5577 (captured_main): Clear swbreak_feature and hwbreak_feature.
5578 * server.h (swbreak_feature, hwbreak_feature): Declare.
5579 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5580 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5581 supports_stopped_by_hw_breakpoint>: New fields.
5582 (target_supports_stopped_by_sw_breakpoint)
5583 (target_stopped_by_sw_breakpoint)
5584 (target_supports_stopped_by_hw_breakpoint)
5585 (target_stopped_by_hw_breakpoint): Declare.
5586
15c66dd6
PA
55872015-03-04 Pedro Alves <palves@redhat.com>
5588
5589 enum lwp_stop_reason -> enum target_stop_reason
5590 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5591 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5592 (linux_wait_1, stuck_in_jump_pad_callback)
5593 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5594 (linux_stopped_by_watchpoint):
5595 * linux-low.h (enum lwp_stop_reason): Delete.
5596 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5597 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5598
98fc70d6
YQ
55992015-03-04 Yao Qi <yao.qi@linaro.org>
5600
5601 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5602
dd2ac174
GB
56032015-03-03 Gary Benson <gbenson@redhat.com>
5604
5605 * hostio.c (handle_vFile): Fix prefix lengths.
5606
d68e53f4
MM
56072015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5608
5609 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5610 ptr_bits.
5611
bf2d68ab
AA
56122015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5613
5614 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5615 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5616 (clean): Add "rm -f" for above C files.
5617 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5618 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5619 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5620 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5621 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5622 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5623 (init_registers_s390x_vx_linux64)
5624 (init_registers_s390x_tevx_linux64)
5625 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5626 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5627 declarations.
5628 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5629 (s390_store_vxrs_high): New functions.
5630 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5631 NT_S390_VXRS_HIGH.
5632 (s390_arch_setup): Add logic for selecting one of the new target
5633 descriptions. Activate the new vector regsets if applicable.
5634 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5635 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5636 and init_registers_s390x_tevx_linux64.
5637
c966a859
PA
56382015-03-01 Pedro Alves <palves@redhat.com>
5639
5640 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5641 parameter.
5642
4180215b
PA
56432015-02-27 Pedro Alves <palves@redhat.com>
5644
5645 * linux-x86-low.c (u_debugreg_offset): New function.
5646 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5647
749bab01
PA
56482015-02-27 Pedro Alves <palves@redhat.com>
5649
5650 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5651 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5652 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5653 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5654 (ps_lsetfpregs, ps_getpid)
5655 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5656 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5657 (ps_lsetxregs, ps_plog): Declare.
5658
3c14e5a3
PA
56592015-02-27 Pedro Alves <palves@redhat.com>
5660
5661 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5662 IP_AGENT_EXPORT_FUNC.
5663 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5664 IP_AGENT_EXPORT_FUNC.
5665 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5666 (IP_AGENT_EXPORT): Delete.
5667 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5668 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5669 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5670 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5671 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5672 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5673 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5674 (traceframe_read_count, traceframe_write_count)
5675 (traceframes_created, trace_state_variables, get_raw_reg)
5676 (get_trace_state_variable_value, set_trace_state_variable_value)
5677 (ust_loaded, helper_thread_id, cmd_buf): Use
5678 IPA_SYM_EXPORTED_NAME.
5679 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5680 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5681 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5682 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5683 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5684 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5685 EXTERN_C_PUSH/EXTERN_C_POP.
5686 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5687 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5688 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5689 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5690 (traceframe_write_count, traceframe_read_count)
5691 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5692 (about_to_request_buffer_space, get_trace_state_variable_value)
5693 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5694 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5695 EXTERN_C_PUSH/EXTERN_C_POP.
5696 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5697 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5698 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5699 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5700 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5701 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5702 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5703 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5704 Define.
5705 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5706 (IP_AGENT_EXPORT_VAR_DECL): Define.
5707 (tracing): Declare.
5708 (gdb_agent_get_raw_reg): Declare.
5709
fe978cb0
PA
57102015-02-27 Tom Tromey <tromey@redhat.com>
5711 Pedro Alves <palves@redhat.com>
5712
5713 Rename symbols whose names are reserved C++ keywords throughout.
5714
3bc3d82a
PA
57152015-02-27 Pedro Alves <palves@redhat.com>
5716
5717 * Makefile.in (COMPILER): New, get it from autoconf.
5718 (CXX): Get from autoconf instead.
5719 (COMPILE.pre): Use COMPILER.
5720 (CC-LD): Rename to ...
5721 (CC_LD): ... this. Use COMPILER.
5722 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5723 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5724 * acinclude.m4: Include build-with-cxx.m4.
5725 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5726 Disable -Werror by default if building in C++ mode.
5727 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5728 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5729 the C++ compiler. Save/restore CXXFLAGS too.
5730 * configure: Regenerate.
5731
07697489
PA
57322015-02-27 Pedro Alves <palves@redhat.com>
5733
5734 * acinclude.m4: Include libiberty.m4.
5735 * configure.ac: Call libiberty_INIT.
5736 * config.in, configure: Regenerate.
5737
9beb7c4e
PA
57382015-02-26 Pedro Alves <palves@redhat.com>
5739
5740 * linux-low.c (linux_wait_1): When incrementing the PC past a
5741 program breakpoint always use the_low_target.breakpoint_len as
5742 increment, rather than the maximum between that and
5743 the_low_target.decr_pc_after_break.
5744
8090aef2
PA
57452015-02-23 Pedro Alves <palves@redhat.com>
5746
5747 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5748 thread was doing a step-over; always adjust the PC if
5749 we stepped over a permanent breakpoint.
5750 (linux_wait_1): If we stepped over breakpoint that was on top of a
5751 permanent breakpoint, manually advance the PC past it.
5752
bc9540e8
PA
57532015-02-23 Pedro Alves <palves@redhat.com>
5754
5755 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5756 modes.
5757 (x86_fill_gregset, x86_store_gregset): Use it when handling
5758 $orig_eax.
5759
2db9a427
PA
57602015-02-20 Pedro Alves <palves@redhat.com>
5761
5762 * thread-db.c: Include "nat/linux-procfs.h".
5763 (thread_db_init): Skip listing new threads if the kernel supports
5764 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5765
afa8d396
PA
57662015-02-20 Pedro Alves <palves@redhat.com>
5767
5768 * linux-low.c (status_pending_p_callback): Use ptid_match.
5769
c9587f88
AT
57702015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5771
5772 PR breakpoints/16812
5773 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5774 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5775 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5776
b05ec7a5
AT
57772015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5778
5779 PR breakpoints/15956
5780 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5781
d33501a5
MM
57822015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5783
5784 * linux-low.c (linux_low_btrace_conf): Print size.
5785 * server.c (handle_btrace_conf_general_set): New.
5786 (hanle_general_set): Call handle_btrace_conf_general_set.
5787 (handle_query): Report Qbtrace-conf:bts:size as supported.
5788
f4abbc16
MM
57892015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5790
5791 * linux-low.c (linux_low_enable_btrace): Update parameters.
5792 (linux_low_btrace_conf): New.
5793 (linux_target_ops)<to_btrace_conf>: Initialize.
5794 * server.c (current_btrace_conf): New.
5795 (handle_btrace_enable): Rename to ...
5796 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5797 to target_enable_btrace. Update comment. Update users.
5798 (handle_qxfer_btrace_conf): New.
5799 (qxfer_packets): Add btrace-conf entry.
5800 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5801 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5802 (target_ops)<read_btrace_conf>: New.
5803 (target_enable_btrace): Update parameters.
5804 (target_read_btrace_conf): New.
5805
043c3577
MM
58062015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5807
5808 * server.c (handle_btrace_general_set): Remove call to
5809 target_supports_btrace.
5810 (supported_btrace_packets): New.
5811 (handle_query): Call supported_btrace_packets.
5812 * target.h: include btrace-common.h.
5813 (btrace_target_info): Removed.
5814 (supports_btrace, target_supports_btrace): Update parameters.
5815
734b0e4b
MM
58162015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5817
5818 * Makefile.in (SFILES): Add common/btrace-common.c.
5819 (OBS): Add common/btrace-common.o.
5820 (btrace-common.o): Add build rules.
5821 * linux-low: Include btrace-common.h.
5822 (linux_low_read_btrace): Use struct btrace_data. Call
5823 btrace_data_init and btrace_data_fini.
5824
d6c146e9
PA
58252015-02-06 Pedro Alves <palves@redhat.com>
5826
5827 * thread-db.c (find_new_threads_callback): Add debug output.
5828
20ba1ce6
PA
58292015-02-04 Pedro Alves <palves@redhat.com>
5830
5831 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5832 (resume_stopped_resumed_lwps): New function.
5833 (linux_wait_for_event_filtered): Use it.
5834
8cc73a39
SDJ
58352015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5836
5837 * Makefile.in (SFILES): Add linux-personality.c.
5838 (linux-personality.o): New rule.
5839 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5840 list of objects to be built.
5841 * linux-low.c: Include nat/linux-personality.h.
5842 (linux_create_inferior): Remove code to disable address space
5843 randomization (moved to ../nat/linux-personality.c). Create
5844 cleanup to disable address space randomization.
5845
fb23d554
SDJ
58462015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5847
5848 * Makefile.in (posix-strerror.o): New rule.
5849 (mingw-strerror.o): Likewise.
5850 * configure: Regenerated.
5851 * configure.ac: Source file ../common/common.host. Initialize new
5852 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5853
cdf43629
YQ
58542015-01-14 Yao Qi <yao@codesourcery.com>
5855
5856 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5857 (ppc-linux.o): New rule.
5858 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5859 * configure.ac: AC_CHECK_FUNCS(getauxval).
5860 * config.in: Re-generated.
5861 * configure: Re-generated.
5862 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5863 ppc64_64bit_inferior_p
5864
514c5338
YQ
58652015-01-14 Yao Qi <yao@codesourcery.com>
5866
5867 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5868 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5869 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5870 (PT_ORIG_R3, PT_TRAP): Likewise.
5871 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5872 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5873 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5874
3368c1e5
JB
58752015-01-10 Joel Brobecker <brobecker@adacore.com>
5876
5877 * i387-fp.c (i387_cache_to_xsave): In look over
5878 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5879 zmmh_low_space field by use of zmmh_high_space.
5880
582511be
PA
58812015-01-09 Pedro Alves <palves@redhat.com>
5882
5883 * linux-low.c (step_over_bkpt): Move higher up in the file.
5884 (handle_extended_wait): Don't store the stop_pc here.
5885 (get_stop_pc): Adjust comments and rename to ...
5886 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5887 stopped for a software breakpoint or hardware breakpoint.
5888 (thread_still_has_status_pending_p): New function.
5889 (status_pending_p_callback): Use
5890 thread_still_has_status_pending_p. If the event is no longer
5891 interesting, resume the LWP.
5892 (handle_tracepoints): Add assert.
5893 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5894 (wstatus_maybe_breakpoint): New function.
5895 (cancel_breakpoint): Delete function.
5896 (check_stopped_by_watchpoint): New function, factored out from
5897 linux_low_filter_event.
5898 (lp_status_maybe_breakpoint): Delete function.
5899 (linux_low_filter_event): Remove filter_ptid argument.
5900 Leave thread group exits pending here. Store the LWP's stop PC.
5901 Always leave events pending.
5902 (linux_wait_for_event_filtered): Pull all events out of the
5903 kernel, and leave them all pending.
5904 (count_events_callback, select_event_lwp_callback): Consider all
5905 events.
5906 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5907 (select_event_lwp): Only give preference to the stepping LWP in
5908 all-stop mode. Adjust comments.
5909 (ignore_event): New function.
5910 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5911 references to cancel_breakpoints. Adjust to renames. Also give
5912 equal priority to all LWPs that have had events in non-stop mode.
5913 If reporting a software breakpoint event, unadjust the LWP's PC.
5914 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5915 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5916 Adjust.
5917 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5918 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5919 (linux_stopped_by_watchpoint): Adjust.
5920 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5921 * linux-low.h (enum lwp_stop_reason): New.
5922 (struct lwp_info) <stop_pc>: Adjust comment.
5923 <stopped_by_watchpoint>: Delete field.
5924 <stop_reason>: New field.
5925 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5926 * mem-break.c (software_breakpoint_inserted_here)
5927 (hardware_breakpoint_inserted_here): New function.
5928 * mem-break.h (software_breakpoint_inserted_here)
5929 (hardware_breakpoint_inserted_here): Declare.
5930 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5931 (cancel_breakpoints): Delete.
5932 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5933 (upload_fast_traceframes): Remove references to
5934 cancel_breakpoints.
5935
a33e3959
PA
59362015-01-09 Pedro Alves <palves@redhat.com>
5937
5938 * thread-db.c (find_new_threads_callback): Ignore thread if the
5939 kernel thread ID is -1.
5940
8784d563
PA
59412015-01-09 Pedro Alves <palves@redhat.com>
5942
5943 * linux-low.c (linux_attach_fail_reason_string): Move to
5944 nat/linux-ptrace.c, and rename.
5945 (linux_attach_lwp): Update comment.
5946 (attach_proc_task_lwp_callback): New function.
5947 (linux_attach): Adjust to rename and use
5948 linux_proc_attach_tgid_threads.
5949 (linux_attach_fail_reason_string): Delete declaration.
5950
76f2b779
JB
59512015-01-01 Joel Brobecker <brobecker@adacore.com>
5952
5953 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5954 * server.c (gdbserver_version): Likewise.
5955
fafcc06a
SDJ
59562014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5957
5958 * remote-utils.c: Include ctype.h.
5959 (input_interrupt): Explicitly handle the case when the char
5960 received is the NUL byte. Improve the printing of non-ASCII
5961 characters.
5962
beed38b8
JB
59632014-12-16 Joel Brobecker <brobecker@adacore.com>
5964
5965 * linux-low.c (linux_low_filter_event): Update call to
5966 linux_enable_event_reporting following the addition of
5967 a new parameter to that function.
5968
bf330350
CU
59692014-12-16 Catalin Udma <catalin.udma@freescale.com>
5970
5971 PR server/17457
5972 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5973 (AARCH64_FPCR_REGNO): Likewise.
5974 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5975 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5976 (aarch64_store_fpregset): Likewise.
5977
5227d625
JB
59782014-12-15 Joel Brobecker <brobecker@adacore.com>
5979
5980 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5981 Remove FIXME comment about assumption about N.
5982
f93b65a0
JB
59832014-12-13 Joel Brobecker <brobecker@adacore.com>
5984
5985 * configure.ac: If large-file support is disabled in GDBserver,
5986 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5987 * configure: Regenerate.
5988
e5a9158d
AA
59892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5990
5991 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5992 warning upon ENODATA from ptrace.
5993 * linux-s390-low.c (s390_store_tdb): New.
5994 (s390_regsets): Add regset for NT_S390_TDB.
5995
feea5f36
AA
59962014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5997
5998 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5999 without a fill_function.
6000 * linux-s390-low.c (s390_fill_last_break): Remove.
6001 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6002 (s390_arch_setup): Use regset's size instead of fill_function for
6003 loop end condition.
6004
098dbe61
AA
60052014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6006
6007 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6008 the regset's store function when ptrace returned an error.
6009 * regcache.c (get_thread_regcache): Invalidate register cache
6010 before fetching inferior's registers.
6011
28eef672
AA
60122014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6013
6014 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6015 while-loop as for-loop.
6016 (regsets_store_inferior_registers): Likewise.
6017
bdca27a2
YQ
60182014-11-28 Yao Qi <yao@codesourcery.com>
6019
6020 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6021 * config.in, configure: Re-generate.
6022 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6023 is defined.
6024
9c232dda
YQ
60252014-11-21 Yao Qi <yao@codesourcery.com>
6026
6027 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6028 (AC_CHECK_HEADERS): Remove malloc.h.
6029 * configure: Re-generated.
6030 * config.in: Re-generated.
6031 * server.h: Don't include alloca.h and malloc.h.
6032 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6033 Don't include malloc.h.
6034
43968415
JB
60352014-11-17 Joel Brobecker <brobecker@adacore.com>
6036
6037 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6038 corresponding ERRNO check in same block.
6039
40e91bc7
PA
60402014-11-12 Pedro Alves <palves@redhat.com>
6041
6042 * server.c (cont_thread): Update comment.
6043 (start_inferior, attach_inferior): No longer clear cont_thread.
6044 (handle_v_cont): No longer set cont_thread.
6045 (captured_main): Clear cont_thread each time a GDB connects.
6046
c2c118cf
PA
60472014-11-12 Pedro Alves <palves@redhat.com>
6048
6049 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6050 thread, and don't resume all threads if the Hc thread has exited.
6051
78708b7c
PA
60522014-11-12 Pedro Alves <palves@redhat.com>
6053
6054 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6055 the process group instead of to a specific LWP.
6056
a2abc7de
PA
60572014-10-15 Pedro Alves <palves@redhat.com>
6058
6059 PR server/17487
6060 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6061 parameter.
6062 (arm_set_thread_context): Delete.
6063 (the_low_target): Adjust.
6064 * win32-i386-low.c (debug_registers_changed)
6065 (debug_registers_used): Delete.
6066 (update_debug_registers_callback): New function.
6067 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6068 needing to update their debug registers.
6069 (win32_get_current_dr): New function.
6070 (x86_dr_low_get_addr, x86_dr_low_get_control)
6071 (x86_dr_low_get_status): Fetch the debug register from the thread
6072 record's context.
6073 (i386_initial_stuff): Adjust.
6074 (i386_get_thread_context): Remove current_event parameter. Don't
6075 clear debug_registers_changed nor copy DR values to
6076 debug_reg_state.
6077 (i386_set_thread_context): Delete.
6078 (i386_prepare_to_resume): New function.
6079 (i386_thread_added): Mark the thread as needing to update irs
6080 debug registers.
6081 (the_low_target): Remove i386_set_thread_context and install
6082 i386_prepare_to_resume.
6083 * win32-low.c (win32_get_thread_context): Adjust.
6084 (win32_set_thread_context): Use SetThreadContext
6085 directly.
6086 (win32_prepare_to_resume): New function.
6087 (win32_require_context): New function, factored out from ...
6088 (thread_rec): ... this.
6089 (continue_one_thread): Call win32_prepare_to_resume on each thread
6090 we're about to continue.
6091 (win32_resume): Call win32_prepare_to_resume on the event thread.
6092 * win32-low.h (struct win32_thread_info)
6093 <debug_registers_changed>: New field.
6094 (struct win32_target_ops): Change prototype of set_thread_context,
6095 delete set_thread_context and add prepare_to_resume.
6096 (win32_require_context): New declaration.
6097
a442d071
GB
60982014-10-08 Gary Benson <gbenson@redhat.com>
6099
6100 * server.h: Do not include common-exceptions.h.
6101
6f1947e8
GB
61022014-10-08 Gary Benson <gbenson@redhat.com>
6103
6104 * server.h: Do not include cleanups.h.
6105
63b434a4
JH
61062014-09-30 James Hogan <james.hogan@imgtec.com>
6107
6108 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6109 mips64-dsp-linux.c.
6110
c4d9ceb6
YQ
61112014-09-23 Yao Qi <yao@codesourcery.com>
6112
6113 * linux-low.c (lp_status_maybe_breakpoint): New function.
6114 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6115 (count_events_callback): Likewise.
6116 (select_event_lwp_callback): Likewise.
6117 (cancel_breakpoints_callback): Likewise.
6118
89a5711c
DB
61192014-09-19 Don Breazeal <donb@codesourcery.com>
6120
6121 * linux-low.c (handle_extended_wait): Call
6122 linux_ptrace_get_extended_event.
6123 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6124 linux_is_extended_waitstatus.
6125
bffc0964
JB
61262014-09-16 Joel Brobecker <brobecker@adacore.com>
6127
6128 * Makefile.in (CPPFLAGS): Define.
6129 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6130 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6131
0bfdf32f
GB
61322014-09-16 Gary Benson <gbenson@redhat.com>
6133
6134 * inferiors.h (current_inferior): Renamed as...
6135 (current_thread): New variable. All uses updated.
6136 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6137 (maybe_move_out_of_jump_pad): Likewise.
6138 (cancel_breakpoint): Likewise.
6139 (linux_low_filter_event): Likewise.
6140 (wait_for_sigstop): Likewise.
6141 (linux_resume_one_lwp): Likewise.
6142 (need_step_over_p): Likewise.
6143 (start_step_over): Likewise.
6144 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6145 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6146 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6147 and save_inferior as saved_thread.
6148 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6149 saved_thread.
6150 (regcache_invalidate_thread): Likewise.
6151 * remote-utils.c (prepare_resume_reply): Likewise.
6152 * thread-db.c (thread_db_get_tls_address): Likewise.
6153 (disable_thread_event_reporting): Likewise.
6154 (remove_thread_event_breakpoints): Likewise.
6155 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6156 as saved_thread.
6157 * target.h (set_desired_inferior): Renamed as...
6158 (set_desired_thread): New declaration. All uses updated.
6159 * server.c (myresume): Updated comment to reference thread instead
6160 of inferior.
6161 (handle_serial_event): Likewise.
6162 (handle_target_event): Likewise.
6163
361c8ade
GB
61642014-09-12 Tom Tromey <tromey@redhat.com>
6165 Gary Benson <gbenson@redhat.com>
6166
6167 * regcache.h: Include common-regcache.h.
6168 (regcache_read_pc): Don't declare.
6169 * regcache.c (get_thread_regcache_for_ptid): New function.
6170
bd9269f7
GB
61712014-09-11 Tom Tromey <tromey@redhat.com>
6172 Gary Benson <gbenson@redhat.com>
6173
6174 * symbol.c: New file.
6175 * Makefile.in (SFILES): Add symbol.c.
6176 (OBS): Add symbol.o.
6177
f8c1d06b
GB
61782014-09-11 Gary Benson <gbenson@redhat.com>
6179
6180 * target.c (target_stop_ptid, target_continue_ptid): New
6181 functions.
6182
721ec300
GB
61832014-09-11 Tom Tromey <tromey@redhat.com>
6184 Gary Benson <gbenson@redhat.com>
6185
6186 * target.h: Include target/target.h.
6187 * target.c (target_read_memory, target_read_uint32)
6188 (target_write_memory): New functions.
6189
c5e92cca
GB
61902014-09-11 Gary Benson <gbenson@redhat.com>
6191
6192 * server.h (debug_hw_points): Don't declare.
6193 * server.c (debug_hw_points): Don't define. Replace all uses
6194 with show_debug_regs.
6195 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6196 all uses with show_debug_regs.
6197
2e4bb98a
EBM
61982014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6199
6200 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6201 endianness into account.
6202 (ppc_supply_ptrace_register): Likewise.
6203
ac740bc7
JH
62042014-09-03 James Hogan <james.hogan@imgtec.com>
6205
6206 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6207 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6208
97ea6506
GB
62092014-09-03 Gary Benson <gbenson@redhat.com>
6210
6211 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6212 ALL_DEBUG_ADDRESS_REGISTERS.
6213
df7e5265
GB
62142014-09-02 Gary Benson <gbenson@redhat.com>
6215
6216 * i386-low.h: Renamed as...
6217 * x86-low.h: New file. All type, function and variable name
6218 prefixes changed from "i386_" to "x86_". All references updated.
6219 * i386-low.c: Renamed as...
6220 * x86-low.c: New file. All type, function and variable name
6221 prefixes changed from "i386_" to "x86_". All references updated.
6222
ed859da7
GB
62232014-09-02 Gary Benson <gbenson@redhat.com>
6224
6225 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6226 (x86_linux_new_thread): Likewise.
6227
860789c7
GB
62282014-08-29 Gary Benson <gbenson@redhat.com>
6229
6230 * server.h (setjmp.h): Do not include.
6231 (toplevel): Do not declare.
6232 (common-exceptions.h): Include.
6233 (cleanups.h): Likewise.
6234 * server.c (toplevel): Do not define.
6235 (exit_code): New static global.
6236 (detach_or_kill_for_exit_cleanup): New function.
6237 (main): New function. Original main renamed to...
6238 (captured_main): New function.
6239 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6240
ff55e1b5
GB
62412014-08-29 Gary Benson <gbenson@redhat.com>
6242
6243 * Makefile.in (SFILES): Add common/common-exceptions.c.
6244 (OBS): Add common-exceptions.o.
6245 (common-exceptions.o): New rule.
6246 * utils.c (prepare_to_throw_exception): New function.
6247
e9bcb658
GB
62482014-08-29 Gary Benson <gbenson@redhat.com>
6249
6250 * config.in: Regenerate.
6251 * configure: Likewise.
6252
e3180625
GB
62532014-08-29 Gary Benson <gbenson@redhat.com>
6254
6255 * Makefile.in (SFILES): Add common/cleanups.c.
6256 (OBS): cleanups.o.
6257 (cleanups.o): New rule.
6258
e3d6ba5d
GB
62592014-08-29 Gary Benson <gbenson@redhat.com>
6260
6261 * utils.c (internal_vwarning): New function.
6262
7096e886
GB
62632014-08-28 Gary Benson <gbenson@redhat.com>
6264
6265 * utils.h (fatal): Remove declaration.
6266 * utils.c (fatal): Remove function.
6267
14ce3192
GB
62682014-08-28 Gary Benson <gbenson@redhat.com>
6269
6270 * tracepoint.c (gdb_agent_init): Replace fatal with
6271 perror_with_name.
6272 (initialize_tracepoint): Likewise.
6273
50278d59
GB
62742014-08-28 Gary Benson <gbenson@redhat.com>
6275
6276 * remote-utils.c (remote_prepare): Replace fatal with error.
6277
aa96c426
GB
62782014-08-28 Gary Benson <gbenson@redhat.com>
6279
6280 * linux-low.c (linux_async): Replace fatal with warning.
6281 Tidy up and return.
6282 (linux_start_non_stop): Return -1 if linux_async failed.
6283
f7160e97
GB
62842014-08-28 Gary Benson <gbenson@redhat.com>
6285
6286 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6287 gdb_assert.
6288 (i386_dr_low_get_addr): Remove vague comment.
6289 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6290 gdb_assert.
6291
38e08fca
GB
62922014-08-28 Gary Benson <gbenson@redhat.com>
6293
6294 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6295 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6296 internal_error.
6297 (linux_resume_one_lwp): Likewise.
6298 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6299 gdb_assert.
6300 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6301 with internal_error.
6302 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6303 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6304 (find_register_by_name): Replace fatal with internal_error.
6305 (find_regno): Likewise.
6306 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6307 * thread-db.c (thread_db_create_event): Likewise.
6308 (thread_db_load_search): Likewise.
6309 (try_thread_db_load_1): Likewise.
6310 * tracepoint.c (get_jump_space_head): Replace fatal with
6311 internal_error.
6312 (claim_trampoline_space): Likewise.
6313 (have_fast_tracepoint_trampoline_buffer): Likewise.
6314 (cmd_qtstart): Likewise.
6315 (stop_tracing): Likewise.
6316 (fast_tracepoint_collecting): Likewise.
6317 (target_malloc): Likewise.
6318 (download_tracepoint): Likewise.
6319 (download_trace_state_variables): Replace check with gdb_assert.
6320 (upload_fast_traceframes): Replace fatal with internal_error.
6321
34abf635
GB
63222014-08-19 Tom Tromey <tromey@redhat.com>
6323 Gary Benson <gbenson@redhat.com>
6324
6325 * Makefile.in (SFILES): Add common/common-debug.c.
6326 (OBS): Add common-debug.o.
6327 (common-debug.o): New rule.
6328 * debug.h (debug_printf): Don't declare.
6329 * debug.c (debug_printf): Renamed and rewritten as...
6330 (debug_vprintf): New function.
6331
f6e94d78
GB
63322014-08-19 Gary Benson <gbenson@redhat.com>
6333
6334 * utils.h: Do not include print-utils.h.
6335
9239eeab
GB
63362014-08-19 Tom Tromey <tromey@redhat.com>
6337 Gary Benson <gbenson@redhat.com>
6338
6339 * server.h: Add static assertion.
6340 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6341
ef87c8bb
GB
63422014-08-19 Tom Tromey <tromey@redhat.com>
6343 Gary Benson <gbenson@redhat.com>
6344
6345 * Makefile.in (SFILES): Add common/errors.c.
6346 (OBS): Add errors.o.
6347 (IPA_OBS): Add errors-ipa.o.
6348 (errors.o): New rule.
6349 (errors-ipa.o): Likewise.
6350 * utils.h (perror_with_name, error, warning): Don't declare.
6351 * utils.c (warning): Renamed and rewritten as...
6352 (vwarning): New function.
6353 (error): Renamed and rewritten as...
6354 (verror): New function.
6355 (internal_error): Renamed and rewritten as...
6356 (internal_verror): New function.
6357
bb974a24
GB
63582014-08-07 Gary Benson <gbenson@redhat.com>
6359
6360 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6361 * configure: Regenerate.
6362 * config.in: Likewise.
6363 * server.h: Do not include errno.h.
6364 * event-loop.c: Likewise.
6365 * hostio-errno.c: Likewise.
6366 * linux-low.c: Likewise.
6367 * remote-utils.c: Likewise.
6368 * spu-low.c: Likewise.
6369 * utils.c: Likewise.
6370 * gdbreplay.c: Unconditionally include errno.h.
6371
6d3d12eb
GB
63722014-08-07 Gary Benson <gbenson@redhat.com>
6373
6374 * server.h: Do not include string.h.
6375 * event-loop.c: Likewise.
6376 * linux-low.c: Likewise.
6377 * regcache.c: Likewise.
6378 * remote-utils.c: Likewise.
6379 * spu-low.c: Likewise.
6380 * utils.c: Likewise.
6381
dccbb609
GB
63822014-08-07 Gary Benson <gbenson@redhat.com>
6383
6384 * server.h: Do not include gdb_assert.h.
6385
e76df0d0
GB
63862014-08-07 Gary Benson <gbenson@redhat.com>
6387
6388 * server.h: Do not include common-utils.h.
6389
4cb9c816
GB
63902014-08-07 Gary Benson <gbenson@redhat.com>
6391
6392 * server.h: Do not include ptid.h.
6393 * notif.h: Likewise.
6394
3995eeee
GB
63952014-08-07 Gary Benson <gbenson@redhat.com>
6396
6397 * server.h: Do not include gdb_locale.h.
6398
cb9f1a9b
GB
63992014-08-07 Gary Benson <gbenson@redhat.com>
6400
6401 * server.h: Do not include gdb/signals.h.
6402 * win32-low.c: Likewise.
6403
a5fceff8
GB
64042014-08-07 Gary Benson <gbenson@redhat.com>
6405
6406 * server.h: Do not include pathmax.h.
6407
b9391142
GB
64082014-08-07 Gary Benson <gbenson@redhat.com>
6409
6410 * server.h: Do not include libiberty.h.
6411 * linux-bfin-low.c: Likewise.
6412
0e443c87
GB
64132014-08-07 Gary Benson <gbenson@redhat.com>
6414
6415 * server.h: Do not include ansidecl.h.
6416
8ebb3f56
GB
64172014-08-07 Gary Benson <gbenson@redhat.com>
6418
6419 * linux-x86-low.c: Do not include stddef.h.
6420 * lynx-ppc-low.c: Likewise.
6421 * tracepoint.c: Likewise.
6422
8980bdf6
GB
64232014-08-07 Gary Benson <gbenson@redhat.com>
6424
6425 * server.h: Do not include stdarg.h.
6426 * nto-low.c: Likewise.
6427
d7096f71
GB
64282014-08-07 Gary Benson <gbenson@redhat.com>
6429
6430 * server.h: Do not include stdlib.h.
6431 * inferiors.c: Likewise.
6432 * linux-low.c: Likewise.
6433 * regcache.c: Likewise.
6434 * spu-low.c: Likewise.
6435 * tracepoint.c: Likewise.
6436 * utils.c: Likewise.
6437
d02f550d
GB
64382014-08-07 Gary Benson <gbenson@redhat.com>
6439
6440 * server.h: Do not include stdio.h.
6441 * linux-low.c: Likewise.
6442 * remote-utils.c: Likewise.
6443 * spu-low.c: Likewise.
6444 * utils.c: Likewise.
6445 * wincecompat.c: Likewise.
6446
87f6c4e3
GB
64472014-08-06 Gary Benson <gbenson@redhat.com>
6448
6449 * regcache.c (init_register_cache): Move conditionals inside if.
6450
7089dca4
GB
64512014-08-06 Gary Benson <gbenson@redhat.com>
6452
6453 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6454
462f517e
GB
64552014-07-31 Gary Benson <gbenson@redhat.com>
6456
6457 * ax.h: Do not include server.h.
6458 * gdbthread.h: Likewise.
6459 * lynx-low.h: Likewise.
6460 * notif.h: Likewise.
6461
976411d6
GB
64622014-07-30 Gary Benson <gbenson@redhat.com>
6463
6464 * server.h: Include common-defs.h.
6465 Do not include config.h or build-gnulib-gdbserver/config.h.
6466
d41f6d8e
GB
64672014-07-30 Gary Benson <gbenson@redhat.com>
6468
6469 * hostio-errno.c: Move server.h to top of includes list.
6470 * inferiors.c: Likewise.
6471 * linux-x86-low.c: Likewise.
6472 * notif.c: Include server.h.
6473
314c6a35
TT
64742014-07-24 Tom Tromey <tromey@redhat.com>
6475 Gary Benson <gbenson@redhat.com>
6476
6477 * server.h (CORE_ADDR): Now unsigned.
6478
69ff6be5
PA
64792014-07-16 Pedro Alves <palves@redhat.com>
6480
6481 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6482
ce9e3fe7
PA
64832014-07-15 Pedro Alves <palves@redhat.com>
6484
6485 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6486 copy.
6487
e76126e8
PA
64882014-07-11 Pedro Alves <palves@redhat.com>
6489
6490 * linux-low.c (kill_wait_lwp): New function, based on
6491 kill_one_lwp_callback, but use my_waitpid directly.
6492 (kill_one_lwp_callback, linux_kill): Use it.
6493
8e9db26e
PA
64942014-06-23 Pedro Alves <palves@redhat.com>
6495
6496 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6497 before setting DR0..DR3.
6498
698b3e08
GB
64992014-06-20 Gary Benson <gbenson@redhat.com>
6500
6501 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6502 * configure: Regenerated.
6503 * config.in: Likewise.
6504
125f8a3d
GB
65052014-06-20 Gary Benson <gbenson@redhat.com>
6506
6507 * Makefile.in (SFILES): Update locations for files moved
6508 from common to nat.
6509 (object file files): Reordered.
6510
42995dbd
GB
65112014-06-20 Gary Benson <gbenson@redhat.com>
6512
6513 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6514 (i386_dr_low_set_addr): Likewise.
6515 (i386_dr_low_get_addr): Likewise.
6516 (i386_dr_low_can_set_control): Likewise.
6517 (i386_dr_low_set_control): Likewise.
6518 (i386_dr_low_get_control): Likewise.
6519 (i386_dr_low_get_status): Likewise.
6520 (i386_get_debug_register_length): Likewise.
6521 * linux-x86-low.c (i386_dr_low_set_addr):
6522 Changed signature. Made static.
6523 (i386_dr_low_get_addr): Likewise.
6524 (i386_dr_low_set_control): Likewise.
6525 (i386_dr_low_get_control): Likewise.
6526 (i386_dr_low_get_status): Likewise.
6527 (i386_dr_low): New global variable.
6528 * win32-i386-low.c (i386_dr_low_set_addr):
6529 Changed signature. Made static.
6530 (i386_dr_low_get_addr): Likewise.
6531 (i386_dr_low_set_control): Likewise.
6532 (i386_dr_low_get_control): Likewise.
6533 (i386_dr_low_get_status): Likewise.
6534 (i386_dr_low): New global variable.
6535
e1d2394b
MS
65362014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6537
6538 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6539 * Makefile.in (AR, AR_FLAGS): Define.
6540 * configure: Regenerate.
6541
3a8ee006
GB
65422014-06-19 Gary Benson <gbenson@redhat.com>
6543
6544 * Makefile.in (i386-dregs.o): New rule.
6545 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6546 * i386-low.c (target.h): Remove include.
6547 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6548 (DR_CONTROL_SHIFT): Likewise.
6549 (DR_CONTROL_SIZE): Likewise.
6550 (DR_RW_EXECUTE): Likewise.
6551 (DR_RW_WRITE): Likewise.
6552 (DR_RW_READ): Likewise.
6553 (DR_RW_IORW): Likewise.
6554 (DR_LEN_1): Likewise.
6555 (DR_LEN_2): Likewise.
6556 (DR_LEN_4): Likewise.
6557 (DR_LEN_8): Likewise.
6558 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6559 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6560 (DR_ENABLE_SIZE): Likewise.
6561 (DR_LOCAL_SLOWDOWN): Likewise.
6562 (DR_GLOBAL_SLOWDOWN): Likewise.
6563 (DR_CONTROL_RESERVED): Likewise.
6564 (I386_DR_CONTROL_MASK): Likewise.
6565 (I386_DR_VACANT): Likewise.
6566 (I386_DR_LOCAL_ENABLE): Likewise.
6567 (I386_DR_GLOBAL_ENABLE): Likewise.
6568 (I386_DR_DISABLE): Likewise.
6569 (I386_DR_SET_RW_LEN): Likewise.
6570 (I386_DR_GET_RW_LEN): Likewise.
6571 (I386_DR_WATCH_HIT): Likewise.
6572 (i386_wp_op_t): Likewise.
6573 (i386_show_dr): Likewise.
6574 (i386_length_and_rw_bits): Likewise.
6575 (i386_insert_aligned_watchpoint): Likewise.
6576 (i386_remove_aligned_watchpoint): Likewise.
6577 (i386_handle_nonaligned_watchpoint): Likewise.
6578 i386_update_inferior_debug_regs(): Likewise.
6579 (i386_dr_insert_watchpoint): Likewise.
6580 (i386_dr_remove_watchpoint): Likewise.
6581 (i386_dr_region_ok_for_watchpoint): Likewise.
6582 (i386_dr_stopped_data_address): Likewise.
6583 (i386_dr_stopped_by_watchpoint): Likewise.
6584
8f26655c
GB
65852014-06-19 Gary Benson <gbenson@redhat.com>
6586
6587 * i386-low.c (i386_dr_show): Renamed to
6588 i386_show_dr and made static. All uses updated.
6589 (i386_dr_length_and_rw_bits): Renamed to
6590 i386_length_and_rw_bits and made static.
6591 All uses updated.
6592 (i386_dr_insert_aligned_watchpoint): Renamed to
6593 i386_insert_aligned_watchpoint and made static.
6594 All uses updated.
6595 (i386_dr_remove_aligned_watchpoint): Renamed to
6596 i386_remove_aligned_watchpoint and made static.
6597 All uses updated.
6598 (i386_dr_update_inferior_debug_regs): Renamed to
6599 i386_update_inferior_debug_regs and made static.
6600 All uses updated.
6601
b9228891
GB
66022014-06-18 Gary Benson <gbenson@redhat.com>
6603
5171def3
GB
6604 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6605 (i386_dr_low_can_set_control): Likewise.
6606 (i386_get_debug_register_length): Likewise.
6607 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6608 (i386_dr_low_can_set_control): Likewise.
6609 (i386_get_debug_register_length): Likewise.
6610
66112014-06-17 Gary Benson <gbenson@redhat.com>
6612
b9228891
GB
6613 * i386-low.h (i386-dregs.h): New include.
6614 (DR_FIRSTADDR): Now in i386-dregs.h.
6615 (DR_LASTADDR): Likewise.
6616 (DR_NADDR): Likewise.
6617 (DR_STATUS): Likewise.
6618 (DR_CONTROL): Likewise.
6619 (i386_debug_reg_state): Likewise.
6620 (i386_dr_insert_watchpoint): Likewise.
6621 (i386_dr_remove_watchpoint): Likewise.
6622 (i386_dr_region_ok_for_watchpoint): Likewise.
6623 (i386_dr_stopped_data_address): Likewise.
6624 (i386_dr_stopped_by_watchpoint): Likewise.
6625 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6626
4be83cc2
GB
66272014-06-18 Gary Benson <gbenson@redhat.com>
6628
6629 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6630 i386_dr_insert_watchpoint.
6631 (i386_low_remove_watchpoint): Renamed to
6632 i386_dr_remove_watchpoint.
6633 (i386_low_region_ok_for_watchpoint): Renamed to
6634 i386_dr_region_ok_for_watchpoint.
6635 (i386_low_stopped_data_address): Renamed to
6636 i386_dr_stopped_data_address.
6637 (i386_low_stopped_by_watchpoint): Renamed to
6638 i386_dr_stopped_by_watchpoint.
6639 * i386-low.c (i386_show_dr): Renamed to
6640 i386_dr_show and made nonstatic. All uses updated.
6641 (i386_length_and_rw_bits): Renamed to
6642 i386_dr_length_and_rw_bits and made nonstatic.
6643 All uses updated.
6644 (i386_insert_aligned_watchpoint): Renamed to
6645 i386_dr_insert_aligned_watchpoint and made nonstatic.
6646 All uses updated.
6647 (i386_remove_aligned_watchpoint): Renamed to
6648 i386_dr_remove_aligned_watchpoint and made nonstatic.
6649 All uses updated.
6650 (i386_update_inferior_debug_regs): Renamed to
6651 i386_dr_update_inferior_debug_regs and made nonstatic.
6652 All uses updated.
6653 (i386_low_insert_watchpoint): Renamed to
6654 i386_dr_insert_watchpoint. All uses updated.
6655 (i386_low_remove_watchpoint): Renamed to
6656 i386_dr_remove_watchpoint. All uses updated.
6657 (i386_low_region_ok_for_watchpoint): Renamed to
6658 i386_dr_region_ok_for_watchpoint. All uses updated.
6659 (i386_low_stopped_data_address): Renamed to
6660 i386_dr_stopped_data_address. All uses updated.
6661 (i386_low_stopped_by_watchpoint): Renamed to
6662 i386_dr_stopped_by_watchpoint. All uses updated.
6663
131aa0d4
GB
66642014-06-18 Gary Benson <gbenson@redhat.com>
6665
6666 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6667 (i386_dr_low_can_set_control): Likewise.
6668 (i386_insert_aligned_watchpoint): New check.
6669
d9305f7f
GB
66702014-06-18 Gary Benson <gbenson@redhat.com>
6671
6672 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6673 Renamed to state.
6674
e927c9fc
GB
66752014-06-18 Gary Benson <gbenson@redhat.com>
6676
6677 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6678 instead of fatal and error.
6679 (i386_handle_nonaligned_watchpoint): Likewise.
6680
1b6d4134
GB
66812014-06-18 Gary Benson <gbenson@redhat.com>
6682
6683 * i386-low.c (i386_get_debug_register_length): New macro.
6684 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6685 (i386_show_dr): Use debug_printf instead of fprintf. Use
6686 phex to format values.
6687
6e62758f
GB
66882014-06-18 Gary Benson <gbenson@redhat.com>
6689
6690 * i386-low.h: Comment changes.
6691 * i386-low.c: Likewise.
6692
fc6e2f03
GB
66932014-06-18 Gary Benson <gbenson@redhat.com>
6694
6695 * i386-low.c: Whitespace changes.
6696
f9d1eeed
TT
66972014-06-12 Tom Tromey <tromey@redhat.com>
6698
6699 * utils.c (freeargv): Remove.
6700
0b04e523
TT
67012014-06-12 Tom Tromey <tromey@redhat.com>
6702
6703 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6704 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6705 (parse_debug_format_options): Likewise.
6706 (gdbserver_usage): Likewise.
6707 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6708 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6709 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6710 against libiberty.
6711 ($(LIBGNU)): Depend on libiberty.
6712 (all-lib): Recurse into all subdirs.
6713 (install-only): Invoke "install" target in subdirs.
6714 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6715 targets.
6716 * configure: Rebuild.
6717 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6718 for vasprintf, vsnprintf, or gettimeofday.
6719 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6720 srv_tgtobj.
6721
270c9937
JB
67222014-06-05 Joel Brobecker <brobecker@adacore.com>
6723
6724 * development.sh: Delete.
6725 * Makefile.in (config.status): Adjust dependency on development.sh.
6726 * configure.ac: Adjust development.sh source call.
6727 * configure: Regenerate.
6728
0a261ed8
PA
67292014-06-02 Pedro Alves <palves@redhat.com>
6730
6731 * ax.c (gdb_free_agent_expr): New function.
6732 * ax.h (gdb_free_agent_expr): New declaration.
6733 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6734 list.
6735 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6736 static.
6737 (clear_breakpoint_conditions_and_commands): New function.
6738 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6739 (clear_breakpoint_conditions_and_commands): New declaration.
6740
e9dae05e
RR
67412014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6742
6743 * linux-aarch64-low.c (asm/ptrace.h): Include.
6744
5876f503
JK
67452014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6746
6747 Fix TLS access for -static -pthread.
6748 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6749 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6750 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6751
802e8e6d
PA
67522014-05-20 Pedro Alves <palves@redhat.com>
6753
6754 * linux-aarch64-low.c (aarch64_insert_point)
6755 (aarch64_remove_point): No longer check whether the type is
6756 supported here. Adjust to new interface.
6757 (the_low_target): Install aarch64_supports_z_point_type as
6758 supports_z_point_type method.
6759 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6760 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6761 instead of a Z packet char. Adjust.
6762 (arm_supports_z_point_type): New function.
6763 (arm_insert_point, arm_remove_point): Adjust to new interface.
6764 (the_low_target): Install arm_supports_z_point_type.
6765 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6766 (cris_insert_point, cris_remove_point): Adjust to new interface.
6767 Don't check whether the type is supported here.
6768 (the_low_target): Install cris_supports_z_point_type.
6769 * linux-low.c (linux_supports_z_point_type): New function.
6770 (linux_insert_point, linux_remove_point): Adjust to new interface.
6771 * linux-low.h (struct linux_target_ops) <insert_point,
6772 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6773 raw_breakpoint pointer parameter.
6774 <supports_z_point_type>: New method.
6775 * linux-mips-low.c (mips_supports_z_point_type): New function.
6776 (mips_insert_point, mips_remove_point): Adjust to new interface.
6777 Use mips_supports_z_point_type.
6778 (the_low_target): Install mips_supports_z_point_type.
6779 * linux-ppc-low.c (the_low_target): Install NULL as
6780 supports_z_point_type method.
6781 * linux-s390-low.c (the_low_target): Install NULL as
6782 supports_z_point_type method.
6783 * linux-sparc-low.c (the_low_target): Install NULL as
6784 supports_z_point_type method.
6785 * linux-x86-low.c (x86_supports_z_point_type): New function.
6786 (x86_insert_point): Adjust to new insert_point interface. Use
6787 insert_memory_breakpoint. Adjust to new
6788 i386_low_insert_watchpoint interface.
6789 (x86_remove_point): Adjust to remove_point interface. Use
6790 remove_memory_breakpoint. Adjust to new
6791 i386_low_remove_watchpoint interface.
6792 (the_low_target): Install x86_supports_z_point_type.
6793 * lynx-low.c (lynx_target_ops): Install NULL as
6794 supports_z_point_type callback.
6795 * nto-low.c (nto_supports_z_point_type): New.
6796 (nto_insert_point, nto_remove_point): Adjust to new interface.
6797 (nto_target_ops): Install nto_supports_z_point_type.
6798 * mem-break.c: Adjust intro comment.
6799 (struct raw_breakpoint) <raw_type, size>: New fields.
6800 <inserted>: Update comment.
6801 <shlib_disabled>: Delete field.
6802 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6803 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6804 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6805 (raw_bkpt_type_to_target_hw_bp_type): New function.
6806 (find_enabled_raw_code_breakpoint_at): New function.
6807 (find_raw_breakpoint_at): New type and size parameters. Use them.
6808 (insert_memory_breakpoint): New function, based off
6809 set_raw_breakpoint_at.
6810 (remove_memory_breakpoint): New function.
6811 (set_raw_breakpoint_at): Reimplement.
6812 (set_breakpoint): New, based on set_breakpoint_at.
6813 (set_breakpoint_at): Reimplement.
6814 (delete_raw_breakpoint): Go through the_target->remove_point
6815 instead of assuming memory breakpoints.
6816 (find_gdb_breakpoint_at): Delete.
6817 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6818 (find_gdb_breakpoint): New function.
6819 (set_gdb_breakpoint_at): Delete.
6820 (z_type_supported): New function.
6821 (set_gdb_breakpoint_1): New function, loosely based off
6822 set_gdb_breakpoint_at.
6823 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6824 (delete_gdb_breakpoint_at): Delete.
6825 (delete_gdb_breakpoint_1): New function, loosely based off
6826 delete_gdb_breakpoint_at.
6827 (delete_gdb_breakpoint): New function.
6828 (clear_gdb_breakpoint_conditions): Rename to ...
6829 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6830 breakpoint.
6831 (add_condition_to_breakpoint): Make static.
6832 (add_breakpoint_condition): Take a struct breakpoint pointer
6833 instead of an address. Adjust.
6834 (gdb_condition_true_at_breakpoint): Rename to ...
6835 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6836 z_type parameter.
6837 (gdb_condition_true_at_breakpoint): Reimplement.
6838 (add_breakpoint_commands): Take a struct breakpoint pointer
6839 instead of an address. Adjust.
6840 (gdb_no_commands_at_breakpoint): Rename to ...
6841 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6842 parameter. Return true if no breakpoint was found. Change debug
6843 output.
6844 (gdb_no_commands_at_breakpoint): Reimplement.
6845 (run_breakpoint_commands): Rename to ...
6846 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6847 and change return type to boolean.
6848 (run_breakpoint_commands): New function.
6849 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6850 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6851 breakpoint. Go through the_target->remove_point instead of
6852 assuming memory breakpoint.
6853 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6854 software and hardware breakpoints.
6855 (reinsert_raw_breakpoint): Go through the_target->insert_point
6856 instead of assuming memory breakpoint.
6857 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6858 software and hardware breakpoints.
6859 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6860 Check both software and hardware breakpoints.
6861 (validate_inserted_breakpoint): Assert the breakpoint is a
6862 software breakpoint. Set the inserted flag to -1 instead of
6863 setting shlib_disabled.
6864 (delete_disabled_breakpoints): Adjust.
6865 (validate_breakpoints): Only validate software breakpoints.
6866 Adjust to inserted flag change.
6867 (check_mem_read, check_mem_write): Skip breakpoint types other
6868 than software breakpoints. Adjust to inserted flag change.
6869 * mem-break.h (enum raw_bkpt_type): New enum.
6870 (raw_breakpoint, struct process_info): Forward declare.
6871 (Z_packet_to_target_hw_bp_type): Delete declaration.
6872 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6873 (set_gdb_breakpoint, delete_gdb_breakpoint)
6874 (clear_breakpoint_conditions): New declarations.
6875 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6876 (breakpoint_inserted_here): Update comment.
6877 (add_breakpoint_condition, add_breakpoint_commands): Replace
6878 address parameter with a breakpoint pointer parameter.
6879 (gdb_breakpoint_here): Update comment.
6880 (delete_gdb_breakpoint_at): Delete.
6881 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6882 * server.c (process_point_options): Take a struct breakpoint
6883 pointer instead of an address. Adjust.
6884 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6885 delete_gdb_breakpoint.
6886 * spu-low.c (spu_target_ops): Install NULL as
6887 supports_z_point_type method.
6888 * target.h: Include mem-break.h.
6889 (struct target_ops) <prepare_to_access_memory>: Update comment.
6890 <supports_z_point_type>: New field.
6891 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6892 instead of a char. Also take a raw breakpoint pointer.
6893 * win32-arm-low.c (the_low_target): Install NULL as
6894 supports_z_point_type.
6895 * win32-i386-low.c (i386_supports_z_point_type): New function.
6896 (i386_insert_point, i386_remove_point): Adjust to new interface.
6897 (the_low_target): Install i386_supports_z_point_type.
6898 * win32-low.c (win32_supports_z_point_type): New function.
6899 (win32_insert_point, win32_remove_point): Adjust to new interface.
6900 (win32_target_ops): Install win32_supports_z_point_type.
6901 * win32-low.h (struct win32_target_ops):
6902 <supports_z_point_type>: New method.
6903 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6904 instead of a char. Also take a raw breakpoint pointer.
6905
932539e3
PA
69062014-05-20 Pedro Alves <palves@redhat.com>
6907
6908 * mem-break.h: Include break-common.h.
6909 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6910 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6911 (Z_packet_to_target_hw_bp_type): New declaration.
6912 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6913 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6914 (Z_PACKET_ACCESS_WP): Delete macros.
6915 (Z_packet_to_hw_type): Delete function.
6916 * i386-low.h: Don't include break-common.h here.
6917 (Z_packet_to_hw_type): Delete declaration.
6918 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6919 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6920 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6921 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6922 * linux-aarch64-low.c: Don't include break-common.h here.
6923 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6924 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6925 (Z_packet_to_target_hw_bp_type): Delete function.
6926 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6927 function.
6928 (mips_insert_point, mips_remove_point): Use
6929 Z_packet_to_target_hw_bp_type.
6930
4ff0d3d8
PA
69312014-05-20 Pedro Alves <palves@redhat.com>
6932
6933 * linux-aarch64-low.c: Include break-common.h.
6934 (enum target_point_type): Delete.
6935 (Z_packet_to_point_type): Rename to ...
6936 (Z_packet_to_target_hw_bp_type): ... this, and return a
6937 target_hw_bp_type instead.
6938 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6939 instead of an enum target_point_type.
6940 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6941 breakpoint type.
6942 (aarch64_dr_state_insert_one_point)
6943 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6944 (aarch64_handle_aligned_watchpoint)
6945 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6946 Take an enum target_hw_bp_type instead of an enum
6947 target_point_type.
6948 (aarch64_supports_z_point_type): New function.
6949 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6950 use Z_packet_to_target_hw_bp_type.
6951
786dc519
JB
69522014-05-20 Joel Brobecker <brobecker@adacore.com>
6953
6954 * configure.ac: Only use -Werror by default when DEVELOPMENT
6955 is true.
6956 * configure: Regenerate.
6957
9e0aa64f
JK
69582014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6959
6960 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6961 * linux-x86-low.c (X86_64_USER_REGS): New.
6962 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6963
2b577b92
YQ
69642014-04-28 Yao Qi <yao@codesourcery.com>
6965
6966 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6967 name.
6968
94611da2
PA
69692014-04-25 Pedro Alves <palves@redhat.com>
6970
6971 PR server/16255
6972 * linux-low.c (linux_attach_fail_reason_string): New function.
6973 (linux_attach_lwp): Delete.
6974 (linux_attach_lwp_1): Rename to ...
6975 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6976 argument. Remove "initial" parameter. Return int instead of
6977 void. Don't error or warn here.
6978 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6979 failure to attach to the tgid. Call warning when failing to
6980 attach to an lwp.
6981 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6982 argument. Remove "initial" parameter. Return int instead of
6983 void. Don't error or warn here.
6984 (linux_attach_fail_reason_string): New declaration.
6985 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6986 interface change. Use linux_attach_fail_reason_string.
6987
01f9f808
MS
69882014-04-24 Michael Sturm <michael.sturm@mintel.com>
6989 Walfred Tedeschi <walfred.tedeschi@intel.com>
6990
6991 * Makefile.in: Added rules to handle new files
6992 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6993 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6994 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6995 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6996 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6997 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6998 x32-avx512-linux.o.
6999 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7000 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7001 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7002 i386/x32-avx512.xml.
7003 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7004 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7005 i386/x32-avx512-linux.xml.
7006 * i387-fp.c (num_avx512_k_registers): New constant for number
7007 of K registers.
7008 (num_avx512_zmmh_low_registers): New constant for number of
7009 lower ZMM registers (0-15).
7010 (num_avx512_zmmh_high_registers): New constant for number of
7011 higher ZMM registers (16-31).
7012 (num_avx512_ymmh_registers): New contant for number of higher
7013 YMM registers (ymm16-31 added by avx521 on x86_64).
7014 (num_avx512_xmm_registers): New constant for number of higher
7015 XMM registers (xmm16-31 added by AVX512 on x86_64).
7016 (struct i387_xsave): Add space for AVX512 registers.
7017 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7018 Add code to handle AVX512 registers.
7019 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7020 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7021 prototypei from generated file.
7022 (tdesc_amd64_avx512_linux): Likewise.
7023 (init_registers_x32_avx512_linux): Likewise.
7024 (tdesc_x32_avx512_linux): Likewise.
7025 (init_registers_i386_avx512_linux): Likewise.
7026 (tdesc_i386_avx512_linux): Likewise.
7027 (x86_64_regmap): Add AVX512 registers.
7028 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7029 mask.
7030 (initialize_low_arch): Add code to initialize AVX512 registers.
7031
51aa91f9
PA
70322014-04-23 Pedro Alves <palves@redhat.com>
7033
7034 * mem-break.c (find_gdb_breakpoint_at): Make static.
7035 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7036
a4165e94
PA
70372014-04-23 Pedro Alves <palves@redhat.com>
7038
7039 * i386-low.c: Don't include break-common.h here.
7040 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7041 prototype to take target_hw_bp_type as argument instead of a Z
7042 packet char.
7043 * i386-low.h: Include break-common.h here.
7044 (Z_packet_to_hw_type): Declare.
7045 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7046 prototypes.
7047 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7048 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7049 (x86_remove_point): Convert the packet number to a
7050 target_hw_bp_type before calling i386_low_remove_watchpoint.
7051 * win32-i386-low.c (i386_insert_point): Convert the packet number
7052 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7053 (i386_remove_point): Convert the packet number to a
7054 target_hw_bp_type before calling i386_low_remove_watchpoint.
7055
b8acf843
PA
70562014-04-23 Pedro Alves <palves@redhat.com>
7057
7058 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7059
d708bcd1
PA
70602014-04-10 Pedro Alves <palves@redhat.com>
7061
7062 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7063 Check if the condition or command is NULL before checking if the
7064 breakpoint is known. On success, return true.
7065 * mem-break.h (add_breakpoint_condition): Document return.
7066 (add_breakpoint_commands): Add describing comment.
7067 * server.c (skip_to_semicolon): New function.
7068 (process_point_options): Use it.
7069
2eec7d5b
PA
70702014-04-09 Pedro Alves <palves@redhat.com>
7071
7072 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7073 to lwpid_of.
7074
fa96cb38
PA
70752014-02-27 Pedro Alves <palves@redhat.com>
7076
7077 PR 12702
7078 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7079 macros.
7080 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7081 output.
7082 (last_thread_of_process_p): Take a PID argument instead of a
7083 thread pointer.
7084 (linux_wait_for_lwp): Delete.
7085 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7086 functions.
7087 (linux_low_filter_event): New function, party factored out from
7088 linux_wait_for_event.
7089 (linux_wait_for_event): Rename to ...
7090 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7091 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7092 sigsuspend. Check for zombie leaders.
7093 (linux_wait_for_event): Reimplement as wrapper around
7094 linux_wait_for_event_filtered.
7095 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7096 a normal or signal exit is seen, it's the whole process exiting.
7097 (wait_for_sigstop): No longer a for_each_inferior callback.
7098 Rewrite on top of linux_wait_for_event_filtered.
7099 (stop_all_lwps): Call wait_for_sigstop directly.
7100 * server.c (resume, handle_target_event): Handle
7101 TARGET_WAITKIND_NO_RESUMED.
7102
d763de10
JB
71032014-02-26 Joel Brobecker <brobecker@adacore.com>
7104
7105 * win32-low.c (psapi_get_dll_name,
7106 * win32_CreateToolhelp32Snapshot): Delete.
7107 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7108 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7109 Delete.
7110 (handle_load_dll): Add function description.
7111 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7112
850a0f76
JB
71132014-02-26 Joel Brobecker <brobecker@adacore.com>
7114
7115 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7116 Add comment.
7117 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7118 base address when calling win32_add_one_solib.
7119 (handle_load_dll): Delete local variable load_addr.
7120 Remove 0x1000 offset applied to DLL base address when calling
7121 win32_add_one_solib.
7122 (handle_unload_dll): Add comment.
7123
f25b3fc3
JB
71242014-02-26 Joel Brobecker <brobecker@adacore.com>
7125
7126 * win32-low.c (win32_add_all_dlls): Renames
7127 win32_ensure_ntdll_loaded. Rewrite function documentation.
7128 Adjust implementation to always load all DLLs.
7129 Add 0x1000 offset to DLL base address when calling
7130 win32_add_one_solib.
7131 (child_initialization_done): New static global.
7132 (do_initial_child_stuff): Set child_initialization_done to
7133 zero during child initialization, and 1 after. Replace call
7134 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7135 Add comment.
7136 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7137 (handle_unload_dll): Add function documentation.
7138 (get_child_debug_event): Ignore load and unload DLL events
7139 during child initialization.
7140
d86d4aaf
DE
71412014-02-20 Doug Evans <dje@google.com>
7142
3bc32da3 7143 Remove global all_lwps.
d86d4aaf
DE
7144 * inferiors.h (ptid_of): Move here from linux-low.h.
7145 (pid_of, lwpid_of): Ditto.
7146 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7147 parameter is a struct thread_info * now.
7148 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7149 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7150 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7151 directly.
7152 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7153 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7154 * linux-arm-low.c (update_registers_callback): Update, "entry"
7155 parameter is a struct thread_info * now.
7156 Fetch lwpid from current_inferior directly.
7157 (arm_insert_point): Pass &all_threads to find_inferior instead of
7158 &all_lwps.
7159 (arm_remove_point): Ditto.
7160 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7161 (arm_prepare_to_resume): Fetch pid from thread.
7162 (arm_read_description): Fetch lwpid from current_inferior directly.
7163 * linux-low.c (all_lwps): Delete.
7164 (delete_lwp): Delete call to remove_inferior.
7165 (handle_extended_wait): Fetch lwpid from thread.
7166 (add_lwp): Don't set lwp->entry.id. Remove call to
7167 add_inferior_to_list.
7168 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7169 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7170 (kill_one_lwp_callback): Ditto.
7171 (linux_kill): Don't dereference NULL pointer.
7172 Fetch ptid,lwpid from thread.
7173 (get_detach_signal): Fetch ptid from thread.
7174 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7175 Simplify call to regcache_invalidate_thread.
7176 (delete_lwp_callback): Update, "entry" parameter is a
7177 struct thread_info * now. Fetch pid from thread.
7178 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7179 (status_pending_p_callback): Update, "entry" parameter is a
7180 struct thread_info * now. Fetch ptid from thread.
7181 (find_lwp_pid): Update, "entry" parameter is a
7182 struct thread_info * now.
7183 (linux_wait_for_lwp): Fetch pid from thread.
7184 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7185 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7186 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7187 (dequeue_one_deferred_signal): Ditto.
7188 (cancel_breakpoint): Fetch ptid from current_inferior.
7189 (linux_wait_for_event): Pass &all_threads to find_inferior,
7190 not &all_lwps. Fetch ptid, lwpid from thread.
7191 (count_events_callback): Update, "entry" parameter is a
7192 struct thread_info * now.
7193 (select_singlestep_lwp_callback): Ditto.
7194 (select_event_lwp_callback): Ditto.
7195 (cancel_breakpoints_callback): Ditto.
7196 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7197 not &all_lwps.
7198 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7199 (unsuspend_one_lwp): Update, "entry" parameter is a
7200 struct thread_info * now.
7201 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7202 not &all_lwps.
7203 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7204 Fetch lwpid from thread, not lwp.
7205 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7206 Pass &all_threads to find_inferior, not &all_lwps.
7207 (send_sigstop): Fetch lwpid from thread, not lwp.
7208 (send_sigstop_callback): Update, "entry" parameter is a
7209 struct thread_info * now.
7210 (suspend_and_send_sigstop_callback): Ditto.
7211 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7212 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7213 struct thread_info * now.
7214 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7215 from thread, lwp.
7216 (lwp_running): Update, "entry" parameter is a
7217 struct thread_info * now.
7218 (stop_all_lwps): Fetch ptid from thread.
7219 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7220 (linux_resume_one_lwp): Fetch lwpid from thread.
7221 (linux_set_resume_request): Update, "entry" parameter is a
7222 struct thread_info * now. Fetch pid, lwpid from thread.
7223 (resume_status_pending_p): Update, "entry" parameter is a
7224 struct thread_info * now.
7225 (need_step_over_p): Ditto. Fetch lwpid from thread.
7226 (start_step_over): Fetch lwpid from thread.
7227 (linux_resume_one_thread): Update, "entry" parameter is a
7228 struct thread_info * now. Fetch lwpid from thread.
7229 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7230 (proceed_one_lwp): Update, "entry" parameter is a
7231 struct thread_info * now. Fetch lwpid from thread.
7232 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7233 struct thread_info * now.
7234 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7235 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7236 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7237 directly.
7238 (regsets_store_inferior_registers): Ditto.
7239 (fetch_register, store_register): Ditto.
7240 (linux_read_memory, linux_write_memory): Ditto.
7241 (linux_request_interrupt): Ditto.
7242 (linux_read_auxv): Ditto.
7243 (linux_xfer_siginfo): Ditto.
7244 (linux_qxfer_spu): Ditto.
7245 (linux_qxfer_libraries_svr4): Ditto.
7246 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7247 moved to inferiors.h.
7248 (get_lwp): Delete.
7249 (get_thread_lwp): Update.
7250 (struct lwp_info): Delete member "entry". Simplify comment for
7251 member "thread".
7252 (all_lwps): Delete.
7253 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7254 current_inferior directly.
7255 (update_watch_registers_callback): Update, "entry" parameter is a
7256 struct thread_info * now. Fetch pid from thread.
7257 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7258 (mips_insert_point): Fetch lwpid from current_inferior.
7259 Pass &all_threads to find_inferior, not &all_lwps.
7260 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7261 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7262 directly.
7263 (mips_stopped_data_address): Ditto.
7264 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7265 directly.
7266 * linux-tile-low.c (tile_arch_setup): Ditto.
7267 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7268 (update_debug_registers_callback): Update, "entry" parameter is a
7269 struct thread_info * now. Fetch pid from thread.
7270 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7271 Pass &all_threads to find_inferior, not &all_lwps.
7272 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7273 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7274 Pass &all_threads to find_inferior, not &all_lwps.
7275 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7276 (i386_dr_low_get_status): Ditto.
7277 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7278 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7279 (x86_linux_read_description): Ditto.
7280 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7281
3b8361aa
DE
72822014-02-20 Doug Evans <dje@google.com>
7283
7284 * inferiors.c (get_first_inferior): Fix buglet.
7285
f7667f0d
DE
72862014-02-19 Doug Evans <dje@google.com>
7287
7288 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7289 * inferiors.c (add_thread): Change result type to struct thread_info *.
7290 All callers updated.
7291 (add_lwp): Call add_thread here instead of in callers.
7292 All callers updated.
7293 * linux-low.h (get_lwp_thread): Rewrite.
7294 (struct lwp_info): New member "thread".
7295
b3312d80
DE
72962014-02-19 Doug Evans <dje@google.com>
7297
7298 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7299 All callers updated.
7300
ecc6f45c
DE
73012014-02-19 Doug Evans <dje@google.com>
7302
7303 * inferiors.c (add_thread): Fix whitespace.
7304
649ebbca
DE
73052014-02-19 Doug Evans <dje@google.com>
7306
7307 * dll.c (clear_dlls): Replace accessing list implemention details
7308 with API function.
7309 * gdbthread.h (get_first_thread): Declare.
7310 * inferiors.c (for_each_inferior_with_data): New function.
7311 (get_first_thread): New function.
7312 (find_thread_ptid): Simplify.
7313 (get_first_inferior): New function.
7314 (clear_list): Delete.
7315 (one_inferior_p): New function.
7316 (clear_inferior_list): New function.
7317 (clear_inferiors): Update.
7318 * inferiors.h (for_each_inferior_with_data): Declare.
7319 (clear_inferior_list): Declare.
7320 (one_inferior_p): Declare.
7321 (get_first_inferior): Declare.
7322 * linux-low.c (linux_wait_for_event): Replace accessing list
7323 implemention details with API function.
7324 * server.c (target_running): Ditto.
7325 (accumulate_file_name_length): New function.
7326 (emit_dll_description): New function.
7327 (handle_qxfer_libraries): Replace accessing list implemention
7328 details with API function.
7329 (handle_qxfer_threads_worker): New function.
7330 (handle_qxfer_threads_proper): Replace accessing list implemention
7331 details with API function.
7332 (handle_query): Ditto.
7333 (visit_actioned_threads_callback_ftype): New typedef.
7334 (visit_actioned_threads_data): New struct.
7335 (visit_actioned_threads): Rewrite to be find_inferior callback.
7336 (resume): Call find_inferior.
7337 (handle_status): Replace accessing list implemention
7338 details with API function.
7339 (process_serial_event): Replace accessing list implemention details
7340 with API function.
7341 * target.c (set_desired_inferior): Replace accessing list implemention
7342 details with API function.
7343 * tracepoint.c (same_process_p): New function.
7344 (gdb_agent_about_to_close): Replace accessing list implemention
7345 details with API function.
7346 * win32-low.c (child_delete_thread): Replace accessing list
7347 implemention details with API function.
7348 (match_dll_by_basename): New function.
7349 (dll_is_loaded_by_basename): New function.
7350 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7351 details call to dll_is_loaded_by_basename.
7352
80894984
DE
73532014-02-19 Doug Evans <dje@google.com>
7354
7355 * dll.h (struct dll_info): Add comment.
7356 * gdbthread.h (struct thread_info): Add comment.
7357 (current_ptid): Simplify.
7358 * inferiors.c (add_process): Update.
7359 (remove_process): Update.
7360 * inferiors.h (struct process_info): Rename member "head" to "entry".
7361 * linux-low.c (delete_lwp): Update.
7362 (add_lwp): Update.
7363 (last_thread_of_process_p): Update.
7364 (kill_one_lwp_callback, linux_kill): Update.
7365 (status_pending_p_callback): Update.
7366 (wait_for_sigstop): Update. Simplify read of ptid.
7367 (start_step_over): Update.
7368 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7369 (get_lwp_thread): Update.
7370 (struct lwp_info): Rename member "head" to "entry".
7371 * regcache.h (inferior_list_entry): Delete.
7372 * server.c (kill_inferior_callback): Update.
7373 (detach_or_kill_inferior_callback): Update.
7374 (print_started_pid): Update.
7375 (print_attached_pid): Update.
7376 (process_serial_event): Simplify read of ptid.
7377 * thread-db.c (thread_db_create_event): Update.
7378 (thread_db_get_tls_address): Update.
7379 * win32-low.c (current_inferior_ptid): Simplify.
7380
46917d26
TT
73812014-02-19 Tom Tromey <tromey@redhat.com>
7382
7383 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7384 argument.
7385 (target_supports_btrace): Update.
7386
0759a81e
YQ
73872014-02-14 Yao Qi <yao@codesourcery.com>
7388
7389 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7390 (rsp-low-ipa.o): New target.
7391
a7191e8b
TT
73922014-02-12 Tom Tromey <tromey@redhat.com>
7393
7394 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7395 convert_ascii_to_int.
7396 * regcache.c (registers_to_string): Likewise.
7397 * remote-utils.c (decode_M_packet): Likewise.
7398 * server.c (process_serial_event): Likewise.
7399
ff0e980e
TT
74002014-02-12 Tom Tromey <tromey@redhat.com>
7401
7402 * server.c (handle_query, handle_v_run): Use hex2bin, not
7403 unhexify.
7404 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7405
e9371aff
TT
74062014-02-12 Tom Tromey <tromey@redhat.com>
7407
7408 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7409 convert_int_to_ascii.
7410 * regcache.c (registers_to_string, collect_register_as_string):
7411 Likewise.
7412 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7413 Likewise.
7414 * server.c (process_serial_event): Likewise.
7415 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7416 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7417
971dc0b8
TT
74182014-02-12 Tom Tromey <tromey@redhat.com>
7419
7420 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7421 bin2hex, not hexify.
7422 * tracepoint.c (cmd_qtstatus): Likewise.
7423
0a822afb
TT
74242014-02-12 Tom Tromey <tromey@redhat.com>
7425
7426 * remote-utils.c (monitor_output): Pass explicit length to
7427 hexify.
7428
9c3d6531
TT
74292014-02-12 Tom Tromey <tromey@redhat.com>
7430
7431 * tracepoint.c: Include rsp-low.h.
7432 * server.c: Include rsp-low.h.
7433 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7434 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7435 declare.
7436 * remote-utils.c: Include rsp-low.h.
7437 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7438 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7439 (convert_int_to_ascii, convert_ascii_to_int): Move to
7440 common/rsp-low.c.
7441 * regcache.c: Include rsp-low.h.
7442 * ax.c: Include rsp-low.h.
7443 * Makefile.in (SFILES): Add common/rsp-low.c.
7444 (OBS): Add rsp-low.o.
7445 (rsp-low.o): New target.
7446
01fd3ea5
TT
74472014-02-12 Tom Tromey <tromey@redhat.com>
7448
7449 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7450 Include print-utils.h.
7451 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7452 (plongest, thirty_two, phex_nz): Remove.
7453 * Makefile.in (SFILES): Add common/print-utils.c.
7454 (OBS): Add print-utils.o.
7455 (print-utils-ipa.o): New target.
7456 (print-utils.o): New target.
7457 (IPA_OBJS): Add print-utils-ipa.o.
7458
e99dc820
TT
74592014-02-06 Tom Tromey <tromey@redhat.com>
7460
7461 * Makefile.in (SFILES): Fix indentation.
7462
ee1e2d4f
DE
74632014-02-05 Doug Evans <dje@google.com>
7464
7465 * linux-low.c (linux_wait_for_event): Improve comment.
7466 (linux_wait_1): Keep current_inferior in sync with event_child.
7467
f5a02773
DE
74682014-01-22 Doug Evans <dje@google.com>
7469
7470 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7471
87ce2a04
DE
74722014-01-22 Doug Evans <dje@google.com>
7473
7474 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7475 * configure: Regenerate.
7476 * config.in: Regenerate.
7477 * Makefile.in (SFILES): Add debug.c.
7478 (OBS): Add debug.o.
7479 * debug.c: New file.
7480 * debug.h: New file.
7481 * linux-aarch64-low.c (*): Update all debugging printfs to use
7482 debug_printf instead of fprintf.
7483 * linux-arm-low.c (*): Ditto.
7484 * linux-cris-low.c (*): Ditto.
7485 * linux-crisv32-low.c (*): Ditto.
7486 * linux-m32r-low.c (*): Ditto.
7487 * linux-sparc-low.c (*): Ditto.
7488 * linux-x86.c (*): Ditto.
7489 * linux-low.c (*): Ditto.
7490 (linux_wait_1): Add calls to debug_enter, debug_exit.
7491 (linux_wait): Remove redundant debugging printf.
7492 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7493 (linux_resume, unstop_all_lwps): Ditto.
7494 * mem-break.c (*): Update all debugging printfs to use
7495 debug_printf instead of fprintf.
7496 * remote-utils.c (*): Ditto.
7497 * thread-db.c (*): Ditto.
7498 * server.c #include <ctype.h>, "gdb_vecs.h".
7499 (debug_threads): Moved to debug.c.
7500 (*): Update all debugging printfs to use debug_printf instead of
7501 fprintf.
7502 (start_inferior): Replace call to fflush with call to debug_flush.
7503 (monitor_show_help): Mention set debug-format.
7504 (parse_debug_format_options): New function.
7505 (handle_monitor_command): Handle "monitor set debug-format".
7506 (gdbserver_usage): Mention --debug-format.
7507 (main): Parse --debug-format.
7508 * server.h (debug_threads): Declaration moved to debug.h.
7509 #include "debug.h".
7510 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7511 trace_debug_1 that uses debug_printf.
7512 (tracepoint_look_up_symbols): Update all debugging printfs to use
7513 debug_printf instead of fprintf.
7514
e671835b
BS
75152014-01-20 Baruch Siach <baruch@tkos.co.il>
7516
7517 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7518 sys/ptrace.h.
7519
b5737fa9
PA
75202014-01-17 Pedro Alves <palves@redhat.com>
7521
ea38d2a9 7522 PR build/16445
c7faa97a
PA
7523 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7524 defined after including gdb_proc_service.h.
b5737fa9 7525
40ed484e
DE
75262014-01-16 Doug Evans <dje@google.com>
7527
7528 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7529 (match_dll): Use it.
7530
969c39fb
MM
75312014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7532
7533 * target.h (target_ops) <read_btrace>: Change parameters and
7534 return type to allow error reporting.
7535 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7536 trace reading errors on.
7537 * linux-low.c (linux_low_read_btrace): Pass trace reading
7538 errors on.
7539 (linux_low_disable_btrace): New.
7540
ab7f45ba
DE
75412014-01-15 Doug Evans <dje@google.com>
7542
7543 * inferiors.c (thread_id_to_gdb_id): Delete.
7544 * inferiors.h (thread_id_to_gdb_id): Delete.
7545
66af0f44
EZ
75462014-01-13 Eli Zaretskii <eliz@gnu.org>
7547
7548 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7549 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7550 versions.
7551
9939e131
PA
75522014-01-08 Pedro Alves <palves@redhat.com>
7553
7554 * server.c (handle_status): Don't discard previous queued stop
7555 replies or thread's pending status here.
7556 (main) <disconnection>: Do it here instead.
7557
b7ea362b
PA
75582014-01-08 Pedro Alves <palves@redhat.com>
7559
7560 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7561 * server.c (visit_actioned_threads, handle_pending_status): New
7562 function.
7563 (handle_v_cont): Factor out parts to ...
7564 (resume): ... this new function. If in all-stop, and a thread
7565 being resumed has a pending status, report it without actually
7566 resuming.
7567 (myresume): Adjust to use the new 'resume' function.
7568 (clear_pending_status_callback, set_pending_status_callback)
7569 (find_status_pending_thread_callback): New functions.
7570 (handle_status): Handle the case of multiple threads having
7571 interesting statuses to report. Report threads' real last signal
7572 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7573 with an interesting thread to report the status for, instead of
7574 always reporting the status of the first thread.
7575
28498c42
JB
75762014-01-01 Joel Brobecker <brobecker@adacore.com>
7577
7578 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7579 * gdbreplay.c (gdbreplay_version): Likewise.
7580
f45c82da
YZ
75812013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7582
7583 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7584 iov.iov_len with the real length in use.
7585
379a5e2d
JB
75862013-12-13 Joel Brobecker <brobecker@adacore.com>
7587
7588 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7589 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7590 for all targets that use win32-low.c.
7591 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7592 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7593
4210d83e
PA
75942013-12-13 Pedro Alves <palves@redhat.com>
7595
7596 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7597 if equal to TARGET_WAITKIND_LOADED.
7598 * win32-low.c (cached_status): New static global.
7599 (win32_wait): Add declaration.
7600 (do_initial_child_stuff): Flush all initial pending debug events
7601 up to the initial breakpoint.
7602 (win32_wait): If CACHED_STATUS was set, return that instead
7603 of doing a real wait. Remove the code resuming the execution
7604 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7605 during the initial phase. Also remove the code changing
7606 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7607 TARGET_WAITKIND_STOPPED.
7608
e7f0d979
YQ
76092013-12-11 Yao Qi <yao@codesourcery.com>
7610
7611 * notif.c (handle_notif_ack): Return 0 if no notification
7612 matches.
7613
ebcf782c
DE
76142013-11-20 Doug Evans <dje@google.com>
7615
7616 * linux-low.c (linux_set_resume_request): Fix comment.
7617
20ad9378
DE
76182013-11-20 Doug Evans <dje@google.com>
7619
7620 * linux-low.c (resume_status_pending_p): Tweak comment.
7621
a196ebeb
WT
76222013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7623
7624 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7625 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7626 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7627 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7628 (srv_amd64_regobj): Add amd64-mpx.o.
7629 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7630 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7631 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7632 * i387-fp.c (num_pl_bnd_register) Added constant.
7633 (num_pl_bnd_cfg_registers) Added constant.
7634 (struct i387_xsave) Added reserved area and MPX fields.
7635 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7636 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7637 function.
7638 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7639 (init_registers_amd64_mpx_linux): Declare new function.
7640 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7641 (x86_64_regmap): Add MPX registers.
7642 (x86_linux_read_description): Add MPX case.
7643 (initialize_low_arch): Initialize MPX targets.
7644
0080a2f6
TT
76452013-11-18 Tom Tromey <tromey@redhat.com>
7646
7647 * configure: Rebuild.
7648 * configure.ac: Don't check for stdlib.h.
7649 * gdbreplay.c: Unconditionally include stdlib.h.
7650
2978b111
TT
76512013-11-18 Tom Tromey <tromey@redhat.com>
7652
7653 * config.in: Rebuild.
7654 * configure: Rebuild.
7655 * configure.ac: Don't use AC_HEADER_DIRENT.
7656
a3d08894
TT
76572013-11-18 Tom Tromey <tromey@redhat.com>
7658
7659 * server.h: Don't check HAVE_STRING_H.
7660 * gdbreplay.c: Don't check HAVE_STRING_H.
7661 * configure: Rebuild.
7662
0a5dd17d
TT
76632013-11-18 Tom Tromey <tromey@redhat.com>
7664
7665 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7666 LIBGNU.
7667
1bd2f0ba
TT
76682013-11-08 Tom Tromey <tromey@redhat.com>
7669
7670 * configure, config.in: Rebuild.
7671 * configure.ac: Remove unused configury.
7672
3266f10b
TT
76732013-11-08 Tom Tromey <tromey@redhat.com>
7674
7675 * acinclude.m4: Include common.m4, codeset.m4.
7676 * configure, config.in: Rebuild.
7677 * configure.ac: Use GDB_AC_COMMON.
7678
6682d959
AA
76792013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7680
7681 * linux-s390-low.c (HWCAP_S390_TE): New define.
7682 (s390_arch_setup): Consider the TE field in the HWCAP for
7683 determining 'have_regset_tdb'.
7684
fd0a4d76
SDJ
76852013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7686
7687 PR gdb/16014
7688 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7689 call to sizeof.
7690
1a3d890b
PA
76912013-10-02 Pedro Alves <palves@redhat.com>
7692
7693 * server.c (process_serial_event): Don't output "GDBserver
7694 exiting" if GDB is connected through stdio.
7695 * target.c (mywait): Likewise, be silent if GDB is connected
7696 through stdio.
7697
97ad4581
JB
76982013-10-01 Joel Brobecker <brobecker@adacore.com>
7699
7700 * lynx-low.c (lynx_add_threads_after_attach): New function.
7701 (lynx_attach): Remove call to add_thread. Add call to
7702 lynx_add_threads_after_attach instead.
7703
5b4e221c
MF
77042013-09-28 Mike Frysinger <vapier@gentoo.org>
7705
7706 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7707 * config.in, configure: Regenerated.
7708
ee47b2f8
YQ
77092013-09-18 Yao Qi <yao@codesourcery.com>
7710
7711 PR server/15959
7712 * server.c (start_inferior): Clear 'resume_info'.
7713
d6707650 77142013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7715
d6707650
JW
7716 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7717 for each register.
7718
9243dd0e 77192013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7720
9243dd0e
JW
7721 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7722 linux-tile-low.o to srv_tgtobj.
7723
c623a6ef
WN
77242013-09-16 Will Newton <will.newton@linaro.org>
7725
7726 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7727 out regs.
7728
fb71d39e
PA
77292013-09-06 Pedro Alves <palves@redhat.com>
7730
7731 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7732 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7733 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7734 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7735 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7736 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7737
8e7e9910
PA
77382013-09-06 Pedro Alves <palves@redhat.com>
7739
7740 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7741 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7742
7c3a12ca
PA
77432013-09-06 Pedro Alves <palves@redhat.com>
7744
7745 * linux-amd64-ipa.c: Include tracepoint.h.
7746 * linux-i386-ipa.c: Include tracepoint.h.
7747
8eb3d7b6
RW
77482013-09-06 Ricard Wanderlof <ricardw@axis.com>
7749
7750 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7751 (ps_get_thread_area): New function.
7752
eddddb9d
RW
77532013-09-06 Ricard Wanderlof <ricardw@axis.com>
7754
7755 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7756 (initialize_low_arch): Call init_registers_crisv32 rather than
7757 init_register_crisv32.
7758
533b0600
PA
77592013-09-05 Pedro Alves <palves@redhat.com>
7760
7761 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7762 to ...
7763 * hostio.h: ... this new file.
7764 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7765 win32-low.c: Include hostio.h.
7766
0ce3d3b5
PA
77672013-09-05 Pedro Alves <palves@redhat.com>
7768
7769 * server.h (gdb_client_data, handler_func, callback_handler_func)
7770 (delete_file_handler, add_file_handler, append_callback_event)
7771 (delete_callback_event, start_event_loop, initialize_event_loop):
7772 Move to event-loop.h and include it.
7773 * event-loop.h: New file.
7774
799cdc37
PA
77752013-09-05 Pedro Alves <palves@redhat.com>
7776
7777 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7778 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7779 (loaded_dll, unloaded_dll): Move to ...
7780 * dll.h: ... this new file.
7781 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7782
6a6bbd9d
PA
77832013-09-05 Pedro Alves <palves@redhat.com>
7784
7785 * server.h (current_process, get_thread_process, all_processes)
7786 (add_inferior_to_list, for_each_inferior, current_inferior)
7787 (remove_inferior, add_process, remove_process, find_process_pid)
7788 (have_started_inferiors_p, have_attached_inferiors_p)
7789 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7790 (clear_inferiors, find_inferior, find_inferior_id)
7791 (inferior_target_data, set_inferior_target_data)
7792 (inferior_regcache_data, set_inferior_regcache_data): Move to
7793 inferiors.h, and include it.
7794 * inferiors.h: New file.
7795
f699aaba
PA
77962013-09-05 Pedro Alves <palves@redhat.com>
7797
7798 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7799 Move ...
72f4393d 7800 * ax.h: ... here.
f699aaba 7801
c144c7a0
PA
78022013-09-05 Pedro Alves <palves@redhat.com>
7803
7804 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7805 tracepoint.h.
7806 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7807 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7808 (handle_tracepoint_general_set, handle_tracepoint_query)
7809 (tracepoint_finished_step, tracepoint_was_hit)
7810 (release_while_stepping_state_list, current_traceframe)
7811 (in_readonly_region, traceframe_read_mem)
7812 (fetch_traceframe_registers, traceframe_read_sdata)
7813 (traceframe_read_info, struct fast_tpoint_collect_status)
7814 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7815 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7816 (supply_fast_tracepoint_registers)
7817 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7818 (ipa_tdesc, claim_trampoline_space)
7819 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7820 (agent_mem_read, agent_get_trace_state_variable_value)
7821 (agent_set_trace_state_variable_value, agent_tsv_read)
7822 (agent_mem_read_string, get_raw_reg_func_addr)
7823 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7824 * tracepoint.h: ... this new file.
7825
ff42e6ab
PA
78262013-09-05 Pedro Alves <palves@redhat.com>
7827
7828 * server.h (perror_with_name, error, fatal, warning, paddress)
7829 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7830 include it.
7831 * utils.h: New file.
7832
541af0f4
PA
78332013-09-05 Pedro Alves <palves@redhat.com>
7834
7835 * server.h (remote_debug, noack_mode, transport_is_reliable)
7836 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7837 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7838 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7839 (write_enn, initialize_async_io, enable_async_io)
7840 (disable_async_io, check_remote_input_interrupt_request)
7841 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7842 (dead_thread_notify, prepare_resume_reply)
7843 (decode_address_to_semicolon, decode_address, decode_m_packet)
7844 (decode_M_packet, decode_X_packet, decode_xfer_write)
7845 (decode_search_memory_packet, unhexify, hexify)
7846 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7847 (look_up_one_symbol, relocate_instruction)
7848 (monitor_output): Move to remote-utils.h, and include it.
7849 * remote-utils.h: New file.
7850
eebdf26b
PA
78512013-09-05 Pedro Alves <palves@redhat.com>
7852
7853 * server.h (_): Delete.
7854
3aafd2ff
PA
78552013-09-02 Pedro Alves <palves@redhat.com>
7856
7857 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7858 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7859 allocated.
7860 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7861
cee83bcb
PM
78622013-09-02 Pierre Muller <muller@sourceware.org>
7863
7864 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7865 or WriteProcessMemory complete successfully and handle
7866 ERROR_PARTIAL_COPY error.
7867
9a13b2fa
PA
78682013-09-02 Pedro Alves <palves@redhat.com>
7869
7870 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7871 error instead of EIO.
7872
602e3198
JK
78732013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7874
7875 PR server/15604
7876 * linux-low.c: Include filestuff.h.
7877 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7878 * lynx-low.c: Include filestuff.h.
7879 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7880 * server.c: Include filestuff.h.
7881 (main): Call notice_open_fds.
7882 * spu-low.c: Include filestuff.h.
7883 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7884
96d7229d
LM
78852013-08-22 Luis Machado <lgustavo@codesourcery.com>
7886
7887 * Makefile.in: Explain why ../target and ../nat are not
7888 listed as include file search paths.
7889 (linux-waitpid.o): New object file rule.
7890 * configure.srv (srv_native_linux_obj): New variable.
7891 Replace all occurrences of linux native object files with
7892 $srv_native_linux_obj.
7893 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7894 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7895 (linux_enable_event_reporting): Remove declaration.
7896 (my_waitpid): Moved to common/linux-waitpid.c.
7897 (linux_wait_for_event): Pass ptid when calling
7898 linux_enable_event_reporting.
7899 (linux_supports_tracefork_flag): Remove.
7900 (linux_enable_event_reporting): Likewise.
7901 (linux_tracefork_grandchild): Remove.
7902 (STACK_SIZE): Moved to common/linux-ptrace.c.
7903 (linux_tracefork_child): Remove.
7904 (linux_test_for_tracefork): Remove.
7905 (linux_look_up_symbols): Call linux_supports_traceclone.
7906 (initialize_low): Remove call to linux_test_for_tracefork.
7907 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7908 common/linux-ptrace.h.
7909 (PTRACE_TYPE_ARG4): Likewise.
7910 Include linux-ptrace.h.
7911
32940073
PA
79122013-08-21 Pedro Alves <palves@redhat.com>
7913
7914 * config.in: Renegerate.
7915
33b60d58 79162013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7917
33b60d58
LM
7918 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7919 (SFILES): Remove $(srcdir)/common/target-common.c and
7920 add $(srcdir)/target/waitstatus.c.
7921 (OBS): Remove target-common.o and add waitstatus.o.
7922 (server_h): Remove $(srcdir)/../common/target-common.h and
7923 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7924 and $(srcdir)/../target/waitstatus.h.
7925 (target-common.o): Remove.
7926 (waitstatus.o): New target object file.
7927 * target.h: Do not include target-common.h and
7928 include target/resume.h, target/wait.h and
7929 target/waitstatus.h.
7930
b8e1b30e
LM
79312013-08-13 Luis Machado <lgustavo@codesourcery.com>
7932
7933 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7934 to PTRACE_TYPE_ARG3.
7935 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7936 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7937 PTRACE_TYPE_ARG4.
7938 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7939 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7940
7a60ad40
YQ
79412013-07-27 Jie Zhang <jie@codesourcery.com>
7942 Daniel Jacobowitz <dan@codesourcery.com>
7943 Yao Qi <yao@codesourcery.com>
7944
7945 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7946 (mips-linux-watch.o): New rule.
7947 (mips_linux_watch_h): New variable.
7948 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7949 srv_tgtobj.
7950 * linux-mips-low.c: Include mips-linux-watch.h.
7951 (struct arch_process_info, struct arch_lwp_info): New.
7952 (update_watch_registers_callback): New function.
7953 (mips_linux_new_process, mips_linux_new_thread) New functions.
7954 (mips_linux_prepare_to_resume, mips_insert_point): New
7955 functions.
7956 (mips_remove_point, mips_stopped_by_watchpoint): New
7957 functions.
7958 (rsp_bp_type_to_target_hw_bp_type): New function.
7959 (mips_stopped_data_address): New function.
7960 (the_low_target): Add watchpoint support functions.
7961
de6f69ad
YQ
79622013-07-27 Yao Qi <yao@codesourcery.com>
7963
7964 * i386-low.c: Include break-common.h.
7965 (enum target_hw_bp_type): Remove.
7966
3360c0bf
LM
79672013-07-24 Luis Machado <lgustavo@codesourcery.com>
7968
7969 * Makefile.in (SFILES): /common/target-common.c.
7970 (OBS): Add target-common.o.
7971 (server_h): Add $(srcdir)/../common/target-common.h.
7972 (target-common.o): New target.
7973 * server.c (queue_stop_reply_callback): Free
7974 status string after use.
7975 * target.c (target_waitstatus_to_string): Remove.
7976 * target.h: Include target-common.h.
7977 (resume_kind): Likewise.
7978 (target_waitkind): Likewise.
7979 (target_waitstatus): Likewise.
7980 (TARGET_WNOHANG): Likewise.
7981
bd885420
YQ
79822013-07-04 Yao Qi <yao@codesourcery.com>
7983
7984 * Makefile.in (host_alias): Use @host_noncanonical@.
7985 (target_alias): Use @target_noncanonical@.
7986 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7987 ACX_NONCANONICAL_HOST.
7988 * configure: Regenerated.
7989
7990 Revert:
7991 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7992
7993 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7994 * configure: Rebuild.
7995 * Makefile.in (version_host, version_target): Get from configure.
7996 (version.c): Use $(version_host) and $(version_target).
7997
17ef446e
PA
79982013-07-03 Pedro Alves <palves@redhat.com>
7999
8000 * Makefile.in (config.status): Depend on development.sh.
8001 * acinclude.m4: Include libmcheck.m4.
8002 * configure: Regenerate.
8003
7a9a7487
MG
80042013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8005
8006 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8007 attribute inside the parentheses.
8008 (winapi_DebugSetProcessKillOnExit): Ditto.
8009 (winapi_DebugBreakProcess): Ditto.
8010 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8011
49b64de6
MG
80122013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8013
8014 * notif.h (notif_event): Add a dummy member to avoid compiler
8015 errors.
8016
d5749ee7
PA
80172013-07-01 Pedro Alves <palves@redhat.com>
8018
8019 * hostio.c (HOSTIO_PATH_MAX): Define.
8020 (require_filename, handle_open, handle_unlink, handle_readlink):
8021 Use it.
8022
d8d2a3ee
PA
80232013-07-01 Pedro Alves <palves@redhat.com>
8024
8025 * server.h: Include "pathmax.h".
8026 * linux-low.c: Don't include sys/param.h.
8027 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8028 MAXPATHLEN.
8029 * win32-low.c: Don't include sys/param.h.
8030 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8031
bc7dea8d
PA
80322013-07-01 Pedro Alves <palves@redhat.com>
8033
8034 * event-loop.c: Don't check HAVE_UNISTD_H before including
8035 <unistd.h>.
8036 * gdbreplay.c: Likewise.
8037 * remote-utils.c: Likewise.
8038 * server.c: Likewise.
8039 * configure.ac: Don't check for unistd.h.
8040 * configure: Regenerate.
8041
d6c2da54
TT
80422013-06-28 Tom Tromey <tromey@redhat.com>
8043
8044 * Makefile.in (version.c): Use version.in, not
8045 common/version.in.
8046
257b6bec
MG
80472013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8048
8049 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8050 * configure: Rebuild.
8051 * Makefile.in (version_host, version_target): Get from configure.
8052 (version.c): Use $(version_host) and $(version_target).
8053
86ebe149
DK
80542013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8055
8056 Fix trace-status to output user name without trailing colon.
8057 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8058
f30aa5af
DK
80592013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8060
8061 Fix trace-status to output proper start-time and stop-time.
8062 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8063 output start time and stop time in hex as gdb expects.
8064
28a93511
YQ
80652013-06-26 Pedro Alves <pedro@codesourcery.com>
8066
8067 * tracepoint.c (build_traceframe_info_xml): Output trace state
8068 variables present in the trace buffer.
8069
01208463
TT
80702013-06-24 Tom Tromey <tromey@redhat.com>
8071
8072 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8073 create-version.sh.
8074 (version.o): Remove.
8075 * gdbreplay.c: Include version.h.
8076 (version, host_name): Don't declare.
8077 * server.h: Include version.h.
8078 (version, host_name): Don't declare.
8079
760256f9
PA
80802013-06-12 Pedro Alves <palves@redhat.com>
8081
8082 * linux-x86-low.c (linux_is_elf64): Delete global.
8083 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8084 with local linux_pid_exe_is_elf_64_file use.
8085
030031ee
PA
80862013-06-11 Pedro Alves <palves@redhat.com>
8087
8088 * linux-low.c (regset_disabled, disable_regset): New functions.
8089 (regsets_fetch_inferior_registers)
8090 (regsets_store_inferior_registers): Use them.
8091 (initialize_regsets_info); Don't allocate the disabled_regsets
8092 array here.
8093 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8094 comment.
8095
5da6eb0a
PA
80962013-06-11 Pedro Alves <palves@redhat.com>
8097
8098 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8099 xmalloc.
8100
7e5aaa09
PA
81012013-06-11 Pedro Alves <palves@redhat.com>
8102
8103 * linux-x86-low.c (initialize_low_arch): Call
8104 init_registers_x32_avx_linux.
8105
d878444c
JK
81062013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8107
8108 Fix compatibility with Android Bionic.
8109 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8110 it is not empty.
8111
3aee8918
PA
81122013-06-07 Pedro Alves <palves@redhat.com>
8113
5f2b57b5 8114 PR server/14823
3aee8918
PA
8115 * Makefile.in (OBS): Add tdesc.o.
8116 (IPA_OBJS): Add tdesc-ipa.o.
8117 (tdesc-ipa.o): New rule.
8118 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8119 interface.
8120 * linux-low.c (new_inferior): Delete.
8121 (disabled_regsets, num_regsets): Delete.
8122 (linux_add_process): Adjust to set the new per-process
8123 new_inferior flag.
8124 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8125 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8126 was a stop. When calling arch_setup, switch the current inferior
8127 to the thread that got an event.
8128 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8129 (regsets_fetch_inferior_registers)
8130 (regsets_store_inferior_registers): New regsets_info parameter.
8131 Adjust to use it.
8132 (linux_register_in_regsets): New regs_info parameter. Adjust to
8133 use it.
8134 (register_addr, fetch_register, store_register): New usrregs_info
8135 parameter. Adjust to use it.
8136 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8137 parameter regs_info. Adjust to use it.
8138 (linux_fetch_registers): Get the current inferior's regs_info, and
8139 adjust to use it.
8140 (linux_store_registers): Ditto.
8141 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8142 (initialize_low): Don't initialize the target_regsets here. Call
8143 initialize_low_arch.
8144 * linux-low.h (target_regsets): Delete declaration.
8145 (struct regsets_info): New.
8146 (struct usrregs_info): New.
8147 (struct regs_info): New.
8148 (struct process_info_private) <new_inferior>: New field.
8149 (struct linux_target_ops): Delete the num_regs, regmap, and
8150 regset_bitmap fields. New field regs_info.
8151 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8152 * i387-fp.c (num_xmm_registers): Delete.
8153 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8154 calls to new interface.
8155 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8156 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8157 Infer the number of xmm registers from the regcache's target
8158 description.
8159 * i387-fp.h (num_xmm_registers): Delete.
8160 * inferiors.c (add_thread): Don't install the thread's regcache
8161 here.
8162 * proc-service.c (gregset_info): Fetch the current inferior's
8163 regs_info. Adjust to use it.
8164 * regcache.c: Include tdesc.h.
8165 (register_bytes, reg_defs, num_registers)
8166 (gdbserver_expedite_regs): Delete.
8167 (get_thread_regcache): If the thread doesn't have a regcache yet,
8168 create one, instead of aborting gdbserver.
8169 (regcache_invalidate_one): Rename to ...
8170 (regcache_invalidate_thread): ... this.
8171 (regcache_invalidate_one): New.
8172 (regcache_invalidate): Only invalidate registers of the current
8173 process.
8174 (init_register_cache): Add target_desc parameter, and use it.
8175 (new_register_cache): Ditto. Assert the target description has a
8176 non zero registers_size.
8177 (regcache_cpy): Add assertions. Adjust.
8178 (realloc_register_cache, set_register_cache): Delete.
8179 (registers_to_string, registers_from_string): Adjust.
8180 (find_register_by_name, find_regno, find_register_by_number)
8181 (register_cache_size): Add target_desc parameter, and use it.
8182 (free_register_cache_thread, free_register_cache_thread_one)
8183 (regcache_release, register_cache_size): New.
8184 (register_size): Add target_desc parameter, and use it.
8185 (register_data, supply_register, supply_register_zeroed)
8186 (supply_regblock, supply_register_by_name, collect_register)
8187 (collect_register_as_string, collect_register_by_name): Adjust.
8188 * regcache.h (struct target_desc): Forward declare.
8189 (struct regcache) <tdesc>: New field.
8190 (init_register_cache, new_register_cache): Add target_desc
8191 parameter.
8192 (regcache_invalidate_thread): Declare.
8193 (regcache_invalidate_one): Delete declaration.
8194 (regcache_release): Declare.
8195 (find_register_by_number, register_cache_size, register_size)
8196 (find_regno): Add target_desc parameter.
8197 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8198 declarations.
8199 * remote-utils.c: Include tdesc.h.
8200 (outreg, prepare_resume_reply): Adjust.
8201 * server.c: Include tdesc.h.
8202 (gdbserver_xmltarget): Delete declaration.
8203 (get_features_xml, process_serial_event): Adjust.
8204 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8205 declare.
8206 (struct process_info) <tdesc>: New field.
8207 (ipa_tdesc): Declare.
8208 * tdesc.c: New file.
8209 * tdesc.h: New file.
8210 * tracepoint.c: Include tdesc.h.
8211 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8212 (get_context_regcache): Adjust to pass ipa_tdesc down.
8213 (do_action_at_tracepoint): Adjust to get the register cache size
8214 from the context regcache's description.
8215 (traceframe_walk_blocks): Adjust to get the register cache size
8216 from the current trace frame's description.
8217 (traceframe_get_pc): Adjust to get current trace frame's
8218 description and pass it down.
8219 (gdb_collect): Adjust to get the register cache size from the
8220 IPA's description.
8221 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8222 (gdbserver_xmltarget): Delete.
8223 (initialize_low_tracepoint): Set the ipa's target description.
8224 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8225 (initialize_low_tracepoint): Set the ipa's target description.
8226 * linux-x86-low.c: Include tdesc.h.
8227 [__x86_64__] (is_64bit_tdesc): New.
8228 (ps_get_thread_area, x86_get_thread_area): Use it.
8229 (i386_cannot_store_register): Rename to ...
8230 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8231 (i386_cannot_fetch_register): Rename to ...
8232 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8233 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8234 to new interface.
8235 (target_regsets): Rename to ...
8236 (x86_regsets): ... this.
8237 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8238 interface.
8239 (x86_siginfo_fixup): Use is_64bit_tdesc.
8240 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8241 (tdesc_x32_avx_linux, tdesc_x32_linux)
8242 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8243 Declare.
8244 (x86_linux_update_xmltarget): Delete.
8245 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8246 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8247 (AMD64_LINUX_USER64_CS): New.
8248 (x86_linux_read_description): New, based on
8249 x86_linux_update_xmltarget.
8250 (same_process_callback): New.
8251 (x86_arch_setup_process_callback): New.
8252 (x86_linux_update_xmltarget): New.
8253 (x86_regsets_info): New.
8254 (amd64_linux_regs_info): New.
8255 (i386_linux_usrregs_info): New.
8256 (i386_linux_regs_info): New.
8257 (x86_linux_regs_info): New.
8258 (x86_arch_setup): Reimplement.
8259 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8260 (x86_emit_ops): Ditto.
8261 (the_low_target): Adjust. Install x86_linux_regs_info,
8262 x86_cannot_fetch_register, and x86_cannot_store_register.
8263 (initialize_low_arch): New.
8264 * linux-ia64-low.c (tdesc_ia64): Declare.
8265 (ia64_fetch_register): Adjust.
8266 (ia64_usrregs_info, regs_info): New globals.
8267 (ia64_regs_info): New function.
8268 (the_low_target): Adjust.
8269 (initialize_low_arch): New function.
8270 * linux-sparc-low.c (tdesc_sparc64): Declare.
8271 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8272 Adjust.
8273 (sparc_arch_setup): New function.
8274 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8275 (the_low_target): Adjust.
8276 (initialize_low_arch): New function.
8277 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8278 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8279 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8280 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8281 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8282 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8283 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8284 (tdesc_powerpc_isa205_vsx64l): Declare.
8285 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8286 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8287 (ppc_set_pc, ppc_get_hwcap): Adjust.
8288 (ppc_usrregs_info): Forward declare.
8289 (!__powerpc64__) ppc_regmap_adjusted: New global.
8290 (ppc_arch_setup): Adjust to the current process'es target
8291 description.
8292 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8293 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8294 (ppc_store_evrregset): Adjust.
8295 (target_regsets): Rename to ...
8296 (ppc_regsets): ... this, and make static.
8297 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8298 (ppc_regs_info): New function.
8299 (the_low_target): Adjust.
8300 (initialize_low_arch): New function.
8301 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8302 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8303 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8304 (tdesc_s390x_linux64v2): Declare.
8305 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8306 (s390_fill_gregset, s390_store_last_break): Adjust.
8307 (target_regsets): Rename to ...
8308 (s390_regsets): ... this, and make static.
8309 (s390_get_pc, s390_set_pc): Adjust.
8310 (s390_get_hwcap): New target_desc parameter, and use it.
8311 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8312 (s390_arch_setup): Adjust to set the current process'es target
8313 description. Don't adjust the regmap.
8314 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8315 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8316 (regs_info_3264): New globals.
8317 (s390_regs_info): New function.
8318 (the_low_target): Adjust.
8319 (initialize_low_arch): New function.
8320 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8321 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8322 [__mips64] (init_registers_mips_linux)
8323 (init_registers_mips_dsp_linux): Delete defines.
8324 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8325 (have_dsp): New global.
8326 (mips_read_description): New, based on mips_arch_setup.
8327 (mips_arch_setup): Reimplement.
8328 (get_usrregs_info): New function.
8329 (mips_cannot_fetch_register, mips_cannot_store_register)
8330 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8331 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8332 (target_regsets): Rename to ...
8333 (mips_regsets): ... this, and make static.
8334 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8335 (dsp_regs_info, regs_info): New globals.
8336 (mips_regs_info): New function.
8337 (the_low_target): Adjust.
8338 (initialize_low_arch): New function.
8339 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8340 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8341 Declare.
8342 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8343 (arm_read_description): New, with bits factored from
8344 arm_arch_setup.
8345 (arm_arch_setup): Reimplement.
8346 (target_regsets): Rename to ...
8347 (arm_regsets): ... this, and make static.
8348 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8349 (arm_regs_info): New function.
8350 (the_low_target): Adjust.
8351 (initialize_low_arch): New function.
8352 * linux-m68k-low.c (tdesc_m68k): Declare.
8353 (target_regsets): Rename to ...
8354 (m68k_regsets): ... this, and make static.
8355 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8356 (m68k_regs_info): New function.
8357 (m68k_arch_setup): New function.
8358 (the_low_target): Adjust.
8359 (initialize_low_arch): New function.
8360 * linux-sh-low.c (tdesc_sharch): Declare.
8361 (target_regsets): Rename to ...
8362 (sh_regsets): ... this, and make static.
8363 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8364 (sh_regs_info, sh_arch_setup): New functions.
8365 (the_low_target): Adjust.
8366 (initialize_low_arch): New function.
8367 * linux-bfin-low.c (tdesc_bfin): Declare.
8368 (bfin_arch_setup): New function.
8369 (bfin_usrregs_info, regs_info): New globals.
8370 (bfin_regs_info): New function.
8371 (the_low_target): Adjust.
8372 (initialize_low_arch): New function.
8373 * linux-cris-low.c (tdesc_cris): Declare.
8374 (cris_arch_setup): New function.
8375 (cris_usrregs_info, regs_info): New globals.
8376 (cris_regs_info): New function.
8377 (the_low_target): Adjust.
8378 (initialize_low_arch): New function.
8379 * linux-cris-low.c (tdesc_crisv32): Declare.
8380 (cris_arch_setup): New function.
8381 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8382 (cris_regs_info): New function.
8383 (the_low_target): Adjust.
8384 (initialize_low_arch): New function.
8385 * linux-m32r-low.c (tdesc_m32r): Declare.
8386 (m32r_arch_setup): New function.
8387 (m32r_usrregs_info, regs_info): New globals.
8388 (m32r_regs_info): Adjust.
8389 (initialize_low_arch): New function.
8390 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8391 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8392 (tic6x_usrregs_info): Forward declare.
8393 (tic6x_read_description): New function, based on ...
8394 (tic6x_arch_setup): ... this. Reimplement.
8395 (target_regsets): Rename to ...
8396 (tic6x_regsets): ... this, and make static.
8397 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8398 (tic6x_regs_info): New function.
8399 (the_low_target): Adjust.
8400 (initialize_low_arch): New function.
8401 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8402 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8403 (target_regsets): Rename to ...
8404 (xtensa_regsets): ... this, and make static.
8405 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8406 globals.
8407 (xtensa_arch_setup, xtensa_regs_info): New functions.
8408 (the_low_target): Adjust.
8409 (initialize_low_arch): New function.
8410 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8411 (nios2_arch_setup): Set the current process'es tdesc.
8412 (target_regsets): Rename to ...
8413 (nios2_regsets): ... this.
8414 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8415 (nios2_regs_info): New function.
8416 (the_low_target): Adjust.
8417 (initialize_low_arch): New function.
a261b8f5
PA
8418 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8419 (aarch64_arch_setup): Set the current process'es tdesc.
8420 (target_regsets): Rename to ...
8421 (aarch64_regsets): ... this.
8422 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8423 (aarch64_regs_info): New function.
8424 (the_low_target): Adjust.
8425 (initialize_low_arch): New function.
3aee8918
PA
8426 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8427 globals.
8428 (target_regsets): Rename to ...
8429 (tile_regsets): ... this.
8430 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8431 (tile_regs_info): New function.
8432 (tile_arch_setup): Set the current process'es tdesc.
8433 (the_low_target): Adjust.
8434 (initialize_low_arch): New function.
8435 * spu-low.c (tdesc_spu): Declare.
8436 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8437 * win32-arm-low.c (tdesc_arm): Declare.
8438 (arm_arch_setup): New function.
8439 (the_low_target): Install arm_arch_setup instead of
8440 init_registers_arm.
8441 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8442 (init_windows_x86): Rename to ...
8443 (i386_arch_setup): ... this. Set `win32_tdesc'.
8444 (the_low_target): Adjust.
8445 * win32-low.c (win32_tdesc): New global.
8446 (child_add_thread): Don't create the thread cache here.
8447 (do_initial_child_stuff): Set the new process'es tdesc.
8448 * win32-low.h (struct target_desc): Forward declare.
8449 (win32_tdesc): Declare.
8450 * lynx-i386-low.c (tdesc_i386): Declare global.
8451 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8452 * lynx-low.c (lynx_tdesc): New global.
8453 (lynx_add_process): Set the new process'es tdesc.
8454 * lynx-low.h (struct target_desc): Forward declare.
8455 (lynx_tdesc): Declare global.
8456 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8457 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8458 * nto-low.c (nto_tdesc): New global.
8459 (do_attach): Set the new process'es tdesc.
8460 * nto-low.h (struct target_desc): Forward declare.
8461 (nto_tdesc): Declare.
8462 * nto-x86-low.c (tdesc_i386): Declare.
8463 (nto_x86_arch_setup): Set `nto_tdesc'.
8464
b1fbec62
GB
84652013-06-04 Gary Benson <gbenson@redhat.com>
8466
8467 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8468 to qSupported response when appropriate.
8469 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8470 with nonzero-length annex.
8471 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8472 arguments supplied in annex.
8473
d1ec4ce7
DE
84742013-05-31 Doug Evans <dje@google.com>
8475
ac44adcb 8476 PR server/15594
d1ec4ce7
DE
8477 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8478 64 bits in 64-cross-32 environment.
8479
9b25f2d3
PA
84802013-05-28 Pedro Alves <palves@redhat.com>
8481
8482 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8483 (aarch64-without-fpu.c): Delete rule.
8484 * configure.srv (aarch64*-*-linux*): Remove references to
8485 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8486 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8487 declaration.
8488
6740dc9c
PA
84892013-05-24 Pedro Alves <palves@redhat.com>
8490
8491 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8492 instead of strchr/decode_address. Error if the range isn't split
8493 with a ','. Don't assume there's be a ':' in the action.
8494
c2d6af84
PA
84952013-05-23 Yao Qi <yao@codesourcery.com>
8496 Pedro Alves <palves@redhat.com>
8497
8498 * linux-low.c (lwp_in_step_range): New function.
8499 (linux_wait_1): If the thread was range stepping and stopped
8500 outside the stepping range, report the stop to GDB. Otherwise,
8501 continue stepping. Add range stepping debug output.
8502 (linux_set_resume_request): Copy the step range from the resume
8503 request to the lwp.
8504 (linux_supports_range_stepping): New.
8505 (linux_target_ops) <supports_range_stepping>: Set to
8506 linux_supports_range_stepping.
8507 * linux-low.h (struct linux_target_ops)
8508 <supports_range_stepping>: New field.
8509 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8510 * linux-x86-low.c (x86_supports_range_stepping): New.
8511 (the_low_target) <supports_range_stepping>: Set to
8512 x86_supports_range_stepping.
8513 * server.c (handle_v_cont): Handle 'r' action.
8514 (handle_v_requests): Append ";r" if the target supports range
8515 stepping.
8516 * target.h (struct thread_resume) <step_range_start,
8517 step_range_end>: New fields.
8518 (struct target_ops) <supports_range_stepping>:
8519 New field.
8520 (target_supports_range_stepping): New macro.
8521
58794e1a
JB
85222013-05-17 Joel Brobecker <brobecker@adacore.com>
8523
8524 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8525 confusion in comment.
8526
d631c5a7
JB
85272013-05-17 Joel Brobecker <brobecker@adacore.com>
8528
8529 * lynx-low.c (struct process_info_private): New type.
8530 (lynx_add_process): New function.
8531 (lynx_create_inferior, lynx_attach): Replace calls to
8532 add_process by calls to lynx_add_process.
8533 (lynx_resume): If PTID is null, then try using
8534 current_process()->private->last_wait_event_ptid.
8535 Add comments.
8536 (lynx_clear_inferiors): Delete. The contents of that function
8537 has been inlined in lynx_mourn;
8538 (lynx_wait_1): Save the ptid in the process's private data.
8539 (lynx_mourn): Free the process' private data. Replace call
8540 to lynx_clear_inferiors by call to clear_inferiors.
8541
96f7a20f
YQ
85422013-05-17 Yao Qi <yao@codesourcery.com>
8543
8544 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8545 the right place.
8546
db0dfaa0
LM
85472013-05-16 Luis Machado <lgustavo@codesourcery.com>
8548
8549 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8550 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8551 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8552 PT_TEXT_END_ADDR guards. Update comments.
8553 (linux_target_op) <read_offsets>: Conditionally define to
8554 linux_read_offsets if the target is UCLIBC and if it defines
8555 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8556
68f5f838
SL
85572013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8558 Andrew Jenner <andrew@codesourcery.com>
8559
8560 * Makefile.in (SFILES): Add linux-nios2-low.c.
8561 (clean): Add action to delete nios2-linux.c.
8562 (nios2-linux.c): New rule.
8563 * configure.srv: Add nios2*-*-linux*.
8564 * linux-nios2-low.c: New.
8565
1ebff1fd
HAQ
85662013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8567
8568 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8569
f6150862
HZ
85702013-04-25 Hui Zhu <hui@codesourcery.com>
8571
8572 PR gdb/15186
f6150862
HZ
8573 * ax.c (ax_printf): Add fflush.
8574
614c279d
TT
85752013-04-22 Tom Tromey <tromey@redhat.com>
8576
8577 * Makefile.in (SFILES): Add filestuff.c.
8578 (OBS): Add filestuff.o.
8579 (filestuff.o): New target.
8580 * config.in, configure: Rebuild.
8581 * configure.ac: Check for fdwalk, pipe2.
8582
7d4e5717
PA
85832013-04-17 Pedro Alves <palves@redhat.com>
8584
8585 * configure.ac (USE_THREAD_DB): Delete variable.
8586 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8587 Don't AC_SUBST USE_THREAD_DB.
8588 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8589 * config.in, configure: Regenerate.
8590
d5c93e41
PA
85912013-04-16 Pedro Alves <palves@redhat.com>
8592
8593 * linux-low.h (struct lwp_info) <thread_known>: Move under
8594 the USE_THREAD_DB #ifdef.
8595
04f5fe89
PA
85962013-04-16 Pedro Alves <palves@redhat.com>
8597
8598 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8599 (linux-low.o): Delete rule.
8600 * linux-low.h: Always include "gdb_thread_db.h" instead of
8601 conditionally including thread_db.h.
8602 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8603 HAVE_THREAD_DB_H.
8604
480b27bf
JK
86052013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8606
8607 * Makefile.in (install-only): Fix make install regression.
8608
43662968
JK
86092013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8610
8611 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8612 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8613 installation.
8614 * gdbserver.1: Remove.
8615
3e74e146
PA
86162013-03-22 Pedro Alves <palves@redhat.com>
8617
8618 * linux-low.c (handle_extended_wait): Don't call
8619 linux_enable_event_reporting.
8620
a8347a2a
TT
86212013-03-15 Tony Theodore <tonyt@logyst.com>
8622
8623 PR build/9098:
8624 * Makefile.in (SHELL): Use @SHELL@.
8625
eeb56fa7
SDJ
86262013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8627
8628 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8629 compiler warning.
8630
4fa7e2ff
JB
86312013-03-13 Joel Brobecker <brobecker@adacore.com>
8632
8633 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8634 Remove extraneous NULL element.
8635
8ddb1965
YQ
86362013-03-13 Yao Qi <yao@codesourcery.com>
8637
8638 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8639 'V' block in trace frame.
8640
9accd112
MM
86412013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8642
8643 * target.h (struct target_ops): Add btrace ops.
8644 (target_supports_btrace): New macro.
8645 (target_enable_btrace): New macro.
8646 (target_disable_btrace): New macro.
8647 (target_read_btrace): New macro.
8648 * gdbthread.h (struct thread_info): Add btrace field.
8649 * server.c: Include btrace-common.h.
8650 (handle_btrace_general_set): New function.
8651 (handle_btrace_enable): New function.
8652 (handle_btrace_disable): New function.
8653 (handle_general_set): Call handle_btrace_general_set.
8654 (handle_qxfer_btrace): New function.
8655 (struct qxfer qxfer_packets[]): Add btrace entry.
8656 * inferiors.c (remove_thread): Disable btrace.
8657 * linux-low: Include linux-btrace.h.
8658 (linux_low_enable_btrace): New function.
8659 (linux_low_read_btrace): New function.
8660 (linux_target_ops): Add btrace ops.
8661 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8662 Add srv_linux_btrace=yes.
8663 (x86_64-*-linux*): Add linux-btrace.o.
8664 Add srv_linux_btrace=yes.
8665 * configure.ac: Define HAVE_LINUX_BTRACE.
8666 * config.in: Regenerated.
8667 * configure: Regenerated.
8668
5cc22e4c
MM
86692013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8670
8671 * server.c (handle_qxfer): Preserve error message if -3 is
8672 returned.
8673 (qxfer): Document the -3 return value.
8674
7c97f91e
MM
86752013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8676
8677 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8678 (linux_btrace_h): New variable.
8679 (linux-btrace.o): New rule.
8680
be9a119c 86812013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8682 Hafiz Abid Qadeer <abidh@codesourcery.com>
8683
8684 * tracepoint.c (trace_buffer_size): New global.
8685 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8686 (init_trace_buffer): Change to one-argument function. Allocate
8687 trace buffer memory.
8688 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8689 handle QTBuffer:size packet.
8690 (cmd_bigqtbuffer_size): New function.
8691 (initialize_tracepoint): Call init_trace_buffer with
8692 DEFAULT_TRACE_BUFFER_SIZE.
8693 * server.c (handle_query): Add QTBuffer:size in the
8694 supported packets.
8695
e64f7499
YQ
86962013-03-07 Yao Qi <yao@codesourcery.com>
8697
8698 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8699 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8700 of -1.
8701 (cmd_qtsp): Adjust condition. Do post increment.
8702 Set cur_action and cur_step_action back to 0.
8703
f0ae6fc3
PA
87042013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8705
8706 PR server/15236
8707 * linux-low.c (linux_write_memory): Return early success if LEN is
8708 zero.
8709
b5b0b0af
CV
87102013-03-05 Corinna Vinschen <vinschen@redhat.de>
8711
334ad4a8 8712 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8713
589bc927
TT
87142013-02-28 Tom Tromey <tromey@redhat.com>
8715
8716 * configure.ac: Invoke AC_SYS_LARGEFILE.
8717 * configure, config.in: Rebuild.
8718
dfe07582
CV
87192013-02-28 Corinna Vinschen <vinschen@redhat.com>
8720
8721 * win32-low.c: Throughout, fix format strings and casts of
8722 printf-like functions to avoid type related warnings on all
8723 platforms.
8724 (get_child_debug_event): Print dwDebugEventCode as hex since
8725 that's how it's usually documented.
8726
736cd585
YQ
87272013-02-28 Yao Qi <yao@codesourcery.com>
8728
8729 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8730 pulongest.
8731
e1f58301
JW
87322013-02-27 Jiong Wang <jiwang@tilera.com>
8733
8734 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8735 (reg-tilegx32.c): New rule.
8736 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8737 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8738 different register info initializer according to elf class.
8739 (init_registers_tilgx32): New function. The tilegx32 register info
8740 initializer.
8741 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8742 (tile_store_gregset): Likewise.
8743
d171ca78
YQ
87442013-02-27 Yao Qi <yao@codesourcery.com>
8745
8746 * server.c (process_point_options): Print debug message when
8747 debug_threads is true.
8748
282bbdf3
YQ
87492013-02-26 Yao Qi <yao@codesourcery.com>
8750
8751 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8752
aca22551
PA
87532013-02-19 Pedro Alves <palves@redhat.com>
8754 Kai Tietz <ktietz@redhat.com>
8755
8756 PR gdb/15161
8757
8758 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8759 instead of strtoul to extract address from packet.
8760 (process_serial_event) <'z'>: Likewise.
8761
4f3cee1c
YQ
87622013-02-18 Yao Qi <yao@codesourcery.com>
8763
8764 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8765
8e1d55a3
PA
87662013-02-14 Pedro Alves <palves@redhat.com>
8767
8768 Plug memory leak.
8769
8770 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8771 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8772
458820da
PA
87732013-02-14 Pedro Alves <palves@redhat.com>
8774
8775 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8776
baea0dae
PA
87772013-02-14 Pedro Alves <palves@redhat.com>
8778
8779 * tracepoint.c (save_string): Delete.
8780 (add_tracepoint_action): Use savestring instead of save_string.
8781
0b1afbb3
PA
87822013-02-12 Pedro Alves <palves@redhat.com>
8783
8784 * linux-xtensa-low.c: Ditto.
8785 * xtensa-xtregs.c: Ditto.
8786
8a4ac37e
PA
87872013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8788
8789 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8790 thread_db.
8791
148de6bb
MS
87922013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8793
8794 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8795 aarch64_num_wp_regs and aarch64_num_bp_regs to
8796 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8797
55fac6e0
MS
87982013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8799
8800 * linux-aarch64-low.c (ps_get_thread_area): Replace
8801 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8802
176eb98c
MS
88032013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8804 Marcus Shawcroft <marcus.shawcroft@arm.com>
8805 Nigel Stephens <nigel.stephens@arm.com>
8806 Yufeng Zhang <yufeng.zhang@arm.com>
8807
8808 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8809 (aarch64.c, aarch64-without-fpu.c): New targets.
8810 * configure.srv (aarch64*-*-linux*): New.
8811 * linux-aarch64-low.c: New file.
8812
56f7af9c
MS
88132013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8814
43aaf8b6 8815 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8816 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8817 (dequeue_one_deferred_signal, linux_resume_one_thread)
8818 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8819 (linux_tracefork_grandchild, linux_test_for_tracefork)
8820 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8821 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8822 where the argument is 0.
8823
60f662b0
YQ
88242013-01-25 Yao Qi <yao@codesourcery.com>
8825
8826 * event-loop.c: Include "queue.h".
8827 (gdb_event_p): New typedef.
8828 (struct gdb_event) <next_event>: Remove.
8829 (event_queue): Change to QUEUE(gdb_event_p).
8830 (async_queue_event): Remove.
8831 (gdb_event_xfree): New.
8832 (initialize_event_loop): New.
8833 (process_event): Use API from QUEUE.
8834 (wait_for_event): Likewise.
8835 * server.c (main): Call initialize_event_loop.
8836 * server.h (initialize_event_loop): Declare.
8837
5ae4861a
YQ
88382013-01-18 Yao Qi <yao@codesourcery.com>
8839
8840 * ax.h (struct eval_agent_expr_context): New.
8841 (gdb_eval_agent_expr): Update declaration.
8842 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8843 TFRAME. Add new argument CTX.
8844 * server.h (struct eval_agent_expr_context): Declare.
8845 (agent_mem_read, agent_tsv_read): Update declaration.
8846 (agent_mem_read_string): Likewise.
8847 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8848 (add_traceframe_block): Add new argument TPOINT.
8849 Increase TPOINT->traceframe_usage.
8850 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8851 eval_tracepoint_agent_expr.
8852 (condition_true_at_tracepoint): Likewise.
8853 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8854 (agent_mem_read_string, agent_tsv_read): Likewise.
8855
85e00e85
YQ
88562013-01-16 Yao Qi <yao@codesourcery.com>
8857
8858 * linux-low.c (linux_resume_one_lwp): Don't check
8859 'lwp->bp_reinsert != 0'.
8860
4039cf45
JB
88612013-01-07 Joel Brobecker <brobecker@adacore.com>
8862 Pedro Alves <palves@redhat.com>
8863
8864 * lynx-low.c (ptrace_request_to_str): Define a temporary
8865 macro and use it to simplify this function's implementation.
8866
9044dee2
JB
88672013-01-07 Joel Brobecker <brobecker@adacore.com>
8868
8869 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8870 sets errno.
8871
e6352c8f
JB
88722013-01-07 Joel Brobecker <brobecker@adacore.com>
8873
8874 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8875
50681a27
JB
88762013-01-07 Joel Brobecker <brobecker@adacore.com>
8877
8878 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8879
3f6e77ef
JB
88802013-01-07 Joel Brobecker <brobecker@adacore.com>
8881
8882 * lynx-low.c (lynx_resume): Use the resume_info parameter
8883 to determine the ptid for the lynx_ptrace call, unless
8884 it is equal to minus_one_ptid, in which case we use the
8885 ptid of the current_inferior.
8886 (lynx_wait_1): After having received a thread create/exit
8887 event, resume the inferior's execution using the signaling
8888 thread's ptid, rather than the old ptid.
8889
7fda33ae
JB
88902013-01-07 Joel Brobecker <brobecker@adacore.com>
8891
8892 * lynx-low.c (lynx_resume): Delete variable ret.
8893
b9786c74
JB
88942013-01-01 Joel Brobecker <brobecker@adacore.com>
8895
8896 * gdbreplay.c (gdbreplay_version): Update copyright year.
8897 * server.c (gdbserver_version): Likewise.
8898
8b93d60f
JB
88992012-12-17 Joel Brobecker <brobecker@adacore.com>
8900
8901 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8902 new thread.
8903
037335a7
JB
89042012-12-17 Joel Brobecker <brobecker@adacore.com>
8905
8906 * lynx-low.c (ptrace_request_to_str): Add handling for
8907 PTRACE_GETTRACESIG.
8908
52d4cbd8
JB
89092012-12-17 Joel Brobecker <brobecker@adacore.com>
8910
8911 * lynx-low.c (lynx_attach): Delete variable new_process.
8912
ab8f6ca9
JB
89132012-12-17 Joel Brobecker <brobecker@adacore.com>
8914
8915 * lynx-low.c (lynx_create_inferior): Delete variable
8916 new_process.
8917
78cbc024
JB
89182012-12-17 Joel Brobecker <brobecker@adacore.com>
8919
8920 * lynx-low.c (ptrace_request_to_str): Do not handle
8921 PTRACE_GETTHREADLIST if this macro does not exist.
8922
14a00470
YQ
89232012-12-15 Yao Qi <yao@codesourcery.com>
8924
8925 * Makefile.in (OBS): Add notif.o.
8926 * notif.c, notif.h: New.
8927 * server.c: Include "notif.h".
8928 (struct vstop_notif) <next>: Remove.
8929 <base>: New field.
8930 (queue_stop_reply): Update.
8931 (push_event, send_next_stop_reply): Remove.
8932 (discard_queued_stop_replies): Update.
8933 (notif_stop): New variable.
8934 (handle_v_stopped): Remove.
8935 (handle_v_requests): Don't call handle_v_stopped. Call
8936 handle_ack_notif instead.
8937 (queue_stop_reply_callback): Call notif_event_enque instead
8938 of queue_stop_reply.
8939 (handle_status): Don't call send_next_stop_reply, call
8940 notif_write_event instead.
8941 (kill_inferior_callback): Likewise.
8942 (detach_or_kill_inferior_callback): Likewise.
8943 (main): Call initialize_notif.
8944 (process_serial_event): Call QUEUE_is_empty.
8945 (handle_target_event): Call notif_push instead of push event.
8946 * server.h (push_event): Remove declaration.
8947
61c125b9
TT
89482012-12-10 Tom Tromey <tromey@redhat.com>
8949
8950 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8951 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8952 macros.
8953 (.c.o): Rewrite.
8954 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8955 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8956 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8957 (amd64-linux-ipa.o, ax.o): Rewrite.
8958 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8959 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8960 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8961 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8962 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8963 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8964 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8965 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8966 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8967 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8968 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8969 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8970 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8971 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8972 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8973 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8974 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8975 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8976 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8977 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8978 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8979 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8980 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8981 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8982 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8983 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8984 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8985 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8986 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8987 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8988 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8989 (reg-tilegx.o): Remove.
8990 (all_object_files): New macro.
8991 Include .deps files.
8992 * aclocal.m4, configure: Rebuild.
8993 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8994 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8995 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8996
e90e9ad9
TT
89972012-12-05 Tom Tromey <tromey@redhat.com>
8998
8999 PR gdb/14917:
9000 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9001
02d403bf 90022012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9003
9004 * configure.ac: Check for linux/perf_event.h.
9005 * config.in: Regenerated.
9006 * configure: Regenerated.
9007
0270a750
PA
90082012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9009
9010 * hostio.c (handle_readlink): Decrease buffer size
9011 parameter passed to readlink by one byte.
9012
8c29b58e
YQ
90132012-11-26 Yao Qi <yao@codesourcery.com>
9014
9015 * configure.ac (build_warnings): Append '-Wempty-body'.
9016 * configure: Regenerated.
9017 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9018 body.
9019
8bdce1ff
PM
90202012-11-15 Pierre Muller <muller@sourceware.org>
9021
9022 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9023 * config.in: Regenerate.
9024 * configure: Regenerate.
9025 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9026 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9027 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9028 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9029 header.
9030 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9031 instead of <sys/wait.h> header.
9032 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9033
02d403bf 90342012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9035
9036 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9037 (various make rules): Remove -DGDBSERVER
9038
fbd5db48
YQ
90392012-11-09 Yao Qi <yao@codesourcery.com>
9040
9041 * spu-low.c (current_ptid): Move it to ..
9042 * gdbthread.h: ... here. New.
9043 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9044 * server.c (myresume, process_serial_event): Likewise.
9045 * thread-db.c (thread_db_find_new_threads): Likewise.
9046 * tracepoint.c (run_inferior_command): Likewise.
9047
b3dc46ff
AB
90482012-10-01 Andrew Burgess <aburgess@broadcom.com>
9049
9050 * server.c (handle_search_memory_1): Include access length in
9051 warning message.
9052
07c04788
HPN
90532012-09-05 Michael Brandt <michael.brandt@axis.com>
9054
9055 * linux-crisv32-low.c: Fix compile errors.
9056
918d227b
YQ
90572012-09-04 Yao Qi <yao@codesourcery.com>
9058
9059 * tracepoint.c (cmd_qtsv): Adjust debug message.
9060 Don't check CUR_TPOINT.
9061
18c1b81a
YQ
90622012-08-28 Yao Qi <yao@codesourcery.com>
9063
9064 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9065 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9066 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9067 Remove declarations of xmalloc, xreallloc, xstrdup and
9068 freeargv.
9069 * Makefile.in (libiberty_h): New.
9070 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9071 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9072
dc82f37b
YQ
90732012-08-23 Yao Qi <yao@codesourcery.com>
9074
9075 * server.h: Remove declaration of 'xsnprintf'.
9076
406b1477
KS
90772012-08-22 Keith Seitz <keiths@redhat.com>
9078
9079 * server.h: Include build-gnulib-gbserver/config.h.
9080 * gdbreplay.c: Likewise.
9081
e6712ff1
DE
90822012-08-08 Doug Evans <dje@google.com>
9083
9084 * Makefile.in (SFILES): Add gdb_vecs.c.
9085 (OBS): Add gdb_vecs.o.
9086 (gdb_vecs_h, host_defs_h): New variables.
9087 (thread-db.o): Add $(gdb_vecs_h) dependency.
9088 (gdb_vecs.o): New rule.
9089 * thread-db.c: #include "gdb_vecs.h".
9090 (thread_db_load_search): Use a vector to iterate over path elements.
9091 Handle text appearing after "$pdir".
9092
9093 * configure.ac: Add check for strstr.
9094 * config.in: Regenerate.
9095 * configure: Regenerate.
9096
7c3270ae
UW
90972012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9098
9099 * hostio.c (handle_pread): If pread fails, fall back to attempting
9100 lseek/read.
9101 (handle_pwrite): Likewise for pwrite.
9102
b62e2b27
UW
91032012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9104
9105 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9106 between unsupported TYPE and unimplementable ADDR/LEN combination.
9107 (arm_insert_point): Act on new return value.
9108
78a99e91
PA
91092012-07-31 Pedro Alves <palves@redhat.com>
9110
9111 * server.c (process_point_options): Only skip tokens if we find
9112 one that is unrecognized. Don't treat 'X' specially while
9113 skipping unrecognized tokens.
9114
fcf303ab
UW
91152012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9116
9117 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9118 to 4-byte-align HW breakpoint addresses for Thumb.
9119
7255706c
YQ
91202012-07-27 Yao Qi <yao@codesourcery.com>
9121
9122 PR remote/14161.
9123
9124 * server.h: Declare gdb_agent_about_to_close.
9125 * target.c (kill_inferior): Include "agent.h".
9126 New. Send command 'kill'.
9127 * target.h (kill_inferior): Removed macro.
9128 * tracepoint.c (gdb_agent_about_to_close): New.
9129 (gdb_agent_helper_thread): Handle command 'close'.
9130 Wait endlessly until the inferior stops.
9131 Install gdb_agent_remove_socket to atexit hook.
9132 (agent_socket_name): New static variable.
9133 (gdb_agent_socket_init): Replace local variable 'name' with
9134 'agent_socket_name'.
9135 (gdb_agent_remove_socket): New.
9136
5a3f286f
YQ
91372012-07-27 Yao Qi <yao@codesourcery.com>
9138
9139 * server.c (process_point_options): Stop at 'X' when parsing.
9140
961bd387
ME
91412012-07-19 Michael Eager <eager@eagercon.com>
9142
a261b8f5 9143 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9144 to hw_execute.
9145 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9146 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9147 hardware breakpoint.
9148
aa7c7447
JK
91492012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9150
9151 * gdbserver/linux-low.c (initialize_low): Call
9152 linux_ptrace_init_warnings.
9153
7f216e7c
DE
91542012-07-02 Doug Evans <dje@google.com>
9155
9156 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9157 pointer to int.
9158
d3ce09f5
SS
91592012-07-02 Stan Shebs <stan@codesourcery.com>
9160
9161 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9162 (ax.o): Add it to build rule.
9163 (ax-ipa.o): Ditto.
9164 (OBS): Add format.o.
9165 (IPA_OBS): Add format.o.
9166 * server.c (handle_query): Claim support for breakpoint commands.
9167 (process_point_options): Add command case.
9168 (process_serial_event): Leave running if there are printfs in
9169 effect.
9170 * mem-break.h (any_persistent_commands): Declare.
9171 (add_breakpoint_commands): Declare.
9172 (gdb_no_commands_at_breakpoint): Declare.
9173 (run_breakpoint_commands): Declare.
9174 * mem-break.c (struct point_command_list): New struct.
9175 (struct breakpoint): New field command_list.
9176 (any_persistent_commands): New function.
9177 (add_commands_to_breakpoint): New function.
9178 (add_breakpoint_commands): New function.
9179 (gdb_no_commands_at_breakpoint): New function.
9180 (run_breakpoint_commands): New function.
9181 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9182 locally.
9183 * ax.c: Include format.h.
9184 (ax_printf): New function.
9185 (gdb_eval_agent_expr): Add printf opcode.
9186
2f8f6aed
YQ
91872012-06-13 Yao Qi <yao@codesourcery.com>
9188
9189 * server.c (start_inferior): Remove duplicated writes to fields
9190 'last_resume_kind' and 'last_status' of 'current_inferior'.
9191
0c9070b3
YQ
91922012-06-12 Yao Qi <yao@codesourcery.com>
9193 Pedro Alves <palves@redhat.com>
9194
9195 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9196 comment.
9197 * server.c (handle_v_cont): Extend comment.
9198
c52daf70
YQ
91992012-06-11 Yao Qi <yao@codesourcery.com>
9200
9201 * linux-low.c (linux_attach): Add 'static'.
9202
d38bbb0a
YQ
92032012-06-06 Yao Qi <yao@codesourcery.com>
9204
9205 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9206
89dc0afd
JK
92072012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9208
9209 Fix gcc -flto compilation warning.
9210 * server.c (main): Make variable multi_mode and attach volatile.
9211
75f62ce7
TJB
92122012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9213
9214 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9215 if the platform doesn't know about it.
9216
65f479b6
PA
92172012-05-30 Jeff Kenton <jkenton@tilera.com>
9218
9219 * Makefile.in (SFILES): Add linux-tile-low.c.
9220 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9221 * configure.srv: Handle tilegx-*-linux*.
9222 * linux-tile-low.c: New file.
9223
0c5bf5a9
JK
92242012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9225
9226 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9227
a493e3e2
PA
92282012-05-24 Pedro Alves <palves@redhat.com>
9229
9230 PR gdb/7205
9231
43aaf8b6 9232 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9233
2ea28649
PA
92342012-05-24 Pedro Alves <palves@redhat.com>
9235
9236 PR gdb/7205
9237
9238 Replace target_signal with gdb_signal throughout.
9239
8d409d16
MR
92402012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9241
9242 * linux-low.c (linux_store_registers): Avoid the copying sequence
9243 when no data has been retrieved by ptrace.
9244
23512c01
MGD
92452012-05-22 Will Deacon <will.deacon@arm.com>
9246
9247 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9248 Include asm/ptrace.h.
9249 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9250 already defined.
9251
4934b29e
MR
92522012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9253
9254 * linux-low.c (linux_store_registers): Don't re-retrieve data
9255 with ptrace that has already been obtained from /proc. Always
9256 copy any data retrieved with ptrace to the buffer supplied.
9257
bde24c0a
PA
92582012-05-11 Yao Qi <yao@codesourcery.com>
9259 Pedro Alves <palves@redhat.com>
9260
9261 * linux-low.c (enum stopping_threads_kind): New.
9262 (stopping_threads): Change type to `enum stopping_threads_kind'.
9263 (handle_extended_wait): If stopping and suspending threads, leave
9264 the new_lwp suspended too.
9265 (linux_wait_for_event): Adjust.
9266 (stop_all_lwps): Set `stopping_threads' to
9267 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9268 whether we're suspending threads or just stopping them. Assert no
9269 recursion happens.
9270
623b6bdf
YQ
92712012-04-29 Yao Qi <yao@codesourcery.com>
9272
9273 * server.h: Move some code to ...
9274 * gdbthread.h: ... here. New.
9275 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9276 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9277 (nto-low.o, win32-low.o): Likewise.
9278 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9279 * regcache.c, remote-utils.c, server.c: Likewise.
9280 * target.c, tracepoint.c, win32-low.c: Likewise.
9281
f15f9948
TJB
92822012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9283
9284 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9285 (PTRACE_ARG4_TYPE): Likewise.
9286 (PTRACE_XFER_TYPE): Likewise.
9287 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9288 ptrace to PTRACE_ARG3_TYPE.
9289 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9290 (PTRACE_ARG4_TYPE): Likewise.
9291 (PTRACE_XFER_TYPE): Likewise.
9292 (linux_detach_one_lwp): Cast fourth argument of
9293 ptrace to long then PTRACE_ARG4_TYPE.
9294 (regsets_fetch_inferior_registers): Cast third argument of
9295 ptrace to long then PTRACE_ARG3_TYPE.
9296 (regsets_store_inferior_registers): Likewise.
9297
38ea300a
PA
92982012-04-20 Pedro Alves <palves@redhat.com>
9299
9300 * configure: Regenerate.
9301
c971b7fa
PA
93022012-04-19 Pedro Alves <palves@redhat.com>
9303
43aaf8b6 9304 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9305 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9306 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9307 (all, install-only, uninstall, clean-info, all-lib, clean): No
9308 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9309 (maintainer-clean realclean distclean): Use subdir_do.
9310 (subdir_do): New.
9311 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9312 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9313 * acinclude.m4: Include acx_configure_dir.m4.
9314 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9315 calls. Call AC_PROG_RANLIB. Configure gnulib using
9316 ACX_CONFIGURE_DIR.
9317 (GNULIB): New.
9318 (GNULIB_STDINT_H): Adjust.
9319 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9320 * gdbreplay.c: Include build-gnulib/config.h.
9321 * server.h: Likewise.
9322 * aclocal.m4: Regenerate.
9323 * config.in: Regenerate.
9324 * configure: Regenerate.
c971b7fa 9325
809277f8
PA
93262012-04-19 Pedro Alves <palves@redhat.com>
9327
9328 * Makefile.in (LIBGNU, INCGNU): Adjust.
9329 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9330 (all, install-only, uninstall, clean-info, all-lib, clean)
9331 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9332 * configure.ac: Adjust AC_OUTPUT output.
9333 * aclocal.m4: Regenerate.
9334 * configure: Regenerate.
9335
fd9bb8b8
PA
93362012-04-19 Pedro Alves <palves@redhat.com>
9337
9338 * Makefile.in (generated_files): New.
9339 (server_h): Remove the explicit dependency on config.h, and depend
9340 on $generated_files.
9341
1c298c66
PA
93422012-04-19 Pedro Alves <palves@redhat.com>
9343
9344 * Makefile.in (INCGNU): Add -Ignulib.
9345
57c4b50b
PA
93462012-04-19 Pedro Alves <palves@redhat.com>
9347
9348 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9349 (INCGNU): ... this, and spell out -I here.
9350 (GNULIB_LIB): Rename to ...
9351 (LIBGNU): ... this.
9352 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9353
1030e047
PA
93542012-04-19 Pedro Alves <palves@redhat.com>
9355
9356 * config.in: Regenerate.
9357
447d4319
PA
93582012-04-19 Pedro Alves <palves@redhat.com>
9359
9360 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9361 * server.h (memmem): Remove declaration.
9362 * config.in: Regenerate.
9363 * configure: Regenerate.
9364
aad9eab9
YQ
93652012-04-19 Yao Qi <yao@codesourcery.com>
9366
9367 * Makefile.in (SFILES): Add common/vec.c.
9368 (OBS): Add vec.o.
9369 (vec.o): New rule.
9370
3e10640f
YQ
93712012-04-19 Yao Qi <yao@codesourcery.com>
9372
9373 * remote-utils.c (prepare_resume_reply): Replace with macro
9374 target_core_of_thread.
9375 * server.c (handle_qxfer_threads_proper): Likewise.
9376 * target.h (traget_core_of_thread): New macro.
9377
71622373
PA
93782012-04-18 Pedro Alves <palves@redhat.com>
9379
9380 * aclocal.m4: Regenerate.
9381 * configure: Regenerate.
9382
80d26939
YQ
93832012-04-16 Yao Qi <yao@codesourcery.com>
9384
9385 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9386 duplicated on address.
9387
42476b70
YQ
93882012-04-16 Yao Qi <yao@codesourcery.com>
9389
9390 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9391 (struct tracepoint_action_ops) <send>: New field.
9392 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9393 (agent_expr_send, x_tracepoint_action_send): New.
9394 (l_tracepoint_action_send): New.
9395 (cmd_qtdp): Download and install tracepoint
9396 according to `use_agent'.
9397 (run_inferior_command): Add one more parameter `len'.
9398 Update callers.
9399 (tracepoint_send_agent): New.
9400 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9401
7bc83639
YQ
94022012-04-16 Yao Qi <yao@codesourcery.com>
9403
9404 * tracepoint.c (download_tracepoints): Moved to ...
9405 (cmd_qtstart): ... here.
9406
5f18041e
YQ
94072012-04-14 Yao Qi <yao@codesourcery.com>
9408
9409 * tracepoint.c: Include inttypes.h.
9410 (struct collect_memory_action): Use sized types.
9411 (struct tracepoint): Likewise.
9412 (cmd_qtdp, stop_tracing): Update print specifiers.
9413 (cmd_qtp, response_tracepoint): Likewise.
9414 (collect_data_at_tracepoint): Likewise.
9415 (collect_data_at_step): Likewise.
9416
55a8c076
YQ
94172012-04-14 Yao Qi <yao@codesourcery.com>
9418
9419 Import gnulib module inttypes.
9420 * aclocal.m4, config.in, configure: Regenerated.
9421
dc750257
YQ
94222012-04-14 Yao Qi <yao@codesourcery.com>
9423
9424 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9425 Makefile and config.status at last.
9426
0ab5faf9
YQ
94272012-04-13 Yao Qi <yao@codesourcery.com>
9428
9429 * tracepoint.c: Include stdint.h unconditionally.
9430
18f5fd81
TJB
94312012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9432
9433 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9434 on BFD_HAVE_SYS_PROCFS_TYPE.
9435 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9436 * configure: Regenerate.
9437 * config.in: Likewise.
9438
4d47af5c
L
94392012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9440
9441 * Makefile.in (clean): Also remove x32.c x32-linux.c
9442 x32-avx.c x32-avx-linux.c.
9443 (x32.o): New target.
9444 (x32.c): Likewise.
9445 (x32-linux.o): Likewise.
9446 (x32-linux.c): Likewise.
9447 (x32-avx.o): Likewise.
9448 (x32-avx.c): Likewise.
9449 (x32-avx-linux.o): Likewise.
9450 (x32-avx-linux.c): Likewise.
9451
9452 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9453 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9454 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9455 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9456 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9457 i386/x32-avx-linux.xml.
9458
9459 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9460 (init_registers_x32_avx_linux): Likwise.
9461 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9462 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9463
ecedbe58
PA
94642012-04-13 Pedro Alves <palves@redhat.com>
9465
9466 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9467 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9468 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9469 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9470 the sub-make.
9471
c92b5177
L
94722012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9473
9474 * linux-x86-low.c (compat_x32_clock_t): New.
9475 (compat_x32_siginfo_t): Likewise.
9476 (compat_x32_siginfo_from_siginfo): Likewise.
9477 (siginfo_from_compat_x32_siginfo): Likewise.
9478 (linux_is_elf64): Likewise.
9479 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9480 and siginfo_from_compat_x32_siginfo for x32.
9481 (x86_arch_setup): Set linux_is_elf64.
9482
214d508e
L
94832012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9484
9485 PR gdb/13969
9486 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9487 e_machine field.
9488 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9489 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9490 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9491 compatible with process.
9492
c9a1864a
YQ
94932012-04-12 Yao Qi <yao@codesourcery.com>
9494
9495 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9496 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9497 (install-only, install-info, clean): Handle sub dir gnulib.
9498 (all-lib, am--refresh): New targets.
9499 (memmem.o): Remove target.
9500 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9501 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9502 (AC_REPLACE_FUNCS): Remove memmem.
9503 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9504 (AC_OUTPUT): Generate Makefile in gnulib/.
9505 * aclocal.m4, config.in, configure: Regenerated.
9506
367ba2c2
MR
95072012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9508
9509 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9510
9d236627
PA
95112012-04-05 Pedro Alves <palves@redhat.com>
9512
9513 -Werror=strict-aliasing
9514
9515 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9516 pointer.
9517
111217b3
PA
95182012-04-04 Pedro Alves <palves@redhat.com>
9519
9520 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9521 (sparc_store_gregset_from_stack, sparc_store_gregset)
9522 (sparc_breakpoint_at): Fix formatting.
9523
8365dcf5
TJB
95242012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9525
9526 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9527 are available.
9528 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9529 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9530 * config.in: Regenerate.
9531 * configure: Likewise.
9532
689cc2ae
PA
95332012-03-29 Pedro Alves <palves@redhat.com>
9534
9535 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9536 Correct ptrace arguments.
9537
c14dfd32
PA
95382012-03-28 Pedro Alves <palves@redhat.com>
9539
9540 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9541 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9542 (IA64_FR1_REGNUM): New defines.
9543 (ia64_fetch_register): New.
9544 (the_low_target): Install it.
9545 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9546 field.
9547 * linux-low.c (linux_fetch_registers): Try the
9548 the_low_target.fetch_register hook first.
9549
9550 * linux-arm-low.c (the_low_target): Adjust.
9551 * linux-bfin-low.c (the_low_target): Adjust.
9552 * linux-cris-low.c (the_low_target): Adjust.
9553 * linux-crisv32-low.c (the_low_target): Adjust.
9554 * linux-m32r-low.c (the_low_target): Adjust.
9555 * linux-m68k-low.c (the_low_target): Adjust.
9556 * linux-mips-low.c (the_low_target): Adjust.
9557 * linux-ppc-low.c (the_low_target): Adjust.
9558 * linux-s390-low.c (the_low_target): Adjust.
9559 * linux-sh-low.c (the_low_target): Adjust.
9560 * linux-sparc-low.c (the_low_target): Adjust.
9561 * linux-tic6x-low.c (the_low_target): Adjust.
9562 * linux-x86-low.c (the_low_target): Adjust.
9563 * linux-xtensa-low.c (the_low_target): Adjust.
9564
63c88e13
PA
95652012-03-26 Pedro Alves <palves@redhat.com>
9566
9567 * server.c (handle_qxfer_libraries): Don't bail early if
9568 the_target->qxfer_libraries_svr4 is not NULL.
9569
fb723180
PA
95702012-03-26 Pedro Alves <palves@redhat.com>
9571
9572 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9573
0afae3cf
PA
95742012-03-23 Pedro Alves <palves@redhat.com>
9575
9576 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9577 "library-list-svr4" element's start tag when the the DSO list is
9578 empty.
9579
485f1ee4
PA
95802012-03-23 Pedro Alves <palves@redhat.com>
9581
9582 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9583 a variable whose type size is the same as the inferior's pointer
9584 size.
9585
a5362b9a
TS
95862012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9587
9588 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9589 struct siginfo.
9590 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9591 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9592 * linux-low.h: Include <signal.h>.
9593 (struct siginfo): Remove forward declaration.
9594 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9595 struct siginfo.
9596
d226c142
MF
95972012-03-21 Mike Frysinger <vapier@gentoo.org>
9598
9599 * .gitignore: Ignore more files.
9600
122f36ef
PA
96012012-03-19 Pedro Alves <palves@redhat.com>
9602 Jan Kratochvil <jan.kratochvil@redhat.com>
9603
9604 * server.c (cont_thread, general_thread): Add describing comments.
9605 (start_inferior): Clear `cont_thread'.
9606 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9607 of a process.
9608
fc3e5175
YQ
96092012-03-15 Yao Qi <yao@codesourcery.com>
9610
9611 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9612 handling to ...
9613 (cmd_qtdp): ... here.
9614
8d0d92cd
YQ
96152012-03-15 Yao Qi <yao@codesourcery.com>
9616
9617 * tracepoint.c (struct tracepoint_action_ops): New.
9618 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9619 (m_tracepoint_action_download): New.
9620 (r_tracepoint_action_download): New.
9621 (x_tracepoint_action_download): New.
9622 (l_tracepoint_action_download): New.
9623 (add_tracepoint_action): Install `action->ops' according type.
9624 (download_tracepoint_1): Move code `download' function pointer
9625 of various tracepoint_action_ops.
9626
87b0bb13
JK
96272012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9628
9629 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9630 linux_ptrace_attach_warnings.
9631
5f572dec
JK
96322012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9633
9634 * Makefile.in (linux-ptrace.o): New.
9635 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9636 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9637 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9638 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9639 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9640 of these targets.
9641 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9642
f4647387
YQ
96432012-03-08 Yao Qi <yao@codesourcery.com>
9644 Pedro Alves <palves@redhat.com>
9645
9646 Fix PR server/13392.
9647 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9648 offset of JMP insn.
9649 * tracepoint.c (remove_tracepoint): New.
9650 (cmd_qtdp): Call remove_tracepoint when failed to install.
9651
9b224c5e
PA
96522012-03-07 Pedro Alves <palves@redhat.com>
9653
9654 * linux-low.c (get_detach_signal): New.
9655 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9656 Pass on pending signals to PTRACE_DETACH. Check the result of the
9657 ptrace call.
9658 * server.c (program_signals, program_signals_p): New.
9659 (handle_general_set): Handle QProgramSignals.
9660 * server.h (program_signals, program_signals_p): Declare.
9661
e237a7e2
JK
96622012-03-05 Pedro Alves <palves@redhat.com>
9663 Jan Kratochvil <jan.kratochvil@redhat.com>
9664
9665 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9666 New comment why.
9667
5808517f
YQ
96682012-03-03 Yao Qi <yao@codesourcery.com>
9669
9670 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9671 agent_look_up_symbols.
9672
58b4daa5
YQ
96732012-03-03 Yao Qi <yao@codesourcery.com>
9674
9675 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9676 (linux-x86-low.o): Likewise.
9677 * server.h: Remove in_process_agent_loaded.
9678 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9679 common/agent.c.
9680 Update callers.
9681
8ffcbaaf
YQ
96822012-03-03 Yao Qi <yao@codesourcery.com>
9683
9684 * tracepoint.c (gdb_agent_capability): New global.
9685 (in_process_agent_loaded_ust): Renamed to
9686 `in_process_agent_supports_ust'.
9687 Update callers.
9688 (in_process_agent_supports_ust): Call agent_capability_check.
9689 (clear_installed_tracepoints): Assert that agent supports
9690 agent.
9691
d1feda86
YQ
96922012-03-03 Yao Qi <yao@codesourcery.com>
9693
9694 * linux-low.c (linux_supports_agent): New.
9695 (linux_target_ops): Initialize field `supports_agent' with
9696 linux_supports_agent.
9697 * target.h (struct target_ops) <supports_agent>: New.
9698 (target_supports_agent): New macro.
9699 * server.c (handle_general_set): Handle packet 'QAgent'.
9700 (handle_query): Send `QAgent+'.
9701 * Makefile.in (server.o): Depends on agent.h.
9702
2fa291ac
YQ
97032012-03-03 Yao Qi <yao@codesourcery.com>
9704
9705 * Makefile.in (OBS): Add agent.o.
9706 Add new rule for agent.o.
9707 Track dependence of tracepoint.c on agent.h.
9708 * tracepoint.c (run_inferior_command_1):
9709 (run_inferior_command): Call agent_run_command.
9710 (gdb_ust_connect_sync_socket): Deleted. Move it to
9711 common/agent.c.
9712 (resume_thread, stop_thread): Likewise.
9713 (gdb_ust_socket_init): Renamed to ...
9714 (gdb_agent_socket_init): ... New.
9715 (gdb_ust_thread): Renamed to ...
9716 (gdb_agent_helper_thread): ... New.
9717 (gdb_ust_init): Move some code to ...
9718 (gdb_agent_init): ... here. New.
9719 [HAVE_UST]: Call gdb_ust_init.
9720 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9721 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9722 * config.in, configure: Regenerated.
9723
05044653
PA
97242012-03-02 Pedro Alves <palves@redhat.com>
9725
9726 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9727 * linux-low.c (struct simple_pid_list): New.
9728 (stopped_pids): New a struct simple_pid_list pointer.
9729 (add_to_pid_list, pull_pid_from_list): New.
9730 (handle_extended_wait): Don't assume the first signal new children
9731 report is SIGSTOP. Adjust call to pull_pid_from_list.
9732 (linux_wait_for_lwp): Adjust.
9733
8d00225b
YQ
97342012-03-02 Yao Qi <yao@codesourcery.com>
9735
9736 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9737 debug log.
9738
19560ba5
YQ
97392012-03-02 Yao Qi <yao@codesourcery.com>
9740
9741 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9742 `stop_pc' and `tpoint'. Update caller.
9743
1faeff08
MR
97442012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9745
9746 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9747 * linux-low.c (use_linux_regsets): New macro.
9748 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9749 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9750 (linux_register_in_regsets): New function.
9751 (usr_fetch_inferior_registers): Skip registers covered by
9752 regsets.
9753 (usr_store_inferior_registers): Likewise.
9754 (usr_fetch_inferior_registers): New macro.
9755 (usr_store_inferior_registers): Likewise.
9756 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9757 (linux_store_registers): Likewise.
9758 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9759 prototype.
9760 (init_registers_mips64_dsp_linux): Likewise.
9761 (init_registers_mips_linux): New macro.
9762 (init_registers_mips_dsp_linux): Likewise.
9763 (mips_dsp_num_regs): Likewise.
9764 (DSP_BASE, DSP_CONTROL): New fallback macros.
9765 (mips_base_regs): New macro.
9766 (mips_regmap): Use it. Fix the size.
9767 (mips_dsp_regmap): New variable.
9768 (mips_dsp_regset_bitmap): Likewise.
9769 (mips_arch_setup): New function.
9770 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9771 than mips_regmap.
9772 (mips_cannot_store_register): Likewise.
9773 (the_low_target): Update .arch_setup, .num_regs and .regmap
9774 initializers. Add .regset_bitmap initializer.
9775 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9776 initializer.
9777 * linux-bfin-low.c (the_low_target): Likewise.
9778 * linux-cris-low.c (the_low_target): Likewise.
9779 * linux-crisv32-low.c (the_low_target): Likewise.
9780 * linux-ia64-low.c (the_low_target): Likewise.
9781 * linux-m32r-low.c (the_low_target): Likewise.
9782 * linux-m68k-low.c (the_low_target): Likewise.
9783 * linux-ppc-low.c (the_low_target): Likewise.
9784 * linux-s390-low.c (the_low_target): Likewise.
9785 * linux-sh-low.c (the_low_target): Likewise.
9786 * linux-sparc-low.c (the_low_target): Likewise.
9787 * linux-tic6x-low.c (the_low_target): Likewise.
9788 * linux-x86-low.c (the_low_target): Likewise.
9789 * linux-xtensa-low.c (the_low_target): Likewise.
9790 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9791 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9792 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9793 srv_xmlfiles.
9794 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9795 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9796
c03e6ccc
YQ
97972012-02-29 Yao Qi <yao@codesourcery.com>
9798 Pedro Alves <palves@redhat.com>
9799
9800 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9801 `step_over_finished' is true.
9802
644cebc9
PA
98032012-02-27 Pedro Alves <palves@redhat.com>
9804
9805 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9806 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9807
c14d7ab2
PA
98082012-02-27 Pedro Alves <palves@redhat.com>
9809
9810 PR server/9684
9811 * linux-low.c (pid_is_stopped): New.
9812 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9813
412c89dd
LM
98142012-02-25 Luis Machado <lgustavo@codesourcery.com>
9815
9816 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9817 of conditions.
9818
b745defe
MR
98192012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9820
9821 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9822
9f3a5c85
LM
98232012-02-24 Luis Machado <lgustavo@codesourcery>
9824
9825 * server.c (handle_query): Advertise support for target-side
9826 breakpoint condition evaluation.
9827 (process_point_options): New function.
9828 (process_serial_event): When inserting a breakpoint, check for
9829 a target-side condition that should be evaluated.
9830
9831 * mem-break.c: Include regcache.h and ax.h.
9832 (point_cond_list_t): New data structure.
9833 (breakpoint) <cond_list>: New field.
9834 (find_gdb_breakpoint_at): Make non-static.
9835 (delete_gdb_breakpoint_at): Clear any target-side
9836 conditions.
9837 (clear_gdb_breakpoint_conditions): New function.
9838 (add_condition_to_breakpoint): Likewise.
9839 (add_breakpoint_condition): Likewise.
9840 (gdb_condition_true_at_breakpoint): Likewise.
9841 (gdb_breakpoint_here): Return result directly instead
9842 of going through a local variable.
9843
9844 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9845 (clear_gdb_breakpoint_conditions): Likewise.
9846 (add_breakpoint_condition): Likewise.
9847 (gdb_condition_true_at_breakpoint): Likewise.
9848
9849 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9850 (need_step_over_p): Take target-side breakpoint condition into
9851 consideration.
9852
5e1dc496
LM
98532012-02-24 Luis Machado <lgustavo@codesourcery>
9854
9855 * server.h: Include tracepoint.h.
9856 (agent_mem_read, agent_get_trace_state_variable_value,
9857 agent_set_trace_state_variable_value,
9858 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9859 get_set_tsv_func_addr): New prototypes.
9860
9861 * ax.h: New include file.
9862 * ax.c: New source file.
9863
9864 * tracepoint.c: Include ax.h.
9865 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9866 agent_expr, eval_result_type): Move to ax.h.
9867 (parse_agent_expr): Rename to ...
9868 (gdb_parse_agent_expr): ... this, make it non-static and move
9869 to ax.h.
9870 (unparse_agent_expr) Rename to ...
9871 (gdb_unparse_agent_expr): ... this, make it non-static and move
9872 to ax.h.
9873 (eval_agent_expr): Rename to ...
9874 (eval_tracepoint_agent_expr): ... this.
9875 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9876 forward declarations.
9877 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9878 (agent_get_trace_state_variable_value): New function.
9879 (agent_set_trace_state_variable_value): New function.
9880 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9881 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9882 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9883 (condition_true_at_tracepoint): Likewise.
9884 (parse_agent_expr): Rename to ...
9885 (gdb_parse_agent_expr): ... this and move to ax.c.
9886 (unparse_agent_expr): Rename to ...
9887 (gdb_unparse_agent_expr): ... this and move to ax.c.
9888 (gdb_agent_op_name): Move to ax.c.
9889 (eval_agent_expr): Rename to ...
9890 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9891 and move to ax.c.
9892 (eval_tracepoint_agent_expr): New function.
9893 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9894 non-static.
5e1dc496
LM
9895 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9896 ax.c.
9897 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9898 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9899 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9900 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9901 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9902 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9903 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9904 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9905 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9906 (compile_bytecodes): Remove forward declaration.
9907 (is_goto_target): Move to ax.c.
9908 (compile_bytecodes): Move to ax.c and call
9909 agent_get_trace_state_variable_value (...) and
9910 agent_set_trace_state_variable_value (...).
9911
9912 * Makefile.in: Update ax.c and IPA dependencies.
9913
277e4e52
PA
99142012-02-24 Pedro Alves <palves@redhat.com>
9915
9916 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9917 (cmd_bigqtbuffer_circular): ... this. Only handle
9918 'QTBuffer:circular:'.
9919 (handle_tracepoint_general_set): Adjust.
9920
bf4c19f7
YQ
99212012-02-16 Yao Qi <yao@codesourcery.com>
9922
9923 * inferiors.c: Move code to ...
9924 * dll.c: .... here. New.
9925 * server.h: Declare clear_dlls.
9926 * Makefile.in (SFILES): Add dll.c.
9927 (OBS): Add dll.o
9928 (dll.o): New rule.
9929
d73f2619
YQ
99302012-02-11 Yao Qi <yao@codesourcery.com>
9931
9932 * server.c: (handle_monitor_command): Add a new parameter
9933 `own_buf'.
9934 (handle_query): Update caller.
9935
f8255c2a
JB
99362012-02-09 Joel Brobecker <brobecker@adacore.com>
9937
9938 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9939 * configure, config.in: Regenerate.
9940 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9941 is not defined.
9942
da84f473
PA
99432012-02-02 Pedro Alves <palves@redhat.com>
9944
9945 Try SIGKILL first, then PTRACE_KILL.
9946 * linux-low.c (linux_kill_one_lwp): New.
9947 (linux_kill_one_lwp): Rename to ...
9948 (kill_one_lwp_callback): ... this. Use the new
9949 linux_kill_one_lwp.
9950
e886a173
PA
99512012-02-02 Pedro Alves <palves@redhat.com>
9952
9953 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9954 inferior.
9955
be07f1a2
PA
99562012-01-27 Pedro Alves <palves@redhat.com>
9957
9958 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9959 (elf_64_file_p): Make static.
9960 (linux_pid_exe_is_elf_64_file): New.
9961 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9962 Delete declarations.
9963 (linux_pid_exe_is_elf_64_file): Declare.
9964 * linux-x86-low.c (x86_arch_setup): Use
9965 linux_pid_exe_is_elf_64_file.
9966
d8301ad1
JK
99672012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9968
9969 * linux-low.c (linux_wait_for_event_1): Rename to ...
9970 (linux_wait_for_event): ... here and merge it with former
9971 linux_wait_for_event - new variable wait_ptid, use it.
9972 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9973
01b17894
PA
99742012-01-23 Pedro Alves <palves@redhat.com>
9975
9976 * server.c (main): Avoid yet another case of infinite loop while
9977 detaching/killing after a longjmp.
9978
e825046f
JK
99792012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9980
9981 Code cleanup.
9982 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9983
b9e7b9c3
UW
99842012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9985
9986 * hostio.c (handle_readlink): New function.
9987 (handle_vFile): Call it to handle "vFile:readlink" packets.
9988
901f9912
UW
99892012-01-20 Pedro Alves <palves@redhat.com>
9990 Ulrich Weigand <ulrich.weigand@linaro.org>
9991
9992 * server.c (handle_v_requests): Only support vAttach and vRun to
9993 start multiple processes when in extended protocol mode.
9994
fc1ab1a0
PA
99952012-01-17 Pedro Alves <palves@redhat.com>
9996
9997 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9998 memalign plus mprotect to allocate the scratch buffer.
9999
7d5d4e98
PA
100002012-01-13 Pedro Alves <palves@redhat.com>
10001
10002 * server.c (attach_inferior): Clear `cont_thread'.
10003
f128d5e9
PA
100042012-01-13 Pedro Alves <palves@redhat.com>
10005
10006 * server.c (main): Avoid infinite loop while detaching/killing
10007 after a longjmp.
10008
06db92f0
DE
100092012-01-09 Doug Evans <dje@google.com>
10010
10011 * server.c (start_inferior): Set last_ptid in --wrapper case.
10012
32d92999
YQ
100132012-01-06 Yao Qi <yao@codesourcery.com>
10014
10015 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10016 defined.
10017 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10018
5e0a92a9
YQ
100192012-01-04 Yao Qi <yao@codesourcery.com>
10020
10021 * tracepoint.c (cmd_qtdp): Print debug message
10022 for static tracepoint.
10023
ae639e8c
YQ
100242012-01-04 Yao Qi <yao@codesourcery.com>
10025
10026 * tracepoint.c (trace_vdebug): Differentiate debug message
10027 between gdbserver and IPA.
10028
f72429c5
YQ
100292012-01-03 Yao Qi <yao@codesourcery.com>
10030
10031 * tracepoint.c (tracepoint_was_hit): Don't collect for
10032 static tracepoint.
10033
12c3e59c
JB
100342012-01-02 Joel Brobecker <brobecker@adacore.com>
10035
10036 * terminal.h: Reformat copyright header.
10037
67827812
JB
100382012-01-02 Joel Brobecker <brobecker@adacore.com>
10039
10040 * server.c (gdbserver_version): Update copyright year.
10041 * gdbreplay.c (gdbreplay_version): Likewise.
10042
3e52c33d
JK
100432011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10044
10045 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10046
10047 Revert:
10048 2011-12-18 Hui Zhu <teawater@gmail.com>
10049 * linux-low.c (linux_create_inferior): Save return value to ret.
10050
66f1260e
HZ
100512011-12-18 Hui Zhu <teawater@gmail.com>
10052
10053 * linux-low.c (linux_create_inferior): Save return value to ret.
10054
e77616d7
DE
100552011-12-16 Doug Evans <dje@google.com>
10056
e7b06c57
DE
10057 * linux-low.c (linux_create_inferior): If stdio connection,
10058 redirect stdin from /dev/null, stdout to stderr.
10059 * remote-utils.c (remote_is_stdio): New static global.
10060 (remote_connection_is_stdio): New function.
10061 (remote_prepare): Handle stdio connection.
10062 (remote_open): Ditto.
10063 (remote_close): Don't close stdin for stdio connections.
10064 (read_prim,write_prim): New functions. Replace all calls to
10065 read/write to these.
10066 * server.c (main): Watch for "-" argument. Move call to
10067 remote_prepare before start_inferior.
10068 * server.h (STDIO_CONNECTION_NAME): New macro.
10069 (remote_connection_is_stdio): Declare.
10070
e77616d7
DE
10071 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10072 in debugging output.
10073
82067193
YQ
100742011-12-15 Yao Qi <yao@codesourcery.com>
10075
10076 * tracepoint.c: Include sys/syscall.h.
10077 (gdb_ust_thread): Remove preprocessor conditional.
10078
82bfbe7e
PA
100792011-12-14 Pedro Alves <pedro@codesourcery.com>
10080
10081 * linux-low.c (linux_detach_one_lwp): Call
10082 the_low_target.prepare_to_resume before detaching.
10083
712c6575
YQ
100842011-12-14 Yao Qi <yao@codesourcery.com>
10085
10086 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10087 of write.
10088
d54d1edf
YQ
100892011-12-14 Yao Qi <yao@codesourcery.com>
10090
10091 * i386-low.c (i386_low_stopped_data_address): Initialize local
10092 variable `control'.
10093
6210a125
PA
100942011-12-13 Pedro Alves <pedro@codesourcery.com>
10095
10096 PR remote/13492
10097
10098 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10099 DR_CONTROL unless necessary. Extend comments.
10100 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10101 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10102
2ece8244
YQ
101032011-12-13 Yao Qi <yao@codesourcery.com>
10104
10105 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10106 macros.
10107 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10108
784867a5
JK
101092011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10110
10111 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10112 Print new debug message for such case.
10113
6bf36717
JK
101142011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10115
10116 Fix overlapping memcpy.
10117 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10118 the read_inferior_memory transfer.
10119 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10120 write_inferior_memory transfer.
10121 (set_fast_tracepoint_jump): New variable buf. Use it for the
10122 read_inferior_memory and write_inferior_memory transfers.
10123 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10124 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10125 Use it for the write_inferior_memory transfer.
10126 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10127 buffers.
10128
50275556
MR
101292011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10130
10131 * linux-low.c (fetch_register, store_register): Make code
10132 consistent, fix formatting.
10133
7325beb4
MR
101342011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10135
10136 * linux-low.c (usr_store_inferior_registers): Factor out code
10137 to handle individual registers into...
10138 (store_register): ... this new function.
10139
c642a434
UW
101402011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10141
10142 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10143 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10144 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10145 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10146 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10147 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10148 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10149 (srv_xmlfiles): Add new XML files.
10150
10151 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10152 and <sys/uio.h>.
10153 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10154 (init_registers_s390_linux32v1): Add prototype.
10155 (init_registers_s390_linux32v2): Likewise.
10156 (init_registers_s390_linux64v1): Likewise.
10157 (init_registers_s390_linux64v2): Likewise.
10158 (init_registers_s390x_linux64v1): Likewise.
10159 (init_registers_s390x_linux64v2): Likewise.
10160 (s390_num_regs): Increment to 52.
10161 (s390_regmap): Add orig_r2 register.
10162 (s390_num_regs_3264): Increment to 68.
10163 (s390_regmap_3264): Add orig_r2 register.
10164 (s390_collect_ptrace_register): Handle orig_r2 register.
10165 (s390_supply_ptrace_register): Likewise.
10166 (s390_fill_last_break): New function.
10167 (s390_store_last_break): Likewise.
10168 (s390_fill_system_call): New function.
10169 (s390_store_system_call): Likewise.
10170 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10171 register sets.
10172 (s390_check_regset): New function.
10173 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10174 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10175 Update target_regsets for available register sets.
10176
2268b414
JK
101772011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10178 Jan Kratochvil <jan.kratochvil@redhat.com>
10179
10180 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10181 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10182 New.
10183 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10184 * linux-low.h (struct process_info_private): New member r_debug.
10185 * server.c (handle_qxfer_libraries): Call
10186 the_target->qxfer_libraries_svr4.
10187 (handle_qxfer_libraries_svr4): New function.
10188 (qxfer_packets): New entry "libraries-svr4".
10189 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10190 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10191 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10192 PACKET_qXfer_libraries_svr4.
10193
d6db1fab
UW
101942011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10195
10196 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10197 PSW address/mask between 8-byte and 16-byte formats.
10198 (s390_supply_ptrace_register): Likewise.
10199 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10200 basic addressing mode bit.
10201
242f5f1c
SS
102022011-11-24 Stan Shebs <stan@codesourcery.com>
10203
10204 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10205
f196051f
SS
102062011-11-17 Stan Shebs <stan@codesourcery.com>
10207
10208 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10209 (tracing_start_time): New global.
10210 (tracing_stop_time): New global.
10211 (tracing_user_name): New global.
10212 (tracing_notes): New global.
10213 (tracing_stop_note): New global.
10214 (cmd_qtstart): Set traceframe_usage, start_time.
10215 (stop_tracing): Set stop_time.
10216 (cmd_qtstatus): Report additional status.
10217 (cmd_qtp): New function.
10218 (handle_tracepoint_query): Call it.
10219 (cmd_qtnotes): New function.
10220 (handle_tracepoint_general_set): Call it.
10221 (get_timestamp): Rename from tsv_get_timestamp.
10222
405f8e94
SS
102232011-11-14 Stan Shebs <stan@codesourcery.com>
10224 Kwok Cheung Yeung <kcy@codesourcery.com>
10225
10226 * linux-x86-low.c (small_jump_insn): New.
10227 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10228 trampoline and error message, build a trampoline and issue a small
10229 jump instruction to it.
10230 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10231 trampoline and error message.
10232 (x86_get_min_fast_tracepoint_insn_len): New.
10233 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10234 * linux-low.h (struct linux_target_ops): Add arguments to
10235 install_fast_tracepoint_jump_pad operation, add new operation.
10236 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10237 arguments.
10238 (linux_get_min_fast_tracepoint_insn_len): New function.
10239 (linux_target_op): Add new operation.
10240 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10241 (gdb_trampoline_buffer_end): Ditto.
10242 (gdb_trampoline_buffer_error): Ditto.
10243 (struct ipa_sym_addresses): Add fields for new IPA variables.
10244 (symbol_list): Add entries for new IPA variables.
10245 (struct tracepoint): Add fields to hold the address range of the
10246 trampoline used by the tracepoint.
10247 (trampoline_buffer_head): New static variable.
10248 (trampoline_buffer_tail): Ditto.
10249 (claim_trampoline_space): New function.
10250 (have_fast_tracepoint_trampoline_buffer): New function.
10251 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10252 structure.
10253 (install_fast_tracepoint): Ditto, also add error buffer argument.
10254 (cmd_qtminftpilen): New function.
10255 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10256 (fast_tracepoint_from_trampoline_address): New function.
10257 (fast_tracepoint_collecting): Handle trampoline as part of jump
10258 pad space.
10259 (set_trampoline_buffer_space): New function.
10260 (initialize_tracepoint): Initialize new IPA variables.
10261 * target.h (struct target_ops): Add arguments to
10262 install_fast_tracepoint_jump_pad operation, add new
10263 get_min_fast_tracepoint_insn_len operation.
10264 (target_get_min_fast_tracepoint_insn_len): New.
10265 (install_fast_tracepoint_jump_pad): Add arguments.
10266 * server.h (IPA_BUFSIZ): Define.
10267 * linux-i386-ipa.c: Include extra header files.
10268 (initialize_fast_tracepoint_trampoline_buffer): New function.
10269 (initialize_low_tracepoint): Call it.
10270 * server.h (set_trampoline_buffer_space): Declare.
10271 (claim_trampoline_space): Ditto.
10272 (have_fast_tracepoint_trampoline_buffer): Ditto.
10273
1e4d1764
YQ
102742011-11-14 Yao Qi <yao@codesourcery.com>
10275
10276 * server.c (handle_query): Handle InstallInTrace for qSupported.
10277 * tracepoint.c (add_tracepoint): Sort list.
10278 (install_tracepoint, download_tracepoint): New.
10279 (cmd_qtdp): Call them to install and download tracepoints.
10280 (sort_tracepoints): Removed.
10281 (cmd_qtstart): Update.
10282
5c73ff4e
YQ
102832011-11-14 Yao Qi <yao@codesourcery.com>
10284
10285 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10286 * mem-break.h: Declare.
10287 * tracepoint.c (cmd_qtstart): Move some code to ...
10288 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10289 New.
10290 (download_tracepoints): Move some code to ...
10291 (download_tracepoint_1): ... here. New.
10292
86a30030
YQ
102932011-11-08 Yao Qi <yao@codesourcery.com>
10294
10295 * remote-utils.c (relocate_instruction): A comment fix.
10296
8d26e50c
JB
102972011-11-07 Joel Brobecker <brobecker@adacore.com>
10298
10299 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10300 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10301 dr_status_mirror and dr_control_mirror from debug_reg_state.
10302 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10303 (i386_initial_stuff): Remove use of deleted globals.
10304 (i386_get_thread_context, i386_set_thread_context,
10305 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10306 from debug_reg_state.
10307
a59306a3
YQ
103082011-11-05 Yao Qi <yao@codesourcery.com>
10309
10310 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10311 address as TPOINT's.
10312
3065dfb6
SS
103132011-11-02 Stan Shebs <stan@codesourcery.com>
10314
10315 * tracepoint.c (agent_mem_read_string): New function.
10316 (eval_agent_expr): Call it for tracenz.
10317 * server.c (handle_query): Report support for tracenz.
10318
fd0d8c7c
YQ
103192011-11-02 Yao Qi <yao@codesourcery.com>
10320
10321 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10322
609086b1
YQ
103232011-11-02 Yao Qi <yao@codesourcery.com>
10324
10325 * target.h: Fix a typo in comment.
10326
b9fd1791
PA
103272011-10-31 Pedro Alves <pedro@codesourcery.com>
10328
10329 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10330 clobber the breakpoints' shadows with fast tracepoint jumps.
10331 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10332 * target.c (write_inferior_memory): Also pass MYADDR down to
10333 check_mem_write.
10334
03583c20
UW
103352011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10336
10337 * configure.ac: Check support for personality routine.
10338 * configure: Regenerate.
10339 * config.in: Likewise.
10340 * linux-low.c: Include <sys/personality.h>.
10341 Define ADDR_NO_RANDOMIZE if necessary.
10342 (linux_create_inferior): Disable address space randomization when
10343 forking inferior, if requested.
10344 (linux_supports_disable_randomization): New function.
10345 (linux_target_ops): Install it.
10346 * server.h (disable_randomization): Declare.
10347 * server.c (disable_randomization): New global variable.
10348 (handle_general_set): Handle QDisableRandomization.
10349 (handle_query): Likewise for qSupported.
10350 (main): Support --disable-randomization and --no-disable-randomization
10351 command line arguments.
10352 * target.h (struct target_ops): Add supports_disable_randomization.
10353 (target_supports_disable_randomization): New macro.
10354
723b724b
MF
103552011-09-29 Mike Frysinger <vapier@gentoo.org>
10356
10357 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10358 ifdef check.
10359 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10360 [!PT_GETDSBT] (target_loadmap): New definition.
10361 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10362 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10363 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10364 and PT_GETDSBT to LINUX_LOADMAP.
10365 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10366 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10367
55329a5c 103682011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10369
10370 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10371 (arm_linux_hwbp_cap): New static variable.
10372 (arm_linux_get_hwbp_cap): Replace by ...
10373 (arm_linux_init_hwbp_cap): ... this new function.
10374 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10375 (arm_linux_get_hw_watchpoint_count): Likewise.
10376 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10377 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10378 (arm_prepare_to_resume): Use perror_with_name instead of error.
10379
55329a5c 103802011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10381
10382 * linux-arm-low.c: Include <signal.h>.
10383 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10384 (struct arm_linux_hwbp_cap): New data type.
10385 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10386 (struct arm_linux_hw_breakpoint): New data type.
10387 (MAX_BPTS, MAX_WPTS): Define.
10388 (struct arch_process_info, struct arch_lwp_info): New data types.
10389 (arm_linux_get_hwbp_cap): New function.
10390 (arm_linux_get_hw_breakpoint_count): Likewise.
10391 (arm_linux_get_hw_watchpoint_count): Likewise.
10392 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10393 (arm_hwbp_control_initialize): Likewise.
10394 (arm_hwbp_control_is_enabled): Likewise.
10395 (arm_hwbp_control_is_initialized): Likewise.
10396 (arm_hwbp_control_disable): Likewise.
10397 (arm_linux_hw_breakpoint_equal): Likewise.
10398 (arm_linux_hw_point_initialize): Likewise.
10399 (struct update_registers_data): New data structure.
10400 (update_registers_callback: New function.
10401 (arm_insert_point): Likewise.
10402 (arm_remove_point): Likewise.
10403 (arm_stopped_by_watchpoint): Likewise.
10404 (arm_stopped_data_address): Likewise.
10405 (arm_new_process): Likewise.
10406 (arm_new_thread): Likewise.
10407 (arm_prepare_to_resume): Likewise.
10408 (the_low_target): Register arm_insert_point, arm_remove_point,
10409 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10410 arm_new_thread, and arm_prepare_to_resume.
10411
6b9801d4
SS
104122011-09-15 Stan Shebs <stan@codesourcery.com>
10413
10414 * server.h (struct emit_ops): Add compare-goto fields.
10415 * tracepoint.c (gdb_agent_op_sizes): New table.
10416 (emit_eq_goto): New function.
10417 (emit_ne_goto): New function.
10418 (emit_lt_goto): New function.
10419 (emit_le_goto): New function.
10420 (emit_gt_goto): New function.
10421 (emit_ge_goto): New function.
10422 (is_goto_target): New function.
10423 (compile_bytecodes): Recognize special cases of compare-goto
10424 combinations and call specialized emitters for them.
10425 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10426 (amd64_emit_ne_goto): New function.
10427 (amd64_emit_lt_goto): New function.
10428 (amd64_emit_le_goto): New function.
10429 (amd64_emit_gt_goto): New function.
10430 (amd64_emit_ge_goto): New function.
10431 (amd64_emit_ops): Add the new functions.
10432 (i386_emit_eq_goto): New function.
10433 (i386_emit_ne_goto): New function.
10434 (i386_emit_lt_goto): New function.
10435 (i386_emit_le_goto): New function.
10436 (i386_emit_gt_goto): New function.
10437 (i386_emit_ge_goto): New function.
10438 (i386_emit_ops): Add the new functions.
10439
bf15cbda
SS
104402011-09-08 Stan Shebs <stan@codesourcery.com>
10441
10442 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10443 (i386_emit_epilogue): Restore %ebx.
10444
943ca1dd
JZ
104452011-08-31 Jie Zhang <jzhang918@gmail.com>
10446
10447 * server.c (step_thread): Remove definition.
10448 (process_serial_event): Don't handle Hs.
10449 * server.h (step_thread): Remove declaration.
10450 * target.c (set_desired_inferior): Remove use of step_thread.
10451
e3deef73
LM
104522011-08-24 Luis Machado <lgustavo@codesourcery.com>
10453
10454 * linux-low.c: Include linux-procfs.h.
10455 (linux_attach_lwp_1): Update comments.
10456 (linux_attach): Scan for existing threads when attaching to a
10457 process that is the tgid.
10458 * Makefile.in: Update dependencies.
10459
13da1c97
LM
104602011-08-24 Luis Machado <lgustavo@codesourcery.com>
10461
10462 * configure.srv: Add linux-procfs.o dependencies.
10463
881127c9
YQ
104642011-08-14 Yao Qi <yao@codesourcery.com>
10465
10466 * target.h (struct target_ops): Fix indent.
10467 * win32-low.c (win32_target_ops): Fix comment.
10468
58dbd541
YQ
104692011-08-14 Andrew Jenner <andrew@codesourcery.com>
10470 Yao Qi <yao@codesourcery.com>
10471
10472 * Makefile.in (clean): Remove tic6x-*.c files.
10473 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10474 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10475 (tic6x-c64xp-linux.c): Likewise.
10476 * configure.srv: Add support for tic6x-*-uclinux.
10477 * linux-tic6x-low.c: New.
10478 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10479
78d85199
YQ
104802011-08-14 Andrew Stubbs <ams@codesourcery.com>
10481 Yao Qi <yao@codesourcery.com>
10482
10483 * target.h (struct target_ops): Add read_loadmap.
10484 * linux-low.c (struct target_loadseg): New type.
10485 (struct target_loadmap): New type.
10486 (linux_read_loadmap): New function.
10487 (linux_target_ops): Add linux_read_loadmap.
10488 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10489 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10490 to NULL.
78d85199 10491
a959a88d
EZ
104922011-08-05 Eli Zaretskii <eliz@gnu.org>
10493
10494 * win32-low.c: Include <stdint.h>.
10495
1ced966e
PA
104962011-07-22 Pedro Alves <pedro@codesourcery.com>
10497
10498 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10499 to the inferior here.
10500 (i386_remove_aligned_watchpoint): Ditto.
10501 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10502 fit part of the watchpoint in the debug registers.
10503 (i386_update_inferior_debug_regs): New.
10504 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10505 registers, and only update the inferior on success.
10506 (i386_low_remove_watchpoint): Ditto.
10507
d26e3629
KY
105082011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10509
10510 * linux-low.c (compare_ints, unique, list_threads, show_process,
10511 linux_core_of_thread): Delete.
10512 (linux_target_ops): Change linux_core_of_thread to
10513 linux_common_core_of_thread.
10514 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10515 * utils.c (malloc_failure): Change type of argument.
10516 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10517 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10518 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10519 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10520 (IPA_OBJS): Add common-utils-ipa.o.
10521 (ptid_h, linux_osdata_h): New macros.
10522 (server_h): Add common/common-utils.h, common/xml-utils.h,
10523 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10524 common/ptid.h.
10525 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10526 ptid.o, buffer.o): New rules.
10527 (linux-low.o): Add common/linux-osdata.h as a dependency.
10528 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10529 * configure.ac: Add AC_HEADER_DIRENT check.
10530 * config.in: Regenerate.
10531 * configure: Regenerate.
10532 * remote-utils.c (xml_escape_text): Delete.
10533 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10534 buffer_xml_printf): Move to common/buffer.c.
10535 * server.c (main): Remove call to initialize_inferiors.
10536 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10537 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10538 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10539 internal_error, gdb_assert, gdb_assert_fail): Delete.
10540 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10541 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10542 common/buffer.h.
10543 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10544 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10545 initialize_inferiors): Delete.
10546
2275a1a7
PA
105472011-07-20 Pedro Alves <pedro@codesourcery.com>
10548
10549 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10550 symbol error.
10551
0a5b1e09
PA
105522011-05-31 Pedro Alves <pedro@codesourcery.com>
10553
10554 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10555 assertion.
10556 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10557
6938fd34
YQ
105582011-05-26 Yao Qi <yao@codesourcery.com>
10559
10560 * Makefile.in (thread-db.o): Track dependence to
10561 common/gdb_thread_db.h.
10562 * thread-db.c: include gdb_thread_db.h from right place.
10563
b481f9e0
TT
105642011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10565
10566 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10567 __FILE__ and __LINE__ to internal_error.
10568
98a5dd13
DE
105692011-05-13 Doug Evans <dje@google.com>
10570
10571 * thread-db.c (try_thread_db_load_from_sdir): New function.
10572 (try_thread_db_load_from_dir): New function.
10573 (thread_db_load_search): Handle $sdir, ignore $pdir.
10574 Remove trying of system directories if search of
10575 libthread-db-search-path fails, that is now done via $sdir.
10576
d248b706
KY
105772011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10578
10579 * server.c (handle_query): Add EnableDisableTracepoints to the list
10580 of supported features.
43aaf8b6 10581 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10582 tracepoints.
43aaf8b6
PA
10583 (cmd_qtenable_disable): New.
10584 (cmd_qtstart): Install tracepoints even if disabled.
10585 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10586 receiving a QTEnable or QTDisable packet.
10587 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10588 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10589 tracepoints.
10590 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10591
84e578fb
DE
105922011-05-10 Doug Evans <dje@google.com>
10593
10594 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10595
71f55dd8
DE
105962011-05-04 Doug Evans <dje@google.com>
10597
10598 * linux-low.c (linux_join): Skip process lookup.
10599 * spu-low.c (spu_join): Ditto.
10600 * server.c (join_inferiors_callback): Delete.
10601 (process_serial_event): For 'D' packet (detach) call join_inferior
10602 directly.
10603
4d393d60
JM
106042011-05-04 Joseph Myers <joseph@codesourcery.com>
10605
10606 * README: Don't mention xscale*-*-linux*.
10607 * configure.srv (xscale*-*-linux*): Don't handle target.
10608
b00ad6ff
NF
106092011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10610
10611 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10612 casting pointers.
10613 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10614 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10615 (i386_emit_void_call_2): Likewise.
10616
af96c192
YQ
106172011-04-26 Yao Qi <yao@codesourcery.com>
10618
43aaf8b6
PA
10619 * linux-low.c: Move common macros to linux-ptrace.h.
10620 Include linux-ptrace.h.
af96c192
YQ
10621 * Makefile.in (linux_ptrace_h): New.
10622 (linux-low.o): Depends on linux-ptrace.h.
10623
03f2bd59
JK
106242011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10625
10626 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10627 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10628 (remote_prepare): New function with most of the TCP code from ...
10629 (remote_open): ... here. Detect PORT here unconditionally. Move also
10630 setting transport_is_reliable.
10631 * server.c (run_once): New variable.
10632 (gdbserver_usage): Document it.
10633 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10634 the first run if RUN_ONCE.
10635 * server.h (run_once, remote_prepare): New declarations.
10636
7a9dd1b2
TT
106372011-04-19 Tom Tromey <tromey@redhat.com>
10638
10639 * win32-low.c (handle_load_dll): Remove duplicate "the".
10640
81239425
PM
106412011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10642
10643 Remove support for old Cygwin 1.5 versions.
10644 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10645 function to avoid warning.
10646 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10647 warning.
10648
9e0627f1
PM
106492011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10650
10651 * gdbserver/server.h (Macro _): Define it if not available.
10652
588eebee
MS
106532011-03-14 Michael Snyder <msnyder@vmware.com>
10654
348af9f7 10655 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10656
43f70d4c
JB
106572011-03-10 Joel Brobecker <brobecker@adacore.com>
10658
10659 * Makefile.in (maintainer-clean realclean distclean): Remove
10660 "make ... subdir_do" command.
10661
348af9f7
MS
106622011-03-10 Michael Snyder <msnyder@vmware.com>
10663
10664 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10665
10666 * server.c (handle_v_run): Free alloced buffer on early return.
10667
e637a4f5
YQ
106682011-03-09 Yao Qi <yao@codesourcery.com>
10669
10670 Revert:
10671 2011-03-04 Yao Qi <yao@codesourcery.com>
10672
10673 * Makefile.in: Remove GNU make feature --directory.
10674
10675 2011-03-05 Yao Qi <yao@codesourcery.com>
10676
10677 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10678 (subdir_do): New make target. Copied from gdb/Makefile.
10679 (maintainer-clean, realclean, distclean, clean): Call corresponding
10680 make targets in common/Makefile.
10681
10682 2011-02-11 Yao Qi <yao@codesourcery.com>
10683
10684 * configure.ac: Call AC_PROG_RANLIB.
10685 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10686 * configure: Regenerate.
10687
e6edda56
JK
106882011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10689
10690 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10691
e5141119
JB
106922011-03-06 Yao Qi <yao@codesourcery.com>
10693
10694 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10695
64794aa4
JB
106962011-03-05 Yao Qi <yao@codesourcery.com>
10697
10698 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10699 (subdir_do): New make target. Copied from gdb/Makefile.
10700 (maintainer-clean, realclean, distclean, clean): Call corresponding
10701 make targets in common/Makefile.
10702
7a762829
YQ
107032011-03-04 Yao Qi <yao@codesourcery.com>
10704
10705 * Makefile.in: Remove GNU make feature --directory.
10706
348af9f7
MS
107072011-03-04 Michael Snyder <msnyder@vmware.com>
10708
10709 * server.c (queue_stop_reply): Call xmalloc not malloc.
10710
107112011-03-02 Michael Snyder <msnyder@vmware.com>
10712
10713 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10714
9f72fee2
MS
107152011-02-28 Michael Snyder <msnyder@vmware.com>
10716
588eebee
MS
10717 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10718 (cmd_qtframe): Ditto.
10719 (cmd_qtbuffer): Ditto.
10720 (cmd_bigqtbuffer): Ditto.
10721
9f72fee2
MS
10722 * utils.c (decimal2str): Initialize 'width' to nine, then
10723 don't mess with it.
10724
8040bd49
UW
107252011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10726
10727 * hostio.c (require_data): Free *data, not data.
10728
7e52cbd0
JK
107292011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10730
10731 * hostio.c (require_data): Use free, not xfree.
10732
9130f83e
MS
107332011-02-27 Michael Snyder <msnyder@vmware.com>
10734
4b812f4e
MS
10735 * server.c (handle_query): Discard unused value.
10736
9130f83e
MS
10737 * hostio.c (require_data): Free malloc memory before returning
10738 error.
10739
69d37113
MS
107402011-02-26 Michael Snyder <msnyder@vmware.com>
10741
10742 * linux-low.c (list_threads): Call closedir for dirent.
10743
35f5825a
MS
107442011-02-27 Michael Snyder <msnyder@vmware.com>
10745
2a589cef
MS
10746 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10747 a case statement falls through.
10748
0adea5f7
MS
10749 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10750
35f5825a
MS
10751 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10752 in comparison.
10753
238f1c74
MS
107542011-02-26 Michael Snyder <msnyder@vmware.com>
10755
10756 * utils.c (decimal2str): Eliminate dead code and dead param.
10757 (pulongest): Drop dead param from call to decimal2str.
10758 (plongest): Ditto.
10759
633ff500
JB
107602011-02-24 Joel Brobecker <brobecker@adacore.com>
10761
10762 Revert the following patch (not approved yet):
10763 2011-02-21 Hui Zhu <teawater@gmail.com>
10764 * tracepoint.c (tp_printf): New function.
10765 (eval_agent_expr): Handle gdb_agent_op_printf.
10766
f9c6ff72
HZ
107672011-02-21 Hui Zhu <teawater@gmail.com>
10768
10769 * tracepoint.c (tp_printf): New function.
10770 (eval_agent_expr): Handle gdb_agent_op_printf.
10771
94d5e490
TT
107722011-02-18 Tom Tromey <tromey@redhat.com>
10773
10774 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10775 (tracepoint.o): Likewise.
10776 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10777 (gdb_agent_op_names): Likewise.
10778
c7f96d2b
TT
107792011-02-18 Tom Tromey <tromey@redhat.com>
10780
10781 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10782 gdb_agent_op_rot>: New constants.
10783 (gdb_agent_op_names): Add pick and roll.
10784 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10785 cases.
10786
0feedb2c
JK
107872011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10788
10789 * aclocal.m4: Regenerated with aclocal-1.11.1.
10790
b3b9301e
PA
107912011-02-14 Pedro Alves <pedro@codesourcery.com>
10792
10793 * server.c (handle_qxfer_traceframe_info): New.
10794 (qxfer_packets): Register "traceframe-info".
10795 (handle_query): Report support for qXfer:traceframe-info:read+.
10796 * tracepoint.c (match_blocktype): New.
10797 (traceframe_find_block_type): Rename to ...
10798 (traceframe_walk_blocks): ... this. Add callback filter argument,
10799 and use it.
10800 (traceframe_find_block_type): New, reimplemented on top of
10801 traceframe_walk_blocks.
10802 (build_traceframe_info_xml): New.
10803 (traceframe_read_info): New.
10804 * server.h (traceframe_read_info): Declare.
10805
4f3e6fb7
YQ
108062011-02-11 Yao Qi <yao@codesourcery.com>
10807
10808 * configure.ac: Call AC_PROG_RANLIB.
10809 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10810 * configure: Regenerate.
10811
764880b7
PA
108122011-02-07 Pedro Alves <pedro@codesourcery.com>
10813
10814 * server.c (gdb_read_memory): Change return semantics to allow
10815 partial transfers.
10816 (handle_search_memory_1): Adjust.
10817 (process_serial_event) <'m' packet>: Handle partial transfers.
10818 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10819
1c79eb8a
PA
108202011-01-28 Pedro Alves <pedro@codesourcery.com>
10821
10822 * regcache.c (init_register_cache): Initialize
10823 regcache->register_status.
10824 (free_register_cache): Release regcache->register_status.
10825 (regcache_cpy): Copy register_status.
10826 (registers_to_string): Print 'x's for unavailable registers.
10827 (supply_register): Mark the register's status valid or
10828 unavailable, depending on whether a buffer was passed in or not.
10829 (supply_register_zeroed): New.
10830 (supply_regblock): Mark the registers' status valid or
10831 unavailable, depending on whether a buffer was passed in or not.
10832 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10833 (struct regcache): New `register_status' field.
10834 (supply_register_zeroed): Declare.
10835 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10836 supply_register_zeroed, rather than passing a NULL buffer to
10837 supply_register.
10838 * tracepoint.c (fetch_traceframe_registers): Update comment.
10839
85724a0e
PA
108402011-01-28 Pedro Alves <pedro@codesourcery.com>
10841
10842 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10843 buffer explicit.
10844
d08aafef
PA
108452011-01-25 Pedro Alves <pedro@codesourcery.com>
10846
10847 * server.h (decode_xfer_write): Change prototype.
10848 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10849 and don't extract the annex here.
10850 * server.c (decode_xfer_read): Remove `annex' parameter,
10851 and don't extract the annex here.
10852 (decode_xfer): New.
10853 (struct qxfer): New.
10854 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10855 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10856 (handle_qxfer_statictrace): New functions, abstracted out from
10857 handle_query, and made to use the struct qxfer interface.
10858 (handle_threads_qxfer_proper): Rename to ...
10859 (handle_qxfer_threads_proper): ... this.
10860 (handle_threads_qxfer): Rename to ...
10861 (handle_qxfer_threads): ... this. Adjust.
10862 (qxfer_packets): New array.
10863 (handle_qxfer): New function.
10864 (handle_query): Use handle_qxfer.
10865
493e2a69
MS
108662011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10867
10868 * gdbreplay.c: Shorten lines of >= 80 columns.
10869 * linux-low.c: Ditto.
10870 * linux-ppc-low.c: Ditto.
10871 * linux-s390-low.c: Ditto.
10872 * linux-sparc-low.c: Ditto.
10873 * linux-x86-low.c: Ditto.
10874 * linux-xtensa-low.c: Ditto.
10875 * mem-break.c: Ditto.
10876 * nto-low.c: Ditto.
10877 * regcache.h: Ditto.
10878 * remote-utils.c: Ditto.
10879 * server.c: Ditto.
10880 * server.h: Ditto.
10881 * thread-db.c: Ditto.
10882 * tracepoint.c: Ditto.
10883 * utils.c: Ditto.
10884 * win32-low.h: Ditto.
10885
44944448
JB
108862011-01-05 Joel Brobecker <brobecker@adacore.com>
10887
10888 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10889 update.
10890
71ce852c
JB
108912011-01-01 Joel Brobecker <brobecker@adacore.com>
10892
10893 * server.c (gdbserver_version): Update copyright year in version
10894 output.
10895 * gdbreplay.c (gdbreplay_version): Ditto.
10896
eb826dc6
MF
108972010-12-29 Jie Zhang <jie.zhang@analog.com>
10898
10899 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10900 * linux-bfin-low.c: New file.
10901 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10902 PT_DATA_ADDR for BFIN targets.
10903 * Makefile.in (SFILES): Add linux-bfin-low.c.
10904 (clean): Remove reg-bfin.c.
10905 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10906 * README: Mention supported Blackfin targets.
10907
39ab222a
MF
109082010-12-23 Mike Frysinger <vapier@gentoo.org>
10909
10910 * .gitignore: New file.
10911
a1f2ce7d
MF
109122010-11-16 Mike Frysinger <vapier@gentoo.org>
10913
10914 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10915
f474844c
JZ
109162010-10-22 Jie Zhang <jie@codesourcery.com>
10917
10918 * Makefile.in: Add FLAGS_TO_PASS variable.
10919 (install): Remove dependency of install-only and recursively
10920 invoke make for install-only.
10921
f1048712
DE
109222010-10-04 Doug Evans <dje@google.com>
10923
10924 * Makefile.in (uninstall): Use $(DESTDIR).
10925
b53a1623
PA
109262010-09-24 Pedro Alves <pedro@codesourcery.com>
10927
e6ee044d
PA
10928 PR gdb/11842
10929
b53a1623
PA
10930 * linux-x86-low.c (compat_siginfo_from_siginfo)
10931 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10932 si_code is < 0. Check for si_code == SI_TIMER before checking for
10933 si_code < 0.
10934
fa1bd1e4
JB
109352010-09-13 Joel Brobecker <brobecker@adacore.com>
10936
10937 * lynx-i386-low.c: New file.
10938 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10939
47fac8f8
JB
109402010-09-13 Joel Brobecker <brobecker@adacore.com>
10941
10942 * lynx-low.c (ptrace_request_to_str): Remove handling for
10943 request values that have been removed in LynxOS 5.x.
10944
1adfc54d
JB
109452010-09-13 Joel Brobecker <brobecker@adacore.com>
10946
10947 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10948 <ptrace.h>
10949
c2a66c29
NS
109502010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10951
10952 * configure.ac: Add --enable-inprocess-agent option.
10953 * configure: Rebuilt.
10954
32fcada3
YQ
109552010-09-06 Yao Qi <yao@codesourcery.com>
10956
10957 * linux-low.c (linux_kill): Remove unused variable.
10958 (linux_stabilize_threads): Likewise.
10959 * server.c (start_inferior): Likewise.
10960 (queue_stop_reply_callback): Likewise.
10961 * tracepoint.c (do_action_at_tracepoint): Likewise.
10962
0cccb683
YQ
109632010-09-06 Yao Qi <yao@codesourcery.com>
10964
10965 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10966 on return.
10967
423ec54c
JK
109682010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10969
10970 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10971
12ac6819
PA
109722010-09-06 Pedro Alves <pedro@codesourcery.com>
10973
10974 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10975 "$(IPA_DEPFILES)".
10976
8ed54b31
JB
109772010-09-01 Joel Brobecker <brobecker@adacore.com>
10978
10979 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10980 gdbserver/lynx-ppc-low.c: New files.
10981 * Makefile.in (lynx_low_h): New variable.
10982 (lynx-low.o, lynx-ppc-low.o): New rules.
10983 * configure.ac: On LynxOS, link with -lnetinet.
10984 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10985 * configure: regenerate.
10986
bb0116a4
JB
109872010-09-01 Joel Brobecker <brobecker@adacore.com>
10988
10989 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10990 * configure.ac: Add check for vasprintf and vsnprintf.
10991 * configure, config.in: Regenerate.
10992 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10993
a778ab81 109942010-09-01 Joel Brobecker <brobecker@adacore.com>
10995
10996 * gdbreplay.c: Move include of alloca.h up, next to include of
10997 malloc.h.
10998 * server.h: Add include of malloc.h.
10999 * mem-break.c: Remove include of malloc.h.
11000 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11001
8b034a19 110022010-09-01 Joel Brobecker <brobecker@adacore.com>
11003
11004 * Makefile.in (memmem.o): Build with -Wno-error.
11005
110062010-09-01 Joel Brobecker <brobecker@adacore.com>
11007
11008 * utils.c (xsnprintf): Make non-static.
11009 * server.h: Add xsnprintf declaration.
11010 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11011 replace calls to snprintf by calls to xsnprintf throughout.
11012
110132010-09-01 Joel Brobecker <brobecker@adacore.com>
11014
11015 * configure.ac: Add configure check for alloca.
11016 * configure, config.in: Regenerate.
11017 * server.h: Include alloca.h if it exists.
11018 * gdbreplay.c: Include alloca.h if it exists.
11019
1a981360
PA
110202010-08-28 Pedro Alves <pedro@codesourcery.com>
11021
11022 * linux-low.c (__SIGRTMIN): Define if not already defined.
11023 (linux_create_inferior): Check for __ANDROID__ rather than
11024 __SIGRTMIN.
11025 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11026 are already deferred.
11027 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11028 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11029 stopped and already has a pending signal to report.
11030 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11031 a pending signal to report or is moving out of a jump pad.
11032 (linux_init_signals): Check for __ANDROID__ rather than
11033 __SIGRTMIN.
11034
b4d51a55
PA
110352010-08-28 Pedro Alves <pedro@codesourcery.com>
11036
11037 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11038 debug_threads check. Avoid a linear search when not doing debug
11039 output.
11040
ec48365d
PA
110412010-08-27 Pedro Alves <pedro@codesourcery.com>
11042
11043 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11044 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11045 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11046 (process_event): Change local fd's type to gdb_fildes_t.
11047 (create_file_handler): Adjust prototype.
11048 (delete_file_handler): Adjust prototype.
11049 (handle_file_event): Adjust prototype. Use pfildes.
11050 (create_file_event): Adjsut prototype.
11051 * remote-utils.c (remote_desc, listen_desc): Change type to
11052 gdb_fildes_t.
11053 * server.h: New gdb_fildes_t typedef.
11054 [USE_WIN32API]: Include winsock2.h.
11055 (delete_file_handler, add_file_handler): Adjust prototypes.
11056 (pfildes): Declare.
11057 * utils.c (pfildes): New.
11058
854d88f0
PA
110592010-08-27 Pedro Alves <pedro@codesourcery.com>
11060
11061 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11062 * configure: Regenerate.
11063
0146f85b
PA
110642010-08-27 Pedro Alves <pedro@codesourcery.com>
11065
11066 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11067 (linux_done_accessing_memory): ... this.
11068 (linux_target_ops): Adjust.
11069 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11070 * nto-low.c (nto_target_ops): Adjust comment.
11071 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11072 * spu-low.c (spu_target_ops): Adjust comment.
11073 * target.h (target_ops): Rename unprepare_to_access_memory field
11074 to done_accessing_memory.
11075 (unprepare_to_access_memory): Rename to ...
11076 (done_accessing_memory): ... this.
11077
90d74c30
PA
110782010-08-26 Pedro Alves <pedro@codesourcery.com>
11079
11080 * linux-low.c (linux_prepare_to_access_memory): New.
11081 (linux_unprepare_to_access_memory): New.
11082 (linux_target_ops): Install them.
11083 * server.c (read_memory): Rename to ...
11084 (gdb_read_memory): ... this. Use
11085 prepare_to_access_memory/prepare_to_access_memory.
11086 (write_memory): Rename to ...
11087 (gdb_write_memory): ... this. Use
11088 prepare_to_access_memory/prepare_to_access_memory.
11089 (handle_search_memory_1): Adjust.
11090 (process_serial_event): Adjust.
11091 * target.h (struct target_ops): New fields
11092 prepare_to_access_memory and unprepare_to_access_memory.
11093 (prepare_to_access_memory, unprepare_to_access_memory): New.
11094 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11095 prepare_to_access_memory/prepare_to_access_memory.
11096 * nto-low.c (nto_target_ops): Adjust.
11097 * spu-low.c (spu_target_ops): Adjust.
11098 * win32-low.c (win32_target_ops): Adjust.
11099
fd467969
PA
111002010-08-26 Pedro Alves <pedro@codesourcery.com>
11101
11102 * Makefile.in (WARN_CFLAGS): Get it from configure.
11103 (WERROR_CFLAGS): New.
11104 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11105 * configure.ac: Introduce --enable-werror, which adds -Werror to
11106 the compiler command line. Enabled by default. Disable with
11107 --disable-werror. Add -Wdeclaration-after-statement
11108 Wpointer-arith and -Wformat-nonliteral to warning flags.
11109 * configure: Regenerate.
11110
331e2f5f
PA
111112010-08-26 Pedro Alves <pedro@codesourcery.com>
11112
11113 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11114
e581f2b4
PA
111152010-08-26 Pedro Alves <pedro@codesourcery.com>
11116
11117 * gdbreplay.c (remote_error): New.
11118 (gdbchar): New.
11119 (expect): Use gdbchar. Check for error reading from GDB.
11120 Clarify sync error output.
11121 (play): Check for errors writing to GDB.
11122 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11123 * remote-utils.c (getpkt): Check for errors writing to the remote
11124 descriptor.
11125
3c11dd79
PA
111262010-08-25 Pedro Alves <pedro@codesourcery.com>
11127
11128 * linux-low.c (linux_wait_1): Move non-debugging code out of
11129 `debug_threads' control.
11130
d20a8ad9
PA
111312010-08-25 Pedro Alves <pedro@codesourcery.com>
11132
11133 * linux-low.c (linux_wait_1): Don't set last_status here.
11134 * server.c (push_event, queue_stop_reply_callback): Assert we're
11135 not pushing a TARGET_WAITKIND_IGNORE event.
11136 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11137 (myresume, handle_target_event): Set the thread's last_resume_kind
11138 and last_status from the target returned status.
11139
964e4306
PA
111402010-08-25 Pedro Alves <pedro@codesourcery.com>
11141
11142 PR threads/10729
11143
11144 * linux-x86-low.c (update_debug_registers_callback): New.
11145 (i386_dr_low_set_addr): Use it.
11146 (i386_dr_low_get_addr): New.
11147 (i386_dr_low_set_control): Use update_debug_registers_callback.
11148 (i386_dr_low_get_control): New.
11149 (i386_dr_low_get_status): Adjust.
11150 * linux-low.c (linux_stop_lwp): New.
11151 * linux-low.h (linux_stop_lwp): Declare.
11152
11153 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11154 argument instead of a i386_debug_reg_state.
11155 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11156 a i386_debug_reg_state.
11157 (i386_insert_aligned_watchpoint): Adjust.
11158 (i386_remove_aligned_watchpoint): Adjust.
11159 (i386_low_stopped_data_address): Read the debug registers from the
11160 inferior instead of from the mirrors.
11161 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11162 (i386_dr_low_get_addr): Declare.
11163 (i386_dr_low_get_control): Declare.
11164 (i386_dr_low_get_status): Change prototype.
11165
11166 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11167 (i386_dr_low_get_addr): New.
11168 (i386_dr_low_get_control): New.
11169 (i386_dr_low_get_status): Adjust prototype. Return
11170 dr_status_mirror.
11171 (i386_initial_stuff): Clear dr_status_mirror and
11172 dr_control_mirror.
11173 (i386_get_thread_context): Adjust.
11174 (i386_set_thread_context): Adjust.
11175 (i386_thread_added): Adjust.
11176
5f21a75b
PA
111772010-08-24 Pedro Alves <pedro@codesourcery.com>
11178
11179 * linux-low.h (linux_thread_area): Delete declaration.
11180
3e4c1235
TS
111812010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11182
11183 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11184 after its termination.
11185
1971b033
PA
111862010-08-09 Pedro Alves <pedro@codesourcery.com>
11187
11188 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11189 (gdb_wants_all_stopped): Delete.
11190 (linux_wait_1): Don't call them.
11191 * server.c (handle_v_cont): Tag all threads as want-stopped.
11192 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11193 stopped as "client-wants-stopped".
11194
310444ac
PA
111952010-07-31 Pedro Alves <pedro@codesourcery.com>
11196
11197 * Makefile.in (signals_h): New.
11198 (server_h): Depend on it.
11199 (server.o): Don't depend on $(signals_def).
11200 (signals.o): Depend on $(signals_def).
11201
a19cae16
JK
112022010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11203
11204 * Makefile.in (signals_def): New.
11205 (server_h): Append include/gdb/signals.h and signals_def.
11206 (server.o): Append signals_def.
11207
30d50328
JK
112082010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11209
11210 * server.c (handle_target_event): Use target_signal_to_host for
11211 resume_info.sig initialization.
11212 * target.h (struct thread_resume) <sig>: New comment.
11213
5c3216e2
OS
112142010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11215
c6f46ca0
OS
11216 * server.c (handle_query): strcpy() the returned string from paddress()
11217 instead of sprintf().
5c3216e2
OS
11218 * utils.c (paddress): Return phex_nz().
11219
6bd31874
JB
112202010-07-07 Joel Brobecker <brobecker@adacore.com>
11221
11222 * server.c (handle_v_cont): Call mourn_inferior if process
11223 just exited.
11224 (myresume): Likewise.
11225
0fb4aa4b
PA
112262010-07-01 Pedro Alves <pedro@codesourcery.com>
11227
11228 Static tracepoints, and integration with UST.
11229
11230 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11231 * mem-break.c (uninsert_all_breakpoints)
11232 (reinsert_all_breakpoints): New.
11233 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11234 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11235 (gdb_agent_ust_loaded, helper_thread_id)
11236 (gdb_agent_helper_thread_id): New macros.
11237 (struct ipa_sym_addresses): Add addr_ust_loaded,
11238 addr_helper_thread_id, addr_cmd_buf.
11239 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11240 (in_process_agent_loaded_ust): New.
11241 (write_e_ust_not_loaded): New.
11242 (maybe_write_ipa_ust_not_loaded): New.
11243 (struct collect_static_trace_data_action): New.
11244 (enum tracepoint_type) <static_tracepoint>: New.
11245 (struct tracepoint) <handle>: Mention static tracepoints.
11246 (struct static_tracepoint_ctx): New.
11247 (CMD_BUF_SIZE): New.
11248 (add_tracepoint_action): Handle static tracepoint actions.
11249 (unprobe_marker_at): New.
11250 (clear_installed_tracepoints): Handle static tracepoints.
11251 (cmd_qtdp): Handle static tracepoints.
11252 (probe_marker_at): New.
11253 (cmd_qtstart): Handle static tracepoints.
11254 (response_tracepoint): Handle static tracepoints.
11255 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11256 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11257 (get_context_regcache): Handle static tracepoints.
11258 (do_action_at_tracepoint): Handle static tracepoint actions.
11259 (traceframe_find_block_type): Handle static trace data blocks.
11260 (traceframe_read_sdata): New.
11261 (download_tracepoints): Download static tracepoint actions.
11262 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11263 (GDB_PROBE_NAME): New.
11264 (ust_ops): New.
11265 (GET_UST_SYM): New.
11266 (USTF): New.
11267 (dlsym_ust): New.
11268 (ust_marker_to_static_tracepoint): New.
11269 (gdb_probe): New.
11270 (collect_ust_data_at_tracepoint): New.
11271 (gdb_ust_probe): New.
11272 (UNIX_PATH_MAX, SOCK_DIR): New.
11273 (gdb_ust_connect_sync_socket): New.
11274 (resume_thread, stop_thread): New.
11275 (run_inferior_command): New.
11276 (init_named_socket): New.
11277 (gdb_ust_socket_init): New.
11278 (cstr_to_hexstr): New.
11279 (next_st): New.
11280 (first_marker, next_marker): New.
11281 (response_ust_marker): New.
11282 (cmd_qtfstm, cmd_qtsstm): New.
11283 (unprobe_marker_at, probe_marker_at): New.
11284 (cmd_qtstmat, gdb_ust_thread): New.
11285 (gdb_ust_init): New.
11286 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11287 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11288 (ST_REGENTRY): New.
11289 (x86_64_st_collect_regmap): New.
11290 (X86_64_NUM_ST_COLLECT_GREGS): New.
11291 (AMD64_RIP_REGNUM): New.
11292 (supply_static_tracepoint_registers): New.
11293 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11294 (ST_REGENTRY): New.
11295 (i386_st_collect_regmap): New.
11296 (i386_NUM_ST_COLLECT_GREGS): New.
11297 (supply_static_tracepoint_registers): New.
11298 * server.c (handle_query): Handle qXfer:statictrace:read.
11299 <qSupported>: Report support for StaticTracepoints, and
11300 qXfer:statictrace:read features.
11301 * server.h (traceframe_read_sdata)
11302 (supply_static_tracepoint_registers): Declare.
11303 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11304 (unpack_varlen_hex): Include in IPA build.
11305 * Makefile.in (ustlibs, ustinc): New.
11306 (IPA_OBJS): Add remote-utils-ipa.o.
11307 ($(IPA_LIB)): Link -ldl and -lpthread.
11308 (UST_CFLAGS): New.
11309 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11310 * config.in, configure: Regenerate.
11311
9e4344e5
PA
113122010-06-20 Ian Lance Taylor <iant@google.com>
11313 Pedro Alves <pedro@codesourcery.com>
11314
11315 * linux-x86-low.c (always_true): Delete.
11316 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11317 trying to fool the compiler with always_true.
11318
c6beb2cb
PA
113192010-06-20 Pedro Alves <pedro@codesourcery.com>
11320
11321 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11322 conditions in gdbserver.
11323
d2ed6730
UW
113242010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11325
11326 * spu-low.c (spu_read_memory): Wrap around local store limit.
11327 (spu_write_memory): Likewise.
11328
4e29fb54
PA
113292010-06-15 Pedro Alves <pedro@codesourcery.com>
11330
11331 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11332 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11333 LONGEST uses.
11334 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11335 uses.
11336 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11337 uses with LONGEST uses.
11338
6a271cae
PA
113392010-06-14 Stan Shebs <stan@codesourcery.com>
11340 Pedro Alves <pedro@codesourcery.com>
11341
11342 Bytecode compiler.
11343
11344 * linux-x86-low.c: Include limits.h.
11345 (add_insns): New.
11346 (always_true): New.
11347 (EMIT_ASM): New.
11348 (EMIT_ASM32): New.
11349 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11350 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11351 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11352 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11353 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11354 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11355 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11356 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11357 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11358 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11359 (amd64_emit_void_call_2): New.
11360 (amd64_emit_ops): New.
11361 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11362 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11363 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11364 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11365 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11366 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11367 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11368 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11369 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11370 (i386_emit_stack_adjust, i386_emit_int_call_1)
11371 (i386_emit_void_call_2): New.
11372 (i386_emit_ops): New.
11373 (x86_emit_ops): New.
11374 (the_low_target): Install x86_emit_ops.
11375 * server.h (struct emit_ops): New.
11376 (get_raw_reg_func_addr): Declare.
11377 (current_insn_ptr, emit_error): Declare.
11378 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11379 (set_trace_state_variable_value): New defines.
11380 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11381 addr_get_trace_state_variable_value and
11382 addr_set_trace_state_variable_value.
11383 (symbol_list): New fields for get_raw_reg,
11384 get_trace_state_variable_value and set_trace_state_variable_value.
11385 (condfn): New typedef.
11386 (struct tracepoint): New field `compiled_cond'.
11387 (do_action_at_tracepoint): Clear compiled_cond.
11388 (get_trace_state_variable_value, set_trace_state_variable_value):
11389 Export in the IPA.
11390 (condition_true_at_tracepoint): If there's a compiled condition,
11391 run that.
11392 (current_insn_ptr, emit_error): New globals.
11393 (struct bytecode_address): New.
11394 (get_raw_reg_func_addr): New.
11395 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11396 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11397 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11398 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11399 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11400 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11401 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11402 (compile_tracepoint_condition, compile_bytecodes): New.
11403 * target.h (emit_ops): Forward declare.
11404 (struct target_ops): New field emit_ops.
11405 (target_emit_ops): New.
11406 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11407 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11408 * linux-low.c (linux_emit_ops): New.
11409 (linux_target_ops): Install it.
11410 * linux-low.h (struct linux_target_ops): New field emit_ops.
11411
92b72907
UW
114122010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11413
11414 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11415 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11416
fa593d66
PA
114172010-06-01 Pedro Alves <pedro@codesourcery.com>
11418 Stan Shebs <stan@codesourcery.com>
11419
11420 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11421 (all): Depend on $(extra_libraries).
11422 (install-only): Install the IPA.
11423 (IPA_OBJS, IPA_LIB): New.
11424 (clean): Remove the IPA lib.
11425 (IPAGENT_CFLAGS): New.
11426 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11427 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11428 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11429 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11430 * configure.ac: Check for atomic builtins support in the compiler.
11431 (IPA_DEPFILES, extra_libraries): Define.
11432 * configure.srv (ipa_obj): Add description.
11433 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11434 (i[34567]86-*-linux*): Set ipa_obj.
11435 (x86_64-*-linux*): Set ipa_obj.
11436 * linux-low.c (stabilizing_threads): New.
11437 (supports_fast_tracepoints): New.
11438 (linux_detach): Stabilize threads before detaching.
11439 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11440 the lwp is either not stabilizing, or is moving out of a jump pad.
11441 (linux_fast_tracepoint_collecting): New.
11442 (maybe_move_out_of_jump_pad): New.
11443 (enqueue_one_deferred_signal): New.
11444 (dequeue_one_deferred_signal): New.
11445 (linux_wait_for_event_1): If moving out of a jump pad, defer
11446 pending signals to later.
11447 (linux_stabilize_threads): New.
11448 (linux_wait_1): Check if threads need moving out of jump pads, and
11449 do it if so.
11450 (stuck_in_jump_pad_callback): New.
11451 (move_out_of_jump_pad_callback): New.
11452 (lwp_running): New.
11453 (linux_resume_one_lwp): Handle moving out of jump pads.
11454 (linux_set_resume_request): Dequeue deferred signals.
11455 (need_step_over_p): Also step over fast tracepoint jumps.
11456 (start_step_over): Also uninsert fast tracepoint jumps.
11457 (finish_step_over): Also reinsert fast tracepoint jumps.
11458 (linux_install_fast_tracepoint_jump): New.
11459 (linux_target_ops): Install linux_stabilize_threads and
11460 linux_install_fast_tracepoint_jump_pad.
11461 * linux-low.h (linux_target_ops) <get_thread_area,
11462 install_fast_tracepoint_jump_pad>: New fields.
11463 (struct lwp_info) <collecting_fast_tracepoint,
11464 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11465 (linux_get_thread_area): Declare.
11466 * linux-x86-low.c (jump_insn): New.
11467 (x86_get_thread_area): New.
11468 (append_insns): New.
11469 (push_opcode): New.
11470 (amd64_install_fast_tracepoint_jump_pad): New.
11471 (i386_install_fast_tracepoint_jump_pad): New.
11472 (x86_install_fast_tracepoint_jump_pad): New.
11473 (the_low_target): Install x86_get_thread_area and
11474 x86_install_fast_tracepoint_jump_pad.
11475 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11476 (struct fast_tracepoint_jump): New.
11477 (fast_tracepoint_jump_insn): New.
11478 (fast_tracepoint_jump_shadow): New.
11479 (find_fast_tracepoint_jump_at): New.
11480 (fast_tracepoint_jump_here): New.
11481 (delete_fast_tracepoint_jump): New.
11482 (set_fast_tracepoint_jump): New.
11483 (uninsert_fast_tracepoint_jumps_at): New.
11484 (reinsert_fast_tracepoint_jumps_at): New.
11485 (set_breakpoint_at): Use write_inferior_memory.
11486 (uninsert_raw_breakpoint): Use write_inferior_memory.
11487 (check_mem_read): Mask out fast tracepoint jumps.
11488 (check_mem_write): Mask out fast tracepoint jumps.
11489 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11490 (set_fast_tracepoint_jump): Declare.
11491 (delete_fast_tracepoint_jump)
11492 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11493 (reinsert_fast_tracepoint_jumps_at): Declare.
11494 * regcache.c: Don't compile many functions when building the
11495 in-process agent library.
11496 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11497 the register buffer in the heap.
11498 (free_register_cache): If the register buffer isn't owned by the
11499 regcache, don't free it.
11500 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11501 pre-existing register caches.
11502 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11503 type.
11504 (convert_ascii_to_int): : Constify `from' parameter type.
11505 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11506 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11507 the needed buffer in-place.
11508 (relocate_instruction): New.
11509 * server.c (handle_query) <qSymbols>: If the target supports
11510 tracepoints, give it a chance of looking up symbols. Report
11511 support for fast tracepoints.
11512 (handle_status): Stabilize threads.
11513 (process_serial_event): Adjust.
11514 * server.h (struct fast_tracepoint_jump): Forward declare.
11515 (struct process_info) <fast_tracepoint_jumps>: New field.
11516 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11517 (decode_X_packet, decode_M_packet): Adjust.
11518 (relocate_instruction): Declare.
11519 (in_process_agent_loaded): Declare.
11520 (tracepoint_look_up_symbols): Declare.
11521 (struct fast_tpoint_collect_status): Declare.
11522 (fast_tracepoint_collecting): Declare.
11523 (force_unlock_trace_buffer): Declare.
11524 (handle_tracepoint_bkpts): Declare.
11525 (initialize_low_tracepoint)
11526 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11527 * target.h (struct target_ops) <stabilize_threads,
11528 install_fast_tracepoint_jump_pad>: New fields.
11529 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11530 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11531 [HAVE_STDINT_H]: Include stdint.h.
11532 (trace_debug_1): Rename to ...
11533 (trace_vdebug): ... this.
11534 (trace_debug): Rename to ...
11535 (trace_debug_1): ... this. Add `level' parameter.
11536 (trace_debug): New.
11537 (ATTR_USED, ATTR_NOINLINE): New.
11538 (IP_AGENT_EXPORT): New.
11539 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11540 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11541 (about_to_request_buffer_space, trace_buffer_is_full)
11542 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11543 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11544 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11545 (traceframe_write_count, traceframes_created)
11546 (trace_state_variables)
11547 New renaming defines.
11548 (struct ipa_sym_addresses): New.
11549 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11550 (symbol_list): New.
11551 (ipa_sym_addrs): New.
11552 (all_tracepoint_symbols_looked_up): New.
11553 (in_process_agent_loaded): New.
11554 (write_e_ipa_not_loaded): New.
11555 (maybe_write_ipa_not_loaded): New.
11556 (tracepoint_look_up_symbols): New.
11557 (debug_threads) [IN_PROCESS_AGENT]: New.
11558 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11559 (UNKNOWN_SIDE_EFFECTS): New.
11560 (stop_tracing): New.
11561 (flush_trace_buffer): New.
11562 (stop_tracing_bkpt): New.
11563 (flush_trace_buffer_bkpt): New.
11564 (read_inferior_integer): New.
11565 (read_inferior_uinteger): New.
11566 (read_inferior_data_pointer): New.
11567 (write_inferior_data_pointer): New.
11568 (write_inferior_integer): New.
11569 (write_inferior_uinteger): New.
11570 (struct collect_static_trace_data_action): Delete.
11571 (enum tracepoint_type): New.
11572 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11573 <actions_str, step_actions, step_actions_str>: Only include in
11574 GDBserver.
fa593d66
PA
11575 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11576 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11577 (tracepoints): Use IP_AGENT_EXPORT.
11578 (last_tracepoint): Don't include in the IPA.
11579 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11580 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11581 (alloced_trace_state_variables): New.
11582 (trace_state_variables): Use IP_AGENT_EXPORT.
11583 (traceframe_t): Delete unused variable.
11584 (circular_trace_buffer): Don't include in the IPA.
11585 (trace_buffer_start): Delete.
11586 (struct trace_buffer_control): New.
11587 (trace_buffer_free): Delete.
11588 (struct ipa_trace_buffer_control): New.
11589 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11590 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11591 New.
11592 (trace_buffer_ctrl): New.
11593 (TRACE_BUFFER_CTRL_CURR): New.
11594 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11595 Reimplement as macros.
11596 (trace_buffer_wrap): Delete.
11597 (traceframe_write_count, traceframe_read_count)
11598 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11599 (struct tracepoint_hit_ctx) <type>: New field.
11600 (struct fast_tracepoint_ctx): New.
11601 (memory_barrier): New.
11602 (cmpxchg): New.
11603 (record_tracepoint_error): Update atomically in the IPA.
11604 (clear_inferior_trace_buffer): New.
11605 (about_to_request_buffer_space): New.
11606 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11607 updating the same buffer.
11608 (add_tracepoint): Default the tracepoint's type to trap
11609 tracepoint, and orig_size to -1.
11610 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11611 internal variables.
11612 (create_trace_state_variable): New parameter `gdb'. Handle it.
11613 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11614 (cmd_qtdp): Handle fast tracepoints.
11615 (cmd_qtdv): Adjust.
11616 (max_jump_pad_size): New.
11617 (gdb_jump_pad_head): New.
11618 (get_jump_space_head): New.
11619 (claim_jump_space): New.
11620 (sort_tracepoints): New.
11621 (MAX_JUMP_SIZE): New.
11622 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11623 IPA.
11624 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11625 support. Upload fast traceframes, and delete internal IPA
11626 breakpoints.
11627 (stop_tracing_handler): New.
11628 (flush_trace_buffer_handler): New.
11629 (cmd_qtstop): Upload fast tracepoints.
11630 (response_tracepoint): Handle fast tracepoints.
11631 (tracepoint_finished_step): Upload fast traceframes. Set the
11632 tracepoint hit context's tracepoint type.
11633 (handle_tracepoint_bkpts): New.
11634 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11635 type. Add comment about fast tracepoints.
11636 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11637 non-existing action_str field.
11638 (get_context_regcache): Handle fast tracepoints.
11639 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11640 to the regcache.
11641 (fast_tracepoint_from_jump_pad_address): New.
11642 (fast_tracepoint_from_ipa_tpoint_address): New.
11643 (collecting_t): New.
11644 (force_unlock_trace_buffer): New.
11645 (fast_tracepoint_collecting): New.
11646 (collecting): New.
11647 (gdb_collect): New.
11648 (write_inferior_data_ptr): New.
11649 (target_tp_heap): New.
11650 (target_malloc): New.
11651 (download_agent_expr): New.
11652 (UALIGN): New.
11653 (download_tracepoints): New.
11654 (download_trace_state_variables): New.
11655 (upload_fast_traceframes): New.
11656 (IPA_FIRST_TRACEFRAME): New.
11657 (IPA_NEXT_TRACEFRAME_1): New.
11658 (IPA_NEXT_TRACEFRAME): New.
11659 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11660 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11661 (gdb_jump_pad_buffer_end): New.
11662 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11663 (initialize_tracepoint): Adjust.
11664 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11665 buffer. Initialize the low module.
11666 * utils.c (PREFIX, TOOLNAME): New.
11667 (malloc_failure): Use PREFIX.
11668 (error): In the IPA, an error causes an exit.
11669 (fatal, warning): Use PREFIX.
11670 (internal_error): Use TOOLNAME.
11671 (NUMCELLS): Increase to 10.
11672 * configure, config.in: Regenerate.
11673
d149dd1d
PA
116742010-06-01 Pedro Alves <pedro@codesourcery.com>
11675
11676 * server.c (handle_query) <qSupported>: Do two passes over the
11677 qSupported string to avoid nesting strtok.
11678
f6528abd
JK
116792010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11680
11681 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11682 (CDEPS): New.
11683 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11684 -Wl,--dynamic-list.
11685 * configure: Regenerate.
11686 * proc-service.list: New.
11687
ca2a87a0
JK
116882010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11689
11690 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11691 New comment.
11692
363a6e9f
OS
116932010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11694
11695 * gdbreplay.c (remote_open): Check error return from socket() call by
11696 its equality to -1 not by it being negative.
11697 * remote-utils.c (remote_open): Likewise.
11698
d23b6cb1
PA
116992010-05-23 Pedro Alves <pedro@codesourcery.com>
11700
11701 * config.h: Regenerate.
11702
28d3cf85
MK
117032010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11704
11705 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11706 doesn't provide PTRACE_GET_THREAD_AREA.
11707
fea36a59
MK
117082010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11709
11710 * linux-m68k-low.c: Include <asm/ptrace.h>
11711 (ps_get_thread_area): Implement.
11712
24b066ba
DE
117132010-05-03 Doug Evans <dje@google.com>
11714
11715 * event-loop.c (struct callback_event): New struct.
11716 (callback_list): New global.
11717 (append_callback_event, delete_callback_event): New functions.
11718 (process_callback): New function.
11719 (start_event_loop): Call it.
11720 * remote-utils.c (NOT_SCHEDULED): Define.
11721 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11722 moved out of readchar.
11723 (readchar): Rewrite. Call reschedule before returning.
11724 (reset_readchar): New function.
11725 (remote_close): Call it.
11726 (process_remaining, reschedule): New functions.
11727 * server.h (callback_handler_func): New typedef.
11728 (append_callback_event, delete_callback_event): Declare.
11729
9836d6ea
PA
117302010-05-03 Pedro Alves <pedro@codesourcery.com>
11731
11732 * proc-service.c (ps_pglobal_lookup): Use
11733 thread_db_look_up_one_symbol.
11734 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11735 parameter. Use it instead of all_symbols_looked_up.
11736 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11737 field.
11738 (all_symbols_looked_up): Don't declare.
11739 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11740 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11741 field.
11742 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11743 Set all_symbols_looked_up here.
11744 (thread_db_look_up_one_symbol): New.
11745 (thread_db_get_tls_address): Adjust.
11746 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11747 thread_db object on the heap, and tentatively set it in the
11748 process structure.
11749 (thread_db_init): Don't set all_symbols_looked_up here.
11750 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11751
7984d532
PA
117522010-05-03 Pedro Alves <pedro@codesourcery.com>
11753
11754 * linux-low.c (linux_kill, linux_detach): Adjust.
11755 (status_pending_p_callback): Remove redundant statement. Check
11756 for !TARGET_WAITIKIND_IGNORE, instead of
11757 TARGET_WAITKIND_STOPPED.
11758 (handle_tracepoints): Make sure LWP is locked. Adjust.
11759 (linux_wait_for_event_1): Adjust.
11760 (linux_cancel_breakpoints): New.
11761 (unsuspend_one_lwp): New.
11762 (unsuspend_all_lwps): New.
11763 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11764 (send_sigstop_callback): Change return type to int, add new
11765 `except' parameter and handle it.
11766 (suspend_and_send_sigstop_callback): New.
11767 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11768 pass them down. If SUSPEND, also increment the lwp's suspend
11769 count.
11770 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11771 (need_step_over_p): Don't consider suspended LWPs.
11772 (start_step_over): Adjust.
11773 (proceed_one_lwp): Change return type to int, add new `except'
11774 parameter and handle it.
11775 (unsuspend_and_proceed_one_lwp): New.
11776 (proceed_all_lwps): Use find_inferior instead of
11777 for_each_inferior.
11778 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11779 also decrement the suspend count of LWPs. Pass `except' down,
11780 instead of hacking its suspend count.
11781 (linux_pause_all): Add `freeze' parameter. Adjust.
11782 (linux_unpause_all): New.
11783 (linux_target_ops): Install linux_unpause_all.
11784 * server.c (handle_status): Adjust.
11785 * target.h (struct target_ops): New fields `unpause_all' and
11786 `cancel_breakpoints'. Add new parameter to `pause_all'.
11787 (pause_all): Add new `freeze' parameter.
11788 (unpause_all): New.
11789 (cancel_breakpoints): New.
11790 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11791 cancel breakpoints.
11792 (cmd_qtstart): Pause threads.
11793 (stop_tracing): Pause threads, and cancel breakpoints.
11794 * win32-low.c (win32_target_ops): Adjust.
11795
e471f25b
PA
117962010-05-03 Pedro Alves <pedro@codesourcery.com>
11797
11798 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11799 the inferior right away from here...
11800 (linux_wait_1): ... to here, and adjust to check the thread's
11801 last_resume_kind instead of the lwp's step or stop_expected flags.
11802
1915ef4f
PA
118032010-05-02 Pedro Alves <pedro@codesourcery.com>
11804
11805 * README: Use consistent `GDB' and `GDBserver' spellings.
11806
f9e39928
PA
118072010-05-02 Pedro Alves <pedro@codesourcery.com>
11808
11809 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11810 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11811 (linux_detach_one_lwp): Assume the lwp is stopped.
11812 (any_thread_of): Delete.
11813 (linux_detach): Stop all lwps here. Don't blindly delete all
11814 breakpoints.
11815 (delete_lwp_callback): New.
11816 (linux_mourn): Delete all lwps of the process that is gone.
11817 (linux_wait_1): Don't delete the last lwp of the process here.
11818 * mem-break.h (mark_breakpoints_out): Declare.
11819 * mem-break.c (mark_breakpoints_out): New.
11820 (free_all_breakpoints): Use it.
11821 * server.c (handle_target_event): If the process is gone, mark
11822 breakpoints out.
11823 * thread-db.c (struct thread_db) <create_bp>: New field.
11824 (thread_db_enable_reporting): Fix prototype. Store a thread event
11825 breakpoint reference in the thread_db struct.
11826 (thread_db_load_search): Clear the thread_db object.
11827 (try_thread_db_load_1): Ditto.
11828 (switch_to_process): New.
11829 (disable_thread_event_reporting): Use it.
11830 (remove_thread_event_breakpoints): New.
11831 (thread_db_detach, thread_db_mourn): Use it.
11832
1e7fc18c
PA
118332010-05-01 Pedro Alves <pedro@codesourcery.com>
11834
11835 * linux-low.c (linux_enable_event_reporting): New.
11836 (linux_wait_for_event_1, handle_extended_wait): Use it.
11837
02fc4de7
PA
118382010-04-30 Pedro Alves <pedro@codesourcery.com>
11839
11840 * linux-low.c (linux_kill_one_lwp, linux_kill)
11841 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11842 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11843 SIGSTOP even if the LWP is stopped.
11844 (send_sigstop_callback): New.
11845 (stop_all_lwps): Use send_sigstop_callback instead.
11846 (linux_resume_one_thread): Adjust.
11847 (proceed_one_lwp): Still proceed an LWP that the client has
11848 requested to stop, if we haven't reported it as stopped yet. Make
11849 sure that LWPs the client want stopped, have a pending SIGSTOP.
11850
bc3b5632
DE
118512010-04-26 Doug Evans <dje@google.com>
11852
ae1ada35
DE
11853 * server.c (handle_general_set): Make static.
11854
bc3b5632
DE
11855 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11856 Print received char after testing for error/eof instead of before.
11857 (input_interrupt): Tweak comment.
11858
65730243
DE
118592010-04-23 Doug Evans <dje@google.com>
11860
11861 * server.c (start_inferior): Print inferior argv if --debug.
11862
a8ae7dc0
AR
118632010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11864
11865 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11866 * nto-x86-low.c: Include server.h
11867
1c07cc19
PM
118682010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11869
11870 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11871 be consistent with other sources of this directory.
11872 (init_registers_amd64): Correct name of source file of this function
11873 in the comment.
11874
e0a61e09
PM
118752010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11876
11877 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11878 64-bit executables.
11879
54709339
PM
118802010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11881
11882 * win32-i386-low.c: Add 64-bit support.
11883 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11884 (init_registers_amd64): Declare.
11885 (mappings): Add 64-bit version of array.
11886 (init_windows_x86): New function.
11887 (the_low_target): Change init_arch field to init_windows_x86.
11888
e8f0053d
PM
118892010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11890
11891 * win32-low.c: Adapt to support also 64-bit architecture.
11892 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11893 (get_image_name): Use SIZE_T type for local variable `done'.
11894 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11895 (toolhelp_get_dll_name): Idem.
11896 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11897 Use uintptr_t typecast to avoid warning.
11898 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11899 (handle_exception): Use phex_nz to avoid warning.
11900 (win32_wait): Remove unused local variable `process'.
11901
c481e77e
PM
119022010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11903
11904 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11905 `amd64-avx.o'.
11906
12ea4b69
PM
119072010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11908
11909 * configure.ac: Use `ws2_32' library for srv_mingw.
11910 * configure: Regenerate.
11911 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11912 * remote-utils.c: Likewise.
11913
f6d1620c
L
119142010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11915
11916 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11917 if __x86_64__ is defined.
11918
8e642873
PM
119192010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11920
11921 * configure: Regenerate.
11922
711e434b
PM
119232010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11924
11925 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11926 * target.h (target_ops): New get_tib_address field.
11927 * win32-low.h (win32_thread_info): Add thread_local_base field.
11928 * win32-low.c (child_add_thread): Add tlb argument.
11929 Set thread_local_base field to TLB.
11930 (get_child_debug_event): Adapt to child_add_thread change.
11931 (win32_get_tib_address): New function.
11932 (win32_target_ops): Set get_tib_address field to
11933 win32_get_tib_address.
11934 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11935
505106cd
PA
119362010-04-12 Pedro Alves <pedro@codesourcery.com>
11937
505106cd
PA
11938 * linux-low.c (linux_mourn): Also remove the process.
11939 * server.c (handle_target_event): Don't remove the process here.
11940 * nto-low.c (nto_mourn): New.
11941 (nto_target_ops): Install it.
11942 * spu-low.c (spu_mourn): New.
11943 (spu_target_ops): Install it.
11944 * win32-low.c (win32_mourn): New.
11945 (win32_target_ops): Install it.
11946
e8470a06
PA
119472010-04-12 Pedro Alves <pedro@codesourcery.com>
11948
11949 * server.h (buffer_xml_printf): Remove redundant `;'.
11950
45ba0d02
PA
119512010-04-12 Pedro Alves <pedro@codesourcery.com>
11952
11953 * regcache.c (set_register_cache): Invalidate regcaches before
11954 changing the register cache layout.
11955 (regcache_invalidate_one): Allow a NULL regcache.
11956 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11957 regcaches before changing the register cache layout or the target
11958 regsets.
11959
59e04013
L
119602010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11961
11962 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11963 variable warning on Linux/x86-64.
11964
8336d594
PA
119652010-04-11 Pedro Alves <pedro@codesourcery.com>
11966
11967 GDBserver disconnected tracing support.
11968
11969 * linux-low.c (linux_remove_process): Delete.
11970 (add_lwp): Don't set last_resume_kind here.
11971 (linux_kill): Use `mourn'.
11972 (linux_detach): Use `thread_db_detach', and `mourn'.
11973 (linux_mourn): New.
11974 (linux_attach_lwp_1): Adjust comment.
11975 (linux_attach): last_resume_kind moved the thread_info; adjust.
11976 (status_pending_p_callback): Adjust.
11977 (linux_wait_for_event_1): Adjust.
11978 (count_events_callback, select_singlestep_lwp_callback)
11979 (select_event_lwp_callback, cancel_breakpoints_callback)
11980 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11981 (proceed_one_lwp): Adjust.
11982 (linux_async): Add debug output.
11983 (linux_thread_stopped): New.
11984 (linux_pause_all): New.
11985 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11986 linux_pause_all.
11987 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11988 (thread_db_free): Delete declaration.
11989 (thread_db_detach, thread_db_mourn): Declare.
11990 * thread-db.c (thread_db_init): Use thread_db_mourn.
11991 (thread_db_free): Delete, split in two.
11992 (disable_thread_event_reporting): New.
11993 (thread_db_detach): New.
11994 (thread_db_mourn): New.
11995
11996 * server.h (struct thread_info) <last_resume_kind>: New field.
11997 <attached>: Add comment.
11998 <gdb_detached>: New field.
11999 (handler_func): Change return type to int.
12000 (handle_serial_event, handle_target_event): Ditto.
12001 (gdb_connected): Declare.
12002 (tracing): Delete.
12003 (disconnected_tracing): Declare.
12004 (stop_tracing): Declare.
12005
12006 * server.c (handle_query) <qSupported>: Report support for
12007 disconnected tracing.
12008 (queue_stop_reply_callback): Account for running threads.
12009 (gdb_wants_thread_stopped): New.
12010 (gdb_wants_all_threads_stopped): New.
12011 (gdb_reattached_process): New.
12012 (handle_status): Clear the `gdb_detached' flag of all processes.
12013 In all-stop, stop all threads.
12014 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12015 (process_serial_event): If the remote connection breaks, or if an
12016 exit was forced with "monitor exit", force an event loop exit.
12017 Handle disconnected tracing on detach.
12018 (handle_serial_event): Adjust.
12019 (handle_target_event): If GDB isn't connected, forward events back
12020 to the inferior, unless the last process exited, in which case,
12021 exit gdbserver. Adjust interface.
12022
12023 * remote-utils.c (remote_open): Don't block in accept. Instead
12024 register an event loop source on the listen socket file
12025 descriptor. Refactor bits into ...
12026 (listen_desc): ... this new global.
12027 (gdb_connected): ... this new function.
12028 (enable_async_notification): ... this new function.
12029 (handle_accept_event): ... this new function.
12030 (remote_close): Clear remote_desc.
12031
12032 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12033
12034 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12035 New fields.
12036 (mourn_inferior): Define.
12037 (target_process_qsupported): Avoid the dangling else problem.
12038 (thread_stopped): Define.
12039 (pause_all): Define.
12040 (target_waitstatus_to_string): Declare.
12041 * target.c (target_waitstatus_to_string): New.
12042
12043 * tracepoint.c (tracing): Make extern.
12044 (disconnected_tracing): New.
12045 (stop_tracing): Make extern. Handle tracing stops due to GDB
12046 disconnecting.
12047 (cmd_qtdisconnected): New.
12048 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12049 (handle_tracepoint_general_set): Handle QTDisconnected.
12050
12051 * event-loop.c (event_handler_func): Change return type to int.
12052 (process_event): Bail out if the event handler wants the event
12053 loop to stop.
12054 (handle_file_event): Ditto.
12055 (start_event_loop): Bail out if the event handler wants the event
12056 loop to stop.
12057
12058 * nto-low.c (nto_target_ops): Adjust.
12059 * spu-low.c (spu_wait): Don't remove the process here.
12060 (spu_target_ops): Adjust.
12061 * win32-low.c (win32_wait): Don't remove the process here.
12062 (win32_target_ops): Adjust.
12063
5d267c4c
PA
120642010-04-11 Pedro Alves <pedro@codesourcery.com>
12065
12066 * regcache.c (realloc_register_cache): Invalidate inferior's
12067 regcache before recreating it.
12068
623ccd72
PA
120692010-04-09 Pedro Alves <pedro@codesourcery.com>
12070
12071 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12072
219f2f23
PA
120732010-04-09 Stan Shebs <stan@codesourcery.com>
12074 Pedro Alves <pedro@codesourcery.com>
12075
12076 * server.h (LONGEST): New.
12077 (struct thread_info) <while_stepping>: New field.
12078 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12079 Declare.
12080 (initialize_tracepoint, handle_tracepoint_general_set)
12081 (handle_tracepoint_query, tracepoint_finished_step)
12082 (tracepoint_was_hit, release_while_stepping_state_list):
12083 (current_traceframe): Declare.
12084 * server.c (handle_general_set): Handle tracepoint packets.
12085 (read_memory): New.
12086 (write_memory): New.
12087 (handle_search_memory_1): Use read_memory.
12088 (handle_query): Report support for conditional tracepoints, trace
12089 state variables, and tracepoint sources. Handle tracepoint
12090 queries.
12091 (main): Initialize the tracepoints module.
12092 (process_serial_event): Handle traceframe reads/writes.
12093
12094 * linux-low.c (handle_tracepoints): New.
12095 (linux_wait_1): Call it.
12096 (linux_resume_one_lwp): Handle while-stepping.
12097 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12098 (linux_target_ops): Install them.
12099 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12100 New field.
12101 * linux-x86-low.c (x86_supports_tracepoints): New.
12102 (the_low_target). Install it.
12103
12104 * mem-break.h (delete_breakpoint): Declare.
12105 * mem-break.c (delete_breakpoint): Make external.
12106
12107 * target.h (struct target_ops): Add `supports_tracepoints',
12108 `read_pc', and `write_pc' fields.
12109 (target_supports_tracepoints): Define.
12110 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12111 (phex_nz): New.
12112
12113 * regcache.h (struct regcache) <registers_owned>: New field.
12114 (init_register_cache, regcache_cpy): Declare.
12115 (regcache_read_pc, regcache_write_pc): Declare.
12116 (register_cache_size): Declare.
12117 (supply_regblock): Declare.
12118 * regcache.c (init_register_cache): New.
12119 (new_register_cache): Use it.
12120 (regcache_cpy): New.
12121 (register_cache_size): New.
12122 (supply_regblock): New.
12123 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12124
219f2f23
PA
12125 * tracepoint.c: New.
12126
12127 * Makefile.in (OBS): Add tracepoint.o.
12128 (tracepoint.o): New rule.
12129
3a13a53b
L
121302010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12131
12132 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12133 (i386-mmx.o): New.
12134 (i386-mmx.c): Likewise.
12135 (i386-mmx-linux.o): Likewise.
12136 (i386-mmx-linux.c): Likewise.
12137
12138 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12139 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12140 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12141 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12142
12143 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12144 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12145 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12146
1570b33e
L
121472010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12148
12149 * Makefile.in (clean): Updated.
12150 (i386-avx.o): New.
12151 (i386-avx.c): Likewise.
12152 (i386-avx-linux.o): Likewise.
12153 (i386-avx-linux.c): Likewise.
12154 (amd64-avx.o): Likewise.
12155 (amd64-avx.c): Likewise.
12156 (amd64-avx-linux.o): Likewise.
12157 (amd64-avx-linux.c): Likewise.
12158
12159 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12160 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12161 (srv_amd64_regobj): Add amd64-avx.o.
12162 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12163 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12164 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12165 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12166 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12167 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12168 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12169
12170 * i387-fp.c: Include "i386-xstate.h".
12171 (i387_xsave): New.
12172 (i387_cache_to_xsave): Likewise.
12173 (i387_xsave_to_cache): Likewise.
12174 (x86_xcr0): Likewise.
12175
12176 * i387-fp.h (i387_cache_to_xsave): Likewise.
12177 (i387_xsave_to_cache): Likewise.
12178 (x86_xcr0): Likewise.
12179
12180 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12181 * linux-crisv32-low.c (target_regsets): Likewise.
12182 * linux-m68k-low.c (target_regsets): Likewise.
12183 * linux-mips-low.c (target_regsets): Likewise.
12184 * linux-ppc-low.c (target_regsets): Likewise.
12185 * linux-s390-low.c (target_regsets): Likewise.
12186 * linux-sh-low.c (target_regsets): Likewise.
12187 * linux-sparc-low.c (target_regsets): Likewise.
12188 * linux-xtensa-low.c (target_regsets): Likewise.
12189
12190 * linux-low.c: Include <sys/uio.h>.
12191 (regsets_fetch_inferior_registers): Support nt_type.
12192 (regsets_store_inferior_registers): Likewise.
12193 (linux_process_qsupported): New.
12194 (linux_target_ops): Add linux_process_qsupported.
12195
12196 * linux-low.h (regset_info): Add nt_type.
12197 (linux_target_ops): Add process_qsupported.
12198
12199 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12200 and <sys/uio.h>.
12201 (init_registers_i386_avx_linux): New.
12202 (init_registers_amd64_avx_linux): Likewise.
12203 (xmltarget_i386_linux_no_xml): Likewise.
12204 (xmltarget_amd64_linux_no_xml): Likewise.
12205 (PTRACE_GETREGSET): Likewise.
12206 (PTRACE_SETREGSET): Likewise.
12207 (x86_fill_xstateregset): Likewise.
12208 (x86_store_xstateregset): Likewise.
12209 (use_xml): Likewise.
12210 (x86_linux_update_xmltarget): Likewise.
12211 (x86_linux_process_qsupported): Likewise.
12212 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12213 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12214 init_registers_i386_linux here. Call
12215 x86_linux_update_xmltarget.
12216 (the_low_target): Add x86_linux_process_qsupported.
12217
12218 * server.c (handle_query): Call target_process_qsupported.
12219
12220 * target.h (target_ops): Add process_qsupported.
12221 (target_process_qsupported): New.
12222
fc7238bb
PA
122232010-04-03 Pedro Alves <pedro@codesourcery.com>
12224
12225 * inferiors.c (add_thread): Set last_status kind to
12226 TARGET_WAITKIND_IGNORE.
12227 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12228 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12229 (linux_wait_1): Move `thread' local definition to block that uses
12230 it. Don't NULL initialize `event_child'.
12231 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12232 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12233 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12234
bdabb078
PA
122352010-04-01 Pedro Alves <pedro@codesourcery.com>
12236
12237 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12238 an extended waitstatus, or by a watchpoint.
12239 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12240 thread was stepping or has been stopped by a watchpoint.
12241
d3bbe7a0
PA
122422010-04-01 Pedro Alves <pedro@codesourcery.com>
12243
12244 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12245 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12246 of another, then delete the previous, and validate all
12247 breakpoints.
12248 (validate_inserted_breakpoint): New.
12249 (delete_disabled_breakpoints): New.
12250 (validate_breakpoints): New.
12251 (check_mem_read): Validate breakpoints before trusting their
12252 shadow. Delete disabled breakpoints.
12253 (check_mem_write): Validate breakpoints before trusting they
12254 should be inserted. Delete disabled breakpoints.
12255 * mem-break.h (validate_breakpoints):
12256 * server.c (handle_query): Validate breakpoints when we see a
12257 qSymbol query.
12258
8b07ae33
PA
122592010-04-01 Pedro Alves <pedro@codesourcery.com>
12260
12261 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12262 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12263 if we could tell there's a GDB breakpoint at stop_pc.
12264 (need_step_over_p): Don't do a step over if we find a GDB
12265 breakpoint at the resume PC.
12266
12267 * mem-break.c (struct raw_breakpoint): New.
12268 (enum bkpt_type): New type `gdb_breakpoint'.
12269 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12270 fields. New field `raw'.
12271 (find_raw_breakpoint_at): New.
12272 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12273 breakpoint instead.
12274 (set_breakpoint_at): Adjust.
12275 (delete_raw_breakpoint): New.
12276 (release_breakpoint): New.
12277 (delete_breakpoint): Rename to...
12278 (delete_breakpoint_1): ... this. Add proc parameter. Use
12279 release_breakpoint. Return ENOENT.
12280 (delete_breakpoint): Reimplement.
12281 (find_breakpoint_at): Delete.
12282 (find_gdb_breakpoint_at): New.
12283 (delete_breakpoint_at): Delete.
12284 (set_gdb_breakpoint_at): New.
12285 (delete_gdb_breakpoint_at): New.
12286 (gdb_breakpoint_here): New.
12287 (set_reinsert_breakpoint): Use release_breakpoint.
12288 (uninsert_breakpoint): Rename to ...
12289 (uninsert_raw_breakpoint): ... this.
12290 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12291 (reinsert_raw_breakpoint): Change parameter type to
12292 raw_breakpoint.
12293 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12294 instead.
12295 (check_breakpoints): Adjust. Use release_breakpoint.
12296 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12297 (breakpoint_inserted_here): Ditto.
12298 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12299 Don't trust the breakpoint's shadow if it is not inserted.
12300 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12301 (delete_all_breakpoints): Adjust.
12302 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12303 use delete_breakpoint_1.
12304
12305 * mem-break.h (breakpoints_supported): Delete declaration.
12306 (set_gdb_breakpoint_at): Declare.
12307 (gdb_breakpoint_here): Declare.
12308 (delete_breakpoint_at): Delete.
12309 (delete_gdb_breakpoint_at): Declare.
12310
12311 * server.h (struct raw_breakpoint): Forward declare.
12312 (struct process_info): New field `raw_breakpoints'.
12313
12314 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12315 breakpoints.
12316
6bf5e0ba
PA
123172010-03-24 Pedro Alves <pedro@codesourcery.com>
12318
12319 * linux-low.c (status_pending_p_callback): Fix comment.
12320 (linux_wait_for_event_1): Move most of the internal breakpoint
12321 handling from here...
12322 (linux_wait_1): ... to here.
12323 (count_events_callback): New.
12324 (select_singlestep_lwp_callback): New.
12325 (select_event_lwp_callback): New.
12326 (cancel_breakpoints_callback): New.
12327 (select_event_lwp): New.
12328 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12329 priority to all LWPs that have had events that should be reported
12330 to the client. Cancel breakpoints when about to reporting the
12331 event to the client, not while stopping lwps. No longer cancel
12332 finished single-steps here.
12333 (cancel_finished_single_step): Delete.
12334 (cancel_finished_single_steps): Delete.
12335
414a389f
PA
123362010-03-24 Pedro Alves <pedro@codesourcery.com>
12337
12338 * mem-break.c (enum bkpt_type): New.
12339 (struct breakpoint): New field `type'.
12340 (set_breakpoint_at): Change return type to struct breakpoint
12341 pointer. Set type to `other_breakpoint' by default.
12342 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12343 in the breakpoint list.
12344 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12345 (reinsert_breakpoint): Rename to ...
12346 (reinsert_raw_breakpoint): ... this.
12347 (reinsert_breakpoints_at): Adjust.
12348 * mem-break.h (struct breakpoint): Declare.
12349 (set_breakpoint_at): Change return type to struct breakpoint
12350 pointer.
12351
2280c721
PA
123522010-03-24 Pedro Alves <pedro@codesourcery.com>
12353
12354 * server.c (handle_query): Assign, not compare.
12355
d50171e4
PA
123562010-03-24 Pedro Alves <pedro@codesourcery.com>
12357
12358 Teach linux gdbserver to step-over-breakpoints.
12359
12360 * linux-low.c (can_hardware_single_step): New.
12361 (supports_breakpoints): New.
12362 (handle_extended_wait): If stopping threads, read the stop pc of
12363 the new cloned LWP.
12364 (get_pc): New.
12365 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12366 low target doesn't support retrieving the PC.
12367 (add_lwp): Set last_resume_kind to resume_continue.
12368 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12369 (linux_attach): Don't clear stop_expected. Set the lwp's
12370 last_resume_kind to resume_stop.
12371 (linux_detach_one_lwp): Don't check for removed breakpoints.
12372 (check_removed_breakpoint): Delete.
12373 (status_pending_p): Rename to ...
12374 (status_pending_p_callback): ... this. Don't check for removed
12375 breakpoints. Don't consider threads that are stopped from GDB's
12376 perspective.
12377 (linux_wait_for_lwp): Always read the stop_pc here.
12378 (cancel_breakpoint): New.
12379 (step_over_bkpt): New global.
12380 (linux_wait_for_event_1): Implement stepping over breakpoints.
12381 (gdb_wants_lwp_stopped): New.
12382 (gdb_wants_all_stopped): New.
12383 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12384 single-step traps here. Store the thread's last reported target
12385 wait status.
12386 (send_sigstop): Don't clear stop_expected. Always set it,
12387 instead.
12388 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12389 (cancel_finished_single_step): New.
12390 (cancel_finished_single_steps): New.
12391 (wait_for_sigstop): Don't cancel finished single-step traps here.
12392 (linux_resume_one_lwp): Don't check for removed breakpoints.
12393 Don't set `step' on non-hardware step archs.
12394 (linux_set_resume_request): Ignore resume_stop requests if already
12395 stopping or stopped. Set the lwp's last_resume_kind.
12396 (resume_status_pending_p): Don't check for removed breakpoints.
12397 (need_step_over_p): New.
12398 (start_step_over): New.
12399 (finish_step_over): New.
12400 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12401 requests. Clear the thread's last reported target waitstatus.
12402 Don't use the `suspended' flag. Don't consider pending breakpoints.
12403 (linux_resume): Start a step-over if necessary.
12404 (proceed_one_lwp): New.
12405 (proceed_all_lwps): New.
12406 (unstop_all_lwps): New.
12407 * linux-low.h (struct lwp_info): Rewrite comment for the
12408 `suspended' flag. Add the `stop_pc' field. Delete the
12409 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12410 Add `'last_resume_kind' and `need_step_over' fields.
12411 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12412 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12413 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12414 (set_raw_breakpoint_at): New.
12415 (set_breakpoint_at): Rewrite to use it.
12416 (reinsert_breakpoint_handler): Delete.
12417 (set_reinsert_breakpoint): New.
12418 (reinsert_breakpoint_by_bp): Delete.
12419 (delete_reinsert_breakpoints): New.
12420 (uninsert_breakpoint): Rewrite.
12421 (uninsert_breakpoints_at): New.
12422 (reinsert_breakpoint): Rewrite.
12423 (reinsert_breakpoints_at): New.
12424 (check_breakpoints): Rewrite.
12425 (breakpoint_here): New.
12426 (breakpoint_inserted_here): New.
12427 (check_mem_read): Adjust.
12428 * mem-break.h (breakpoints_supported, breakpoint_here)
12429 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12430 (reinsert_breakpoint_by_bp): Delete declaration.
12431 (delete_reinsert_breakpoints): Declare.
12432 (reinsert_breakpoint): Delete declaration.
12433 (reinsert_breakpoints_at): Declare.
12434 (uninsert_breakpoint): Delete declaration.
12435 (uninsert_breakpoints_at): Declare.
12436 (check_breakpoints): Adjust prototype.
12437 * server.h: Adjust include order.
12438 (struct thread_info): Declare here. Add a `last_status' field.
12439
30ba68cb
MS
124402010-03-23 Michael Snyder <msnyder@vmware.com>
12441
12442 * server.c (crc32): New function.
12443 (handle_query): Add handling for 'qCRC:' request.
12444
b9a881c2
PA
124452010-03-23 Pedro Alves <pedro@codesourcery.com>
12446
12447 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12448 lwp had been stopped by a watchpoint.
12449
e92d13d5
PA
124502010-03-16 Pedro Alves <pedro@codesourcery.com>
12451
12452 * server.h (internal_error): Declare.
12453 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12454 * utils.c (internal_error): New function.
12455
64daa791
AS
124562010-03-15 Andreas Schwab <schwab@redhat.com>
12457
12458 * configure.srv: Fix typo setting srv_regobj.
12459
f52cd8cd
PA
124602010-03-15 Pedro Alves <pedro@codesourcery.com>
12461
12462 * linux-low.c (fetch_register): Avoid passing a non string literal
12463 format to `error'.
12464 (usr_store_inferior_registers): Ditto.
12465
93ae6fdc
PA
124662010-03-14 Pedro Alves <pedro@codesourcery.com>
12467
12468 * linux-low.c (linux_write_memory): Bail out early if peeking
12469 memory failed.
12470
c3adc08c
PA
124712010-03-14 Pedro Alves <pedro@codesourcery.com>
12472
12473 * linux-low.h (struct lwp_info): New fields
12474 `stopped_by_watchpoint' and `stopped_data_address'.
12475 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12476 here, and cache them in the lwp object.
12477 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12478 directly.
12479 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12480 field.
12481 (linux_stopped_by_watchpoint): Rewrite.
12482 (linux_stopped_data_address): Rewrite.
12483
bce522a2
PA
124842010-03-06 Simo Melenius <simo.melenius@iki.fi>
12485
12486 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12487 switching the current inferior, not before.
12488
90884b2b
L
124892010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12490
12491 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12492 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12493 i386-linux.c and amd64-linux.c.
12494 (reg-i386.o): Removed.
12495 (reg-i386.c): Likewise.
12496 (reg-i386-linux.o): Likewise.
12497 (reg-i386-linux.c): Likewise.
12498 (reg-x86-64.o): Likewise.
12499 (reg-x86-64.c): Likewise.
12500 (reg-x86-64-linux.o): Likewise.
12501 (reg-x86-64-linux.c): Likewise.
12502 (i386.o): New.
12503 (i386.c): Likewise.
12504 (i386-linux.o): Likewise.
12505 (i386-linux.c): Likewise.
12506 (amd64.o): Likewise.
12507 (amd64.c): Likewise.
12508 (amd64-linux.o): Likewise.
12509 (amd64-linux.c): Likewise.
12510
12511 * configure.srv (srv_i386_regobj): New.
12512 (srv_i386_linux_regobj): Likewise.
12513 (srv_amd64_regobj): Likewise.
12514 (srv_amd64_linux_regobj): Likewise.
12515 (srv_i386_32bit_xmlfiles): Likewise.
12516 (srv_i386_64bit_xmlfiles): Likewise.
12517 (srv_i386_xmlfiles): Likewise.
12518 (srv_amd64_xmlfiles): Likewise.
12519 (srv_i386_linux_xmlfiles): Likewise.
12520 (srv_amd64_linux_xmlfiles): Likewise.
12521 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12522 srv_xmlfiles to $srv_i386_xmlfiles.
12523 (i[34567]86-*-mingw32ce*): Likewise.
12524 (i[34567]86-*-mingw*): Likewise.
12525 (i[34567]86-*-nto*): Likewise.
12526 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12527 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12528 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12529 (x86_64-*-linux*): Likewise.
12530
12531 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12532 (init_registers_amd64_linux): New.
12533 (x86_arch_setup): Replace init_registers_x86_64_linux with
12534 init_registers_amd64_linux.
12535
193f13e6
MK
125362010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12537
12538 * configure.ac: Check for libdl. If it is not available link against
12539 static libthread_db.
12540 * configure: Regenerate.
12541
85d721b8
PA
125422010-02-22 Pedro Alves <pedro@codesourcery.com>
12543
12544 PR9605
12545
12546 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12547 handing a read watchpoint.
12548 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12549
6076632b
DE
125502010-02-12 Doug Evans <dje@google.com>
12551
12552 * linux-low.c (linux_supports_tracefork_flag): Document.
12553 (linux_look_up_symbols): Add comment.
12554
3327ccf7
L
125552010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12556
12557 * regcache.c (supply_register): Clear regcache if buf is NULL.
12558
0718675c 125592010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12560 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12561
12562 * inferiors.c (find_inferior): Add function documentation.
12563 (unloaded_dll): Handle the case where the unloaded dll has not
12564 been previously registered in the dll list.
12565
177321bd
DJ
125662010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12567
12568 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12569 (thumb2_breakpoint): New.
12570 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12571
2b009048
DJ
125722010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12573
12574 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12575 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12576 breakpoints.
12577
3be029c7
PA
125782010-01-21 Pedro Alves <pedro@codesourcery.com>
12579
12580 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12581
18f5de3b
JK
125822010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12583
12584 * linux-s390-low.c (s390_collect_ptrace_register)
12585 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12586
3743bb4f
DE
125872010-01-21 Doug Evans <dje@google.com>
12588
14ce3065
DE
12589 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12590 (PTRACE_ARG4_TYPE): New macro.
12591 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12592 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12593 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12594 (usr_store_inferior_registers): Ditto.
12595 (linux_read_memory, linux_write_memory): Ditto.
12596 (linux_test_for_tracefork): Ditto.
12597
3743bb4f
DE
12598 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12599 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12600
8b315be5
PA
126012010-01-21 Pedro Alves <pedro@codesourcery.com>
12602
12603 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12604 target.
12605
85492558
PA
126062010-01-21 Pedro Alves <pedro@codesourcery.com>
12607
12608 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12609 prototype to take a regcache. Adjust.
12610
442ea881
PA
126112010-01-20 Pedro Alves <pedro@codesourcery.com>
12612
12613 * regcache.h (struct thread_info): Forward declare.
12614 (struct regcache): New.
12615 (new_register_cache): Adjust prototype.
12616 (get_thread_regcache): Declare.
12617 (free_register_cache): Adjust prototype.
12618 (registers_to_string, registers_from_string): Ditto.
12619 (supply_register, supply_register_by_name, collect_register)
12620 (collect_register_as_string, collect_register_by_name): Ditto.
12621 * regcache.c (struct inferior_regcache_data): Delete.
12622 (get_regcache): Rename to ...
12623 (get_thread_regcache): ... this. Adjust. Switch inferior before
12624 fetching registers.
12625 (regcache_invalidate_one): Adjust.
12626 (regcache_invalidate): Fix prototype.
12627 (new_register_cache): Return the new register cache.
12628 (free_register_cache): Change prototype.
12629 (realloc_register_cache): Adjust.
12630 (registers_to_string): Change prototype to take a regcache. Adjust.
12631 (registers_from_string): Ditto.
12632 (register_data): Ditto.
12633 (supply_register): Ditto.
12634 (supply_register_by_name): Ditto.
12635 (collect_register): Ditto.
12636 (collect_register_as_string): Ditto.
12637 (collect_register_by_name): Ditto.
12638 * server.c (process_serial_event): Adjust.
12639 * linux-low.h (regset_fill_func, regset_store_func): Change
12640 prototype.
12641 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12642 Change prototype.
12643 * linux-low.c (get_stop_pc): Adjust.
12644 (check_removed_breakpoint): Adjust.
12645 (linux_wait_for_event): Adjust.
12646 (linux_resume_one_lwp): Adjust.
12647 (fetch_register): Add regcache parameter. Adjust.
12648 (usr_store_inferior_registers): Ditto.
12649 (regsets_fetch_inferior_registers): Ditto.
12650 (regsets_store_inferior_registers): Ditto.
12651 (linux_fetch_registers, linux_store_registers): Ditto.
12652 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12653 regcache. Adjust.
43aaf8b6
PA
12654 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12655 Ditto.
442ea881
PA
12656 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12657 prototype to take a regcache.
12658 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12659 * remote-utils.c (convert_ascii_to_int, outreg)
12660 (prepare_resume_reply): Change prototype to take a regcache.
12661 Adjust.
12662 * target.h (struct target_ops) <fetch_registers, store_registers>:
12663 Change prototype to take a regcache.
12664 (fetch_inferior_registers, store_inferior_registers): Change
12665 prototype to take a regcache. Adjust.
12666 * proc-service.c (ps_lgetregs): Adjust.
12667 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12668 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12669 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12670 take a regcache. Adjust.
12671 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12672 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12673 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12674 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12675 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12676 (cris_cannot_fetch_register):
12677 (cris_breakpoint_at): Change prototype to take a regcache.
12678 Adjust.
12679 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12680 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12681 to take a regcache. Adjust.
12682 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12683 Adjust.
12684 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12685 take a regcache. Adjust.
12686 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12687 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12688 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12689 * linux-mips-low.c (mips_get_pc):
12690 (mips_set_pc): Change prototype to take a regcache. Adjust.
12691 (mips_reinsert_addr): Adjust.
12692 (mips_collect_register): Change prototype to take a regcache.
12693 Adjust.
12694 (mips_supply_register):
12695 (mips_collect_register_32bit, mips_supply_register_32bit)
12696 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12697 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12698 * linux-ppc-low.c (ppc_supply_ptrace_register)
12699 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12700 (parse_spufs_run): Adjust.
12701 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12702 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12703 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12704 take a regcache. Adjust.
12705 * linux-s390-low.c (s390_collect_ptrace_register)
12706 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12707 (s390_set_pc): Change prototype to take a regcache. Adjust.
12708 (s390_arch_setup): Adjust.
12709 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12710 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12711 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12712 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12713 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12714 regcache. Adjust.
12715 (sparc_breakpoint_at): Adjust.
12716 * linux-xtensa-low.c (xtensa_fill_gregset):
12717 (xtensa_store_gregset):
12718 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12719 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12720 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12721 prototype to take a regcache. Adjust.
12722 * win32-arm-low.c (arm_fetch_inferior_register)
12723 (arm_store_inferior_register): Change prototype to take a
12724 regcache. Adjust.
12725 * win32-i386-low.c (i386_fetch_inferior_register)
12726 (i386_store_inferior_register): Change prototype to take a
12727 regcache. Adjust.
12728 * win32-low.c (child_fetch_inferior_registers)
12729 (child_store_inferior_registers): Change prototype to take a
12730 regcache. Adjust.
12731 (win32_wait): Adjust.
12732 (win32_fetch_inferior_registers): Change prototype to take a
12733 regcache. Adjust.
12734 (win32_store_inferior_registers): Adjust.
12735 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12736 store_inferior_register>: Change prototype to take a regcache.
12737
60c3d7b0
DE
127382010-01-20 Doug Evans <dje@google.com>
12739
12740 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12741 #ifdef.
12742 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12743 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12744
dc146f7c
VP
127452010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12746
12747 * linux-low.c (linux_core_of_thread): New.
12748 (compare_ints, show_process, list_threads): New.
12749 (linux_qxfer_osdata): Report threads and cores.
12750 (linux_target_op): Register linux_core_of_thread.
12751 * remote-utils.c (prepare_resume_reply): Report the core.
12752 (buffer_xml_printf): Support %d specifier.
12753 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12754 New.
12755 (handle_query): Handle qXfer:threads. Announce availability
12756 thereof.
12757 * target.h (struct target_ops): New field core_of_thread.
12758
7803799a
UW
127592010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12760
12761 * Makefile.in (clean): Remove new generated files.
12762 (reg-s390.o, reg-s390.c): Remove rules.
12763 (reg-s390x.o, reg-s390x.c): Likewise.
12764 (s390-linux32.o, s390-linux32.c): Add rules.
12765 (s390-linux64.o, s390-linux64.c): Likewise.
12766 (s390x-linux64.o, s390x-linux64.c): Likewise.
12767 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12768 * linux-s390-low.c: Include <elf.h>.
12769 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12770 (init_registers_s390): Remove prototype.
12771 (init_registers_s390x): Likewise.
12772 (init_registers_s390_linux32): Add prototype.
12773 (init_registers_s390_linux64): Likewise.
12774 (init_registers_s390x_linux64): Likewise.
12775 (s390_num_regs_3264): New define.
12776 (s390_regmap_3264): New global variable.
12777 (s390_cannot_fetch_register): Remove obsolete check.
12778 (s390_cannot_store_register): Likewise.
12779 (s390_collect_ptrace_register): Handle upper/lower register halves.
12780 (s390_supply_ptrace_register): Likewise.
12781 (s390_fill_gregset): Update to register number changes.
12782 (s390_get_hwcap): New routine.
12783 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12784 Install appropriate regmap and register set.
12785
6e7ffa39
JB
127862010-01-01 Joel Brobecker <brobecker@adacore.com>
12787
12788 * server.c (gdbserver_version): Update copyright year to 2010.
12789 * gdbreplay.c (gdbreplay_version): Likewise.
12790
957f3f49
DE
127912009-12-28 Doug Evans <dje@google.com>
12792
12793 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12794 elf/external.h. Include <elf.h> instead but only if necessary.
12795
ca5c370d
PA
127962009-12-28 Pedro Alves <pedro@codesourcery.com>
12797
12798 * linux-low.c (linux_remove_process): Remove `detaching'
12799 parameter. Don't release/detach from thread_db here.
12800 (linux_kill): Release/detach from thread_db here, ...
12801 (linux_detach): ... and here, before actually detaching.
12802 (linux_wait_1): ... and here, when a process exits.
12803 * thread-db.c (any_thread_of): New.
12804 (thread_db_free): Switch the current inferior to a thread of the
12805 passed in process.
12806
4ee62156
DE
128072009-12-21 Doug Evans <dje@google.com>
12808
d90e6a88
DE
12809 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12810
c5f62d5f
DE
12811 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12812 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12813 warning ifndef __NR_tkill. Move setting of errno there too.
12814 Delete unnecessary resetting of errno after syscall.
12815 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12816
10e86dd7
DE
12817 * configure.ac: Check for dladdr.
12818 * config.in: Regenerate.
12819 * configure: Regenerate.
12820 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12821 (try_thread_db_load): Update.
12822
4ee62156
DE
12823 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12824
00f515da
DE
128252009-12-18 Doug Evans <dje@google.com>
12826
e9464885
DE
12827 * event-loop.c: Include unistd.h if it exists.
12828
07d4f67e
DE
12829 * linux-low.c (my_waitpid): Move definition away from being in
12830 between linux_tracefork_child/linux_test_for_tracefork.
12831
00f515da
DE
12832 * gdb_proc_service.h (psaddr_t): Fix type.
12833 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12834 signature to match glibc.
12835
1de1badb
DE
128362009-12-16 Doug Evans <dje@google.com>
12837
12838 * linux-low.c (linux_read_memory): Fix argument to read.
12839
aeeb81d1
PA
128402009-11-26 Pedro Alves <pedro@codesourcery.com>
12841
12842 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12843 events, don't leave current_inferior pointing at null.
12844
10357975
PA
128452009-11-26 Pedro Alves <pedro@codesourcery.com>
12846
12847 * win32-low.c (LOG): Delete.
12848 (OUTMSG): Output to stderr.
12849 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12850 on compile time LOG macro.
12851 (win32_wait): Fix debug output.
12852
cf6e3471
PA
128532009-11-26 Pedro Alves <pedro@codesourcery.com>
12854
12855 * win32-low.c (win32_add_one_solib): If the dll name is
12856 "ntdll.dll", prepend the system directory to the dll path.
12857
0c85e18e
MK
128582009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12859
12860 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12861
9ac544ce 128622009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12863 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12864
12865 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12866 * configure.ac: Check for __mcoldfire__ and set
12867 gdb_cv_m68k_is_coldfire.
12868 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12869 reg-cf.o and reg-m68k.o.
12870 * configure: Regenerated.
12871
fd7dd3e6
PA
128722009-11-16 Pedro Alves <pedro@codesourcery.com>
12873
12874 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12875 Pass it to thread_db_free.
12876 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12877 proper `detaching' argument to linux_remove_process.
12878 * linux-low.h (thread_db_free): Add `detaching' parameter.
12879 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12880 to thread_db_free.
12881 (thread_db_free): Add `detaching' parameter. Only
12882 call td_ta_clear_event if detaching from process.
12883
75aa492e
MK
128842009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12885
12886 * thread-db.c (thread_db_free): Fix typo.
12887
21e1bee4
PP
128882009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12889
12890 PR gdb/10838
12891 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12892
8838b45e
NS
128932009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12894
12895 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12896 with an i686 compiler.
12897 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12898 needed.
12899 * configure: Rebuilt.
12900
8a35fb51
SL
129012009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12902
12903 PR gdb/10783
12904
12905 * server.c (handle_search_memory_1): Correct read_addr initialization
12906 in loop for searching subsequent chunks.
12907
96f15937
PP
129082009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12909
12910 * configure.ac: New --with-libthread-db option.
12911 * thread-db.c: Allow direct dependence on libthread_db.
12912 (thread_db_free): Adjust.
12913 * config.in: Regenerate.
12914 * configure: Likewise.
889bf7c5 12915
5f7d1694
PP
129162009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12917
12918 PR gdb/10757
12919 * thread-db.c (attach_thread): New function.
12920 (maybe_attach_thread): Return success/failure.
12921 (find_new_threads_callback): Adjust.
889bf7c5
PA
12922 (thread_db_find_new_threads): Loop until no new threads.
12923
88e3b899
PA
129242009-10-13 Pedro Alves <pedro@codesourcery.com>
12925
12926 * proc-service.c (ps_lgetregs): Formatting.
12927
cdbfd419
PP
129282009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12929
12930 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12931 * configure.ac: Adjust.
12932 * linux-low.h (struct process_info_private): Move members to struct
12933 thread_db.
12934 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12935 * linux-low.c (linux_remove_process): Adjust.
12936 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12937 * server.c (handle_query): Move code ...
12938 (handle_monitor_command): ... here. New function.
12939 * target.h (struct target_ops): New member.
12940 * thread-db.c (struct thread_db): New.
12941 (libthread_db_search_path): New variable.
12942 (thread_db_create_event, thread_db_enable_reporting)
12943 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12944 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12945 (try_thread_db_load_1, dladdr_to_soname): New functions.
12946 (try_thread_db_load, thread_db_load_search): New functions.
12947 (thread_db_init): Search for libthread_db.
12948 (thread_db_free): New function.
12949 (thread_db_handle_monitor_command): Likewise.
12950 * config.in: Regenerate.
12951 * configure: Regenerate.
889bf7c5 12952
4168d2d6
UW
129532009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12954
12955 * spu-low.c (spu_kill): Wait for inferior to terminate.
12956 Call clear_inferiors.
12957 (spu_detach): Call clear_inferiors.
12958
81ecdfbb
RW
129592009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12960
12961 * aclocal.m4: Regenerate.
12962 * config.in: Likewise.
12963 * configure: Likewise.
12964
0b9ff2c0
UW
129652009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12966
12967 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12968 (parse_spufs_run): New function.
12969 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12970 (ppc_breakpoint_at): Handle SPU breakpoints.
12971
efcbbd14
UW
129722009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12973
12974 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12975 (SPUFS_MAGIC): Define.
12976 (spu_enumerate_spu_ids): New function.
12977 (linux_qxfer_spu): New function.
12978 (linux_target_ops): Install linux_qxfer_spu.
12979
f4d9bade
UW
129802009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12981
12982 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12983 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12984 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12985 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12986 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12987 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12988 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12989 (init_registers_powerpc_cell32l): Add prototype.
12990 (init_registers_powerpc_cell64l): Likewise.
12991 (ppc_arch_setup): Detect Cell/B.E. architecture.
12992
96e946ca
RW
129932009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12994
12995 * Makefile.in (datarootdir): New variable.
12996
58d6951d
DJ
129972009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12998
12999 * linux-low.c (linux_write_memory): Update debugging output.
13000 * Makefile.in (clean): Add new descriptions.
13001 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13002 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13003 * configure.srv: Add new files for arm*-*-linux*.
13004 * linux-arm-low.c: Add new declarations.
13005 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13006 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13007 (HWCAP_VFPv3D16): New.
13008 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13009 instead of __IWMMXT__.
13010 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13011 (arm_arch_setup): New.
13012 (target_regsets): Remove #ifdef. Add VFP regset.
13013 (the_low_target): Use arm_arch_setup.
13014
12b42a12
DJ
130152009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13016
13017 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13018 the main thread again.
13019
ac8c974e
AR
130202009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13021
13022 Adding Neutrino gdbserver.
13023 * configure: Regenerated.
13024 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13025 * configure.srv (i[34567]86-*-nto*): New target.
13026 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13027 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13028 (nto_comctrl) [__QNX__]: New function.
13029 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13030
4424e0c3 130312009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13032
13033 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13034 srv_tgtobj.
13035
912cf4ba
PA
130362009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13037 Pedro Alves <pedro@codesourcery.com>
13038
13039 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13040 don't support CONTEXT_EXTENDED_REGISTERS.
13041 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13042 (the_low_target): Install them.
13043 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13044 failing with ERROR_PIPE_NOT_CONNECTED.
13045
aa5ca48f
DE
130462009-06-30 Doug Evans <dje@google.com>
13047 Pierre Muller <muller@ics.u-strasbg.fr>
13048
13049 Add h/w watchpoint support to x86-linux, win32-i386.
13050 * Makefile.in (SFILES): Add i386-low.c
13051 (i386_low_h): Define.
13052 (i386-low.o): Add dependencies.
13053 (linux-x86-low.o): Add i386-low.h dependency.
13054 (win32-i386-low.o): Ditto.
13055 * i386-low.c: New file.
13056 * i386-low.h: New file.
13057 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13058 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13059 * linux-low.c (linux_add_process): Initialize arch_private.
13060 (linux_remove_process): Free arch_private.
13061 (add_lwp): Initialize arch_private.
13062 (delete_lwp): Free arch_private.
13063 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13064 provided.
13065 * linux-low.h (process_info_private): New member arch_private.
13066 (lwp_info): New member arch_private.
13067 (linux_target_ops): New members new_process, new_thread,
13068 prepare_to_resume.
13069 (ptid_of): New macro.
13070 * linux-x86-low.c: Include stddef.h, i386-low.h.
13071 (arch_process_info): New struct.
13072 (arch_lwp_info): New struct.
13073 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13074 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13075 (i386_dr_low_get_status): New function.
13076 (x86_insert_point, x86_remove_point): New functions.
13077 (x86_stopped_by_watchpoint): New function.
13078 (x86_stopped_data_address): New function.
13079 (x86_linux_new_process, x86_linux_new_thread): New functions.
13080 (x86_linux_prepare_to_resume): New function.
13081 (the_low_target): Add entries for insert_point, remove_point,
13082 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13083 prepare_to_resume.
13084 * server.c (debug_hw_points): New global.
13085 (monitor_show_help): Document set debug-hw-points.
13086 (handle_query): Process "set debug-hw-points".
13087 * server.h (debug_hw_points): Declare.
13088 (paddress): Declare.
13089 * utils.c (NUMCELLS, CELLSIZE): New macros.
13090 (get_sell, xsnprintf, paddress): New functions.
13091 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13092 remove_point, stopped_by_watchpoint, stopped_data_address.
13093 * win32-i386-low.c: Include i386-low.h.
13094 (debug_reg_state): Replaces dr.
13095 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13096 (i386_dr_low_get_status): New function.
13097 (i386_insert_point, i386_remove_point): New functions.
13098 (i386_stopped_by_watchpoint): New function.
13099 (i386_stopped_data_address): New function.
13100 (i386_initial_stuff): Update.
13101 (get_thread_context,set_thread_context,i386_thread_added): Update.
13102 (the_low_target): Add entries for insert_point,
13103 remove_point, stopped_by_watchpoint, stopped_data_address.
13104 * win32-low.c (win32_insert_watchpoint): New function.
13105 (win32_remove_watchpoint): New function.
13106 (win32_stopped_by_watchpoint): New function.
13107 (win32_stopped_data_address): New function.
13108 (win32_target_ops): Add entries for insert_watchpoint,
13109 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13110 * win32-low.h (win32_target_ops): New members insert_point,
13111 remove_point, stopped_by_watchpoint, stopped_data_address.
13112
d993e290
PA
131132009-06-25 Pedro Alves <pedro@codesourcery.com>
13114
13115 * server.c (process_serial_event): Re-return unsupported, not
13116 error, if the type isn't recognized. Re-allow supporting only
13117 insert or remove packets. Also call require_running for
13118 breakpoints. Add missing break statement to default case. Tidy.
13119 * target.h (struct target_ops): Rename insert_watchpoint to
13120 insert_point, and remove_watchpoint to remove_point.
13121
13122 * linux-low.h (struct linux_target_ops): Likewise.
13123 * linux-low.c (linux_insert_watchpoint): Rename to ...
13124 (linux_insert_point): ... this. Adjust.
13125 (linux_remove_watchpoint): Rename to ...
13126 (linux_remove_point): ... this. Adjust.
13127 (linux_target_ops): Adjust.
13128 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13129 (cris_insert_point): ... this.
13130 (cris_remove_watchpoint): Rename to ...
13131 (cris_remove_point): ... this.
13132 (the_low_target): Adjust.
13133
0f54c268
PM
131342009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13135
13136 * server.c (handle_v_kill): Pass signal_pid to
13137 kill_inferior if multi_process is zero.
13138
c6314022
AR
131392009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13140
13141 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13142 * target.h (target_ops): Comment for *_watchpoint to make it clear
13143 the functions can get types '0' and '1'.
13144
4463ce24
AR
131452009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13146
13147 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13148 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13149 * regcache.c (get_regcache): Likewise.
13150 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13151 * win32-low.c (child_fetch_inferior_registers): Remove check for
13152 regno 0.
13153
cf8fd78b
PA
131542009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13155 Pedro Alves <pedro@codesourcery.com>
13156
13157 * target.h (struct target_ops) <supports_multi_process>: New
13158 callback.
13159 (target_supports_multi_process): New.
13160 * server.c (handle_query): Even if GDB reports support, only
13161 enable multi-process if the target also supports it. Report
13162 multi-process support only if the target backend supports it.
13163 * linux-low.c (linux_supports_multi_process): New function.
13164 (linux_target_ops): Install it as target_supports_multi_process
13165 callback.
13166
47c0c975
DE
131672009-05-24 Doug Evans <dje@google.com>
13168
e09875d4
DE
13169 Global renaming of find_thread_pid to find_thread_ptid.
13170 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13171 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13172 All callers updated.
13173
e27d73f6
DE
13174 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13175 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13176 directly.
13177
47c0c975
DE
13178 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13179 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13180 (linux_resume_one_lwp): Ditto.
13181
2acc282a
DE
131822009-05-23 Doug Evans <dje@google.com>
13183
13184 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13185 from struct inferior_list_entry * to struct lwp_info *.
13186 All callers updated.
13187
9f1036c1
DE
131882009-05-13 Doug Evans <dje@google.com>
13189
13190 * linux-x86-low.c: Don't include assert.h.
13191 (x86_siginfo_fixup): Use fatal, not assert.
13192 (x86_arch_setup): Fix comment.
13193
d0722149
DE
131942009-05-12 Doug Evans <dje@google.com>
13195
13196 Biarch support for i386/amd64 gdbserver.
13197 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13198 Add linux-x86-low.c.
13199 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13200 (linux-x86-low.o): Add.
13201 * linux-x86-64-low.c: Delete.
13202 * linux-i386-low.c: Delete.
13203 * linux-x86-low.c: New file.
13204 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13205 linux-x86-low.o.
13206 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13207 linux-x86-low.o.
13208 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13209 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13210 (linux_child_pid_to_exec_file): New function.
13211 (elf_64_header_p, elf_64_file_p): New functions.
13212 (siginfo_fixup): New function.
13213 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13214 give target a chance to convert layout.
13215 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13216 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13217
fdeb2a12
DE
132182009-05-07 Doug Evans <dje@google.com>
13219
13220 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13221 (regsets_store_inferior_registers): Ditto.
13222
a6dbe5df
PA
132232009-05-06 Pedro Alves <pedro@codesourcery.com>
13224
13225 PR server/10048
13226
13227 * linux-low.c (must_set_ptrace_flags): Delete.
13228 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13229 of the global.
13230 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13231 `lwp->must_set_ptrace_flags' instead.
ba42693b 13232 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13233 (linux_wait_1): ... not here.
13234
5091eb23
DE
132352009-04-30 Doug Evans <dje@google.com>
13236
9f767825
DE
13237 * inferiors.c (started_inferior_callback): New function.
13238 (attached_inferior_callback): New function.
13239 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13240 * server.c (print_started_pid, print_attached_pid): New functions.
13241 (detach_or_kill_for_exit): New function.
13242 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13243 * server.h (have_started_inferiors_p): Declare.
13244 (have_attached_inferiors_p): Declare.
13245
5091eb23
DE
13246 * inferiors.c (remove_process): Fix memory leak, free process.
13247 * linux-low.c (linux_remove_process): New function.
13248 (linux_kill): Call it instead of remove_process.
13249 (linux_detach, linux_wait_1): Ditto.
13250
155c8968
PA
132512009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13252
13253 * configure.srv: Add x86 Windows CE target.
13254
7fe519cb
UW
132552009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13256
13257 * inferiors.c (get_thread_process): Make global.
13258 * server.h (get_thread_process): Add prototype.
13259 * thread-db.c (find_one_thread): Use get_thread_process
13260 instead of current_process.
13261 (thread_db_get_tls_address): Do not crash if called when
13262 thread layer is not yet initialized.
13263
5472f405
UW
132642009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13265
13266 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13267 * spu-low.c (current_tid): Rename to ...
13268 (current_ptid): ... this.
13269 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13270 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13271 ptid_get_lwp (current_ptid) instead of current_tid.
13272 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13273 instead of current_tid. Use find_process_pid to verify pid
13274 argument is valid. Pass proper argument to remove_process.
13275 (spu_thread_alive): Compare current_ptid instead of current_tid.
13276 (spu_resume): Likewise.
13277
55ac2b99
PA
132782009-04-02 Pedro Alves <pedro@codesourcery.com>
13279
13280 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13281 variable.
13282
95954743
PA
132832009-04-01 Pedro Alves <pedro@codesourcery.com>
13284
13285 Implement the multiprocess extensions, and add linux multiprocess
13286 support.
13287
13288 * server.h (ULONGEST): Declare.
13289 (struct ptid, ptid_t): New.
13290 (minus_one_ptid, null_ptid): Declare.
13291 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13292 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13293 (struct inferior_list_entry): Change `id' type from unsigned from
13294 to ptid_t.
13295 (struct sym_cache, struct breakpoint, struct
13296 process_info_private): Forward declare.
13297 (struct process_info): Declare.
13298 (current_process): Declare.
13299 (all_processes): Declare.
13300 (initialize_inferiors): Declare.
13301 (add_thread): Adjust to use ptid_t.
13302 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13303 (add_process, remove_process, find_thread_pid): Declare.
13304 (find_inferior_id): Adjust to use ptid_t.
13305 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13306 (multi_process): Declare.
13307 (push_event): Adjust to use ptid_t.
13308 (read_ptid, write_ptid): Declare.
13309 (prepare_resume_reply): Adjust to use ptid_t.
13310 (clear_symbol_cache): Declare.
13311 * inferiors.c (all_processes): New.
13312 (null_ptid, minus_one_ptid): New.
13313 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13314 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13315 (add_thread): Change unsigned long to ptid. Remove gdb_id
13316 parameter. Adjust.
13317 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13318 (gdb_id_to_thread): Rename to ...
13319 (find_thread_pid): ... this. Change unsigned long to ptid.
13320 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13321 (loaded_dll, pull_pid_from_list): Adjust.
13322 (add_process, remove_process, find_process_pid)
13323 (get_thread_process, current_process, initialize_inferiors): New.
13324 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13325 (struct target_waitstatus) <related_pid>: Ditto.
13326 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13327 return type to int.
13328 (struct target_ops) <join>: Add `pid' argument.
13329 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13330 (struct target_ops) <wait>: Add `ptid' field. Change return type
13331 to ptid.
13332 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13333 (mywait): Add `ptid' argument. Change return type to ptid_t.
13334 (target_pid_to_str): Declare.
13335 * target.c (set_desired_inferior): Adjust to use ptids.
13336 (mywait): Add new `ptid' argument. Adjust.
13337 (target_pid_to_str): New.
13338 * mem-break.h (free_all_breakpoints): Declare.
13339 * mem-break.c (breakpoints): Delelete.
13340 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13341 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13342 to use per-process breakpoint list.
13343 (free_all_breakpoints): New.
13344 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13345 (symbol_cache, all_symbols_looked_up): Delete.
13346 (hexchars): New.
13347 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13348 read_ptid): New.
13349 (prepare_resume_reply): Change ptid argument's type from unsigned
13350 long to ptid_t. Adjust. Implement W;process and X;process.
13351 (free_sym_cache, clear_symbol_cache): New.
13352 (look_up_one_symbol): Adjust to per-process symbol cache. *
13353 * server.c (cont_thread, general_thread, step_thread): Change type
13354 to ptid_t.
13355 (attached): Delete.
13356 (multi_process): New.
13357 (last_ptid): Change type to ptid_t.
13358 (struct vstop_notif) <ptid>: Change type to ptid_t.
13359 (queue_stop_reply, push_event): Change `ptid' argument's type to
13360 ptid_t.
13361 (discard_queued_stop_replies): Add `pid' argument.
13362 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13363 changes. Don't reference the `attached' global.
13364 (attach_inferior): Adjust to mywait interface changes.
13365 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13366 features. Handle and report "multiprocess+". Handle
13367 "qAttached:PID".
13368 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13369 changes.
13370 (handle_v_kill): New.
13371 (handle_v_stopped): Adjust to use target_pid_to_str.
13372 (handle_v_requests): Allow multiple attaches and runs when
13373 multiprocess extensions are in effect. Handle "vKill".
13374 (myresume): Adjust to use ptids.
13375 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13376 (handle_status): Adjust to discard_queued_stop_replies interface
13377 change.
13378 (first_thread_of, kill_inferior_callback)
13379 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13380 (main): Call initialize_inferiors. Adjust to use ptids, killing
13381 and detaching from all inferiors. Handle multiprocess packet
13382 variants.
13383 * linux-low.h: Include gdb_proc_service.h.
13384 (struct process_info_private): New.
13385 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13386 <lwpid_of>: Use ptid_get_lwp.
13387 (get_lwp_thread): Adjust.
13388 (struct lwp_info): Add `dead' member.
13389 (find_lwp_pid): Declare.
13390 * linux-low.c (thread_db_active): Delete.
13391 (new_inferior): Adjust comment.
13392 (inferior_pid): Delete.
13393 (linux_add_process): New.
13394 (handle_extended_wait): Adjust.
13395 (add_lwp): Change unsigned long to ptid.
13396 (linux_create_inferior): Add process to processes table. Adjust
13397 to use ptids. Don't set new_inferior here.
13398 (linux_attach_lwp): Rename to ...
13399 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13400 it. Adjust to use ptids.
13401 (linux_attach_lwp): New.
13402 (linux_attach): Add process to processes table. Don't set
13403 new_inferior here.
13404 (struct counter): New.
13405 (second_thread_of_pid_p, last_thread_of_process_p): New.
13406 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13407 multiple processes.
13408 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13409 processes. Remove process from process table.
13410 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13411 to multiple processes.
13412 (any_thread_of): New.
13413 (linux_detach): Add `pid' argument, and handle it. Remove process
13414 from processes table.
13415 (linux_join): Add `pid' argument. Handle it.
13416 (linux_thread_alive): Change unsighed long argument to ptid_t.
13417 Consider dead lwps as not being alive.
13418 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13419 threads we're not interested in.
13420 (same_lwp, find_lwp_pid): New.
13421 (linux_wait_for_lwp): Change `pid' argument's type from int to
13422 ptid_t. Adjust.
13423 (linux_wait_for_event): Rename to ...
13424 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13425 from int to ptid_t. Adjust.
13426 (linux_wait_for_event): New.
13427 (linux_wait_1): Add `ptid' argument. Change return type to
13428 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13429 that exit from the process table.
13430 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13431 Adjust.
13432 (mark_lwp_dead): New.
13433 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13434 stopping all threads, mark its main lwp as dead.
13435 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13436 ptids.
13437 (fetch_register, usr_store_inferior_registers)
13438 (regsets_fetch_inferior_registers)
13439 (regsets_store_inferior_registers, linux_read_memory)
13440 (linux_write_memory): Inline `inferior_pid'.
13441 (linux_look_up_symbols): Adjust to use per-process
13442 `thread_db_active'.
13443 (linux_request_interrupt): Adjust to use ptids.
13444 (linux_read_auxv): Inline `inferior_pid'.
13445 (initialize_low): Don't reference thread_db_active.
13446 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13447 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13448 (ps_getpid): Return the pid of the current inferior.
13449 * thread-db.c (proc_handle, thread_agent): Delete.
13450 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13451 per-process data.
13452 (find_one_thread): Change argument type to ptid_t. Adjust to
13453 per-process data.
13454 (maybe_attach_thread): Adjust to per-process data and ptids.
13455 (thread_db_find_new_threads): Ditto.
13456 (thread_db_init): Ditto.
13457 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13458 processes table. Adjust to use ptids.
13459 (spu_kill, spu_detach): Adjust interface. Remove process from
13460 processes table.
13461 (spu_join, spu_thread_alive): Adjust interface.
13462 (spu_wait): Adjust interface. Remove process from processes
13463 table. Adjust to use ptids.
13464 * win32-low.c (current_inferior_tid): Delete.
13465 (current_inferior_ptid): New.
13466 (debug_event_ptid): New.
13467 (thread_rec): Take a ptid. Adjust.
13468 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13469 (child_delete_thread): Ditto.
13470 (do_initial_child_stuff): Add `attached' argument. Add process to
13471 processes table.
13472 (child_fetch_inferior_registers, child_store_inferior_registers):
13473 Adjust.
13474 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13475 (win32_attach): Pass 1 to do_initial_child_stuff.
13476 (win32_kill): Adjust interface. Remove process from processes
13477 table.
13478 (win32_detach): Ditto.
13479 (win32_join): Adjust interface.
13480 (win32_thread_alive): Take a ptid.
13481 (win32_resume): Adjust to use ptids.
13482 (get_child_debug_event): Ditto.
13483 (win32_wait): Adjust interface. Remove exiting process from
13484 processes table.
13485
bd99dc85
PA
134862009-04-01 Pedro Alves <pedro@codesourcery.com>
13487
13488 Non-stop mode support.
13489
13490 * server.h (non_stop): Declare.
13491 (gdb_client_data, handler_func): Declare.
13492 (delete_file_handler, add_file_handler, start_event_loop):
13493 Declare.
13494 (handle_serial_event, handle_target_event, push_event)
13495 (putpkt_notif): Declare.
13496 * target.h (enum resume_kind): New.
13497 (struct thread_resume): Replace `step' field by `kind' field.
13498 (TARGET_WNOHANG): Define.
13499 (struct target_ops) <wait>: Add `options' argument.
13500 <supports_non_stop, async, start_non_stop>: New fields.
13501 (target_supports_non_stop, target_async): New.
13502 (start_non_stop): Declare.
13503 (mywait): Add `options' argument.
13504 * target.c (mywait): Add `options' argument. Print child exit
13505 notifications here.
13506 (start_non_stop): New.
13507 * server.c (non_stop, own_buf, mem_buf): New globals.
13508 (struct vstop_notif): New.
13509 (notif_queue): New global.
13510 (queue_stop_reply, push_event, discard_queued_stop_replies)
13511 (send_next_stop_reply): New.
13512 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13513 interface changes.
13514 (attach_inferior): In non-stop mode, don't wait for the target
13515 here.
13516 (handle_general_set): Handle QNonStop.
13517 (handle_query): When handling qC, return the current general
13518 thread, instead of the first thread of the list.
13519 (handle_query): If the backend supports non-stop mode, include
13520 QNonStop+ in the qSupported query response.
13521 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13522 and non-stop mode.
13523 (handle_v_attach, handle_v_run): Handle non-stop mode.
13524 (handle_v_stopped): New.
13525 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13526 (myresume): Adjust to use resume_kind. Handle non-stop.
13527 (queue_stop_reply_callback): New.
13528 (handle_status): Handle non-stop mode.
13529 (main): Clear non_stop flag on reconnection. Use the event-loop.
13530 Refactor serial protocol handling from here ...
13531 (process_serial_event): ... to this new function. When GDB
13532 selects any thread, select one here. In non-stop mode, wait until
13533 GDB acks all pending events before exiting.
13534 (handle_serial_event, handle_target_event): New.
13535 * remote-utils.c (remote_open): Install remote_desc in the event
13536 loop.
13537 (remote_close): Remove remote_desc from the event loop.
13538 (putpkt_binary): Rename to...
13539 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13540 (putpkt_binary): New as wrapper around putpkt_binary_1.
13541 (putpkt_notif): New.
13542 (prepare_resume_reply): In non-stop mode, don't change the
13543 general_thread.
13544 * event-loop.c: New.
13545 * Makefile.in (OBJ): Add event-loop.o.
13546 (event-loop.o): New rule.
13547
13548 * linux-low.h (pid_of): Moved here.
13549 (lwpid_of): New.
13550 (get_lwp_thread): Use lwpid_of.
13551 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13552 * linux-low.c (pid_of): Delete.
13553 (inferior_pid): Use lwpid_of.
13554 (linux_event_pipe): New.
13555 (target_is_async_p): New.
13556 (delete_lwp): New.
13557 (handle_extended_wait): Use lwpid_of.
13558 (add_lwp): Don't set lwpid field.
13559 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13560 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13561 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13562 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13563 first. Adjust to linux_wait_for_event interface changes. Use
13564 lwpid_of.
13565 (linux_detach): Don't delete the main lwp here.
13566 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13567 (status_pending_p): Don't consider explicitly suspended lwps.
13568 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13569 pointer. Add OPTIONS argument. Change return type to int. Use
13570 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13571 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13572 pointer. Add status pointer argument. Return a pid instead of a
13573 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13574 changes. In non-stop mode, don't switch to a random thread.
13575 (linux_wait): Rename to...
13576 (linux_wait_1): ... this. Add target_options argument, and handle
13577 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13578 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13579 clean exit and signal exit code. Don't stop all threads in
13580 non-stop mode. In all-stop mode, only stop all threads when
13581 reporting a stop to GDB. Handle explicit thread stop requests.
13582 (async_file_flush, async_file_mark): New.
13583 (linux_wait): New.
13584 (send_sigstop): Use lwpid_of.
13585 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13586 interface changes. In non-stop mode, don't switch to a random
13587 thread.
13588 (linux_resume_one_lwp): Use lwpid_of.
13589 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13590 (linux_resume_one_thread): ... this. Handle resume_stop. In
13591 non-stop mode, don't look for pending flag in all threads.
13592 (resume_status_pending_p): Don't consider explicitly suspended
13593 threads.
13594 (my_waitpid): Reimplement. Emulate __WALL.
13595 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13596 Use lwpid_of.
13597 (sigchld_handler, linux_supports_non_stop, linux_async)
13598 (linux_start_non_stop): New.
13599 (linux_target_ops): Register linux_supports_non_stop, linux_async
13600 and linux_start_non_stop.
13601 (initialize_low): Install SIGCHLD handler.
13602 * thread-db.c (thread_db_create_event, find_one_thread)
13603 (thread_db_get_tls_address): Use lwpid_of.
13604 * win32-low.c (win32_detach): Adjust to use resume_kind.
13605 (win32_wait): Add `options' argument.
13606 * spu-low.c (spu_resume): Adjust to use resume_kind.
13607 (spu_wait): Add `options' argument.
13608
5b1c542e
PA
136092009-04-01 Pedro Alves <pedro@codesourcery.com>
13610
13611 Decouple target code from remote protocol.
13612
13613 * target.h (enum target_waitkind): New.
13614 (struct target_waitstatus): New.
13615 (struct target_ops) <wait>: Return an unsigned long. Take a
13616 target_waitstatus pointer instead of a char pointer.
13617 (mywait): Likewise.
13618 * target.c (mywait): Change prototype to return an unsigned long.
13619 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13620 * server.h (thread_from_wait, old_thread_from_wait): Delete
13621 declarations.
13622 (prepare_resume_reply): Change prototype to take a
13623 target_waitstatus.
13624 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13625 (last_status, last_ptid): New.
13626 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13627 pid instead of a signal.
13628 (attach_inferior): Remove "status" and "signal" parameters.
13629 Adjust.
13630 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13631 not as an address.
13632 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13633 (handle_v_requests, myresume): Remove "status" and "signal"
13634 parameters. Adjust.
13635 (handle_status): New.
13636 (main): Delete local `status'. Adjust.
13637 * remote-utils.c: Include target.h.
13638 (prepare_resume_reply): Change prototype to take a
13639 target_waitstatus. Adjust.
13640
13641 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13642 interface.
13643 * spu-low.c (spu_wait): Adjust.
13644 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13645 Delete.
13646 (win32_wait): Adjust.
13647
2bd7c093
PA
136482009-04-01 Pedro Alves <pedro@codesourcery.com>
13649
13650 * target.h (struct thread_resume): Delete leave_stopped member.
13651 (struct target_ops): Add a `n' argument to the `resume' callback.
13652 * server.c (start_inferior): Adjust.
13653 (handle_v_cont, myresume): Adjust.
13654 * linux-low.c (check_removed_breakpoint): Adjust to resume
13655 interface change, and to removed leave_stopped field.
13656 (resume_ptr): Delete.
13657 (struct thread_resume_array): New.
13658 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13659 resume interface change.
13660 (linux_continue_one_thread, linux_queue_one_thread)
13661 (resume_status_pending_p): Check if the resume field is NULL
13662 instead of checking the leave_stopped member.
13663 (linux_resume): Adjust to the target resume interface change.
13664 * spu-low.c (spu_resume): Adjust to the target resume interface
13665 change.
13666 * win32-low.c (win32_detach, win32_resume): Ditto.
13667
c35fafde
PA
136682009-04-01 Pedro Alves <pedro@codesourcery.com>
13669
13670 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13671 flag.
13672 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13673 pending.
13674 (linux_continue_one_thread): Only preserve the stepping flag if
13675 there's a pending breakpoint.
13676
0a59d50b
PA
136772009-03-31 Pedro Alves <pedro@codesourcery.com>
13678
13679 * server.c (main): After the inferior having exited, call
13680 remote_close before exiting gdbserver.
13681
f04c6d38
TJB
136822009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13683
13684 Fix size of FPSCR in Power 7 processors.
13685 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13686 (PPC_FEATURE_HAS_DFP): New #define.
13687 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13688 size of the FPSCR.
13689
78e5cee6
PA
136902009-03-23 Pedro Alves <pedro@codesourcery.com>
13691
13692 * server.c (handle_query) Whitespace and formatting.
13693
1b3f6016
PA
136942009-03-22 Pedro Alves <pedro@codesourcery.com>
13695
13696 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13697 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13698 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13699 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13700 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13701 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13702 Makefile.in, configure.ac: Fix whitespace throughout.
13703 * configure: Regenerate.
13704
a07b2135
PA
137052009-03-22 Pedro Alves <pedro@codesourcery.com>
13706
13707 * inferiors.c (find_inferior): Make it safe for the callback
13708 function to delete the currently iterated inferior.
13709
67cc2626
PA
137102009-03-22 Pedro Alves <pedro@codesourcery.com>
13711
13712 * Makefile.in (linuw_low_h): Move higher.
13713 (thread-db.o): Depend on $(linux_low_h).
13714
54a0b537
PA
137152009-03-17 Pedro Alves <pedro@codesourcery.com>
13716
13717 Rename "process" to "lwp" throughout.
13718
13719 * linux-low.c (all_processes): Rename to...
13720 (all_lwps): ... this.
13721 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13722 (add_process): Rename to ...
13723 (add_lwp): ... this. Adjust.
13724 (linux_create_inferior): Adjust.
13725 (linux_attach_lwp): Adjust.
13726 (linux_attach): Adjust.
13727 (linux_kill_one_process): Rename to ...
13728 (linux_kill_one_lwp): ... this. Adjust.
13729 (linux_kill): Adjust.
13730 (linux_detach_one_process): Rename to ...
13731 (linux_detach_one_lwp): ... this. Adjust.
13732 (linux_detach): Adjust.
13733 (check_removed_breakpoint): Adjust.
13734 (status_pending_p): Adjust.
13735 (linux_wait_for_process): Rename to ...
13736 (linux_wait_for_lwp): ... this. Adjust.
13737 (linux_wait_for_event): Adjust.
13738 (send_sigstop): Adjust.
13739 (wait_for_sigstop): Adjust.
13740 (stop_all_processes): Rename to ...
13741 (stop_all_lwps): ... this.
13742 (linux_resume_one_process): Rename to ...
13743 (linux_resume_one_lwp): ... this. Adjust.
13744 (linux_set_resume_request, linux_continue_one_thread)
13745 (linux_queue_one_thread, resume_status_pending_p)
13746 (usr_store_inferior_registers, regsets_store_inferior_registers)
13747 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13748 Adjust.
13749 * linux-low.h (get_process): Rename to ...
13750 (get_lwp): ... this. Adjust.
13751 (get_thread_process): Rename to ...
13752 (get_thread_lwp): ... this. Adjust.
13753 (get_process_thread): Rename to ...
13754 (get_lwp_thread): ... this. Adjust.
13755 (struct process_info): Rename to ...
13756 (struct lwp_info): ... this.
13757 (all_processes): Rename to ...
13758 (all_lwps): ... this.
13759 * proc-service.c (ps_lgetregs): Adjust.
13760 * thread-db.c (thread_db_create_event, find_one_thread)
13761 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13762
0b16c5cf
PA
137632009-03-14 Pedro Alves <pedro@codesourcery.com>
13764
13765 * server.c (handle_query): Handle "qAttached".
13766
32de4b9d
NS
137672009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13768
13769 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13770 GPLv3, update license URL.
13771
2aecd87f
DE
137722009-03-01 Doug Evans <dje@google.com>
13773
93efd302 13774 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13775 (server_h): Add gdb_signals.h.
13776 (signals.o): Update.
13777 * server.h (target_signal_from_host,target_signal_to_host_p)
13778 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13779
86b1f9c5
PM
137802009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13781
13782 * remote-utils.c (getpkt): Also generate remote-debug
13783 information if noack_mode is set.
13784
4aa995e1
PA
137852009-02-06 Pedro Alves <pedro@codesourcery.com>
13786
13787 * server.c (handle_query): Report qXfer:siginfo:read and
13788 qXfer:siginfo:write as supported and handle them.
13789 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13790 * linux-low.c (linux_xfer_siginfo): New.
13791 (linux_target_ops): Set it.
13792
62709adf
PA
137932009-01-26 Pedro Alves <pedro@codesourcery.com>
13794
13795 * server.c (gdbserver_usage): Mention --remote-debug.
13796 (main): Accept '--remote-debug' switch.
13797
aef93bd7
DE
137982009-01-18 Doug Evans <dje@google.com>
13799
13800 * regcache.c (new_register_cache): No need to check result of xcalloc.
13801 * server.c (handle_search_memory): Back out calls to xmalloc,
13802 result is checked and error is returned to user upon failure.
13803 (handle_query): Ditto. Add more checks for result of malloc.
13804 (handle_v_cont): Check result of malloc, report error back to
13805 user upon failure.
13806 (handle_v_run): Ditto. Call freeargv.
13807 * server.h (freeargv): Declare.
13808 * utils.c (freeargv): New fn.
13809
54363045
DE
138102009-01-15 Doug Evans <dje@google.com>
13811
f626972c
DE
13812 * gdbreplay.c (perror_with_name): Make arg const char *.
13813 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13814 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13815 * utils.c (perror_with_name): Make arg const char *.
54363045 13816
18aae699
PA
138172009-01-14 Pedro Alves <pedro@codesourcery.com>
13818
13819 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13820 when handling a EXIT_PROCESS_DEBUG_EVENT.
13821
ff703abe
JB
138222009-01-06 Joel Brobecker <brobecker@adacore.com>
13823
13824 * gdbreplay.c (gdbreplay_version): Update copyright year.
13825 * server.c (gdbserver_version): Likewise.
13826
f21cc1a2 138272009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13828
13829 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13830 (handle_extended_wait): Improve comment.
0e21c1ec 13831
bca929d3
DE
138322008-12-13 Doug Evans <dje@google.com>
13833
13834 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13835 * server.h (ATTR_MALLOC): New macro.
13836 (xmalloc,xcalloc,xstrdup): Declare.
13837 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13838 * inferiors.c: Ditto.
13839 * linux-low.c: Ditto.
13840 * mem-break.c: Ditto.
13841 * regcache.c: Ditto.
13842 * remote-utils.c: Ditto.
13843 * server.c: Ditto.
13844 * target.c: Ditto.
13845 * win32-low.c: Ditto.
13846
97438e3f
DE
138472008-12-12 Doug Evans <dje@google.com>
13848
896c7fbb
DE
13849 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13850 in debugging printf.
13851
97438e3f
DE
13852 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13853
e3b886f8
DE
138542008-12-09 Doug Evans <dje@google.com>
13855
13856 * linux-low.h (struct process_info): Delete member tid, unused.
13857 * thread-db.c (find_one_thread): Update.
13858 (maybe_attach_thread): Update.
13859
07e059b5
VP
138602008-12-02 Pedro Alves <pedro@codesourcery.com>
13861
889bf7c5
PA
13862 * target.h (struct target_ops): Add qxfer_osdata member.
13863 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13864 and dirent.h.
13865 (linux_qxfer_osdata): New functions.
13866 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13867 callback.
13868 * server.c (handle_query): Handle "qXfer:osdata:read:".
13869 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13870 (buffer_xml_printf): New functions.
13871 * server.h (struct buffer): New.
13872 (buffer_grow_str, buffer_grow_str0): New macros.
13873 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13874 (buffer_xml_printf): Declare.
07e059b5 13875
4cab47ab
DE
138762008-11-24 Doug Evans <dje@google.com>
13877
13878 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13879
f142445f
DJ
138802008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13881
13882 * server.c (handle_v_run): Always use the supplied argument list.
13883
d0107bb6 138842008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13885
d0107bb6
BW
13886 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13887 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13888
2c4ad781
TJB
138892008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13890
13891 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13892 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13893 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13894 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13895 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13896 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13897 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13898 XML target descriptions.
13899 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13900 when inferior is running on an ISA 2.05 or later processor. Add
13901 special case to return offset for full 64-bit slot of FPSCR when
13902 in 32-bits.
13903
dfb64f85
DJ
139042008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13905
13906 * Makefile.in (SFILES, clean): Added sparc64 files.
13907 (reg-sparc64.o, reg-sparc64.c): New.
13908 * configure.srv (sparc*-*-linux*): New configuration.
13909 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13910 syscall arguments for SPARC.
13911 (regsets_store_inferior_registers): Likewise.
13912 * linux-sparc-low.c: New file.
13913
66b6e1dd
DE
139142008-10-21 Doug Evans <dje@google.com>
13915
13916 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13917 (READLINE_DIR,READLINE_DEP): Delete.
13918 (INTERNAL_CFLAGS): Update.
13919 (LINTFLAGS): Update.
13920
9b710a42
PA
139212008-10-10 Pedro Alves <pedro@codesourcery.com>
13922
13923 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13924 whole argv from the last run, not just argv[0].
13925
5822d809
PA
139262008-09-08 Pedro Alves <pedro@codesourcery.com>
13927
13928 * regcache.c (new_register_cache): Return NULL if the register
13929 cache size isn't known yet.
13930 (free_register_cache): Avoid dereferencing a NULL regcache.
13931
74aac56f
DJ
139322008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13933
13934 * configure.srv: Merge MIPS and MIPS64.
13935
400b20f5
MR
139362008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13937
13938 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13939
677c5bb1
LM
139402008-08-18 Luis Machado <luisgpm@br.ibm.com>
13941
13942 * Makefile.in: Add required vsx dependencies.
13943
13944 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13945 Declare init_registers_powerpc_vsx32l.
13946 Declare init_registers_powerpc_vsx64l.
13947 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13948 (ppc_arch_setup): Check for VSX in hwcap.
13949 (ppc_fill_vsxregset): New function.
13950 (ppc_store_vsxregset): New function.
13951 Add new VSX entry in regset_info target_regsets.
13952
13953 * configure.srv: Add new VSX dependencies.
13954
a6f3e723
SL
139552008-08-12 Pedro Alves <pedro@codesourcery.com>
13956
13957 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13958 (remote_open): Set or clear transport_is_reliable.
13959 (putpkt_binary): Don't expect acks in noack mode.
13960 (getpkt): Don't send ack/nac in noack mode.
13961 * server.c (handle_general_set): Handle QStartNoAckMode.
13962 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13963 qSupported.
13964 (main): Reset noack_mode on every connection.
13965 * server.h (noack_mode): Declare.
13966
a417dc56
RW
139672008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13968
13969 * Makefile.in (GDBREPLAY_OBS): New variable.
13970 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13971
3221518c
UW
139722008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13973 Daniel Jacobowitz <dan@codesourcery.com>
13974
13975 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13976 (usr_store_inferior_registers): Likewise.
13977 (regsets_store_inferior_registers): Likewise.
13978
ec56be1b
PA
139792008-07-31 Rolf Jansen <rj@surtec.com>
13980 Pedro Alves <pedro@codesourcery.com>
13981
13982 * configure.ac: Check for memmem declaration.
13983 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13984 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13985 (disable_packet_qfThreadInfo): Unconditionally compile.
13986 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13987 * configure, config.in: Regenerate.
13988
2fe5e3ff
DE
139892008-07-28 Doug Kwan <dougkwan@google.com>
13990
13991 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13992 (linux_write_memory): Remove declaration of errno.
13993
836acd6d
UW
139942008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13995
13996 * linux-low.c (handle_extended_wait): Do not use "status"
13997 variable uninitialized.
13998
aeba519e
PA
139992008-07-07 Pedro Alves <pedro@codesourcery.com>
14000
14001 * server.c (handle_v_attach): Inhibit reporting dll changes.
14002
db42f210
PA
140032008-06-27 Pedro Alves <pedro@codesourcery.com>
14004
14005 * remote-utils.c (prepare_resume_reply): If requested, don't
14006 output "thread:TID" in the T stop reply.
14007
14008 * server.c (disable_packet_vCont, disable_packet_Tthread)
14009 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14010 (handle_query): If requested, disable support for qC, qfThreadInfo
14011 and qsThreadInfo.
14012 (handle_v_requests): If requested, disable support for vCont.
14013 (gdbserver_show_disableable): New.
14014 (main): Handle --disable-packet and --disable-packet=LIST.
14015
14016 * server.h (disable_packet_vCont, disable_packet_Tthread)
14017 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14018
8e4c5421
CD
140192008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14020
14021 * server.c (gdbserver_usage): Mention --version.
14022
6e23a804
DJ
140232008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14024
14025 * Makefile.in (gdbreplay.o): New rule.
14026
90aa6a40
JM
140272008-06-06 Joseph Myers <joseph@codesourcery.com>
14028
14029 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14030 message, not gdbserver.
14031
c16158bc 140322008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14033 Nathan Sidwell <nathan@codesourcery.com>
14034 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14035
14036 * acinclude.m4: Include ../../config/acx.m4.
14037 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14038 * configure, config.in: Regenerate.
14039 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14040 * server.c (gdbserver_version): Print PKGVERSION.
14041 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14042 (main): Adjust gdbserver_usage calls.
14043 * gdbreplay.c (version, host_name): Add declarations.
14044 (gdbreplay_version, gdbreplay_usage): New.
14045 (main): Accept --version and --help options.
14046
aeb75bf5
DJ
140472008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14048
14049 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14050 (arm_breakpoint_at): Handle Thumb.
14051 (the_low_target): Add comment.
14052
76b233dd
UW
140532008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14054
14055 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14056
08388c79
DE
140572008-05-09 Doug Evans <dje@google.com>
14058
a3c83fae
DE
14059 * server.h (decode_search_memory_packet): Declare.
14060 * remote-utils.c (decode_search_memory_packet): New fn.
14061 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14062 (handle_search_memory): New fn.
14063 (handle_query): Process qSearch:memory packets.
14064
bb9c3d36
UW
140652008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14066
14067 * regcache.c (registers_length): Remove.
14068 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14069 full register packet.
14070 * regcache.h (registers_length): Remove prototype.
14071 * server.h (PBUFSIZ): Define to 16384.
14072
7284e1be
UW
140732008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14074
14075 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14076 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14077 powerpc-64l.o, and powerpc-altivec64l.o.
14078 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14079 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14080 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14081 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14082 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14083 to srv_xmlfiles.
14084
14085 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14086 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14087 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14088 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14089 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14090 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14091 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14092 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14093 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14094 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14095 (clean): Update.
14096
14097 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14098 (init_registers_powerpc_32l): ... this new prototype.
14099 (init_registers_powerpc_32): Remove, replace by ...
14100 (init_registers_powerpc_altivec32l): ... this new prototype.
14101 (init_registers_powerpc_e500): Remove, replace by ...
14102 (init_registers_powerpc_e500l): ... this new prototype.
14103 (init_registers_ppc64): Remove, replace by ...
14104 (init_registers_powerpc_64l): ... this new prototype.
14105 (init_registers_powerpc_64): Remove, replace by ...
14106 (init_registers_powerpc_altivec64l): ... this new prototype.
14107 (ppc_num_regs): Set to 73.
14108 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14109 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14110 (ppc_cannot_store_register): Handle orig_r3 and trap.
14111 (ppc_arch_setup): Update init_registers_... calls.
14112 (ppc_fill_gregset): Handle orig_r3 and trap.
14113
14114 * inferiors.c (clear_inferiors): Reset current_inferior.
14115
fdc59709
PB
141162008-04-23 Paolo Bonzini <bonzini@gnu.org>
14117
889bf7c5
PA
14118 * acinclude.m4: Add override.m4.
14119 * configure: Regenerate.
fdc59709 14120
c9b2f845
UW
141212008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14122
14123 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14124 initial call to init_register_ppc64.
14125
550512b8
UW
141262008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14127
43aaf8b6
PA
14128 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14129 single powerpc*-*-linux* case.
550512b8
UW
14130 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14131
b6430ec3
UW
141322008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14133
14134 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14135 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14136 from reg_xmlfiles.
14137 * linux-ppc-low.c: Include <elf.h>.
14138 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14139 (ppc_hwcap): New global variable.
14140 (ppc_regmap): Remove __SPE__ #ifdef sections.
14141 (ppc_regmap_e500): New global variable.
14142 (ppc_cannot_store_register): Update __SPE__ special case.
14143 (ppc_get_hwcap): New function.
14144 (ppc_arch_setup): Use it to determine whether inferior supports
14145 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14146 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14147 Do not access registers if target does not support AltiVec.
14148 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14149 Do not access registers if target does not support SPE.
14150 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14151
52fa2412
UW
141522008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14153
14154 * linux-low.c (disabled_regsets, num_regsets): New.
14155 (use_regsets_p): Delete.
14156 (linux_wait_for_process): Clear disabled_regsets.
14157 (regsets_fetch_inferior_registers): Check and set it.
14158 (regsets_store_inferior_registers): Likewise.
14159 (linux_fetch_registers, linux_store_registers): Do not use
14160 use_regsets_p.
14161 (initialize_low): Allocate disabled_regsets.
14162
e28b3332
DJ
141632008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14164
14165 * Makefile.in (LIBOBJS): New.
14166 (OBS): Use LIBOBJS.
14167 (memmem.o): New rule.
14168 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14169 * configure: Regenerated.
14170
4536995d
UW
141712008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14172
14173 * server.c (handle_query): Never return "unsupported" for
14174 qXfer:features:read queries.
14175
221c031f
UW
141762008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14177
14178 * server.c (get_features_xml): Fix inverted condition.
14179 (handle_query): Always support qXfer:feature:read.
14180
ccd213ac
DJ
141812008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14182
14183 * server.c (wrapper_argv): New.
14184 (start_inferior): Handle wrapper_argv. If set, expect an extra
14185 trap.
14186 (gdbserver_usage): Document --wrapper.
14187 (main): Parse --wrapper.
14188
6fe305f7
UW
141892008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14190
14191 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14192 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14193 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14194 (ppc_set_pc): Likewise.
14195 (ppc_arch_setup): New function.
14196 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14197 of collect_register.
889bf7c5 14198 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14199
5b0a002e
UW
142002008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14201
14202 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14203 instead of linux-ppc64-low.o.
14204 * linux-ppc64-low.c: Remove file.
14205 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14206 (linux-ppc64-low.o): Remove rule.
14207
14208 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14209 (init_registers_powerpc_64): Likewise.
14210 (ppc_regmap): Conditionally define depending on __powerpc64__.
14211 (ppc_cannot_store_register): Do not special-case "fpscr" when
14212 compiled on __powerpc64__.
14213 (ppc_collect_ptrace_register): New function.
14214 (ppc_supply_ptrace_register): New function.
14215 (ppc_breakpoint): Change type to "unsigned int".
14216 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14217 (the_low_target): Conditionally provide initializers for the
889bf7c5 14218 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14219 collect_ptrace_register and supply_ptrace_register members.
14220
9b4b61c8
UW
142212008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14222
14223 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14224 * server.c (gdbserver_xmltarget): Define.
14225 (get_features_xml): Use it to replace "target.xml" and arch_string.
14226
14227 * configure.srv: Remove srv_xmltarget. Add XML files that were
14228 mentioned there to srv_xmlfiles instead. Remove conditional tests
14229 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14230 srv_xmlfiles and srv_regobj to include all possible choices.
14231 * configure.ac (srv_xmltarget): Remove.
14232 (srv_xmlfiles): Do not add "target.xml".
14233 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14234 checks for supplementary target information.
14235 * configure: Regenerate.
14236 * Makefile.in (XML_TARGET): Remove.
14237 (target.xml): Remove rule.
14238 (clean): Do not clean up target.xml.
14239 (.PRECIOUS): Do not mention target.xml.
14240
14241 * target.h (struct target_ops): Remove arch_string member.
14242 * linux-low.c (linux_arch_string): Remove.
14243 (linux_target_ops): Remove arch_string initializer.
14244 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14245 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14246 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14247 * spu-low.c (spu_arch_string): Remove.
14248 (spu_target_ops): Remove arch_string initializer.
14249 * win32-low.c (win32_arch_string): Remove.
14250 (win32_target_ops): Remove arch_string initializer.
14251 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14252 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14253 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14254
ee1a7ae4
UW
142552008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14256
14257 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14258 by collect_ptrace_register and supply_ptrace_register hooks.
14259 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14260 instead of checking for the_low_target.left_pad_xfer.
14261 (usr_store_inferior_registers): Use collect_ptrace_register callback
14262 instead of checking for the_low_target.left_pad_xfer.
14263
14264 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14265 (s390_supply_ptrace_register): Likewise.
14266 (s390_fill_gregset): Call s390_collect_ptrace_register.
14267 (the_low_target): Update.
14268
14269 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14270 (ppc_supply_ptrace_register): Likewise.
14271 (the_low_target): Update.
14272
14273 * linux-i386-low.c (the_low_target): Update.
14274 * linux-x86-64-low.c (the_low_target): Update.
14275
d61ddec4
UW
142762008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14277
14278 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14279 reg-s390.o and reg-s390x.o.
14280
14281 * linux-low.c (new_inferior): New global variable.
14282 (linux_create_inferior, linux_attach): Set it.
14283 (linux_wait_for_process): Call the_low_target.arch_setup after the
14284 target has stopped for the first time.
14285 (initialize_low): Do not call the_low_target.arch_setup.
14286
14287 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14288 (s390_set_pc): Likewise.
14289 (s390_arch_setup): New function.
14290 (the_low_target): Use s390_arch_setup as arch_setup routine.
14291
14292 * regcache.c (realloc_register_cache): New function.
14293 (set_register_cache): Call it for each existing regcache.
14294
d05b4ac3
UW
142952008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14296
14297 * server.h (init_registers): Remove prototype.
14298
14299 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14300 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14301 instead of init_registers ().
14302 * linux-arm-low.c (init_registers_arm): Add prototype.
14303 (init_registers_arm_with_iwmmxt): Likewise.
14304 (the_low_target): Add initializer for arch_setup field.
14305 * linux-cris-low.c (init_registers_cris): Add prototype.
14306 (the_low_target): Add initializer for arch_setup field.
14307 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14308 (the_low_target): Add initializer for arch_setup field.
14309 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14310 (the_low_target): Add initializer for arch_setup field.
14311 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14312 (the_low_target): Add initializer for arch_setup field.
14313 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14314 (the_low_target): Add initializer for arch_setup field.
14315 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14316 (the_low_target): Add initializer for arch_setup field.
14317 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14318 (init_registers_mips64_linux): Likewise.
14319 (the_low_target): Add initializer for arch_setup field.
14320 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14321 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14322 (the_low_target): Add initializer for arch_setup field.
14323 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14324 (init_registers_powerpc_64): Likewise.
14325 (the_low_target): Add initializer for arch_setup field.
14326 * linux-s390-low.c (init_registers_s390): Add prototype.
14327 (init_registers_s390x): Likewise.
14328 (the_low_target): Add initializer for arch_setup field.
14329 * linux-sh-low.c (init_registers_sh): Add prototype.
14330 (the_low_target): Add initializer for arch_setup field.
14331 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14332 (the_low_target): Add initializer for arch_setup field.
14333 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14334 (the_low_target): Add initializer for arch_setup field.
14335
14336 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14337 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14338 instead of init_registers ().
14339 * win32-arm-low.c (init_registers_arm): Add prototype.
14340 (the_low_target): Add initializer for arch_setup field.
14341 * win32-i386-low.c (init_registers_i386): Add prototype.
14342 (the_low_target): Add initializer for arch_setup field.
14343
14344 * spu-low.c (init_registers_spu): Add prototype.
14345 (initialize_low): Call initialie_registers_spu () instead of
14346 initialize_registers ().
14347
fd96d250
PA
143482008-02-19 Pedro Alves <pedro@codesourcery.com>
14349
14350 * server.c (handle_v_requests): When handling the vRun and vAttach
14351 packets, if already debugging a process, don't kill it. Return an
14352 error instead.
14353
d41b6bb4
DJ
143542008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14355
14356 * server.c (handle_query): Correct length check.
14357
5ac588cf
PA
143582008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14359
14360 * win32-low.c (do_initial_child_stuff): Add process handle
14361 parameter. Set current_process_handle and current_process_id from the
14362 parameters. Clear globals.
14363 (win32_create_inferior): Don't set current_process_handle and
14364 current_process_id here. Instead pass them on the call to
14365 do_initial_child_stuff.
14366 (win32_attach): Likewise.
14367 (win32_clear_inferiors): New.
14368 (win32_kill): Don't close the current process handle or the
14369 current thread handle here. Instead call win32_clear_inferiors.
14370 (win32_detach): Don't open a new handle to the process. Call
14371 win32_clear_inferiors.
14372 (win32_join): Don't rely on current_process_handle; open a new
14373 handle using the process id.
14374 (win32_wait): Call win32_clear_inferiors when the inferior process
14375 has exited.
14376
ecd7ecbc
DJ
143772008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14378
14379 * server.c (monitor_show_help): Add "exit".
14380
1525d545
MG
143812008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14382
ecd7ecbc 14383 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14384 (clean): Add reg-xtensa.c.
14385 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14386 * configure.srv (xtensa*-*-linux*) New target.
14387 * linux-xtensa-low.c: New.
14388 * xtensa-xtregs.c: New.
1525d545 14389
59a016f0
PA
143902008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14391
14392 * hostio.c: Don't include errno.h.
14393 (errno_to_fileio_errno): Move to hostio-errno.
14394 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14395 error number outputting to the target->hostio_last_error callback.
14396 (hostio_packet_error): Use FILEIO_EINVAL directly.
14397 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14398 calls to hostio_error.
14399 * hostio-errno.c: New.
14400 * server.h (hostio_last_error_from_errno): Declare.
14401 * target.h (target_ops): Add hostio_last_error member.
14402 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14403 as hostio_last_error handler.
889bf7c5 14404 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14405 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14406 (wince_hostio_last_error): New functions.
14407 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14408 as hostio_last_error handler.
14409 (win32_target_ops) [!_WIN32_WCE]: Register
14410 hostio_last_error_from_errno as hostio_last_error handler.
14411 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14412 (hostio-errno.o): New rule.
14413 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14414 * configure.srv (srv_hostio_err_objs): New variable. Default to
14415 hostio-errno.o.
14416 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14417 * configure: Regenerate.
14418
2d717e4f
DJ
144192008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14420
14421 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14422 (linux_kill, linux_detach): Clean up the process list.
14423 * remote-utils.c (remote_open): Improve port number parsing.
14424 (putpkt_binary, input_interrupt): Only send interrupts if the target
14425 is running.
14426 * server.c (extended_protocol): Make static.
14427 (attached): Define earlier.
14428 (exit_requested, response_needed, program_argv): New variables.
14429 (target_running): New.
14430 (start_inferior): Clear attached here.
14431 (attach_inferior): Set attached here.
14432 (require_running): Define.
14433 (handle_query): Use require_running and target_running. Implement
14434 "monitor exit".
14435 (handle_v_attach, handle_v_run): New.
14436 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14437 (gdbserver_usage): Update.
14438 (main): Redo argument parsing. Handle --debug and --multi. Handle
14439 --attach along with other options or after the port. Save
14440 program_argv. Support no initial program. Resynchronize
14441 communication with GDB after an error. Handle "monitor exit".
14442 Use require_running and target_running. Always allow the extended
14443 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14444 restart in extended mode.
14445 * README: Refer to the GDB manual. Update --attach usage.
14446
7407e2de
AS
144472007-12-20 Andreas Schwab <schwab@suse.de>
14448
14449 * linux-low.c (STACK_SIZE): Define.
14450 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14451 (linux_test_for_tracefork): Likewise.
14452
b65d95c5
DJ
144532007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14454
14455 * linux-low.c (linux_wait_for_event): Update messages. Do not
14456 reinsert auto-delete breakpoints.
14457 * mem-break.c (struct breakpoint): Change return type of handler to
14458 int.
14459 (set_breakpoint_at): Update handler type.
14460 (reinsert_breakpoint_handler): Return 1 instead of calling
14461 delete_breakpoint.
14462 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14463 setting a new one.
14464 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14465 * mem-break.h (set_breakpoint_at): Update handler type.
14466 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14467 * win32-low.c (auto_delete_breakpoint): New.
14468 (get_child_debug_event): Use it.
14469
4e799345
DJ
144702007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14471
14472 * configure.ac: Check for pread and pwrite.
14473 * hostio.c (handle_pread): Fall back to lseek and read.
14474 (handle_pwrite): Fall back to lseek and write.
14475 * config.in, configure: Regenerated.
14476
27524b67
DJ
144772007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14478
14479 * server.c (myresume): Add own_buf argument.
14480 (main): Update calls.
14481
a20d5e98
DJ
144822007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14483
14484 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14485 * remote-utils.c (remote_open): Do not call disable_async_io.
14486 (block_async_io): Delete.
14487 (unblock_async_io): Make static.
14488 (initialize_async_io): New.
14489 * server.c (handle_v_cont): Handle async I/O here.
14490 (myresume): Likewise. Move other common resume tasks here...
14491 (main): ... from here. Call initialize_async_io. Disable async
14492 I/O before the main loop.
14493 * server.h (initialize_async_io): Declare.
14494 (block_async_io, unblock_async_io): Delete prototypes.
14495 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14496
b79d787e
DJ
144972007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14498
14499 * remote-utils.c (readchar): Allow binary data in received messages.
14500
d97903b2
PA
145012007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14502
14503 * win32-low.c (attaching): New global.
14504 (win32_create_inferior): Clear the `attaching' global.
14505 (win32_attach): Set the `attaching' global.
14506 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14507 attaching. Only set a breakpoint at the entry point if not
14508 attaching.
14509
311de423
PA
145102007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14511
14512 * server.c (main): Don't report dll events on the initial
14513 connection on attaches.
14514
6c2d16d2
PA
145152007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14516
14517 * server.c (main): Relax numerical bases supported for the pid of
14518 the --attach command line argument.
14519
5ca906e6
PA
145202007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14521
14522 * win32-low.c (win32_attach): Call OpenProcess before
14523 DebugActiveProcess, not after. Add last error output to error
14524 call.
14525
9c6c8194
PA
145262007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14527
14528 * win32-low.c (win32_get_thread_context)
14529 (win32_set_thread_context): New functions.
14530 (thread_rec): Use win32_get_thread_context.
14531 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14532 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14533 field.
14534
4d5d1aaa
PA
145352007-12-03 Leo Zayas
14536 Pedro Alves <pedro_alves@portugalmail.pt>
14537
14538 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14539 global variables.
14540 (child_add_thread): Minor cleanup.
14541 (child_continue): Resume artificially suspended threads before
14542 calling ContinueDebugEvent.
14543 (suspend_one_thread): New.
14544 (fake_breakpoint_event): New.
14545 (get_child_debug_event): Change return type to int. Check here if
14546 gdb sent an interrupt request. If a soft interrupt was requested,
14547 fake a breakpoint event. Return 0 if there is no event to handle,
14548 and 1 otherwise.
14549 (win32_wait): Don't check here if gdb sent an interrupt request.
14550 Ensure there is a valid event to handle.
14551 (win32_request_interrupt): Add soft interruption method as last
14552 resort.
14553
c436e841
PA
145542007-12-03 Leo Zayas
14555 Pedro Alves <pedro_alves@portugalmail.pt>
14556
14557 * win32-low.h (win32_thread_info): Add descriptions to the
14558 structure members. Replace `suspend_count' counter by a
14559 `suspended' flag.
14560 * win32-low.c (thread_rec): Update condition of when to get the
14561 context from the inferior. Rely on ContextFlags being set if it
14562 has already been retrieved. Only suspend the inferior thread if
14563 we haven't already. Warn if that fails.
14564 (continue_one_thread): s/suspend_count/suspended/. Only call
14565 ResumeThread once. Warn if that fails.
14566
e7b5fa67
PA
145672007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14568
14569 * win32-low.c (win32_wait): Don't read from the inferior when it
14570 has already exited.
14571
a385171d
PA
145722007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14573
14574 * Makefile.in (win32_low_h): New variable.
14575 (win32-low.o): Add dependency on $(win32_low_h).
14576 (win32-arm-low.o, win32-i386-low.o): New rules.
14577
f80c84b3
DJ
145782007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14579
14580 * hostio.c: Correct copyright year.
14581
a6b151f1
DJ
145822007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14583
14584 * Makefile.in (OBS): Add hostio.o.
14585 (hostio.o): New rule.
14586 * server.h (handle_vFile): Declare.
14587 * hostio.c: New file.
14588 * server.c (handle_v_requests): Take packet_len and new_packet_len
14589 for binary packets. Call handle_vFile.
14590 (main): Update call to handle_v_requests.
14591
f9387fc3
DJ
145922007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14593
14594 * linux-low.c: Include <sched.h>.
14595
51c2684e
DJ
145962007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14597
14598 * linux-low.c (linux_tracefork_grandchild): New.
14599 (linux_tracefork_child): Use clone.
14600 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14601
75f83163
JB
146022007-10-31 Joel Brobecker <brobecker@adacore.com>
14603
14604 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14605
da5898ce
DJ
146062007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14607
14608 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14609
24a09b5f
DJ
146102007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14611
14612 * inferiors.c (change_inferior_id): Delete.
14613 (add_pid_to_list, pull_pid_from_list): New.
14614 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14615 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14616 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14617 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14618 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14619 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14620 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14621 (using_threads): Always set to 1.
14622 (handle_extended_wait): New.
14623 (add_process): Do not set TID.
14624 (linux_create_inferior): Set must_set_ptrace_flags.
14625 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14626 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14627 (linux_thread_alive): Rename TID argument to LWPID.
14628 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14629 (linux_wait_for_event): Do not use TID or check using_threads. Update
14630 call to dead_thread_notify. Call handle_extended_wait.
14631 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14632 (send_sigstop): Delete sigstop_sent.
14633 (wait_for_sigstop): Avoid TID.
14634 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14635 (linux_test_for_tracefork): New.
14636 (linux_lookup_signals): Use thread_db_active and
14637 linux_supports_tracefork_flag.
14638 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14639 * linux-low.h (get_process_thread): Avoid TID.
14640 (struct process_ifo): Move thread_known and tid to the end. Remove
14641 sigstop_sent.
14642 (linux_attach_lwp, thread_db_init): Update prototypes.
14643 * server.h (change_inferior_id): Delete prototype.
14644 (add_pid_to_list, pull_pid_from_list): New prototypes.
14645 * thread-db.c (thread_db_use_events): New.
14646 (find_first_thread): Rename to...
14647 (find_one_thread): ...this. Update callers and messages. Do not
14648 call fatal. Check thread_db_use_events. Do not call
14649 change_inferior_id or new_thread_notify.
14650 (maybe_attach_thread): Update. Do not call new_thread_notify.
14651 (thread_db_init): Set thread_db_use_events. Check use_events.
14652 * utils.c (fatal, warning): Correct message prefix.
14653
30ed0a8f
DJ
146542007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14655
14656 * Makefile.in (clean): Remove new files.
14657 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14658 (powerpc-64.o, powerpc-64.c): New rules.
14659 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14660 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14661 with SPE.
14662 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14663 SPE targets.
14664 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14665 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14666 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14667 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14668 (target_regsets): Add AltiVec and SPE register sets.
14669 * configure.ac: Check for AltiVec and SPE.
14670 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14671 (ppc_fill_vrregset, ppc_store_vrregset): New.
14672 (target_regsets): Add AltiVec register set.
14673 * configure: Regenerated.
14674
fd462a61
DJ
146752007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14676
14677 * linux-low.c (O_LARGEFILE): Define.
14678 (linux_read_memory): Use /proc/PID/mem.
14679 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14680 * configure, config.in: Regenerated.
14681
69f223ed
DJ
146822007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14683
14684 * linux-low.c (linux_wait_for_event): Do not pass signals while
14685 single-stepping.
14686
aec18585
PA
146872007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14688
14689 * win32-low.c (create_process): New.
14690 (win32_create_inferior): Use create_process instead of
14691 CreateProcess. If create_process failed retry appending an ".exe"
14692 suffix. Store the GetLastError result immediatelly after
14693 create_process calls and use it on the call to error.
14694
34d86ddd
PA
146952007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14696
14697 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14698
5a0e3bd0
JB
146992007-08-23 Joel Brobecker <brobecker@adacore.com>
14700
14701 * configure.ac: Switch license to GPLv3.
14702
f88c79e6
MS
147032007-08-01 Michael Snyder <msnyder@access-company.com>
14704
14705 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14706
6b3d9b83
PA
147072007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14708
14709 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14710 typedef.
14711 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14712 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14713 CloseToolhelp32Snapshot.
14714 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14715 CloseToolhelp32Snapshot.
14716
c588c53c
MS
147172007-07-27 Michael Snyder <michael.snyder@access-company.com>
14718
14719 * server.c (main): Check for inferior exit before main loop.
14720
aa0403d9
PA
147212007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14722
14723 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14724 instead of on tmp_desc.
14725
255e7678
DJ
147262007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14727 Daniel Jacobowitz <dan@codesourcery.com>
14728
14729 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14730 (add_thread): Minor cleanups.
14731 (clear_inferiors): Move lower in the file. Clear the DLL
14732 list.
14733 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14734 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14735 (xml_escape_text): New.
14736 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14737 for qSupported.
14738 (handle_v_cont): Report errors.
14739 (gdbserver_version): Update.
14740 (main): Correct size of own_buf. Do not report initial DLL events.
14741 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14742 (unloaded_dll, xml_escape_text): New.
14743 * win32-low.c (enum target_waitkind): Update comments.
14744 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14745 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14746 (win32_EnumProcessModules, win32_GetModuleInformation)
14747 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14748 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14749 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14750 (win32_Module32First, win32_Module32Next, load_toolhelp)
14751 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14752 (get_child_debug_event): Handle DLL events.
14753 (win32_wait): Likewise.
14754
0d37add9
DJ
147552007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14756
14757 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14758 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14759
45e2715e
PA
147602007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14761
14762 * win32-low.c (handle_output_debug_string): Ignore event if not
14763 waiting.
14764
c5674cf1
PA
147652007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14766
14767 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14768
2bbe3cc1
DJ
147692007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14770
14771 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14772
ae13219e
DJ
147732007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14774
14775 * inferiors.c (change_inferior_id): Add comment.
14776 * linux-low.c (check_removed_breakpoint): Add an early
14777 prototype. Improve debug output.
14778 (linux_attach): Doc update.
14779 (linux_detach_one_process, linux_detach): Clean up before releasing
14780 each process.
14781 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14782 * linux-low.h (struct process_info): Doc improvement.
14783 * mem-break.c (delete_all_breakpoints): New.
14784 * mem-break.h (delete_all_breakpoints): New prototype.
14785 * thread-db.c (find_first_thread): New.
14786 (thread_db_create_event): Call it instead of
14787 thread_db_find_new_threads. Clean up unused variables.
14788 (maybe_attach_thread): Remove first thread handling.
14789 (thread_db_find_new_threads): Use find_first_thread.
14790 (thread_db_get_tls_address): Likewise.
14791
4105de34
DJ
147922007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14793
14794 * thread-db.c (thread_db_find_new_threads): Add prototype.
14795 (thread_db_create_event): Check for the main thread before adding
14796 a new thread.
14797 (maybe_attach_thread): Only enable event reporting if TID == 0.
14798 (thread_db_get_tls_address): Check for new threads.
14799
2b876972
DJ
148002007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14801
14802 * linux-low.c (linux_create_inferior): Try execv before execvp.
14803 * spu-low.c (spu_create_inferior): Likewise.
14804
7a245884
DJ
148052007-06-13 Mike Frysinger <vapier@gentoo.org>
14806
14807 * linux-low.c (linux_create_inferior): Change execv to execvp.
14808 * spu-low.c (spu_create_inferior): Likewies.
14809
117ce543
DJ
148102007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14811
14812 * Makefile.in (clean): Clean new files instead of deleted ones.
14813 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14814 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14815 rules.
14816 * configure.srv: Specify XML files and new regformats for MIPS and
14817 MIPS64 GNU/Linux.
14818 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14819 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14820 an entry for the restart register.
14821 (mips_cannot_fetch_register, mips_cannot_store_register)
14822 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14823 register names to match the XML descriptions.
14824 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14825 restart register instead of $0.
14826
0e7f50da
UW
148272007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14828 Markus Deuling <deuling@de.ibm.com>
14829
14830 * remote-utils.c (decode_xfer_write): New function.
14831 * server.h (decode_xfer_write): Add prototype.
14832 * server.c (handle_query): Add PACKET_LEN argument. Support
14833 qXfer:spu:read and qXfer:spu:write packets.
14834 (main): Pass packet_len to handle_query.
14835 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14836 * target.h (target_ops): Add qxfer_spu.
14837
374c1d38
UW
148382007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14839
14840 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14841 accessing non-seekable spufs files.
14842
bb63802a
UW
148432007-05-16 Markus Deuling <deuling@de.ibm.com>
14844
889bf7c5 14845 * server.c (handle_query): Add reply for qC packet.
bb63802a 14846
7390519e
PA
148472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14848 Leo Zayas <lerele@champenstudios@com>
14849
14850 * server.h (check_remote_input_interrupt_request): New function.
14851 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14852 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14853 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14854 (check_remote_input_interrupt_request): New function.
14855 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14856 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14857 winapi_GenerateConsoleCtrlEvent): New typedefs.
14858 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14859 to 250 ms.
14860 (win32_wait): Check for remote interrupt request
14861 with check_remote_input_interrupt_request.
14862 (win32_request_interrupt): New function.
14863 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14864
34b34921
PA
148652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14866
14867 * win32-low.c (debug_registers_changed,
14868 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14869 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14870 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14871 (thread_rec): Get context using the low target.
14872 (child_add_thread): Call thread_added on the low target,
14873 which does the same thing.
14874 (regptr): Delete.
14875 (do_initial_child_stuff): Remove debug registers references.
14876 Set context using the low target. Resume threads after
14877 setting the contexts.
14878 (child_continue): Remove dead variable. Remove debug
14879 registers references.
14880 (child_fetch_inferior_registers): Go through the low target.
14881 (do_child_store_inferior_registers): Remove.
14882 (child_store_inferior_registers): Go through the low target.
14883 (win32_resume): Remove debug registers references.
14884 Set context using the low target.
14885 (handle_exception): Change return type to void. Don't record
14886 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14887 first chance exception.
889bf7c5 14888 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14889 goto loop. Always return after waiting for debug event.
14890 (win32_wait): Convert to switch statement. Handle spurious
14891 events.
14892
14893 * win32-i386-low.c (debug_registers_changed,
14894 debug_registers_used): New.
14895 (initial_stuff): Rename to ...
14896 (i386_initial_stuff): ... this. Clear debug registers
14897 state variables.
14898 (store_debug_registers): Delete.
14899 (i386_get_thread_context): New.
14900 (load_debug_registers): Delete.
14901 (i386_set_thread_context): New.
14902 (i386_thread_added): New.
14903 (single_step): Rename to ...
14904 (i386_single_step): ... this.
14905 (do_fetch_inferior_registers): Rename to ...
14906 (i386_fetch_inferior_register): ... this.
14907 (i386_store_inferior_register): New.
14908 (the_low_target): Adapt to new interface.
14909
14910 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14911 (arm_get_thread_context): New.
14912 (arm_set_thread_context): New.
14913 (regptr): New.
14914 (do_fetch_inferior_registers): Rename to ...
14915 (arm_fetch_inferior_register): ... this.
14916 (arm_store_inferior_register): New.
14917 (arm_wince_breakpoint): Reimplement as unsigned long.
14918 (arm_wince_breakpoint_len): Define.
14919 (the_low_target): Adapt to new interface.
14920
14921 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14922 load_debug_registers. Add get_thread_context, set_thread_context,
14923 thread_added and store_inferior_register. Rename
14924 fetch_inferior_registers to fetch_inferior_register.
14925 (regptr): Remove declaration.
14926
dd6953e1
PA
149272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14928
14929 * linux-low.c (linux_detach): Change return type to int. Return 0.
14930 * spu-low.c (spu_detach): Likewise.
14931
444d6139
PA
149322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14933
14934 * target.h (target_ops): Change return type of detach to int.
14935 Add join.
14936 (join_inferior): New.
14937 * server.c (main): Don't skip detach support on mingw32.
14938 If the inferior doesn't support detaching return error.
14939 Call join_inferior instead of using waitpid.
14940 * linux-low.c (linux_join): New.
14941 (linux_target_op): Add linux_join.
14942 * spu-low.c (spu_join): New.
14943 (spu_target_ops): Add spu_join.
14944 * win32-low.c (win32_detach): Adapt to new interface.
14945 Reopen current_process_handle before detaching. Issue a child
14946 resume before detaching.
14947 (win32_join): New.
14948 (win32_target_op): Add win32_join.
14949
1d5315fe
PA
149502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14951
14952 * win32-low.c (win32-attach): Fix return value.
14953 * target.h (target_ops): Describe ATTACH return values.
14954
bf914831
PA
149552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14956
14957 * win32-low.c (GETPROCADDRESS): Define.
14958 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14959 (winapi_DebugSetProcessKillOnExit): Likewise.
14960 (win32_create_inferior): Force usage of ansi CreateProcessA.
14961 (win32_attach): Use GETPROCADDRESS.
14962 (win32_detach): Likewise.
14963
f72f3e60
PA
149642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14965
14966 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14967
ed50f18f
PA
149682007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14969
14970 * win32-low.c: Commit leftover changes from 2007-03-29.
14971
0c2ead7e
DJ
149722007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14973
14974 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14975 fields short instead of int. Add explicit padding.
14976 (i387_cache_to_fsave): Remove unnecessary casts.
14977 (i387_fsave_to_cache): Doc fix.
14978 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14979
73725ff3
DJ
149802007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14981
14982 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14983 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14984
d99f33d8
PA
149852007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14986
14987 * configure.srv (arm*-*-mingw32ce*): Move near the other
14988 arm targets.
14989
68070c10
PA
149902007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14991
2482afc6 14992 * configure.ac: Add errno checking.
68070c10
PA
14993 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14994 sys/file.h and malloc.h.
14995 (AC_CHECK_DECLS): Add perror.
14996 (srv_mingwce): Handle.
2482afc6 14997 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14998 win32-i386-low.o to srv_tgtobj.
14999 (i[34567]86-*-mingw*): Likewise.
15000 (arm*-*-mingw32ce*): Add case.
15001 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15002 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15003 [__MINGW32CE__] (strerror): New function.
15004 [__MINGW32CE__] (errno): Define to GetLastError.
15005 [__MINGW32CE__] (COUNTOF): New macro.
15006 (remote_open): Remove extra close call.
15007 * mem-break.c (delete_breakpoint_at): New function.
15008 * mem-break.h (delete_breakpoint_at): Declare.
15009 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15010 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15011 [USE_WIN32API] (read, write): Add char* casts.
15012 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15013 * server.h: Include wincecompat.h on Windows CE.
15014 [HAVE_ERRNO_H]: Check.
15015 (perror): Declare if not declared.
15016 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15017 (perror_with_name): Remove errno declaration.
15018 * wincecompat.h: New.
15019 * wincecompat.c: New.
15020 * win32-low.h: New.
15021 * win32-arm-low.c: New.
15022 * win32-i386-low.c: New.
15023 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15024 (OUTMSG2): Make it safe.
15025 (_T): New macro.
15026 (COUNTOF): New macro.
15027 (NUM_REGS): Get it from the low target.
15028 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15029 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15030 (thread_rec): Let low target handle debug registers.
15031 (child_add_thread): Likewise.
15032 (child_init_thread_list): Likewise.
15033 (continue_one_thread): Likewise.
15034 (regptr): New.
15035 (do_child_fetch_inferior_registers): Move to ...
15036 * win32-i386-low.c: ... here, and rename to ...
15037 (do_fetch_inferior_registers): ... this.
889bf7c5 15038 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15039 Go through the low target.
15040 (do_child_store_inferior_registers): Use regptr.
15041 (strwinerror): New function.
15042 (win32_create_inferior): Handle Windows CE.
15043 Use strwinerror instead of strerror on Windows error
15044 codes. Add program to the error output.
15045 Don't close the main thread handle on Windows CE.
15046 (win32_attach): Use coredll.dll on Windows CE.
15047 (win32_kill): Close current process and current
15048 thread handles.
15049 (win32_detach): Use coredll.dll on Windows CE.
15050 (win32_resume): Let low target handle debug registers, and
15051 step request.
15052 (handle_exception): Add/Remove initial breakpoint. Avoid
15053 non-existant WSTOPSIG on Windows CE.
15054 (win32_read_inferior_memory): Cast to remove warning.
15055 (win32_arch_string): Go through the low target.
15056 (initialize_low): Call set_breakpoint_data with the low
15057 target's breakpoint.
15058 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15059 FOP_REGNUM, mappings): Move to ...
15060 * win32-i386-low.c: ... here.
15061 * win32-low.c (win32_thread_info): Move to ...
15062 * win32-low.h: ... here.
15063 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15064 win32-arm-low.c and wincecompat.c.
15065 (all:): Add $EXEEXT.
15066 (install-only:): Likewise.
15067 (gdbserver:): Likewise.
15068 (gdbreplay:): Likewise.
15069 * config.in: Regenerate.
15070 * configure: Regenerate.
15071
41093d81
PA
150722007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15073
15074 * win32-low.c: Rename typedef thread_info to
15075 win32_thread_info throughout.
15076
544afa54
PA
150772007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15078
15079 * win32-i386-low.c: Rename to ...
15080 * win32-low.c: ... this.
15081 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15082 * Makefile.in: Likewise.
15083
bce7165d
PA
150842007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15085
15086 * remote-utils.c (monitor_output): Constify msg parameter.
15087 * server.h (monitor_output): Likewise.
15088 * win32-i386-low.c (handle_output_debug_string): New.
15089 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15090 handle_output_debug_string.
15091 (get_child_debug_event): Likewise.
15092
506c7aa0
DJ
150932007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15094
15095 * server.c (main): Correct strtoul check.
15096
42c81e2a
DJ
150972007-03-27 Jon Ringle <jon@ringle.org>
15098
15099 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15100
9453113a
DJ
151012007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15102
15103 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15104
64a69107
DJ
151052007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15106
15107 * terminal.h: Check HAVE_SGTTY_H.
15108
151092007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15110
15111 * remote-utils.c (remote_open): Print out the assigned port number.
15112
c74d0ad8
DJ
151132007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15114
15115 * remote-utils.c (monitor_output): New function.
15116 * server.c (debug_threads): Define here.
15117 (monitor_show_help): New function.
15118 (handle_query): Handle qRcmd.
15119 (main): Do not handle 'd' packet.
15120 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15121 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15122 of debug_threads.
15123
de7c3b4a
PA
151242007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15125
15126 * Makefile.in (EXEEXT): New.
15127 (clean): Use $(EXEEXT).
15128
ef57601b
PA
151292007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15130
15131 * target.h (target_ops): Rename send_signal to request_interrupt,
15132 and remove enum target_signal parameter.
15133 * linux-low.c (linux_request_interrupt): Rename from
15134 linux_send_signal, and always send SIGINT.
15135 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15136 and always send SIGINT.
15137 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15138 of send_signal.
15139 (input_interrupt): Likewise.
15140
820f2bda
PA
151412007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15142
15143 * server.c (get_features_xml): Check if target implemented
15144 arch_string.
15145 * win32-i386-low.c (win32_arch_string): New.
15146 (win32_target_ops): Add win32_arch_string as arch_string member.
15147
ab39bf24
UW
151482007-02-22 Markus Deuling <deuling@de.ibm.com>
15149
15150 * spu-low.c (spu_arch_string): New.
15151 (spu_target_ops): Add spu_arch_string.
15152
61ff6e04
DJ
151532007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15154
15155 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15156 * configure.ac: Do not check for terminal.h.
15157 * configure, config.in: Regenerated.
15158
fb1e4ffc
DJ
151592007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15160
15161 * Makefile.in (OBS): Add $(XML_BUILTIN).
15162 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15163 (clean): Update.
15164 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15165 (arm-with-iwmmxt.c): New.
15166 * config.in, configure: Regenerate.
15167 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15168 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15169 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15170 (arm*-*-linux*): Add iWMMXt and regset support.
15171 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15172 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15173 (arm_store_wmmxregset, target_regsets): New.
15174 * server.c (get_features_xml): Take annex argument. Check builtin
15175 XML documents.
15176 (handle_query): Handle multiple annexes.
15177
0f48aa01
DJ
151782007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15179
15180 * remote-utils.c [USE_WIN32API] (read, write): Define.
15181 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15182 write.
15183
23181151
DJ
151842007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15185
15186 * linux-i386-low.c (the_low_target): Set arch_string.
15187 * linux-x86-64-low.c (the_low_target): Likewise.
15188 * linux-low.c (linux_arch_string): New.
15189 (linux_target_ops): Add it.
15190 * linux-low.h (struct linux_target_ops): Add arch_string.
15191 * server.c (write_qxfer_response): Use const void * for DATA.
15192 (get_features_xml): New.
15193 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15194 * target.h (struct target_ops): Add arch_string method.
15195
9d606399
DJ
151962007-01-03 Denis Pilat <denis.pilat@st.com>
15197 Daniel Jacobowitz <dan@codesourcery.com>
15198
15199 * linux-low.c (linux_kill): Handle being called with no threads.
15200 * win32-i386-low.c (win32_kill): Likewise.
15201 (get_child_debug_event): Clear current_process_handle.
15202
152032006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15204 Daniel Jacobowitz <dan@codesourcery.com>
15205
15206 * remote-utils.c (remote_open): Check the type of specified
15207 serial port devices before opening them.
15208 * server.c (main): Kill the inferior if an error occurs during
15209 the first remote_open.
15210
a5e13d24
DJ
152112006-12-05 Markus Deuling <deuling@de.ibm.com>
15212
15213 * README: Update supported targets.
15214
186947f7
DJ
152152006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15216
15217 * Makefile.in (clean): Remove reg-mips64.c.
15218 (reg-mips64.c, reg-mips64.o): New rules.
15219 * configure.srv: Handle mips64. Include regset support for mips.
15220 * linux-mips-low.c (union mips_register): New.
15221 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15222 (mips_breakpoint, mips_breakpoint_at): Use int.
15223 (mips_collect_register, mips_supply_register)
15224 (mips_collect_register_32bit, mips_supply_register_32bit)
15225 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15226 (mips_store_fpregset, target_regsets): New.
15227 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15228
a13e2c95
UW
152292006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15230
15231 * configure.srv: Add target "spu*-*-*".
15232 * Makefile.in (clean): Remove reg-spu.c.
15233 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15234 * spu-low.c: New file.
15235
cb7283db
DJ
152362006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15237
15238 * configure.ac: Correct td_thr_tls_get_addr test.
15239 * configure: Regenerated.
15240
89be2091
DJ
152412006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15242
15243 * linux-low.c (linux_wait_for_event): Reformat. Use the
15244 pass_signals array.
15245 * remote-utils.c (decode_address_to_semicolon): New.
15246 * server.c (pass_signals, handle_general_set): New.
15247 (handle_query): Mention QPassSignals for qSupported.
15248 (main): Call handle_general_set.
15249 * server.h (pass_signals, decode_address_to_semicolon): New.
15250
000ef4f0
DJ
152512006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15252
15253 * server.c (handle_query): Correct error handling for read_auxv.
15254
b7149293
UW
152552005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15256
15257 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15258 and srv_linux_thread_db to yes.
15259 * linux-s390-low.c (s390_fill_gregset): New function.
15260 (target_regsets): Define data structure.
15261
dae5f5cf
DJ
152622006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15263
15264 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15265 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15266 * config.in, configure: Regenerated.
15267 * inferiors.c (gdb_id_to_thread): New function.
15268 (gdb_id_to_thread_id): Use it.
15269 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15270 * linux-low.h (struct process_info): Add th member.
15271 (thread_db_get_tls_address): New prototype.
15272 * remote-utils.c (decode_address): Make non-static.
15273 * server.c (handle_query): Handle qGetTLSAddr.
15274 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15275 * target.h (struct target_ops): Add get_tls_address.
15276 * thread-db.c (maybe_attach_thread): Save the thread handle.
15277 (thread_db_get_tls_address): New.
15278
32ca6d61
DJ
152792006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15280
15281 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15282 (linux_resume_one_process): Take a siginfo_t *. Update all
15283 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15284 (struct pending_signals): Add a siginfo_t.
15285 (linux_wait_for_process): Always set last_status.
15286 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15287 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15288 * linux-low.h (struct process_info): Add last_status.
15289
5ffff7c1
DJ
152902006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15291
15292 * remote-utils.c (try_rle): New function.
15293 (putpkt_binary): Use it.
15294
8695c747
DJ
152952006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15296
15297 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15298 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15299 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15300 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15301 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15302 point registers.
15303
290fadea
RS
153042006-08-08 Richard Sandiford <richard@codesourcery.com>
15305
15306 * server.c (terminal_fd): New variable.
15307 (old_foreground_pgrp): Likewise.
15308 (restore_old_foreground_pgrp): New function.
15309 (start_inferior): Record the terminal file descriptor in terminal_fd
15310 and its original foreground group in old_foreground_pgrp. Register
15311 restore_old_foreground_pgrp with atexit().
15312
9f2e1e63
DJ
153132006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15314
15315 * server.c (handle_query): Correct qPart to qXfer.
15316
b80864fb
DJ
153172006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15318
15319 * configure.ac: Check for more headers which are missing on
15320 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15321 * configure.srv: Add Cygwin and mingw32.
15322 * remote-utils.c: Don't include headers unconditionally which
15323 are missing on mingw32. Include <winsock.h> for mingw32.
15324 (remote_open): Adjust for mingw32 support. Flush
15325 standard error after writing to it.
15326 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15327 (unblock_async_io, enable_async_io, disable_async_io)
15328 (readchar, getpkt): Update for Winsock support.
15329 (prepare_resume_reply): Expect a protocol signal number.
15330 * server.c: Disable <sys/wait.h> on mingw32.
15331 (start_inferior): Adjust for mingw32 support. Flush
15332 standard error after writing to it.
15333 (attach_inferior): Likewise. Use protocol signal
15334 numbers.
15335 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15336 and names.
15337 * win32-i386-low.c: New file.
15338 * Makefile.in (XM_CLIBS): Set.
15339 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15340 (win32-i386-low.o): New dependency rule.
15341 * linux-low.c (linux_wait): Use target signal numbers.
15342 * target.h (struct target_ops): Doc fix.
15343 * server.h (target_signal_to_name): New prototype.
15344 * gdbreplay.c: Don't include headers unconditionally which
15345 are missing on mingw32. Include <winsock.h> for mingw32.
15346 (remote_close, remote_open): Adjust for Winsock support.
15347 * configure, config.in: Regenerated.
15348
0876f84a
DJ
153492006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15350
15351 * server.c (decode_xfer_read, write_qxfer_response): New.
15352 (handle_query): Take a packet length argument. Handle
15353 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15354 the qSupported response.
15355 (main): Update call to handle_query.
15356
01f9e8fa
DJ
153572006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15358
15359 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15360 (putpkt_binary): Renamed from putpkt and adjusted for binary
15361 data.
15362 (putpkt): New wrapper for putpkt_binary.
15363 (readchar): Don't mask off the high bit.
15364 (decode_X_packet): New function.
15365 * server.c (main): Call putpkt_binary if a handler sets the packet
15366 length. Save the length of the incoming packet. Handle 'X'.
15367 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15368
be2a5f71
DJ
153692006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15370
15371 * server.c (handle_query): Handle qSupported.
15372
ea025f5f
DJ
153732006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15374
15375 * remote-utils.c (all_symbols_looked_up): New variable.
15376 (look_up_one_symbol): Check it.
15377 * server.h (look_up_one_symbol): New declaration.
15378 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15379
9308fc88
DJ
153802006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15381
15382 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15383 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15384 (PTRACE_GET_THREAD_AREA): Define.
15385 (ps_get_thread_area): New function.
15386
52fb6437
NS
153872006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15388
15389 * configure.srv (m68k*-*-uclinux*): New target.
15390 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15391 (linux_resume_one_process): Remove extraneous cast.
15392 (linux_read_offsets): New.
15393 (linux_target_op): Add linux_read_offsets on mmuless systems.
15394 * server.c (handle_query): Add qOffsets logic.
15395 * target.h (struct target_ops): Add read_offsets.
15396
21b0f40c
DJ
153972006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15398
15399 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15400 (PTRACE_GET_THREAD_AREA): Define.
15401 (ps_get_thread_area): New function.
15402 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15403 (linux-x86-64-low.o): Update.
15404
0050a760
DJ
154052006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15406
15407 * configure.ac: Remove checks for prfpregset_t.
15408 * gdb_proc_service.h: New file.
15409 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15410 new "gdb_proc_service.h".
15411 * proc-service.c: Likewise.
15412 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15413 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15414 * Makefile.in (gdb_proc_service_h): Updated.
15415 * configure, config.in: Regenerated.
15416
b92a518e
DJ
154172006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15418
15419 * remote-utils.c (prepare_resume_reply): Move declaration
15420 of gdb_id_from_wait to the top of the block.
15421
545587ee
DJ
154222006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15423
15424 * linux-low.c (regsets_store_inferior_registers): Read the regset
15425 from the target before filling it.
15426
9db87ebd
DJ
154272006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15428
15429 * server.c (attach_inferior): Return SIGTRAP for a successful
15430 attach.
15431
dd24457d
DJ
154322006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15433
15434 * Makefile.in (OBS): Add version.o.
15435 (STAGESTUFF): Delete.
15436 (version.o): Add dependencies.
15437 (version.c): Replace rule.
15438 (clean): Remove version.c.
15439 * server.c (gdbserver_version): New.
15440 (gdbserver_usage): Use printf.
15441 (main): Handle --version and --help.
15442 * server.h (version, host_name): Add declarations.
15443
6f0f660e
EZ
154442005-12-23 Eli Zaretskii <eliz@gnu.org>
15445
889bf7c5
PA
15446 * linux-arm-low.c:
15447 * linux-arm-low.c:
15448 * inferiors.c:
15449 * i387-fp.h:
15450 * i387-fp.c:
15451 * gdbreplay.c:
15452 * regcache.c:
15453 * proc-service.c:
15454 * mem-break.h:
15455 * mem-break.c:
15456 * linux-x86-64-low.c:
15457 * linux-sh-low.c:
15458 * linux-s390-low.c:
15459 * linux-ppc64-low.c:
15460 * linux-ppc-low.c:
15461 * linux-mips-low.c:
15462 * linux-m68k-low.c:
15463 * linux-m32r-low.c:
15464 * linux-low.h:
15465 * linux-low.c:
15466 * linux-ia64-low.c:
15467 * linux-i386-low.c:
15468 * linux-crisv32-low.c:
15469 * thread-db.c:
15470 * terminal.h:
15471 * target.h:
15472 * target.c:
15473 * server.h:
15474 * server.c:
15475 * remote-utils.c:
15476 * regcache.h:
15477 * utils.c:
15478 * Makefile.in:
15479 * configure.ac:
6f0f660e
EZ
15480 * gdbserver.1: Add (C) after Copyright. Update the FSF
15481 address.
15482
9d1fb177
DJ
154832005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15484
15485 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15486 (arm_breakpoint_at): Recognize both breakpoints.
15487 (the_low_target): Use the correct breakpoint instruction.
15488
011a70c2
DJ
154892005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15490
15491 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15492 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15493 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15494 (the_low_target): Update.
15495
7fb85e41
AS
154962005-10-25 Andreas Schwab <schwab@suse.de>
15497
15498 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15499
15500 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15501 (ia64_num_regs): Reduce to 462.
15502
3db0444b
DJ
155032005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15504
15505 * acinclude.m4: Correct quoting.
15506 * aclocal.m4: Regenerated.
15507
15508 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15509 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15510 (thread_db_init): Call thread_db_err_str.
15511 * configure.ac: Check for TD_VERSION.
15512 * config.in, configure: Regenerated.
15513
bee0189a
DJ
155142005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15515
15516 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15517
e9d25b98
DJ
155182005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15519
15520 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15521 is not available. Define HAVE_PTRACE_GETREGS if it is.
15522 * config.in, configure: Regenerated.
15523 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15524 * linux-i386-low.c, linux-m68k-low.c: Update to use
15525 HAVE_PTRACE_GETREGS.
15526 * linux-low.c (regsets_fetch_inferior_registers)
15527 (regsets_store_inferior_registers): Only return 0 if we processed
15528 GENERAL_REGS.
15529 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15530 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15531
a06660f7
DJ
155322005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15533
15534 * inferiors.c (struct thread_info): Add gdb_id.
15535 (add_thread): Add gdb_id argument.
15536 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15537 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15538 calls to add_thread.
15539 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15540 * server.c (handle_query): Use thread_to_gdb_id.
15541 (handle_v_cont, main): Use gdb_id_to_thread_id.
15542 * server.h (add_thread): Update prototype.
15543 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15544 prototypes.
15545
5a1f5858
DJ
155462005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15547
15548 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15549 left-padded registers.
15550 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15551 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15552
e122f1f5
SE
155532005-07-01 Steve Ellcey <sje@cup.hp.com>
15554
15555 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15556 * configure: Regenerate.
15557 * config.in: Regenerate.
15558 * server.h (NEED_DECLARATION_STRERROR):
15559 Replace with !HAVE_DECL_STRERROR.
15560
d592fa2f
DJ
155612005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15562
15563 * linux-low.c (linux_wait, linux_send_signal): Don't test
15564 an unsigned long variable for > 0 if it could be MAX_ULONG.
15565 * server.c (myresume): Likewise.
15566 * target.c (set_desired_inferior): Likewise.
15567
ccbd4912
MK
155682005-06-13 Mark Kettenis <kettenis@gnu.org>
15569
15570 * configure.ac: Simplify and improve check for socklen_t.
15571 * configure, config.in: Regenerate.
15572
f450004a
DJ
155732005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15574
15575 * acconfig.h: Remove.
15576 * configure.ac: Add a test for socklen_t. Use three-argument
15577 AC_DEFINE throughout.
15578 * config.in: Regenerated using autoheader 2.59.
15579 * configure: Regenerated.
15580
15581 * gdbreplay.c (socklen_t): Provide a default.
15582 (remote_open): Use socklen_t.
15583 * remote-utils.c (socklen_t): Provide a default.
15584 (remote_open): Use socklen_t.
15585 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15586 unsigned char.
15587
15588 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15589 char for buffers.
15590 * linux-low.c (linux_read_memory, linux_write_memory)
15591 (linux_read_auxv): Likewise.
15592 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15593 (check_mem_write): Likewise.
15594 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15595 Likewise.
15596 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15597 (registers_from_string, register_data): Likewise.
15598 * server.c (handle_query, main): Likewise.
15599 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15600 (decode_M_packet): Likewise.
15601 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15602 * target.h (struct target_ops): Update read_memory, write_memory,
15603 and read_auxv.
15604 (read_inferior_memory, write_inferior_memory): Update.
15605 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15606 to unsigned char *.
15607 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15608 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15609 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15610 linux-s390-low.c, linux-sh-low.c: Update for changes in
15611 read_inferior_memory and the_low_target->breakpoint.
15612
eee84df1
DJ
156132005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15614
15615 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15616 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15617 * configure.srv: Add powerpc64-*-linux*.
15618 * linux-ppc64-low.c: New file.
15619
45b134e5
OF
156202005-05-23 Orjan Friberg <orjanf@axis.com>
15621
15622 * linux-cris-low.c: New file with support for CRIS.
15623 * linux-crisv32-low.c: Ditto for CRISv32.
15624 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15625 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15626 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15627 reg-crisv32.o, and reg-crisv32.c to make rules.
15628 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15629 recognized targets.
15630
48d93c75
UW
156312005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15632
15633 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15634 of sizeof (PTRACE_XFER_TYPE).
15635 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15636
e013ee27
OF
156372005-05-12 Orjan Friberg <orjanf@axis.com>
15638
889bf7c5 15639 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15640 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15641 pointers for hardware watchpoint support.
15642 * linux-low.h (struct linux_target_ops): Ditto.
15643 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15644 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15645 to linux_target_ops.
15646 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15647 reply packet.
15648 * server.c (main): Recognize 'Z' and 'z' packets.
15649
b0ded00b
UW
156502005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15651
15652 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15653 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15654 (the_low_target): Add new members.
15655
8643e2ad
DJ
156562005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15657
15658 * proc-service.c (ps_lgetregs): Search all_processes instead of
15659 all_threads.
15660
fc620387
DJ
156612005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15662
15663 * server.c (start_inferior): Change return type to int.
15664 (attach_inferior): Change sigptr to int *.
15665 (handle_v_cont, handle_v_requests): Change signal to int *.
15666 (main): Change signal to int.
15667
156682005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15669
15670 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15671 * configure.srv: Add m32r*-*-linux*.
15672 * linux-m32r-low.c: New file.
15673
e0e76420
DJ
156742005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15675
15676 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15677
a1928bad
DJ
156782005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15679
15680 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15681 Take unsigned long arguments for PIDs.
15682 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15683 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15684 (wait_for_sigstop, linux_resume_one_process)
15685 (regsets_fetch_inferior_registers, linux_send_signal)
15686 (linux_read_auxv): Likewise. Update the types of variables holding
15687 PIDs. Update format string specifiers.
15688 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15689 * remote-utils.c (prepare_resume_reply): Likewise.
15690 * server.c (cont_thread, general_thread, step_thread)
15691 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15692 unsigned long.
15693 (handle_query): Update format specifiers.
15694 (handle_v_cont, main): Use strtoul for thread IDs.
15695 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15696 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15697 (general_thread, step_thread, thread_from_wait)
15698 (old_thread_from_wait): Update.
15699 * target.h (struct thread_resume): Use unsigned long for THREAD.
15700 (struct target_ops): Use unsigned long for arguments to attach and
15701 thread_alive.
15702
dcdb98d2
DJ
157032005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15704
15705 * acinclude.m4: Include bfd/bfd.m4 directly.
15706 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15707 <agriffis@toolchain.org>.
15708 * aclocal.m4, configure: Regenerated.
15709
bec39cab
AC
157102005-01-07 Andrew Cagney <cagney@gnu.org>
15711
15712 * configure.ac: Rename configure.in, require autoconf 2.59.
15713 * configure: Re-generate.
15714
434c4c77
DJ
157152004-12-08 Daniel Jacobowitz <dan@debian.org>
15716
15717 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15718 LIBS when finished.
15719 * aclocal.m4: Regenerated.
15720 * configure: Regenerated.
15721
db1d3e1b
AS
157222004-11-21 Andreas Schwab <schwab@suse.de>
15723
15724 * linux-m68k-low.c (m68k_num_gregs): Define.
15725 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15726 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15727 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15728 (m68k_breakpoint_at): New. Add to the_low_target.
15729
15730 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15731 srv_linux_thread_db to yes.
15732
43360365
JB
157332004-10-20 Joel Brobecker <brobecker@gnat.com>
15734
15735 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15736 (ARCH_SET_FS): Likewise.
15737 (ARCH_GET_FS): Likewise.
15738 (ARCH_GET_GS): Likewise.
15739
fd500816
DJ
157402004-10-16 Daniel Jacobowitz <dan@debian.org>
15741
15742 * linux-i386-low.c (ps_get_thread_area): New.
15743 * linux-x86-64-low.c (ps_get_thread_area): New.
15744 * linux-low.c: Include <sys/syscall.h>.
15745 (linux_kill_one_process): Don't kill the first thread here.
15746 (linux_kill): Kill the first thread here.
15747 (kill_lwp): New function.
15748 (send_sigstop, linux_send_signal): Use it.
15749 * proc-service.c: Clean up #ifdefs.
15750 (fpregset_info): Delete.
15751 (ps_lgetregs): Update and enable implementation.
15752 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15753 implementations.
15754 * remote-utils.c (struct sym_cache, symbol_cache): New.
15755 (input_interrupt): Print a clearer message.
15756 (async_io_enabled): New variable.
15757 (enable_async_io, disable_async_io): Use it. Update comments.
15758 (look_up_one_symbol): Use the symbol cache.
15759 * thread-db.c (thread_db_look_up_symbols): New function.
15760 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15761
f6de3c42
DJ
157622004-10-16 Daniel Jacobowitz <dan@debian.org>
15763
15764 * configure.in: Test for -rdynamic.
15765 * configure: Regenerated.
15766 * Makefile (INTERNAL_LDFLAGS): New.
15767 (gdbserver, gdbreplay): Use it.
15768
2c0fc042
AC
157692004-09-02 Andrew Cagney <cagney@gnu.org>
15770
15771 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15772
075b3282
DJ
157732004-03-23 Daniel Jacobowitz <drow@mvista.com>
15774
15775 * linux-low.c (linux_wait): Clear all_processes list also.
15776
fa6a77dc
DJ
157772004-03-12 Daniel Jacobowitz <drow@mvista.com>
15778
15779 * linux-low.c: Include <errno.h>. Remove extern declaration of
15780 errno.
15781
6d782a97
DJ
157822004-03-12 Daniel Jacobowitz <drow@mvista.com>
15783
15784 * gdbreplay.c, server.h, utils.c: Update copyright years.
15785
3a7fb99b
DJ
157862004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15787
15788 * server.c (main): Print child status or termination signal from
15789 variable 'signal', not 'sig'.
15790
c3e735a6
DJ
157912004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15792
15793 * linux-low.c (linux_read_memory): Change return type to
15794 int. Check for and return error from ptrace().
15795 * target.c (read_inferior_memory): Change return type to int. Pass
15796 back return status from the_target->read_memory().
15797 * target.h (struct target_ops): Adapt *read_memory() prototype.
15798 Update comment.
15799 (read_inferior_memory): Adapt prototype.
15800 * server.c (main): Return an error packet if
15801 read_inferior_memory() returns an error.
15802
a59d1c82
DJ
158032004-03-04 Daniel Jacobowitz <drow@mvista.com>
15804
15805 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15806 Unify with other clean targets.
15807
dc3f8883
DJ
158082004-02-29 Daniel Jacobowitz <drow@mvista.com>
15809
15810 * server.c (handle_v_cont): Call set_desired_inferior.
15811
89a208da
DJ
158122004-02-29 Daniel Jacobowitz <drow@mvista.com>
15813
15814 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15815
62ea82f5
DJ
158162004-02-29 Daniel Jacobowitz <drow@mvista.com>
15817
15818 * linux-low.c (linux_wait): Unblock async I/O.
15819 (linux_resume): Block and enable async I/O.
15820 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15821 * server.h (block_async_io, unblock_async_io): Add prototypes.
15822
6910d122
DJ
158232004-02-29 Daniel Jacobowitz <drow@mvista.com>
15824
15825 * remote-utils.c (remote_open): Print a status notice after
15826 opening a TCP port.
15827 * server.c (attach_inferior): Print a status notice after
15828 attaching.
15829
158302004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15831
15832 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15833
c89dc5d4
DJ
158342004-02-26 Daniel Jacobowitz <drow@mvista.com>
15835
15836 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15837 error packet.
15838 * server.c, target.h: Update copyright years.
15839
4b8dad4a
RM
158402004-02-25 Roland McGrath <roland@redhat.com>
15841
15842 * target.h (struct target_ops): New member `read_auxv'.
15843 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15844 * linux-low.c (linux_read_auxv): New function.
15845 (linux_target_ops): Initialize `read_auxv' member to that.
15846
d7446758
JB
158472004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15848
15849 Committed by Jim Blandy <jimb@redhat.com>.
15850
15851 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15852 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15853 instead of GPR_SIZE to distiguish s390 and s390x targets.
15854
5544ad89
DJ
158552004-01-31 Daniel Jacobowitz <drow@mvista.com>
15856
15857 * linux-low.c: Update copyright year.
15858 (check_removed_breakpoint): Clear pending_is_breakpoint.
15859 (linux_set_resume_request, linux_queue_one_thread)
15860 (resume_status_pending_p): New functions.
15861 (linux_continue_one_thread): Use process->resume.
15862 (linux_resume): Only resume threads if there are no pending events.
15863 * linux-low.h (struct process_info): Add resume request
15864 pointer.
15865
2a68b70e
DJ
158662004-01-30 Daniel Jacobowitz <drow@mvista.com>
15867
15868 * regcache.c (new_register_cache): Clear the allocated register
15869 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15870
64386c31
DJ
158712003-10-13 Daniel Jacobowitz <drow@mvista.com>
15872
15873 * linux-low.c (linux_resume): Take a struct thread_resume *
15874 argument.
15875 (linux_wait): Update call.
15876 (resume_ptr): New static variable.
15877 (linux_continue_one_thread): Renamed from
15878 linux_continue_one_process. Use resume_ptr.
15879 (linux_resume): Use linux_continue_one_thread.
15880 * server.c (handle_v_cont, handle_v_requests): New functions.
15881 (myresume): New function.
15882 (main): Handle 'v' case.
15883 * target.h (struct thread_resume): New type.
15884 (struct target_ops): Change argument of "resume" to struct
15885 thread_resume *.
15886 (myresume): Delete macro.
15887
c938e9b0
L
158882003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15889
15890 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15891 (uninstall): Support DESTDIR.
15892
7f313d07
BC
15893Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15894
15895 * configure.srv: Add xscale*linux copy of arm*linux entry.
15896
3b2fc2ea
DJ
158972003-07-24 Daniel Jacobowitz <drow@mvista.com>
15898
15899 * linux-arm-low.c (arm_reinsert_addr): New function.
15900 (the_low_target): Add arm_reinsert_addr.
15901
1c0a559e
MK
159022003-07-08 Mark Kettenis <kettenis@gnu.org>
15903
15904 * mem-break.c: Remove whitespace at end of file.
15905
43d5792c
DJ
159062003-06-28 Daniel Jacobowitz <drow@mvista.com>
15907
15908 * configure.in: Check whether we need to prototype strerror.
15909 * server.h: Optionally prototype strerror.
15910 * gdbreplay.c (perror_with_name): Use strerror.
15911 * linux-low.c (linux_attach_lwp): Use strerror.
15912 * utils.c (perror_with_name): Use strerror.
15913 * config.in, configure: Regenerated.
15914
c8a86edf
DJ
159152003-06-28 Daniel Jacobowitz <drow@mvista.com>
15916
15917 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15918 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15919
73d37363
DJ
159202003-06-20 Daniel Jacobowitz <drow@mvista.com>
15921
15922 * Makefile.in (SFILES): Update.
15923 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15924 low-sun3.c: Remove files.
15925
6ad8ae5c
DJ
159262003-06-17 Daniel Jacobowitz <drow@mvista.com>
15927
15928 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15929 (linux_detach_one_process, linux_detach): New functions.
15930 (linux_target_ops): Add linux_detach.
15931 * server.c (main): Handle 'D' packet.
15932 * target.h (struct target_ops): Add "detach" member.
15933 (detach_inferior): Define.
15934
1581182a
MK
159352003-06-13 Mark Kettenis <kettenis@gnu.org>
15936
15937 From Kelley Cook <kelleycook@wideopenwest.com>:
15938 * configure.srv: Accept i[34567]86 variants.
15939
e5379b03
DJ
159402003-06-05 Daniel Jacobowitz <drow@mvista.com>
15941
15942 * linux-low.c (linux_wait_for_event): Correct comment typos.
15943 (linux_resume_one_process): Call check_removed_breakpoint.
15944 (linux_send_signal): New function.
15945 (linux_target_ops): Add linux_send_signal.
15946 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15947 of kill.
15948 * target.h (struct target_ops): Add send_signal.
15949
2ff29de4
JB
159502003-05-29 Jim Blandy <jimb@redhat.com>
15951
15952 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15953 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15954 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15955 away part of the register's value.
15956
254787d4
DJ
159572003-03-26 Daniel Jacobowitz <drow@mvista.com>
15958
15959 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15960 (linux_wait_for_event, linux_init_signals): Likewise.
15961
94e10508
DJ
159622003-03-17 Daniel Jacobowitz <drow@mvista.com>
15963
15964 * configure.in: Check for stdlib.h.
15965 * configure: Regenerated.
15966 * config.in: Regenerated.
15967
4c0711e0
DJ
159682003-01-04 Andreas Schwab <schwab@suse.de>
15969
15970 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15971
ef66e766
AC
159722003-01-02 Andrew Cagney <ac131313@redhat.com>
15973
15974 * Makefile.in: Remove obsolete code.
15975
a1358604
DJ
159762002-11-20 Daniel Jacobowitz <drow@mvista.com>
15977
15978 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15979 defined(PT_FPR0_HI).
15980
23ce3b1c
DJ
159812002-11-17 Stuart Hughes <seh@zee2.com>
15982
15983 * linux-arm-low.c (arm_num_regs): Increase.
15984 (arm_regmap): Include status register.
15985
159862002-11-17 Daniel Jacobowitz <drow@mvista.com>
15987
15988 * linux-low.c (register_addr): Remove incorrect -1 check.
15989
a9fa9f7d
DJ
159902002-08-29 Daniel Jacobowitz <drow@mvista.com>
15991
15992 * linux-low.c (linux_create_inferior): Call setpgid. Return
15993 the new PID.
15994 (unstopped_p, linux_signal_pid): Remove.
15995 (linux_target_ops): Remove linux_signal_pid.
15996 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15997 global instead of target method.
15998 * target.h (struct target_ops): Remove signal_pid. Update comment
15999 for create_inferior.
16000 * server.c (signal_pid): New variable.
16001 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16002 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16003 (attach_inferior): Set signal_pid.
16004
17574093
DJ
160052002-08-23 Daniel Jacobowitz <drow@mvista.com>
16006
16007 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16008
160092002-08-20 Jim Blandy <jimb@redhat.com>
16010
16011 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16012 default for this.
16013
160142002-08-01 Andrew Cagney <cagney@redhat.com>
16015
16016 * Makefile.in: Make chill references obsolete.
16017
160182002-07-24 Kevin Buettner <kevinb@redhat.com>
16019
16020 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16021 * configure: Regenerate.
16022 * config.in: Regenerate.
16023
160242002-07-09 David O'Brien <obrien@FreeBSD.org>
16025
16026 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16027 (perror_with_name, remote_close, remote_open, expect, play): Static.
16028
160292002-07-04 Michal Ludvig <mludvig@suse.cz>
16030
4b8dad4a 16031 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16032 byte offsets instead of an array of indexes.
16033 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16034
160352002-06-13 Daniel Jacobowitz <drow@mvista.com>
16036
16037 * regcache.c: Add comment.
16038
160392002-06-11 Daniel Jacobowitz <drow@mvista.com>
16040
16041 * thread-db.c: New file.
16042 * proc-service.c: New file.
16043 * acinclude.m4: New file.
16044 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16045 proc-service.o, and thread-db.o.
16046 (linux-low.o): Add USE_THREAD_DB.
16047 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16048 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16049 * aclocal.m4: Regenerated.
16050 * config.in: Regenerated.
16051 * configure: Regenerated.
16052 * configure.in: Check for proc_service.h, sys/procfs.h,
16053 thread_db.h, and linux/elf.h headrs.
16054 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16055 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16056 Check for -lthread_db and thread support.
16057 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16058 PowerPC, and SuperH.
16059 * i387-fp.c: Constify arguments.
16060 * i387-fp.h: Likewise.
16061 * inferiors.c: (struct thread_info): Renamed from
16062 `struct inferior_info'. Remove PID member. Use generic inferior
16063 list header. All uses updated.
16064 (inferiors, signal_pid): Removed.
16065 (all_threads): New variable.
16066 (get_thread): Define.
16067 (add_inferior_to_list): New function.
16068 (for_each_inferior): New function.
16069 (change_inferior_id): New function.
16070 (add_inferior): Removed.
16071 (remove_inferior): New function.
16072 (add_thread): New function.
16073 (free_one_thread): New function.
16074 (remove_thread): New function.
16075 (clear_inferiors): Use for_each_inferior and free_one_thread.
16076 (find_inferior): New function.
16077 (find_inferior_id): New function.
16078 (inferior_target_data): Update argument type.
16079 (set_inferior_target_data): Likewise.
16080 (inferior_regcache_data): Likewise.
16081 (set_inferior_regcache_data): Likewise.
16082 * linux-low.c (linux_bp_reinsert): Remove.
16083 (all_processes, stopping_threads, using_thrads)
16084 (struct pending_signals, debug_threads, pid_of): New.
16085 (inferior_pid): Replace with macro.
16086 (struct inferior_linux_data): Remove.
16087 (get_stop_pc, add_process): New functions.
16088 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16089 Use add_process and add_thread.
16090 (linux_attach_lwp): New function, based on old linux_attach. Use
16091 add_process and add_thread. Set stop_expected for new threads.
16092 (linux_attach): New function.
16093 (linux_kill_one_process): New function.
16094 (linux_kill): Kill all LWPs.
16095 (linux_thread_alive): Use find_inferior_id.
16096 (check_removed_breakpoints, status_pending_p): New functions.
16097 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16098 Update. Use WNOHANG. Wait for cloned processes also. Update process
16099 struct for the found process.
16100 (linux_wait_for_event): New function.
16101 (linux_wait): Use it. Support LWPs.
16102 (send_sigstop, wait_for_sigstop, stop_all_processes)
16103 (linux_resume_one_process, linux_continue_one_process): New functions.
16104 (linux_resume): Support LWPs.
16105 (REGISTER_RAW_SIZE): Remove.
16106 (fetch_register): Use register_size instead. Call supply_register.
16107 (usr_store_inferior_registers): Likewise. Call collect_register.
16108 Fix recursive case.
16109 (regsets_fetch_inferior_registers): Improve error message.
16110 (regsets_store_inferior_registers): Add debugging.
16111 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16112 (unstopped_p, linux_signal_pid): New functions.
16113 (linux_target_ops): Add linux_signal_pid.
16114 (linux_init_signals): New function.
16115 (initialize_low): Call it. Initialize using_threads.
16116 * regcache.c (inferior_regcache_data): Add valid
16117 flag.
16118 (get_regcache): Fetch registers lazily. Add fetch argument
16119 and update all callers.
16120 (regcache_invalidate_one, regcache_invalidate): New
16121 functions.
16122 (new_register_cache): Renamed from create_register_cache.
16123 Return the new regcache.
16124 (free_register_cache): Change argument to a void *.
16125 (registers_to_string, registers_from_string): Call get_regcache
16126 with fetch flag set.
16127 (register_data): Make static. Pass fetch flag to get_regcache.
16128 (supply_register): Call get_regcache with fetch flag clear.
16129 (collect_register): Call get_regcache with fetch flag set.
16130 (collect_register_as_string): New function.
16131 * regcache.h: Update.
16132 * remote-utils.c (putpkt): Flush after debug output and use
16133 stderr.
16134 Handle input interrupts while waiting for an ACK.
16135 (input_interrupt): Use signal_pid method.
16136 (getpkt): Flush after debug output and use stderr.
16137 (outreg): Use collect_register_as_string.
16138 (new_thread_notify, dead_thread_notify): New functions.
16139 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16140 and general_thread.
16141 (look_up_one_symbol): Flush after debug output.
16142 * server.c (step_thread, server_waiting): New variables.
16143 (start_inferior): Don't use signal_pid. Update call to mywait.
16144 (attach_inferior): Update call to mywait.
16145 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16146 (main): Don't fetch/store registers explicitly. Use
16147 set_desired_inferior. Support proposed ``Hs'' packet. Update
16148 calls to mywait.
16149 * server.h: Update.
16150 (struct inferior_list, struct_inferior_list_entry): New.
16151 * target.c (set_desired_inferior): New.
16152 (write_inferior_memory): Constify.
16153 (mywait): New function.
16154 * target.h: Update.
16155 (struct target_ops): New signal_pid method.
16156 (mywait): Removed macro, added prototype.
16157
16158 * linux-low.h (regset_func): Removed.
16159 (regset_fill_func, regset_store_func): New.
16160 (enum regset_type): New.
16161 (struct regset_info): Add type field. Use new operation types.
16162 (struct linux_target_ops): stop_pc renamed to get_pc.
16163 Add decr_pc_after_break and breakpoint_at.
16164 (get_process, get_thread_proess, get_process_thread)
16165 (strut process_info, all_processes, linux_attach_lwp)
16166 (thread_db_init): New.
16167
16168 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16169 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16170 (the_low_target): Add new members.
16171 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16172 (i386_store_fpxregset): Constify.
16173 (target_regsets): Add new kind identifier.
16174 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16175 (i386_set_pc): Add debugging.
16176 (i386_breakpoint_at): New function.
16177 (the_low_target): Add new members.
16178 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16179 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16180 (mips_breakpoint_at): New.
16181 (the_low_target): Add new members.
16182 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16183 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16184 (the_low_target): Add new members.
16185 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16186 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16187 (the_low_target): Add new members.
16188 * linux-x86-64-low.c (target_regsets): Add new kind
16189 identifier.
16190
161912002-05-15 Daniel Jacobowitz <drow@mvista.com>
16192
16193 From Martin Pool <mbp@samba.org>:
16194 * server.c (gdbserver_usage): New function.
16195 (main): Call it.
16196
161972002-05-14 Daniel Jacobowitz <drow@mvista.com>
16198
16199 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16200 stop_at -> stop_pc.
16201
162022002-05-04 Andrew Cagney <ac131313@redhat.com>
16203
16204 * Makefile.in: Remove obsolete code.
16205
162062002-04-24 Michal Ludvig <mludvig@suse.cz>
16207
16208 * linux-low.c (regsets_fetch_inferior_registers),
16209 (regsets_store_inferior_registers): Removed cast to int from
16210 ptrace() calls.
16211 * regcache.h: Added declaration of struct inferior_info.
16212
162132002-04-20 Daniel Jacobowitz <drow@mvista.com>
16214
16215 * inferiors.c (struct inferior_info): Add regcache_data.
16216 (add_inferior): Call create_register_cache.
16217 (clear_inferiors): Call free_register_cache.
16218 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16219 * regcache.c (struct inferior_regcache_data): New.
16220 (registers): Remove.
16221 (get_regcache): New function.
16222 (create_register_cache, free_register_cache): New functions.
16223 (set_register_cache): Don't initialize the register cache here.
16224 (registers_to_string, registers_from_string, register_data): Call
16225 get_regcache.
16226 * regcache.h: Add prototypes.
16227 * server.h: Likewise.
16228
162292002-04-20 Daniel Jacobowitz <drow@mvista.com>
16230
16231 * mem-break.c: New file.
16232 * mem-break.h: New file.
16233 * Makefile.in: Add mem-break.o rule; update server.h
16234 dependencies.
16235 * inferiors.c (struct inferior_info): Add target_data
16236 member.
16237 (clear_inferiors): Free target_data member if set.
16238 (inferior_target_data, set_inferior_target_data): New functions.
16239 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16240 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16241 * linux-low.c (linux_bp_reinsert): New variable.
16242 (struct inferior_linux_data): New.
16243 (linux_create_inferior): Use set_inferior_target_data.
16244 (linux_attach): Likewise. Call add_inferior.
16245 (linux_wait_for_one_inferior): New function.
16246 (linux_wait): Call it.
16247 (linux_write_memory): Add const.
16248 (initialize_low): Call set_breakpoint_data.
16249 * linux-low.h (struct linux_target_ops): Add breakpoint
16250 handling members.
16251 * server.c (attach_inferior): Remove extra add_inferior
16252 call.
16253 * server.h: Include mem-break.h. Update inferior.c
16254 prototypes.
16255 * target.c (read_inferior_memory)
16256 (write_inferior_memory): New functions.
16257 * target.h (read_inferior_memory)
16258 (write_inferior_memory): Change macros to prototypes.
16259 (struct target_ops): Update comments. Add const to write_memory
16260 definition.
16261
162622002-04-11 Daniel Jacobowitz <drow@mvista.com>
16263
16264 * linux-low.c (usr_store_inferior_registers): Support
16265 registers which are allowed to fail to store.
16266 * linux-low.h (linux_target_ops): Likewise.
16267 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16268 (ppc_cannot_store_register): FPSCR may not be storable.
16269
162702002-04-09 Daniel Jacobowitz <drow@mvista.com>
16271
16272 * server.h: Include <string.h> if HAVE_STRING_H.
16273 * ChangeLog: Correct paths in last ChangeLog entry.
16274
162752002-04-09 Daniel Jacobowitz <drow@mvista.com>
16276
16277 * linux-low.h: Remove obsolete prototypes.
16278 (struct linux_target_ops): New.
16279 (extern the_low_target): New.
16280 * linux-low.c (num_regs, regmap): Remove declarations.
16281 (register_addr): Use the_low_target explicitly.
16282 (fetch_register): Likewise.
16283 (usr_fetch_inferior_registers): Likewise.
16284 (usr_store_inferior_registers): Likewise.
16285 * linux-arm-low.c (num_regs): Remove.
16286 (arm_num_regs): Define.
16287 (arm_regmap): Renamed from regmap, made static.
16288 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16289 made static.
16290 (arm_cannot_store_register): Renamed from cannot_store_register,
16291 made static.
16292 (the_low_target): New.
16293 * linux-i386-low.c (num_regs): Remove.
16294 (i386_num_regs): Define.
16295 (i386_regmap): Renamed from regmap, made static.
16296 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16297 made static.
16298 (i386_cannot_store_register): Renamed from cannot_store_register,
16299 made static.
16300 (the_low_target): New.
16301 * linux-ia64-low.c (num_regs): Remove.
16302 (ia64_num_regs): Define.
16303 (ia64_regmap): Renamed from regmap, made static.
16304 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16305 made static.
16306 (ia64_cannot_store_register): Renamed from cannot_store_register,
16307 made static.
16308 (the_low_target): New.
16309 * linux-m68k-low.c (num_regs): Remove.
16310 (m68k_num_regs): Define.
16311 (m68k_regmap): Renamed from regmap, made static.
16312 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16313 made static.
16314 (m68k_cannot_store_register): Renamed from cannot_store_register,
16315 made static.
16316 (the_low_target): New.
16317 * linux-mips-low.c (num_regs): Remove.
16318 (mips_num_regs): Define.
16319 (mips_regmap): Renamed from regmap, made static.
16320 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16321 made static.
16322 (mips_cannot_store_register): Renamed from cannot_store_register,
16323 made static.
16324 (the_low_target): New.
16325 * linux-ppc-low.c (num_regs): Remove.
16326 (ppc_num_regs): Define.
16327 (ppc_regmap): Renamed from regmap, made static.
16328 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16329 made static.
16330 (ppc_cannot_store_register): Renamed from cannot_store_register,
16331 made static.
16332 (the_low_target): New.
16333 * linux-s390-low.c (num_regs): Remove.
16334 (s390_num_regs): Define.
16335 (s390_regmap): Renamed from regmap, made static.
16336 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16337 made static.
16338 (s390_cannot_store_register): Renamed from cannot_store_register,
16339 made static.
16340 (the_low_target): New.
16341 * linux-sh-low.c (num_regs): Remove.
16342 (sh_num_regs): Define.
16343 (sh_regmap): Renamed from regmap, made static.
16344 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16345 made static.
16346 (sh_cannot_store_register): Renamed from cannot_store_register,
16347 made static.
16348 (the_low_target): New.
16349 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16350 (the_low_target): New.
16351
163522002-04-09 Daniel Jacobowitz <drow@mvista.com>
16353
16354 * Makefile.in: Add stamp-h target.
16355 * configure.in: Create stamp-h.
16356 * configure: Regenerated.
16357
163582002-04-09 Daniel Jacobowitz <drow@mvista.com>
16359
16360 * inferiors.c: New file.
16361 * target.c: New file.
16362 * target.h: New file.
16363 * Makefile.in: Add target.o and inferiors.o. Update
16364 dependencies.
16365 * linux-low.c (inferior_pid): New static variable,
16366 moved from server.c.
16367 (linux_create_inferior): Renamed from create_inferior.
16368 Call add_inferior. Return 0 on success instead of a PID.
16369 (linux_attach): Renamed from myattach.
16370 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16371 (linux_thread_alive): Renamed from mythread_alive.
16372 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16373 child dies.
16374 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16375 (regsets_store_inferior_registers): Correct error message.
16376 Add missing ``return 0''.
16377 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16378 (linux_store_registers): Renamed from store_inferior_registers.
16379 (linux_read_memory): Renamed from read_inferior_memory.
16380 (linux_write_memory): Renamed from write_inferior_memory.
16381 (linux_target_ops): New structure.
16382 (initialize_low): Call set_target_ops ().
16383 * remote-utils.c (unhexify): New function.
16384 (hexify): New function.
16385 (input_interrupt): Send signals to ``signal_pid''.
16386 * server.c (inferior_pid): Remove.
16387 (start_inferior): Update create_inferior call.
16388 (attach_inferior): Call add_inferior.
16389 (handle_query): New function.
16390 (main): Call handle_query for `q' packets.
16391 * server.h: Include "target.h". Remove obsolete prototypes.
16392 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16393
163942002-04-09 Daniel Jacobowitz <drow@mvista.com>
16395
16396 * Makefile.in: Add WARN_CFLAGS. Update configury
16397 dependencies.
16398 * configure.in: Check for <string.h>
16399 * configure: Regenerate.
16400 * config.in: Regenerate.
16401 * gdbreplay.c: Include needed system headers.
16402 (remote_open): Remove strchr prototype.
16403 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16404 * regcache.c (supply_register): Change buf argument to const void *.
16405 (supply_register_by_name): Likewise.
16406 (collect_register): Change buf argument to void *.
16407 (collect_register_by_name): Likewise.
16408 * regcache.h: Add missing prototypes.
16409 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16410 * server.c (handle_query): New function.
16411 (attached): New static variable, moved out of main.
16412 (main): Quiet longjmp clobber warnings.
16413 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16414 * utils.c (error): Remove NORETURN.
16415 (fatal): Likewise.
This page took 2.147487 seconds and 4 git commands to generate.